BRIDGE: removed CPU title API

GUI: added settings dialog
DBG: added settings (breaking at various callbacks)
DBG: remove singleshoot breakpoints from the database
DBG: safe dprintf function
DBG: set module + thread in window title
DBG: remove memory breakpoints from modules when unloaded
DBG: fixed a few bugs with the recent file list
This commit is contained in:
mr.exodia 2014-03-20 00:55:40 +01:00
parent 1ddb493df1
commit d4b6dd670c
23 changed files with 1094 additions and 112 deletions

1
.gitignore vendored
View File

@ -52,3 +52,4 @@ x64_dbg_gui/Project/Src/Bridge/x32_bridge.lib
x64_dbg_gui/Project/Src/Bridge/x64_bridge.lib
help/output/*
*.autosave
*.~vsd

View File

@ -570,6 +570,11 @@ BRIDGE_IMPEXP void DbgGetThreadList(THREADLIST* list)
_dbg_sendmessage(DBG_GET_THREAD_LIST, list, 0);
}
BRIDGE_IMPEXP void DbgSettingsUpdated()
{
_dbg_sendmessage(DBG_SETTINGS_UPDATED, 0, 0);
}
//GUI
BRIDGE_IMPEXP void GuiDisasmAt(duint addr, duint cip)
{
@ -620,11 +625,6 @@ BRIDGE_IMPEXP void GuiUpdateWindowTitle(const char* filename)
_gui_sendmessage(GUI_UPDATE_WINDOW_TITLE, (void*)filename, 0);
}
BRIDGE_IMPEXP void GuiUpdateCPUTitle(const char* modname)
{
_gui_sendmessage(GUI_UPDATE_CPU_TITLE, (void*)modname, 0);
}
BRIDGE_IMPEXP HWND GuiGetWindowHandle()
{
return (HWND)_gui_sendmessage(GUI_GET_WINDOW_HANDLE, 0, 0);
@ -759,6 +759,11 @@ BRIDGE_IMPEXP void GuiUpdateThreadView()
_gui_sendmessage(GUI_UPDATE_THREAD_VIEW, 0, 0);
}
BRIDGE_IMPEXP void GuiAddRecentFile(const char* file)
{
_gui_sendmessage(GUI_ADD_RECENT_FILE, (void*)file, 0);
}
//Main
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{

View File

@ -116,7 +116,8 @@ enum DBGMSG
DBG_MODBASE_FROM_NAME, // param1=const char* modname, param2=unused
DBG_DISASM_AT, // param1=duint addr, param2=DISASM_INSTR* instr
DBG_STACK_COMMENT_GET, // param1=duint addr, param2=STACK_COMMENT* comment
DBG_GET_THREAD_LIST // param1=THREADALLINFO* list, param2=unused
DBG_GET_THREAD_LIST, // param1=THREADALLINFO* list, param2=unused
DBG_SETTINGS_UPDATED // param1=unused, param2=unused
};
enum SCRIPTLINETYPE
@ -421,6 +422,7 @@ BRIDGE_IMPEXP duint DbgModBaseFromName(const char* name);
BRIDGE_IMPEXP void DbgDisasmAt(duint addr, DISASM_INSTR* instr);
BRIDGE_IMPEXP bool DbgStackCommentGet(duint addr, STACK_COMMENT* comment);
BRIDGE_IMPEXP void DbgGetThreadList(THREADLIST* list);
BRIDGE_IMPEXP void DbgSettingsUpdated();
//Gui enums
enum GUIMSG
@ -433,7 +435,6 @@ enum GUIMSG
GUI_UPDATE_DISASSEMBLY_VIEW, // param1=unused, param2=unused
GUI_UPDATE_BREAKPOINTS_VIEW, // param1=unused, param2=unused
GUI_UPDATE_WINDOW_TITLE, // param1=(const char*)file, param2=unused
GUI_UPDATE_CPU_TITLE, // param1=(const char*)mod, param2=unused
GUI_SET_INFO_LINE, // param1=(int)line, param2=(const char*)text
GUI_GET_WINDOW_HANDLE, // param1=unused, param2=unused
GUI_DUMP_AT, // param1=(duint)va param2=unused
@ -460,7 +461,8 @@ enum GUIMSG
GUI_REF_SETPROGRESS, // param1=int progress, param2=unused
GUI_STACK_DUMP_AT, // param1=duint addr, param2=duint csp
GUI_UPDATE_DUMP_VIEW, // param1=unused, param2=unused
GUI_UPDATE_THREAD_VIEW // param1=unused, param2=unused
GUI_UPDATE_THREAD_VIEW, // param1=unused, param2=unused
GUI_ADD_RECENT_FILE // param1=(const char*)file, param2=unused
};
//GUI structures
@ -481,7 +483,6 @@ BRIDGE_IMPEXP void GuiUpdateRegisterView();
BRIDGE_IMPEXP void GuiUpdateDisassemblyView();
BRIDGE_IMPEXP void GuiUpdateBreakpointsView();
BRIDGE_IMPEXP void GuiUpdateWindowTitle(const char* filename);
BRIDGE_IMPEXP void GuiUpdateCPUTitle(const char* modname);
BRIDGE_IMPEXP HWND GuiGetWindowHandle();
BRIDGE_IMPEXP void GuiDumpAt(duint va);
BRIDGE_IMPEXP void GuiScriptAdd(int count, const char** lines);
@ -508,6 +509,7 @@ BRIDGE_IMPEXP void GuiReferenceSetProgress(int progress);
BRIDGE_IMPEXP void GuiStackDumpAt(duint addr, duint csp);
BRIDGE_IMPEXP void GuiUpdateDumpView();
BRIDGE_IMPEXP void GuiUpdateThreadView();
BRIDGE_IMPEXP void GuiAddRecentFile(const char* file);
#ifdef __cplusplus
}

View File

@ -626,6 +626,39 @@ extern "C" DLL_EXPORT uint _dbg_sendmessage(DBGMSG type, void* param1, void* par
threadgetlist((THREADLIST*)param1);
}
break;
case DBG_SETTINGS_UPDATED:
{
uint setting;
if(BridgeSettingGetUint("Engine", "CalculationType", &setting))
{
switch(setting)
{
case 0: //calc_signed
valuesetsignedcalc(true);
break;
case 1: //calc_unsigned
valuesetsignedcalc(false);
break;
}
}
if(BridgeSettingGetUint("Engine", "BreakpointType", &setting))
{
switch(setting)
{
case 0: //break_int3short
SetBPXOptions(UE_BREAKPOINT_INT3);
break;
case 1: //break_int3long
SetBPXOptions(UE_BREAKPOINT_LONG_INT3);
break;
case 2: //break_ud2
SetBPXOptions(UE_BREAKPOINT_UD2);
break;
}
}
}
break;
}
return 0;
}

View File

@ -179,3 +179,13 @@ bool GetFileNameFromHandle(HANDLE hFile, char* szFileName)
CloseHandle(hFileMap);
return false;
}
bool settingboolget(const char* section, const char* name)
{
uint setting;
if(!BridgeSettingGetUint(section, name, &setting))
return false;
if(setting)
return true;
return false;
}

View File

@ -109,5 +109,6 @@ bool DirExists(const char* dir);
bool DevicePathToPath(const char* devicepath, char* path, size_t path_size);
bool PathToDevicePath(const char* path, char* devicepath, size_t devicepath_size);
bool GetFileNameFromHandle(HANDLE hFile, char* szFileName);
bool settingboolget(const char* section, const char* name);
#endif // _GLOBAL_H

View File

@ -59,6 +59,9 @@ void dbclose()
//NOTE: remove breakpoints without module
if(!sqlexec(userdb, "DELETE FROM breakpoints WHERE mod IS NULL"))
dprintf("SQL Error: %s\n", sqllasterror());
//NOTE: remove singleshoot breakpoints (mostly temporary breakpoints)
if(!sqlexec(userdb, "DELETE FROM breakpoints WHERE singleshoot=1 AND type=0"))
dprintf("SQL Error: %s\n", sqllasterror());
dbsave();
wait(WAITID_USERDB); //wait for the SQLite operation to complete before closing
lock(WAITID_USERDB);

View File

@ -319,4 +319,4 @@ void bptobridge(const BREAKPOINT* bp, BRIDGEBP* bridge)
default:
bridge->type=bp_none;
}
}
}

View File

@ -7,9 +7,9 @@
//enums
enum BP_TYPE
{
BPNORMAL,
BPHARDWARE,
BPMEMORY
BPNORMAL=0,
BPHARDWARE=1,
BPMEMORY=2
};
//structs

View File

@ -1,5 +1,7 @@
#include "console.h"
static char msg[66000];
void dputs(const char* text)
{
dprintf("%s\n", text);
@ -9,7 +11,7 @@ void dprintf(const char* format, ...)
{
va_list args;
va_start(args, format);
char msg[deflen]="";
vsprintf(msg, format, args);
*msg=0;
vsnprintf(msg, sizeof(msg), format, args);
GuiAddLogMessage(msg);
}

View File

@ -84,7 +84,9 @@ void DebugUpdateGui(uint disasm_addr, bool stack)
char modname[MAX_MODULE_SIZE]="";
if(!modnamefromaddr(disasm_addr, modname, true))
*modname=0;
GuiUpdateCPUTitle(modname);
char title[1024]="";
sprintf(title, "File: %s - PID: %X - Module: %s - Thread: %X", szBaseFileName, fdProcessInfo->dwProcessId, modname, ((DEBUG_EVENT*)GetDebugData())->dwThreadId);
GuiUpdateWindowTitle(title);
GuiUpdateAllViews();
}
@ -378,6 +380,8 @@ static bool cbRemoveModuleBreakpoints(const BREAKPOINT* bp)
DeleteBPX(bp->addr);
break;
case BPMEMORY:
if(bp->enabled)
RemoveMemoryBPX(bp->addr, 0);
break;
case BPHARDWARE:
if(bp->enabled)
@ -478,28 +482,35 @@ static void cbCreateProcess(CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo)
bpenumall(cbSetModuleBreakpoints, modname);
if(!bFileIsDll and !bIsAttached) //Set entry breakpoint
{
pDebuggedBase=(uint)CreateProcessInfo->lpBaseOfImage; //debugged base = executable
char command[256]="";
sprintf(command, "bp "fhex",\"entry breakpoint\",ss", CreateProcessInfo->lpStartAddress);
cmddirectexec(dbggetcommandlist(), command);
pDebuggedBase=(uint)CreateProcessInfo->lpBaseOfImage;
DWORD NumberOfCallBacks=0;
TLSGrabCallBackData(DebugFileName, 0, &NumberOfCallBacks);
if(NumberOfCallBacks)
if(settingboolget("Events", "TlsCallbacks"))
{
dprintf("TLS Callbacks: %d\n", NumberOfCallBacks);
uint* TLSCallBacks=(uint*)emalloc(NumberOfCallBacks*sizeof(uint), "cbCreateProcess:TLSCallBacks");
if(!TLSGrabCallBackData(DebugFileName, TLSCallBacks, &NumberOfCallBacks))
dputs("failed to get TLS callback addresses!");
else
DWORD NumberOfCallBacks=0;
TLSGrabCallBackData(DebugFileName, 0, &NumberOfCallBacks);
if(NumberOfCallBacks)
{
for(int i=0; i<NumberOfCallBacks; i++)
dprintf("TLS Callbacks: %d\n", NumberOfCallBacks);
uint* TLSCallBacks=(uint*)emalloc(NumberOfCallBacks*sizeof(uint), "cbCreateProcess:TLSCallBacks");
if(!TLSGrabCallBackData(DebugFileName, TLSCallBacks, &NumberOfCallBacks))
dputs("failed to get TLS callback addresses!");
else
{
sprintf(command, "bp "fhex",\"TLS Callback %d\",ss", TLSCallBacks[i], i+1);
cmddirectexec(dbggetcommandlist(), command);
for(int i=0; i<NumberOfCallBacks; i++)
{
sprintf(command, "bp "fhex",\"TLS Callback %d\",ss", TLSCallBacks[i], i+1);
cmddirectexec(dbggetcommandlist(), command);
}
}
efree(TLSCallBacks, "cbCreateProcess:TLSCallBacks");
}
efree(TLSCallBacks, "cbCreateProcess:TLSCallBacks");
}
if(settingboolget("Events", "EntryBreakpoint"))
{
sprintf(command, "bp "fhex",\"entry breakpoint\",ss", CreateProcessInfo->lpStartAddress);
cmddirectexec(dbggetcommandlist(), command);
}
}
GuiUpdateBreakpointsView();
@ -535,6 +546,28 @@ static void cbCreateThread(CREATE_THREAD_DEBUG_INFO* CreateThread)
PLUG_CB_CREATETHREAD callbackInfo;
callbackInfo.CreateThread=CreateThread;
plugincbcall(CB_CREATETHREAD, &callbackInfo);
DWORD dwThreadId=((DEBUG_EVENT*)GetDebugData())->dwThreadId;
dprintf("Thread %X created\n", dwThreadId);
if(settingboolget("Events", "ThreadStart"))
{
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
if(settingboolget("Events", "ThreadEntry"))
{
char command[256]="";
sprintf(command, "bp "fhex",\"Thread %X\",ss", CreateThread->lpStartAddress, dwThreadId);
cmddirectexec(dbggetcommandlist(), command);
}
}
static void cbExitThread(EXIT_THREAD_DEBUG_INFO* ExitThread)
@ -545,28 +578,45 @@ static void cbExitThread(EXIT_THREAD_DEBUG_INFO* ExitThread)
callbackInfo.dwThreadId=dwThreadId;
plugincbcall(CB_EXITTHREAD, &callbackInfo);
threadexit(dwThreadId);
dprintf("Thread %X exit\n", dwThreadId);
if(settingboolget("Events", "ThreadEnd"))
{
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
}
static void cbSystemBreakpoint(void* ExceptionData)
{
//log message
dputs("system breakpoint reached!");
bSkipExceptions=false; //we are not skipping first-chance exceptions
//plugin callbacks
PLUG_CB_SYSTEMBREAKPOINT callbackInfo;
callbackInfo.reserved=0;
//TODO: handle stuff (TLS, main entry, etc)
//log message
dputs("system breakpoint reached!");
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
bSkipExceptions=false;
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
plugincbcall(CB_SYSTEMBREAKPOINT, &callbackInfo);
wait(WAITID_RUN);
if(settingboolget("Events", "SystemBreakpoint"))
{
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
}
static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
@ -593,18 +643,44 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
{
pDebuggedBase=(uint)base;
char command[256]="";
sprintf(command, "bp "fhex",\"entry breakpoint\",ss", pDebuggedBase+pDebuggedEntry);
cmddirectexec(dbggetcommandlist(), command);
//SetBPX(pDebuggedBase+pDebuggedEntry, UE_SINGLESHOOT, (void*)cbEntryBreakpoint);
if(settingboolget("Events", "EntryBreakpoint"))
{
sprintf(command, "bp "fhex",\"entry breakpoint\",ss", pDebuggedBase+pDebuggedEntry);
cmddirectexec(dbggetcommandlist(), command);
}
}
GuiUpdateBreakpointsView();
//TODO: plugin callback
//plugin callback
PLUG_CB_LOADDLL callbackInfo;
callbackInfo.LoadDll=LoadDll;
callbackInfo.modInfo=&modInfo;
callbackInfo.modname=modname;
plugincbcall(CB_LOADDLL, &callbackInfo);
if(settingboolget("Events", "DllLoad"))
{
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
if(settingboolget("Events", "DllEntry"))
{
uint oep=GetPE32Data(DLLDebugFileName, 0, UE_OEP);
if(oep)
{
char command[256]="";
sprintf(command, "bp "fhex",\"DllMain (%s)\",ss", oep+(uint)base, modname);
cmddirectexec(dbggetcommandlist(), command);
}
}
}
static void cbUnloadDll(UNLOAD_DLL_DEBUG_INFO* UnloadDll)
@ -620,14 +696,47 @@ static void cbUnloadDll(UNLOAD_DLL_DEBUG_INFO* UnloadDll)
bpenumall(cbRemoveModuleBreakpoints, modname);
SymUnloadModule64(fdProcessInfo->hProcess, (DWORD64)base);
dprintf("DLL Unloaded: "fhex" %s\n", base, modname);
if(settingboolget("Events", "DllÙnload"))
{
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
}
static void cbOutputDebugString(OUTPUT_DEBUG_STRING_INFO* DebugString)
{
//TODO: handle debug strings
PLUG_CB_OUTPUTDEBUGSTRING callbackInfo;
callbackInfo.DebugString=DebugString;
plugincbcall(CB_OUTPUTDEBUGSTRING, &callbackInfo);
if(!DebugString->fUnicode) //ASCII
{
char* DebugText=(char*)emalloc(DebugString->nDebugStringLength+1, "cbOutputDebugString:DebugText");
memset(DebugText, 0, DebugString->nDebugStringLength+1);
if(memread(fdProcessInfo->hProcess, DebugString->lpDebugStringData, DebugText, DebugString->nDebugStringLength, 0))
dprintf("DebugString: \"%s\"\n", DebugText);
efree(DebugText, "cbOutputDebugString:DebugText");
}
if(settingboolget("Events", "DebugStrings"))
{
//update GUI
DebugUpdateGui(GetContextData(UE_CIP), true);
GuiSetDebugState(paused);
//lock
lock(WAITID_RUN);
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
}
static void cbException(EXCEPTION_DEBUG_INFO* ExceptionData)
@ -723,7 +832,7 @@ static DWORD WINAPI threadDebugLoop(void* lpParameter)
unlock(WAITID_STOP);
return 0;
}
BridgeSettingSet("Recent Files", "01", szFileName);
GuiAddRecentFile(szFileName);
varset("$hp", (uint)fdProcessInfo->hProcess, true);
varset("$pid", fdProcessInfo->dwProcessId, true);
ecount=0;
@ -753,8 +862,6 @@ static DWORD WINAPI threadDebugLoop(void* lpParameter)
plugincbcall(CB_INITDEBUG, &initInfo);
//run debug loop (returns when process debugging is stopped)
DebugLoop();
//remove entry breakpoint from database
bpdel(pDebuggedBase+pDebuggedEntry, BPNORMAL);
//call plugin callback
PLUG_CB_STOPDEBUG stopInfo;
stopInfo.reserved=0;
@ -870,20 +977,24 @@ CMDRESULT cbDebugSetBPXOptions(int argc, char* argv[])
if(!argget(*argv, argtype, 0, false))
return STATUS_ERROR;
const char* a=0;
uint setting_type;
if(strstr(argtype, "long"))
{
setting_type=1; //break_int3long
a="TYPE_LONG_INT3";
type=UE_BREAKPOINT_TYPE_LONG_INT3;
type=UE_BREAKPOINT_LONG_INT3;
}
else if(strstr(argtype, "ud2"))
{
setting_type=2; //break_ud2
a="TYPE_UD2";
type=UE_BREAKPOINT_TYPE_UD2;
type=UE_BREAKPOINT_UD2;
}
else if(strstr(argtype, "short"))
{
setting_type=0; //break_int3short
a="TYPE_INT3";
type=UE_BREAKPOINT_TYPE_INT3;
type=UE_BREAKPOINT_INT3;
}
else
{
@ -891,6 +1002,7 @@ CMDRESULT cbDebugSetBPXOptions(int argc, char* argv[])
return STATUS_ERROR;
}
SetBPXOptions(type);
BridgeSettingSetUint("Engine", "BreakpointType", setting_type);
dprintf("default breakpoint type set to: %s\n", a);
return STATUS_CONTINUE;
}
@ -940,9 +1052,24 @@ CMDRESULT cbDebugSetBPX(int argc, char* argv[]) //bp addr [,name [,type]]
dputs("breakpoint already set!");
return STATUS_CONTINUE;
}
if(IsBPXEnabled(addr) or !memread(fdProcessInfo->hProcess, (void*)addr, &oldbytes, sizeof(short), 0) or !SetBPX(addr, type, (void*)cbUserBreakpoint) or !bpnew(addr, true, singleshoot, oldbytes, BPNORMAL, type, bpname))
if(IsBPXEnabled(addr))
{
dprintf("error setting breakpoint at "fhex"!\n", addr);
dprintf("error setting breakpoint at "fhex"!\n (IsBPXEnabled)", addr);
return STATUS_ERROR;
}
else if(!memread(fdProcessInfo->hProcess, (void*)addr, &oldbytes, sizeof(short), 0))
{
dprintf("error setting breakpoint at "fhex"!\n (memread)", addr);
return STATUS_ERROR;
}
else if(!SetBPX(addr, type, (void*)cbUserBreakpoint))
{
dprintf("error setting breakpoint at "fhex"! (SetBPX)\n", addr);
return STATUS_ERROR;
}
else if(!bpnew(addr, true, singleshoot, oldbytes, BPNORMAL, type, bpname))
{
dprintf("error setting breakpoint at "fhex"!\n (bpnew)", addr);
return STATUS_ERROR;
}
dprintf("breakpoint at "fhex" set!\n", addr);

View File

@ -57,7 +57,8 @@ SOURCES += \
Src/BasicView/RegistersView.cpp \
Src/BasicView/SearchListView.cpp \
Src/BasicView/ReferenceView.cpp \
Src/BasicView/ThreadView.cpp
Src/BasicView/ThreadView.cpp \
Src/Gui/SettingsDialog.cpp
HEADERS += \
@ -95,7 +96,8 @@ HEADERS += \
Src/BasicView/SymbolView.h \
Src/BasicView/SearchListView.h \
Src/BasicView/ReferenceView.h \
Src/BasicView/ThreadView.h
Src/BasicView/ThreadView.h \
Src/Gui/SettingsDialog.h
INCLUDEPATH += \
Src \
@ -117,7 +119,8 @@ FORMS += \
Src/BasicView/WordEditDialog.ui \
Src/BasicView/LineEditDialog.ui \
Src/BasicView/SymbolView.ui \
Src/BasicView/SearchListView.ui
Src/BasicView/SearchListView.ui \
Src/Gui/SettingsDialog.ui
INCLUDEPATH += $$PWD/Src/Bridge

View File

@ -77,11 +77,6 @@ void Bridge::emitUpdateWindowTitle(QString filename)
emit updateWindowTitle(filename);
}
void Bridge::emitUpdateCPUTitle(QString modname)
{
emit updateCPUTitle(modname);
}
void Bridge::emitSetInfoLine(int line, QString text)
{
emit setInfoLine(line, text);
@ -220,6 +215,11 @@ void Bridge::emitUpdateThreads()
emit updateThreads();
}
void Bridge::emitAddRecentFile(QString file)
{
emit addRecentFile(file);
}
/************************************************************************************
Static Functions
************************************************************************************/
@ -293,12 +293,6 @@ __declspec(dllexport) void* _gui_sendmessage(GUIMSG type, void* param1, void* pa
}
break;
case GUI_UPDATE_CPU_TITLE:
{
Bridge::getBridge()->emitUpdateCPUTitle(QString(reinterpret_cast<const char*>(param1)));
}
break;
case GUI_SET_INFO_LINE:
{
Bridge::getBridge()->emitSetInfoLine((int)(int_t)param1, QString(reinterpret_cast<const char*>(param2)));
@ -462,6 +456,12 @@ __declspec(dllexport) void* _gui_sendmessage(GUIMSG type, void* param1, void* pa
}
break;
case GUI_ADD_RECENT_FILE:
{
Bridge::getBridge()->emitAddRecentFile(QString(reinterpret_cast<const char*>(param1)));
}
break;
default:
{
}

View File

@ -34,7 +34,6 @@ public:
void emitUpdateRegisters();
void emitUpdateBreakpoints();
void emitUpdateWindowTitle(QString filename);
void emitUpdateCPUTitle(QString modname);
void emitSetInfoLine(int line, QString text);
void emitClearInfoBox();
void emitDumpAt(int_t va);
@ -60,6 +59,7 @@ public:
void emitStackDumpAt(uint_t va, uint_t csp);
void emitUpdateDump();
void emitUpdateThreads();
void emitAddRecentFile(QString file);
//Public variables
void* winId;
@ -76,7 +76,6 @@ signals:
void updateRegisters();
void updateBreakpoints();
void updateWindowTitle(QString filename);
void updateCPUTitle(QString modname);
void setInfoLine(int line, QString text);
void dumpAt(int_t va);
void scriptAdd(int count, const char** lines);
@ -101,6 +100,7 @@ signals:
void stackDumpAt(uint_t va, uint_t csp);
void updateDump();
void updateThreads();
void addRecentFile(QString file);
private:
QMutex mBridgeMutex;

View File

@ -125,9 +125,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
connect(mSymbolView,SIGNAL(showCpu()),this,SLOT(displayCpuWidget()));
connect(ui->actionReferences,SIGNAL(triggered()),this,SLOT(displayReferencesWidget()));
connect(ui->actionThreads,SIGNAL(triggered()),this,SLOT(displayThreadsWidget()));
connect(ui->actionSettings,SIGNAL(triggered()),this,SLOT(openSettings()));
connect(Bridge::getBridge(), SIGNAL(updateWindowTitle(QString)), this, SLOT(updateWindowTitleSlot(QString)));
connect(Bridge::getBridge(), SIGNAL(updateCPUTitle(QString)), this, SLOT(updateCPUTitleSlot(QString)));
connect(Bridge::getBridge(), SIGNAL(addRecentFile(QString)), this, SLOT(addRecentFile(QString)));
const char* errormsg=DbgInit();
if(errormsg)
@ -165,7 +166,8 @@ void MainWindow::loadMRUList(int maxItems)
char currentFile[MAX_PATH]="";
if(!BridgeSettingGet("Recent Files", QString().sprintf("%.2d", i+1).toUtf8().constData(), currentFile))
break;
mMRUList.push_back(currentFile);
if(QString(currentFile).size())
mMRUList.push_back(currentFile);
}
updateMRUMenu();
}
@ -180,6 +182,8 @@ void MainWindow::saveMRUList()
void MainWindow::addMRUEntry(QString entry)
{
if(!entry.size())
return;
//remove duplicate entry if it exists
removeMRUEntry(entry);
mMRUList.insert(mMRUList.begin(), entry);
@ -189,6 +193,8 @@ void MainWindow::addMRUEntry(QString entry)
void MainWindow::removeMRUEntry(QString entry)
{
if(!entry.size())
return;
std::vector<QString>::iterator it;
for (it = mMRUList.begin(); it != mMRUList.end(); ++it)
@ -450,14 +456,6 @@ void MainWindow::updateWindowTitleSlot(QString filename)
setWindowTitle(QString(mWindowMainTitle));
}
void MainWindow::updateCPUTitleSlot(QString modname)
{
if(modname.length())
mCpuWidget->setWindowTitle(QString("CPU - ")+modname);
else
mCpuWidget->setWindowTitle(QString("CPU"));
}
void MainWindow::execeStepOver()
{
DbgCmdExec("eStepOver");
@ -504,3 +502,16 @@ void MainWindow::displayThreadsWidget()
mThreadView->setFocus();
setTab(mThreadView);
}
void MainWindow::openSettings()
{
SettingsDialog settings(this);
settings.exec();
}
void MainWindow::addRecentFile(QString file)
{
addMRUEntry(file);
updateMRUMenu();
saveMRUList();
}

View File

@ -16,6 +16,7 @@
#include "SymbolView.h"
#include "ReferenceView.h"
#include "ThreadView.h"
#include "SettingsDialog.h"
namespace Ui {
class MainWindow;
@ -48,7 +49,6 @@ public slots:
void restartDebugging();
void displayBreakpointWidget();
void updateWindowTitleSlot(QString filename);
void updateCPUTitleSlot(QString modname);
void execeStepOver();
void execeStepInto();
void execeRun();
@ -57,6 +57,8 @@ public slots:
void displaySymbolWidget();
void displayReferencesWidget();
void displayThreadsWidget();
void openSettings();
void addRecentFile(QString file);
private:
Ui::MainWindow *ui;

View File

@ -28,11 +28,11 @@
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
<string>&amp;File</string>
</property>
<widget class="QMenu" name="menuRecent_Files">
<property name="title">
<string>Recent Files</string>
<string>&amp;Recent Files</string>
</property>
<addaction name="separator"/>
</widget>
@ -43,7 +43,7 @@
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View</string>
<string>&amp;View</string>
</property>
<addaction name="actionCpu"/>
<addaction name="actionMemoryMap"/>
@ -56,7 +56,7 @@
</widget>
<widget class="QMenu" name="menuDebug">
<property name="title">
<string>Debug</string>
<string>&amp;Debug</string>
</property>
<addaction name="actionRun"/>
<addaction name="actioneRun"/>
@ -76,20 +76,27 @@
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
<string>&amp;Help</string>
</property>
<addaction name="actionAbout"/>
</widget>
<widget class="QMenu" name="menuPlugins">
<property name="title">
<string>Plugins</string>
<string>&amp;Plugins</string>
</property>
<addaction name="actionScylla"/>
</widget>
<widget class="QMenu" name="menuOptions">
<property name="title">
<string>&amp;Options</string>
</property>
<addaction name="actionSettings"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuView"/>
<addaction name="menuDebug"/>
<addaction name="menuPlugins"/>
<addaction name="menuOptions"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QToolBar" name="mainToolBar">
@ -155,7 +162,7 @@
<normaloff>:/icons/images/folder-horizontal-open.png</normaloff>:/icons/images/folder-horizontal-open.png</iconset>
</property>
<property name="text">
<string>Open</string>
<string>&amp;Open</string>
</property>
<property name="shortcut">
<string>F3</string>
@ -167,7 +174,7 @@
<normaloff>:/icons/images/control-exit.png</normaloff>:/icons/images/control-exit.png</iconset>
</property>
<property name="text">
<string>Exit</string>
<string>E&amp;xit</string>
</property>
<property name="shortcut">
<string>Alt+X</string>
@ -179,7 +186,7 @@
<normaloff>:/icons/images/arrow-run.png</normaloff>:/icons/images/arrow-run.png</iconset>
</property>
<property name="text">
<string>Run</string>
<string>&amp;Run</string>
</property>
<property name="shortcut">
<string>F9</string>
@ -191,7 +198,7 @@
<normaloff>:/icons/images/control-pause.png</normaloff>:/icons/images/control-pause.png</iconset>
</property>
<property name="text">
<string>Pause</string>
<string>&amp;Pause</string>
</property>
<property name="shortcut">
<string>F12</string>
@ -203,7 +210,7 @@
<normaloff>:/icons/images/arrow-restart.png</normaloff>:/icons/images/arrow-restart.png</iconset>
</property>
<property name="text">
<string>Restart</string>
<string>Re&amp;start</string>
</property>
<property name="shortcut">
<string>Ctrl+F2</string>
@ -215,7 +222,7 @@
<normaloff>:/icons/images/control-stop.png</normaloff>:/icons/images/control-stop.png</iconset>
</property>
<property name="text">
<string>Close</string>
<string>&amp;Close</string>
</property>
<property name="shortcut">
<string>Alt+F2</string>
@ -227,7 +234,7 @@
<normaloff>:/icons/images/arrow-step-into.png</normaloff>:/icons/images/arrow-step-into.png</iconset>
</property>
<property name="text">
<string>Step into</string>
<string>Step &amp;into</string>
</property>
<property name="shortcut">
<string>F7</string>
@ -239,7 +246,7 @@
<normaloff>:/icons/images/arrow-step-over.png</normaloff>:/icons/images/arrow-step-over.png</iconset>
</property>
<property name="text">
<string>Step over</string>
<string>Step &amp;over</string>
</property>
<property name="shortcut">
<string>F8</string>
@ -251,7 +258,7 @@
<normaloff>:/icons/images/terminal-command.png</normaloff>:/icons/images/terminal-command.png</iconset>
</property>
<property name="text">
<string>Command</string>
<string>Co&amp;mmand</string>
</property>
<property name="shortcut">
<string>Ctrl+Return</string>
@ -263,7 +270,7 @@
<normaloff>:/icons/images/arrow-step-rtr.png</normaloff>:/icons/images/arrow-step-rtr.png</iconset>
</property>
<property name="text">
<string>Execute till return</string>
<string>E&amp;xecute till return</string>
</property>
<property name="shortcut">
<string>Ctrl+F9</string>
@ -275,7 +282,7 @@
<normaloff>:/icons/images/memory-map.png</normaloff>:/icons/images/memory-map.png</iconset>
</property>
<property name="text">
<string>Memory Map</string>
<string>&amp;Memory Map</string>
</property>
<property name="shortcut">
<string>Alt+M</string>
@ -287,7 +294,7 @@
<normaloff>:/icons/images/log.png</normaloff>:/icons/images/log.png</iconset>
</property>
<property name="text">
<string>Log Window</string>
<string>&amp;Log Window</string>
</property>
<property name="shortcut">
<string>Alt+L</string>
@ -320,7 +327,7 @@
<normaloff>:/icons/images/breakpoint.png</normaloff>:/icons/images/breakpoint.png</iconset>
</property>
<property name="text">
<string>Breakpoints</string>
<string>&amp;Breakpoints</string>
</property>
<property name="shortcut">
<string>Alt+B</string>
@ -356,7 +363,7 @@
<normaloff>:/icons/images/arrow-run.png</normaloff>:/icons/images/arrow-run.png</iconset>
</property>
<property name="text">
<string>Run (skip exceptions)</string>
<string>Run (&amp;skip exceptions)</string>
</property>
<property name="shortcut">
<string>Shift+F9</string>
@ -380,7 +387,7 @@
<normaloff>:/icons/images/script-code.png</normaloff>:/icons/images/script-code.png</iconset>
</property>
<property name="text">
<string>Script</string>
<string>&amp;Script</string>
</property>
<property name="toolTip">
<string>Script</string>
@ -395,7 +402,7 @@
<normaloff>:/icons/images/arrow-run-cursor.png</normaloff>:/icons/images/arrow-run-cursor.png</iconset>
</property>
<property name="text">
<string>Run until selection</string>
<string>Run &amp;until selection</string>
</property>
<property name="toolTip">
<string>Run until selection</string>
@ -410,7 +417,7 @@
<normaloff>:/icons/images/processor-cpu.png</normaloff>:/icons/images/processor-cpu.png</iconset>
</property>
<property name="text">
<string>CPU</string>
<string>&amp;CPU</string>
</property>
<property name="toolTip">
<string>CPU</string>
@ -425,7 +432,7 @@
<normaloff>:/icons/images/pdb.png</normaloff>:/icons/images/pdb.png</iconset>
</property>
<property name="text">
<string>Symbol Info</string>
<string>Symbol &amp;Info</string>
</property>
<property name="toolTip">
<string>Symbol Info</string>
@ -440,7 +447,7 @@
<normaloff>:/icons/images/search.png</normaloff>:/icons/images/search.png</iconset>
</property>
<property name="text">
<string>References</string>
<string>&amp;References</string>
</property>
<property name="toolTip">
<string>References</string>
@ -455,7 +462,7 @@
<normaloff>:/icons/images/arrow-threads.png</normaloff>:/icons/images/arrow-threads.png</iconset>
</property>
<property name="text">
<string>Threads</string>
<string>&amp;Threads</string>
</property>
<property name="toolTip">
<string>Threads</string>
@ -464,6 +471,18 @@
<string>Alt+T</string>
</property>
</action>
<action name="actionSettings">
<property name="icon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/settings.png</normaloff>:/icons/images/settings.png</iconset>
</property>
<property name="text">
<string>&amp;Preferences</string>
</property>
<property name="toolTip">
<string>Settings</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>

View File

@ -0,0 +1,245 @@
#include "SettingsDialog.h"
#include "ui_SettingsDialog.h"
SettingsDialog::SettingsDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SettingsDialog)
{
ui->setupUi(this);
//set window flags
setModal(true);
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(this->size()); //fixed size
LoadSettings(); //load settings from file
}
SettingsDialog::~SettingsDialog()
{
delete ui;
}
void SettingsDialog::GetSettingBool(const char* section, const char* name, bool* set)
{
duint currentSetting;
if(!set || !BridgeSettingGetUint(section, name, &currentSetting))
return;
if(currentSetting)
*set=true;
else
*set=false;
}
Qt::CheckState SettingsDialog::bool2check(bool checked)
{
if(checked)
return Qt::Checked;
return Qt::Unchecked;
}
void SettingsDialog::LoadSettings()
{
//Defaults
memset(&settings, 0, sizeof(SettingsStruct));
settings.eventSystemBreakpoint=true;
settings.eventTlsCallbacks=true;
settings.eventEntryBreakpoint=true;
settings.engineCalcType=calc_unsigned;
settings.engineBreakpointType=break_int3short;
//Events tab
GetSettingBool("Events", "SystemBreakpoint", &settings.eventSystemBreakpoint);
GetSettingBool("Events", "TlsCallbacks", &settings.eventTlsCallbacks);
GetSettingBool("Events", "EntryBreakpoint", &settings.eventEntryBreakpoint);
GetSettingBool("Events", "DllEntry", &settings.eventDllEntry);
GetSettingBool("Events", "ThreadEntry", &settings.eventThreadEntry);
GetSettingBool("Events", "DllLoad", &settings.eventDllLoad);
GetSettingBool("Events", "DllUnload", &settings.eventDllUnload);
GetSettingBool("Events", "ThreadStart", &settings.eventThreadStart);
GetSettingBool("Events", "ThreadEnd", &settings.eventThreadEnd);
GetSettingBool("Events", "DebugStrings", &settings.eventDebugStrings);
ui->chkSystemBreakpoint->setCheckState(bool2check(settings.eventSystemBreakpoint));
ui->chkTlsCallbacks->setCheckState(bool2check(settings.eventTlsCallbacks));
ui->chkEntryBreakpoint->setCheckState(bool2check(settings.eventEntryBreakpoint));
ui->chkDllEntry->setCheckState(bool2check(settings.eventDllEntry));
ui->chkThreadEntry->setCheckState(bool2check(settings.eventThreadEntry));
ui->chkDllLoad->setCheckState(bool2check(settings.eventDllLoad));
ui->chkDllUnload->setCheckState(bool2check(settings.eventDllUnload));
ui->chkThreadStart->setCheckState(bool2check(settings.eventThreadStart));
ui->chkThreadEnd->setCheckState(bool2check(settings.eventThreadEnd));
ui->chkDebugStrings->setCheckState(bool2check(settings.eventDebugStrings));
//Engine tab
duint cur;
if(BridgeSettingGetUint("Engine", "CalculationType", &cur))
{
switch(cur)
{
case calc_signed:
case calc_unsigned:
settings.engineCalcType=(CalcType)cur;
break;
}
}
if(BridgeSettingGetUint("Engine", "BreakpointType", &cur))
{
switch(cur)
{
case break_int3short:
case break_int3long:
case break_ud2:
settings.engineBreakpointType=(BreakpointType)cur;
break;
}
}
switch(settings.engineCalcType)
{
case calc_signed:
ui->radioSigned->setChecked(true);
break;
case calc_unsigned:
ui->radioUnsigned->setChecked(true);
break;
}
switch(settings.engineBreakpointType)
{
case break_int3short:
ui->radioInt3Short->setChecked(true);
break;
case break_int3long:
ui->radioInt3Long->setChecked(true);
break;
case break_ud2:
ui->radioUd2->setChecked(true);
break;
}
}
void SettingsDialog::SaveSettings()
{
//Events tab
BridgeSettingSetUint("Events", "SystemBreakpoint", settings.eventSystemBreakpoint);
BridgeSettingSetUint("Events", "TlsCallbacks", settings.eventTlsCallbacks);
BridgeSettingSetUint("Events", "EntryBreakpoint", settings.eventEntryBreakpoint);
BridgeSettingSetUint("Events", "DllEntry", settings.eventDllEntry);
BridgeSettingSetUint("Events", "ThreadEntry", settings.eventThreadEntry);
BridgeSettingSetUint("Events", "DllLoad", settings.eventDllLoad);
BridgeSettingSetUint("Events", "DllUnload", settings.eventDllUnload);
BridgeSettingSetUint("Events", "ThreadStart", settings.eventThreadStart);
BridgeSettingSetUint("Events", "ThreadEnd", settings.eventThreadEnd);
BridgeSettingSetUint("Events", "DebugStrings", settings.eventDebugStrings);
//Engine tab
BridgeSettingSetUint("Engine", "CalculationType", settings.engineCalcType);
BridgeSettingSetUint("Engine", "BreakpointType", settings.engineBreakpointType);
}
void SettingsDialog::on_chkSystemBreakpoint_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventSystemBreakpoint=false;
else
settings.eventSystemBreakpoint=true;
}
void SettingsDialog::on_chkTlsCallbacks_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventTlsCallbacks=false;
else
settings.eventTlsCallbacks=true;
}
void SettingsDialog::on_chkEntryBreakpoint_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventEntryBreakpoint=false;
else
settings.eventEntryBreakpoint=true;
}
void SettingsDialog::on_chkDllEntry_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventDllEntry=false;
else
settings.eventDllEntry=true;
}
void SettingsDialog::on_chkThreadEntry_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventThreadEntry=false;
else
settings.eventThreadEntry=true;
}
void SettingsDialog::on_chkDllLoad_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventDllLoad=false;
else
settings.eventDllLoad=true;
}
void SettingsDialog::on_chkDllUnload_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventDllUnload=false;
else
settings.eventDllUnload=true;
}
void SettingsDialog::on_chkThreadStart_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventThreadStart=false;
else
settings.eventThreadStart=true;
}
void SettingsDialog::on_chkThreadEnd_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventThreadEnd=false;
else
settings.eventThreadEnd=true;
}
void SettingsDialog::on_chkDebugStrings_stateChanged(int arg1)
{
if(arg1==Qt::Unchecked)
settings.eventDebugStrings=false;
else
settings.eventDebugStrings=true;
}
void SettingsDialog::on_radioUnsigned_clicked()
{
settings.engineCalcType=calc_unsigned;
}
void SettingsDialog::on_radioSigned_clicked()
{
settings.engineCalcType=calc_signed;
}
void SettingsDialog::on_radioInt3Short_clicked()
{
settings.engineBreakpointType=break_int3short;
}
void SettingsDialog::on_radioInt3Long_clicked()
{
settings.engineBreakpointType=break_int3long;
}
void SettingsDialog::on_radioUd2_clicked()
{
settings.engineBreakpointType=break_ud2;
}
void SettingsDialog::on_btnSave_clicked()
{
SaveSettings();
DbgSettingsUpdated();
}

