Re: Question about disassembly

Andrew Dinn via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 11/03/2021 12:16, Christian Biesinger via Gdb wrote:
> On Thu, Mar 11, 2021, 13:07 Mahmood Naderan via Gdb <[email protected]>
> 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
-----------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.