🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Phil Romig Tue, 06 Oct 1992 14:42
assembly
#504
Author: Phil Romig
Date: Tue, 06 Oct 1992 14:42
20 lines
994 bytes
A couple of quick questions:

1) Is there a better group for how to questions than gdb.bug for gdb?

2) I'm using gdb for assembler debugging (don't as why).  I'd like a
   way to define a command that will step forward one instruction and
   disassemble the instruction at the pc.  I think I'm close with:
          define sd
           stepi
           x/i <address of pc>
          end
   the problem is how to get <address of pc> into the x/i command.  
   Anyone have any ideas?

thanks
-PHIL-

romig@cse.unl.edu
University of Nebraska, Lincoln
Lincoln, NE 
Re: assembly
#446
Author: gnu
Date: Tue, 06 Oct 1992 14:13
13 lines
717 bytes
>           define sd
>            stepi
>            x/i <address of pc>
>           end
>    the problem is how to get <address of pc> into the x/i command.  

x/i $pc

> 1) Is there a better group for how-to questions than gdb.bug for gdb?

I don't know of one.

	John Gilmore
assembly
#450
Author: Stu Grossman
Date: Wed, 07 Oct 1992 17:14
7 lines
845 bytes
There is a much easier way to do what you want by using the `display' command.
display causes GDB to automatically display an expression whenever you get back
to command level.  So, the command `display/i $pc' will cause the next
instruction to be printed out in assembly language every time you get back to
command level.  You can also use `si' as an abbreviation for `stepi'.

		Stu Grossman
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads