1
0
Fork 0

DBG: The log now indicates the name of the breakpoint set (closes #1613) (#1662)

This commit is contained in:
pointerrrr 2017-07-27 22:53:09 +02:00 committed by Duncan Ogilvie
parent 3ff9122673
commit b758ea6e9d
2 changed files with 12 additions and 9 deletions

View File

@ -136,7 +136,10 @@ bool cbDebugSetBPX(int argc, char* argv[]) //bp addr [,name [,type]]
return false;
}
GuiUpdateAllViews();
dprintf(QT_TRANSLATE_NOOP("DBG", "Breakpoint at %p set!\n"), addr);
if(bpname)
dprintf(QT_TRANSLATE_NOOP("DBG", "Breakpoint at %p (%s) set!\n"), addr, bpname);
else
dprintf(QT_TRANSLATE_NOOP("DBG", "Breakpoint at %p set!\n"), addr);
return true;
}

View File

@ -1599,24 +1599,24 @@ static void cbCreateThread(CREATE_THREAD_DEBUG_INFO* CreateThread)
DWORD dwThreadId = ((DEBUG_EVENT*)GetDebugData())->dwThreadId;
hActiveThread = ThreadGetHandle(dwThreadId);
auto entry = duint(CreateThread->lpStartAddress);
if(settingboolget("Events", "ThreadEntry"))
{
String command;
command = StringUtils::sprintf("bp %p,\"%s %X\",ss", entry, GuiTranslateText(QT_TRANSLATE_NOOP("DBG", "Thread")), dwThreadId);
cmddirectexec(command.c_str());
}
PLUG_CB_CREATETHREAD callbackInfo;
callbackInfo.CreateThread = CreateThread;
callbackInfo.dwThreadId = dwThreadId;
plugincbcall(CB_CREATETHREAD, &callbackInfo);
auto entry = duint(CreateThread->lpStartAddress);
auto symbolic = SymGetSymbolicName(entry);
if(!symbolic.length())
symbolic = StringUtils::sprintf("%p", entry);
dprintf(QT_TRANSLATE_NOOP("DBG", "Thread %X created, Entry: %s\n"), dwThreadId, symbolic.c_str());
if(settingboolget("Events", "ThreadEntry"))
{
String command;
command = StringUtils::sprintf("bp %p,\"%s %X\",ss", entry, GuiTranslateText(QT_TRANSLATE_NOOP("DBG", "Thread Entry")), dwThreadId);
cmddirectexec(command.c_str());
}
if(settingboolget("Events", "ThreadStart"))
{
HistoryClear();