From: Pierre Habraken <Pierre.Habraken@imag.fr>
To: binutils@sources.redhat.com, gdb@sources.redhat.com
Cc: Richard.Earnshaw@arm.com
Subject: Section .debug_info in object file
Date: Thu, 12 Sep 2002 02:42:00 -0000 [thread overview]
Message-ID: <3D806189.7A45FCBA@imag.fr> (raw)
A few days ago I posted a message about the fact that after launching
gdb to debug a program made of several C and Arm assembly language
files, the command 'info sources' lists C files only.
Richard explained me that the section '.debug_info' in a given object
file is supposed to contain a field (among others) named 'DW_AT_name'
containing the name of the source file from which this object file was
produced.
It appears that assembly object files (at least those which are produced
by Gas) does not include this field 'DW_AT_name' ; this could explain
that gdb does not see assembly language source files at the time it
opens the program being debugged.
Knowing that rises several questions:
- what is the structure of a '.debug_info' section ?
Is this structure documented somewhere ?
- which tool can be used to examine the contents of a '.debug_info'
section ? I tried to use arm-elf-objdump but the result which it
displays is not formatted and checking it is not easy...
- is there a way to force gas to include a field 'DW_AT_name' in the
object files it produces ?
(an option on the command line ? a directive inside the source file ?)
- why would gdb be not able to retrieve an assembly language source file
(together with its name) as long as no breakpoint is set by the user
within this file, where it is able to retrieve this same source file
as soon as a first breakpoint is set (though the name of the source
file is not present in the object file) ?...
Thanks for any help.
Pierre
PS: I am using binutils 2.13 and gdb 5.2.1 compiled for arm-elf.
--
________________________________________________________________________
Pierre HABRAKEN - mailto:Pierre.Habraken@imag.fr
Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
________________________________________________________________________
next reply other threads:[~2002-09-12 9:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-12 2:42 Pierre Habraken [this message]
2002-09-12 4:46 ` Keith.Walker
2002-09-14 4:49 ` Pierre Habraken
2002-09-16 3:10 ` Keith.Walker
2002-09-16 3:30 ` Elias Athanasopoulos
2002-09-16 3:43 ` Pierre Habraken
2002-09-12 11:45 ` [PATCH] " Elias Athanasopoulos
2002-09-12 13:54 ` Richard Henderson
2002-09-12 14:55 ` Elias Athanasopoulos
2002-09-15 2:25 ` Elias Athanasopoulos
2002-09-16 19:35 ` Richard Henderson
2002-09-16 19:51 ` Richard Henderson
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=3D806189.7A45FCBA@imag.fr \
--to=pierre.habraken@imag.fr \
--cc=Richard.Earnshaw@arm.com \
--cc=binutils@sources.redhat.com \
--cc=gdb@sources.redhat.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