I have a script that catches say a value of 666 in the RDX register and pauses debugging. The problem is, that this value might be added to the register by other modules aside from the main application that I am debugging, for example by ntdll.dll, which is of course of no use to me.
How do I get the name of the current module that debugger is in at any given moment so I can ignore if the RDX is changed at that module? Something like this:
idaapi.step_into()
idaapi.wait_for_next_event(2, -1)
counter=GetRegValue('RDX')
if counter==666 and (GetCurrentModuleName()!='ntdll.dll'):
break
get_module_info
populatesmodinfo
pointer, i linked you the docs for it – mimak Jul 10 '23 at 11:59def get_module_info (*args) ‑> bool get_module_info(ea, modinfo) -> bool ea: ea_t modinfo: modinfo_t *
– MartinRøde Jul 11 '23 at 05:35