X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47d67540a017101b3e46abe9ef0f55914d8de37e..520e470fdd0daef09c77938db642e4583933c90d:/src/common/memory.cpp?ds=sidebyside diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 304e9ce1ec..1d44a664e9 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -39,10 +39,14 @@ #if wxUSE_IOSTREAMH #include +#include #else #include +#include +# ifdef _MSC_VER + using namespace std; +# endif #endif -#include #if !defined(__WATCOMC__) && !defined(__VMS__) #include @@ -324,7 +328,7 @@ void wxMemStruct::PrintNode () { wxObject *obj = (wxObject *)m_actualData; wxClassInfo *info = obj->GetClassInfo(); - +/* if (info && info->GetClassName()) wxTrace("%s", info->GetClassName()); else @@ -333,13 +337,25 @@ void wxMemStruct::PrintNode () if (m_fileName) wxTrace(" (%s %d)", m_fileName, (int)m_lineNum); + wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); +*/ + // Let's put this in standard form so IDEs can load the file at the appropriate + // line + if (m_fileName) + wxTrace("%s(%d): ", m_fileName, (int)m_lineNum); + + if (info && info->GetClassName()) + wxTrace("%s", info->GetClassName()); + else + wxTrace("object"); + wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); } else { - wxTrace("Non-object data"); if (m_fileName) - wxTrace(" (%s %d)", m_fileName, (int)m_lineNum); + wxTrace("%s(%d): ", m_fileName, (int)m_lineNum); + wxTrace("non-object data"); wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); } } @@ -351,23 +367,19 @@ void wxMemStruct::Dump () if (m_isObject) { wxObject *obj = (wxObject *)m_actualData; -// wxClassInfo *info = obj->GetClassInfo(); if (m_fileName) - wxTrace("Item (%s %d)", m_fileName, (int)m_lineNum); - else - wxTrace("Item"); + wxTrace("%s(%d): ", m_fileName, (int)m_lineNum); - wxTrace(" at $%lX, size %d: ", (long)GetActualData(), (int)RequestSize()); -// wxTrace(info->GetClassName()); obj->Dump(wxDebugContext::GetStream()); + wxTrace(" at $%lX, size %d", (long)GetActualData(), (int)RequestSize()); wxTrace("\n"); } else { - wxTrace("Non-object data"); if (m_fileName) - wxTrace(" (%s %d)", m_fileName, (int)m_lineNum); + wxTrace("%s(%d): ", m_fileName, (int)m_lineNum); + wxTrace("non-object data"); wxTrace(" at $%lX, size %d\n", (long)GetActualData(), (int)RequestSize()); } }