summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@collabora.co.uk>2023-05-02 09:52:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-02 10:37:53 +0200
commitbcd233e45f1d793555e29522d1c30b67c574b628 (patch)
tree95bfb2274d01d28e4e1499c15312b09e4845680f /sal
parent7e74f2260b7d093c1b3bb6e362de1c52b5068cc6 (diff)
improve windows backtrace_to_string
I want to know the symbol address we actually capture, since we seem to getting duplicates in the output of SymFromAddr, I want to know if the fault is in SymFromAddr, or the backtrace capture call. Change-Id: Iece9c204abb780ae6b67a11e6ba77db816351e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/backtrace.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sal/osl/w32/backtrace.cxx b/sal/osl/w32/backtrace.cxx
index 8d55c6485a12..0b38d1962bc1 100644
--- a/sal/osl/w32/backtrace.cxx
+++ b/sal/osl/w32/backtrace.cxx
@@ -74,10 +74,11 @@ OUString sal::backtrace_to_string(BacktraceState* backtraceState)
OUStringBuffer aBuf;
for( int i = 0; i < nFrames; i++ )
{
- SymFromAddr( hProcess, reinterpret_cast<DWORD64>(backtraceState->buffer[ i ]), nullptr, pSymbol );
+ auto pSymAddr = reinterpret_cast<DWORD64>(backtraceState->buffer[ i ]);
+ SymFromAddr( hProcess, pSymAddr, nullptr, pSymbol );
aBuf.append( OUString::number(nFrames - i - 1) + ": " );
aBuf.appendAscii( pSymbol->Name );
- aBuf.append( " - 0x" + OUString::number(pSymbol->Address, 16) + "\n" );
+ aBuf.append( " - 0x" + OUString::number(pSymAddr, 16) + "\n" );
}
free( pSymbol );