4

I am using IDA pro to analysis software binary. Sometime, some function with end up with sp-analysis failed. I am writing program with IDAPython. Is there any API to detect this case, so I can ignore those failure cases for now.

user3588276
  • 137
  • 1
  • 8

2 Answers2

2

You can do this:

def get_sp_failed():
    failed_funcs = []
    ea = 0
    while ea != BADADDR:
        ea = idaapi.find_text(ea, 0, 0, "sp-analysis failed", idaapi.SEARCH_DOWN | idaapi.SEARCH_NEXT)
        if ea != BADADDR:
            func = idaapi.get_func(ea)
            failed_funcs.append(func.startEA)
            ea = func.endEA
    return failed_funcs
macro_controller
  • 1,469
  • 1
  • 14
  • 32
0

ALT+K the negative stack pointer and change the previous to -.

@Train answer didn't really help unfortunately.