Open pxqlinux opened 1 year ago
Hi, I'll need more context of this for debugging.
or you can provide the test.exe, so I can test it locally for fixing it.
Thanks for answer
i both try latest dev and master branch, the result is same
screen shot:
my test py and exe is test-files.zip
i try to fix the bug: qiling/debugger/qdb/qdb.py at function do_step_over, change if prophecy.going to if not prophecy.going the result is expected
thanks again
Hello, after I change verbose to QL_VERBOSE.DISASM (dump executed instruction) mode, It looks like 0x004819e8
is not supposed to be executed. So the hook which placed by the command step_over is not triggered. if you still think this is a bug and need to be fixed, pls let me know.
Hello ucgJhe, 0x004819e8 not execute is expected,the instruction exec to 0x004819e6 and ZF is 1,so the next instruction will jump to 0x4019ec。 The problem is,the command input to qdb is "s",mean step over to next instruction and hit the temp breakpoint paused, but the simulate exec until the process exit
for qdb command, s
is for step in, n
for step over. So if you type n
on 0x4819e6
the flow will never pause until the program exit , because it simply place a hook on next instruction which is 0x4819e8
and won't be executed. So i think the result is correct.
Please correct me if I get you wrong thx.
Sorry for the mistake, the command i type is “n”, not "s". for the step over command, will follow the jump target instruction, and set the temp breakpoint, because the if conditon not right, the breakpoint set to the wrong position, so "n" command run not hit any breakpoint until the program exited.
@pxqlinux I see you point here. The qdb command n
should place a temp breakpoint at 0x4019ec
since the instruction at 0x4019e6
is NOT a function call, right ? The qdb command is not as same as gdb command semantically. For the qdb command n
was used to place a temp breakpoint at the next address ( pc-related : pc+instruction_size@pc
), and the qdb command s
is to place a temp breakpoint at the address to be executed. I think the qdb command s
is what you want but not n
if the assumption above is correct. Any ideas are welcome if you think this can be improved or shouldn't acting like that.
*Describe the bug A clear and concise description of what the bug is.
Sample Code
I am using qdb to debug the windows pe application. in the code context with: Sample Code
now, zero flag is 1
Expected behavior je in the current line will jump to 0x4019ec expected but the application run until finished
so, i check the code in qiling/debugger/qdb/qdb.py at function do_step_over, the if condition: if prophecy.going: is wrong? maybe if not prophecy.going: ?