Question about disassembly
Andrew Dinn
adinn@redhat.com
Thu Mar 11 12:22:12 GMT 2021
On 11/03/2021 12:16, Christian Biesinger via Gdb wrote:
> On Thu, Mar 11, 2021, 13:07 Mahmood Naderan via Gdb <gdb@sourceware.org>
> wrote:
>
>> Hi
>> How can I debug disassembly instructions with "step" or "next"?
>> Right now, then I use 'n' it seems that gdb executes multiple assembly
>> instructions and then stops. Sound like it uses the source level debugging.
>>
>
> Use stepi / nexti
You will probably want to print the next instruction after each step
which can be done using x/i $pc.
I use the following command definitions (added to my .gdbinit).
define si
stepi
x/i $pc
end
define ni
nexti
x/i $pc
end
regards,
Andrew Dinn
-----------
More information about the Gdb
mailing list