DBG+GUI: workaround for slow dbghelp functions (see #747)
This commit is contained in:
parent
701ab86942
commit
449d04eec6
|
@ -12,6 +12,7 @@
|
|||
#include "module.h"
|
||||
#include "taskthread.h"
|
||||
#include "value.h"
|
||||
#include "comment.h"
|
||||
|
||||
#define PAGE_SHIFT (12)
|
||||
//#define PAGE_SIZE (4096)
|
||||
|
@ -237,10 +238,13 @@ void MemUpdateMap()
|
|||
EXCLUSIVE_ACQUIRE(LockMemoryPages);
|
||||
memoryPages.clear();
|
||||
|
||||
char comment[MAX_COMMENT_SIZE] = "";
|
||||
for(auto & page : pageVector)
|
||||
{
|
||||
duint start = (duint)page.mbi.BaseAddress;
|
||||
duint size = (duint)page.mbi.RegionSize;
|
||||
if(CommentGet(start, comment)) //user comments override info
|
||||
strncpy_s(page.info, comment, _TRUNCATE);
|
||||
memoryPages.insert(std::make_pair(std::make_pair(start, start + size - 1), page));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,14 +351,8 @@ void MemoryMapView::refreshMap()
|
|||
wS = QString((wMemMapStruct.page)[wI].info);
|
||||
setCellContent(wI, 2, wS);
|
||||
|
||||
// Content
|
||||
char comment_text[MAX_COMMENT_SIZE];
|
||||
comment_text[0] = '\0';
|
||||
if(DbgGetCommentAt((duint)wMbi.BaseAddress, comment_text) && comment_text[0] != '\1') // user comment present
|
||||
{
|
||||
wS = QString::fromUtf8(comment_text);
|
||||
}
|
||||
else if(wS.contains(".bss"))
|
||||
// Content TODO: proper section content analysis in dbg/memory.cpp:MemUpdateMap
|
||||
if(wS.contains(".bss"))
|
||||
wS = tr("Uninitialized data");
|
||||
else if(wS.contains(".data"))
|
||||
wS = tr("Initialized data");
|
||||
|
|
Loading…
Reference in New Issue