From d173ccdb9637b3163be600bc099ec71e3640c51f Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Thu, 20 Sep 2018 14:00:50 +0200 Subject: [PATCH] Add additional informations stack in wxDebugReport Always add offset and address of a stack element, even if there is no symbolic function name, as this can still be helpful. If possible add module as well. Closes https://github.com/wxWidgets/wxWidgets/pull/940 --- src/common/debugrpt.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/debugrpt.cpp b/src/common/debugrpt.cpp index 7de8af56dc..e2b6cc1e50 100644 --- a/src/common/debugrpt.cpp +++ b/src/common/debugrpt.cpp @@ -131,10 +131,14 @@ void XmlStackWalker::OnStackFrame(const wxStackFrame& frame) NumProperty(nodeFrame, wxT("level"), frame.GetLevel()); wxString func = frame.GetName(); if ( !func.empty() ) - { nodeFrame->AddAttribute(wxT("function"), func); - HexProperty(nodeFrame, wxT("offset"), frame.GetOffset()); - } + + HexProperty(nodeFrame, wxT("offset"), frame.GetOffset()); + HexProperty(nodeFrame, wxT("address"), reinterpret_cast(frame.GetAddress())); + + wxString module = frame.GetModule(); + if ( !module.empty() ) + nodeFrame->AddAttribute(wxT("module"), module); if ( frame.HasSourceLocation() ) {