From: Peter Barada <peter@the-baradas.com>
To: tarun@acmet.com
Cc: gdb@sources.redhat.com, acmet@vsnl.net, ranjeeta@acmet.com,
rm_nair@acmet.com
Subject: Re: Query regarding assembly level debugging support
Date: Thu, 02 Dec 2004 14:10:00 -0000 [thread overview]
Message-ID: <20041202141029.D5DDD9842C@baradas.org> (raw)
In-Reply-To: <000e01c4d84f$dba18c30$a100a8c0@u8test4> (tarun@acmet.com)
> The linked out file is loaded without errors on GDB. When we run
>the respective out file on GDB, the control of debugger moves to label
>main in the assembly code ( Breakpoint 1, 0xa00200ec in main ()). When I
>try to move to next instruction using "nexti", the control moves to next
>address (Displaying: 0xa00200f0 in main ()). This continues till the
>last address is reached. Only the address increments within the assembly
>file are displayed and not the actual assembly source.
>
> When I try to single step using "step", the message prompted is
>"Single stepping until exit from function main, which has no line number
>information". Whereas if I disassemble one of the addresses give above,
>entire assembly code which I am trying to debug is displayed.
>
> Does this mean that GDB does not support debugging of the assembly
>code?
Peope have been using GDB to debug assembler code for years. A
couple of tricks:
1) Use stepi/nexti commands to step or next one *instruction* as
opposed to source line
2) Use the 'disp/i $pc' to have GDB display the assembler instruction
that will be executed next.
3) Use 'i reg' to dump the registers, or 'p $reg' where 'reg' is the
register name.
--
Peter Barada
peter@the-baradas.com
next prev parent reply other threads:[~2004-12-02 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 9:15 Tarun
2004-12-02 14:10 ` Peter Barada [this message]
2004-12-08 7:04 ` Tarun
2004-12-08 13:57 ` Daniel Jacobowitz
2004-12-02 14:24 ` Daniel Jacobowitz
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=20041202141029.D5DDD9842C@baradas.org \
--to=peter@the-baradas.com \
--cc=acmet@vsnl.net \
--cc=gdb@sources.redhat.com \
--cc=ranjeeta@acmet.com \
--cc=rm_nair@acmet.com \
--cc=tarun@acmet.com \
/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