This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Query regarding assembly level debugging support
- From: Daniel Jacobowitz <drow at false dot org>
- To: Tarun <tarun at acmet dot com>
- Cc: gdb at sources dot redhat dot com, acmet at vsnl dot net,"Ms.Ranjeeta" <ranjeeta at acmet dot com>,"rm at acmet dot com" <rm_nair at acmet dot com>
- Date: Thu, 2 Dec 2004 09:24:04 -0500
- Subject: Re: Query regarding assembly level debugging support
- References: <000e01c4d84f$dba18c30$a100a8c0@u8test4>
On Thu, Dec 02, 2004 at 02:48:15PM +0530, Tarun wrote:
> Hi All,
>
> I am generating object file in Elf/Dwarf format. The prime target is
> to be able to debug the assembly code. That is we are able to step
> through the assembly code showing line numbers and relative addresses.
> The Dwarf (version 2.0) sections currently being included are
> - debug_line
> - debug_abbrev
> - debug_info.
>
> 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?
Are you saying that your source code is assembly, and your assembler
creates debug information for it? This should work in GDB; make sure
that the .debug_line information is correct.
--
Daniel Jacobowitz