mirror of
https://github.com/audacity/wxWidgets.git
synced 2025-12-10 21:09:32 -06:00
Don't truncate addresses under Win64 in wxDebugReport
Avoid casting addresses to "long", as it can be smaller than pointer size on some platforms and notably is under Win64. Use wxUIntPtr instead, which is guaranteed to be large enough. See https://github.com/wxWidgets/wxWidgets/pull/940
This commit is contained in:
parent
d173ccdb96
commit
fa1af3405c
@ -88,9 +88,9 @@ protected:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static inline void
|
||||
HexProperty(wxXmlNode *node, const wxChar *name, unsigned long value)
|
||||
HexProperty(wxXmlNode *node, const wxChar *name, wxUIntPtr value)
|
||||
{
|
||||
node->AddAttribute(name, wxString::Format(wxT("%08lx"), value));
|
||||
node->AddAttribute(name, wxString::Format(wxT("%#zx"), value));
|
||||
}
|
||||
|
||||
static inline void
|
||||
@ -134,7 +134,7 @@ void XmlStackWalker::OnStackFrame(const wxStackFrame& frame)
|
||||
nodeFrame->AddAttribute(wxT("function"), func);
|
||||
|
||||
HexProperty(nodeFrame, wxT("offset"), frame.GetOffset());
|
||||
HexProperty(nodeFrame, wxT("address"), reinterpret_cast<long unsigned int>(frame.GetAddress()));
|
||||
HexProperty(nodeFrame, wxT("address"), wxPtrToUInt(frame.GetAddress()));
|
||||
|
||||
wxString module = frame.GetModule();
|
||||
if ( !module.empty() )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user