View File

@ -0,0 +1,83 @@
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QDialog>
#include "Bridge.h"
namespace Ui {
class SettingsDialog;
}
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit SettingsDialog(QWidget *parent = 0);
~SettingsDialog();
private slots:
void on_chkSystemBreakpoint_stateChanged(int arg1);
void on_chkTlsCallbacks_stateChanged(int arg1);
void on_chkEntryBreakpoint_stateChanged(int arg1);
void on_chkDllEntry_stateChanged(int arg1);
void on_chkThreadEntry_stateChanged(int arg1);
void on_chkDllLoad_stateChanged(int arg1);
void on_chkDllUnload_stateChanged(int arg1);
void on_chkThreadStart_stateChanged(int arg1);
void on_chkThreadEnd_stateChanged(int arg1);
void on_chkDebugStrings_stateChanged(int arg1);
void on_radioUnsigned_clicked();
void on_radioSigned_clicked();
void on_radioInt3Short_clicked();
void on_radioInt3Long_clicked();
void on_radioUd2_clicked();
void on_btnSave_clicked();
private:
//enums
enum CalcType
{
calc_signed=0,
calc_unsigned=1
};
enum BreakpointType
{
break_int3short=0,
break_int3long=1,
break_ud2=2
};
//structures
struct SettingsStruct
{
//Event Tab
bool eventSystemBreakpoint;
bool eventTlsCallbacks;
bool eventEntryBreakpoint;
bool eventDllEntry;
bool eventThreadEntry;
bool eventDllLoad;
bool eventDllUnload;
bool eventThreadStart;
bool eventThreadEnd;
bool eventDebugStrings;
//Engine Tab
CalcType engineCalcType;
BreakpointType engineBreakpointType;
//Exception Tab
};
//variables
Ui::SettingsDialog *ui;
SettingsStruct settings;
//functions
void GetSettingBool(const char* section, const char* name, bool* set);
Qt::CheckState bool2check(bool checked);
void LoadSettings();
void SaveSettings();
};
#endif // SETTINGSDIALOG_H

