Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: Vinayak P Risbud <vinayak@multitech.co.in>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: assembly editing in GDB
Date: Tue, 06 Aug 2002 06:28:00 -0000	[thread overview]
Message-ID: <20020806132659.GA14779@systemhalted> (raw)
In-Reply-To: <3D4F6B35.A5D0AA07@multitech.co.in>

On Tue, Aug 06, 2002 at 11:52:46AM +0530, Vinayak P Risbud wrote:
>         Can I run and debug, an assembly program in GDB ?
>         If yes, how can I edit and write the assembly program
>         in GDB ?

GDB is a debugger not an editor :}

Assembly programs can definately be debug'd in gdb.
Just start it up as you would with any other program,
and start putting break points at addresses instead of
source lines.

# gdb hello
> break main
> r
...
> disassemble

And if you want to _edit_ it while running you need to
use 'set write on' (before loading) and then 'file hello'.

Check out all the variations of break, since you will have
to feed it addresses for code that doesn't have debug info.

I really really really recommend reading all the material
at: http://sources.redhat.com/gdb/documentation/

c.


      parent reply	other threads:[~2002-08-06 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05 23:23 Vinayak P Risbud
2002-08-06  6:11 ` Daniel Jacobowitz
2002-08-06  7:01   ` William A. Gatliff
2002-08-06  6:28 ` Carlos O'Donell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020806132659.GA14779@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=gdb@sources.redhat.com \
    --cc=vinayak@multitech.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox