This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: assembly editing in GDB
- From: "William A. Gatliff" <bgat at billgatliff dot com>
- To: Vinayak P Risbud <vinayak at multitech dot co dot in>,gdb <gdb at sources dot redhat dot com>
- Date: Tue, 6 Aug 2002 09:01:01 -0500
- Subject: Re: assembly editing in GDB
- References: <3D4F6B35.A5D0AA07@multitech.co.in> <20020806131101.GA22456@nevyn.them.org>
- Reply-to: bgat at billgatliff dot com
One other thing: if you do this:
(gdb) display/i $pc
then gdb will actually show the asm instruction it's about to run. :^)
b.g.
As On Tue, Aug 06, 2002 at 09:11:01AM -0400, Daniel Jacobowitz wrote:
> On Tue, Aug 06, 2002 at 11:52:46AM +0530, Vinayak P Risbud wrote:
> > Can I run and debug, an assembly program in GDB ?
>
> Sure.
>
> > If yes, how can I edit and write the assembly program
> > in GDB ?
>
> You can't. GDB does not have any support for editing or assembling
> code. You compile the assembly as normal; if you're using the GNU
> tools you can use "gcc -g" and it will generally arrange to put
> line-number information in the object module.
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
--
Bill Gatliff
bgat@billgatliff.com