View File

@ -0,0 +1,435 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingsDialog</class>
<widget class="QDialog" name="SettingsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>262</width>
<height>201</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Settings</string>
</property>
<property name="windowIcon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/settings.png</normaloff>:/icons/images/settings.png</iconset>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>2</x>
<y>2</y>
<width>261</width>
<height>161</height>
</rect>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabEvents">
<attribute name="title">
<string>Events</string>
</attribute>
<widget class="QLabel" name="lblBreakOn">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>46</width>
<height>13</height>
</rect>
</property>
<property name="text">
<string>Break on:</string>
</property>
</widget>
<widget class="QCheckBox" name="chkSystemBreakpoint">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>System Breakpoint</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
<widget class="QCheckBox" name="chkTlsCallbacks">
<property name="geometry">
<rect>
<x>20</x>
<y>50</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>TLS Callbacks</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
<widget class="QCheckBox" name="chkEntryBreakpoint">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Entry Breakpoint</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
<widget class="QCheckBox" name="chkDllLoad">
<property name="geometry">
<rect>
<x>140</x>
<y>30</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>DLL Load</string>
</property>
</widget>
<widget class="QCheckBox" name="chkDllUnload">
<property name="geometry">
<rect>
<x>140</x>
<y>50</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>DLL Unload</string>
</property>
</widget>
<widget class="QCheckBox" name="chkThreadStart">
<property name="geometry">
<rect>
<x>140</x>
<y>70</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Thread Start</string>
</property>
</widget>
<widget class="QCheckBox" name="chkThreadEnd">
<property name="geometry">
<rect>
<x>140</x>
<y>90</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Thread End</string>
</property>
</widget>
<widget class="QCheckBox" name="chkDebugStrings">
<property name="geometry">
<rect>
<x>140</x>
<y>110</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Debug Strings</string>
</property>
</widget>
<widget class="QCheckBox" name="chkDllEntry">
<property name="geometry">
<rect>
<x>20</x>
<y>90</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>DLL Entry</string>
</property>
</widget>
<widget class="QCheckBox" name="chkThreadEntry">
<property name="geometry">
<rect>
<x>20</x>
<y>110</y>
<width>111</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Thread Entry</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="tabEngine">
<attribute name="title">
<string>Engine</string>
</attribute>
<widget class="QLabel" name="lblCalculationType">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>91</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Calculation Type:</string>
</property>
</widget>
<widget class="QLabel" name="lblBreakpointType">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Default Breakpoint Type:</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>142</width>
<height>19</height>
</rect>
</property>
<layout class="QHBoxLayout" name="layoutCalulationType">
<item>
<widget class="QRadioButton" name="radioSigned">
<property name="text">
<string>&amp;Signed</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioUnsigned">
<property name="text">
<string>&amp;Unsigned</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>80</y>
<width>175</width>
<height>19</height>
</rect>
</property>
<layout class="QHBoxLayout" name="layoutBreakpointType">
<item>
<widget class="QRadioButton" name="radioInt3Short">
<property name="text">
<string>INT3</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioInt3Long">
<property name="text">
<string>Long INT3</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioUd2">
<property name="text">
<string>UD2</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QWidget" name="tabExceptions">
<attribute name="title">
<string>Exceptions</string>
</attribute>
<widget class="QListWidget" name="listExceptions">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>151</width>
<height>81</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier New</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
</widget>
<widget class="QLabel" name="lblIgnoredExceptions">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>101</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Ignored Exceptions:</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>170</x>
<y>30</y>
<width>77</width>
<height>83</height>
</rect>
</property>
<layout class="QVBoxLayout" name="layoutExceptionButtons">
<item>
<widget class="QPushButton" name="btnAddRange">
<property name="text">
<string>Add &amp;Range</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnDeleteRange">
<property name="text">
<string>&amp;Delete Range</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnAddLast">
<property name="text">
<string>Add &amp;Last</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="btnSave">
<property name="geometry">
<rect>
<x>100</x>
<y>170</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Save</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="btnCancel">
<property name="geometry">
<rect>
<x>180</x>
<y>170</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</widget>
<resources>
<include location="../../resource.qrc"/>
</resources>
<connections>
<connection>
<sender>btnCancel</sender>
<signal>clicked()</signal>
<receiver>SettingsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>358</x>
<y>252</y>
</hint>
<hint type="destinationlabel">
<x>357</x>
<y>236</y>
</hint>
</hints>
</connection>
<connection>
<sender>btnSave</sender>
<signal>clicked()</signal>
<receiver>SettingsDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>286</x>
<y>250</y>
</hint>
<hint type="destinationlabel">
<x>279</x>
<y>236</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -37,7 +37,6 @@ void StatusLabel::debugStateChangedSlot(DBGSTATE state)
this->setText("<font color='#ff0000'>Terminated</font>");
this->setStyleSheet("QLabel { background-color : #c0c0c0; }");
GuiUpdateWindowTitle("");
GuiUpdateCPUTitle("");
break;
default:
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

@ -28,5 +28,6 @@
<file>images/pdb.png</file>
<file>images/search.png</file>
<file>images/arrow-threads.png</file>
<file>images/settings.png</file>
</qresource>
</RCC>