Closed Harding-Stardust closed 1 year ago
Your suggestions make sense. These are old samples and fixes / suggestions are welcome. Want to do a PR or I can fix that as well, let us know.
@Harding-Stardust , I want to add though: it is better to check for suspended and not use can_query() in this particular case. Internally, IDA will populate debug names only when it gets suspended. Therefore, just remove the hardcoded -1 if you choose to do the PR yourself and keep the suspended check.
My first PR :-D
Thanks
https://github.com/idapython/src/blob/caeafef297371eae1c929845385dbe5d859abade/examples/debugging/show_debug_names.py#LL19C22-L19C22
The code is much clearer in what is actually happening: if ida_dbg.get_process_state() != ida_dbg.DSTATE_SUSP:
May I also ask why you are not using ida_dbg.dbg_can_query() instead of checking both for loaded and suspended ?