sal/osl/w32/backtrace.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit bcd233e45f1d793555e29522d1c30b67c574b628
Author:     Noel Grandin <noelgran...@collabora.co.uk>
AuthorDate: Tue May 2 09:52:43 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue May 2 10:37:53 2023 +0200

    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.gran...@collabora.co.uk>

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 );

Reply via email to