diff --git a/x64_dbg_bridge/bridgemain.cpp b/x64_dbg_bridge/bridgemain.cpp index a212c892..267dd534 100644 --- a/x64_dbg_bridge/bridgemain.cpp +++ b/x64_dbg_bridge/bridgemain.cpp @@ -389,6 +389,7 @@ BRIDGE_IMPEXP void GuiUpdateAllViews() { GuiUpdateRegisterView(); GuiUpdateDisassemblyView(); + GuiUpdateBreakpointsView(); } BRIDGE_IMPEXP void GuiUpdateRegisterView() @@ -401,6 +402,11 @@ BRIDGE_IMPEXP void GuiUpdateDisassemblyView() _gui_sendmessage(GUI_UPDATE_DISASSEMBLY_VIEW, 0, 0); } +BRIDGE_IMPEXP void GuiUpdateBreakpointsView() +{ + _gui_sendmessage(GUI_UPDATE_BREAKPOINTS_VIEW, 0, 0); +} + //Main BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { diff --git a/x64_dbg_bridge/bridgemain.h b/x64_dbg_bridge/bridgemain.h index 5c9edef8..407a616e 100644 --- a/x64_dbg_bridge/bridgemain.h +++ b/x64_dbg_bridge/bridgemain.h @@ -214,6 +214,7 @@ BRIDGE_IMPEXP void GuiLogClear(); BRIDGE_IMPEXP void GuiUpdateAllViews(); BRIDGE_IMPEXP void GuiUpdateRegisterView(); BRIDGE_IMPEXP void GuiUpdateDisassemblyView(); +BRIDGE_IMPEXP void GuiUpdateBreakpointsView(); #ifdef __cplusplus } diff --git a/x64_dbg_dbg/addrinfo.cpp b/x64_dbg_dbg/addrinfo.cpp index 5d7d3b85..435bad3f 100644 --- a/x64_dbg_dbg/addrinfo.cpp +++ b/x64_dbg_dbg/addrinfo.cpp @@ -28,6 +28,7 @@ void dbinit() dprintf("SQL Error: %s\n", sqllasterror()); dbsave(); bpenumall(0); //update breakpoint list + GuiUpdateBreakpointsView(); } bool dbload() diff --git a/x64_dbg_dbg/breakpoint.cpp b/x64_dbg_dbg/breakpoint.cpp index b0ef88b0..6eb161a5 100644 --- a/x64_dbg_dbg/breakpoint.cpp +++ b/x64_dbg_dbg/breakpoint.cpp @@ -50,6 +50,7 @@ bool bpnew(uint addr, bool enabled, bool singleshoot, short oldbytes, BP_TYPE ty } bpenumall(0); //update breakpoint list dbsave(); + GuiUpdateBreakpointsView(); return true; } @@ -153,6 +154,7 @@ bool bpdel(uint addr, BP_TYPE type) } bpenumall(0); //update breakpoint list dbsave(); + GuiUpdateBreakpointsView(); return true; } @@ -174,6 +176,7 @@ bool bpenable(uint addr, BP_TYPE type, bool enable) } bpenumall(0); //update breakpoint list dbsave(); + GuiUpdateBreakpointsView(); return true; } @@ -196,6 +199,7 @@ bool bpsetname(uint addr, BP_TYPE type, const char* name) } bpenumall(0); //update breakpoint list dbsave(); + GuiUpdateBreakpointsView(); return true; } diff --git a/x64_dbg_dbg/debugger.cpp b/x64_dbg_dbg/debugger.cpp index 71b03194..d1bb29cd 100644 --- a/x64_dbg_dbg/debugger.cpp +++ b/x64_dbg_dbg/debugger.cpp @@ -354,9 +354,7 @@ static void cbCreateProcess(CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo) char modname[256]=""; if(modnamefromaddr((uint)base, modname, true)) bpenumall(cbSetModuleBreakpoints, modname); - - //Set entry breakpoint - if(!bFileIsDll) + if(!bFileIsDll) //Set entry breakpoint { char command[256]=""; sprintf(command, "bp "fhex",\"entry breakpoint\",ss", CreateProcessInfo->lpStartAddress); @@ -364,6 +362,7 @@ static void cbCreateProcess(CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo) pDebuggedBase=(uint)CreateProcessInfo->lpBaseOfImage; //SetBPX((ULONG_PTR)CreateProcessInfo->lpStartAddress, UE_SINGLESHOOT, (void*)cbEntryBreakpoint); } + GuiUpdateBreakpointsView(); //call plugin callback PLUG_CB_CREATEPROCESS callbackInfo; @@ -438,8 +437,7 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll) char modname[256]=""; if(modnamefromaddr((uint)base, modname, true)) bpenumall(cbSetModuleBreakpoints, modname); - - if(bFileIsDll and !stricmp(DLLDebugFileName, szFileName)) + if(bFileIsDll and !stricmp(DLLDebugFileName, szFileName)) //Set entry breakpoint { pDebuggedBase=(uint)base; char command[256]=""; @@ -447,6 +445,7 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll) cmddirectexec(dbggetcommandlist(), command); //SetBPX(pDebuggedBase+pDebuggedEntry, UE_SINGLESHOOT, (void*)cbEntryBreakpoint); } + GuiUpdateBreakpointsView(); //TODO: plugin callback PLUG_CB_LOADDLL callbackInfo;