Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-09-02 02:23:29 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-09-02 02:23:29 +0300
commit2cc5eff9a2f524b13b37c13798c80e2b70c6d714 (patch)
tree24eda0e54a27d74fc28beae9d223352da7bb613b /public
parent8cc43284bd3518981adb2132d119bfc702b64a9c (diff)
Normalize symbol paths on libbacktrace systems.
Diffstat (limited to 'public')
-rw-r--r--public/client/TracyCallstack.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp
index 3a96fe5e..1e201f26 100644
--- a/public/client/TracyCallstack.cpp
+++ b/public/client/TracyCallstack.cpp
@@ -894,7 +894,8 @@ static int SymbolAddressDataCb( void* data, uintptr_t pc, uintptr_t lowaddr, con
}
else
{
- sym.file = CopyString( fn );
+ sym.file = NormalizePath( fn );
+ if( !sym.file ) sym.file = CopyString( fn );
sym.line = lineno;
sym.needFree = true;
}
@@ -934,7 +935,8 @@ static int CodeDataCb( void* data, uintptr_t pc, uintptr_t lowaddr, const char*
}
auto& sym = *(CallstackSymbolData*)data;
- sym.file = CopyString( fn );
+ sym.file = NormalizePath( fn );
+ if( !sym.file ) sym.file = CopyString( fn );
sym.line = lineno;
sym.needFree = true;
sym.symAddr = lowaddr;
@@ -1009,7 +1011,8 @@ static int CallstackDataCb( void* /*data*/, uintptr_t pc, uintptr_t lowaddr, con
const auto len = std::min<size_t>( strlen( function ), std::numeric_limits<uint16_t>::max() );
cb_data[cb_num].name = CopyStringFast( function, len );
- cb_data[cb_num].file = CopyStringFast( fn );
+ cb_data[cb_num].file = NormalizePath( fn );
+ if( !cb_data[cb_num].file ) cb_data[cb_num].file = CopyStringFast( fn );
cb_data[cb_num].line = lineno;
}