From: "Keith.Walker" <Keith.Walker@arm.com>
To: Pierre Habraken <Pierre.Habraken@imag.fr>,
binutils@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: Section .debug_info in object file
Date: Mon, 16 Sep 2002 03:10:00 -0000 [thread overview]
Message-ID: <4.1.20020916105507.02b9c080@mhsun1.maidenhead.arm.com> (raw)
In-Reply-To: <3D832247.D1F4ECBC@imag.fr>
At 01:49 PM 14-09-02 +0200, Pierre Habraken wrote:
>In any case, I wonder what is the exact purpose of the option --gdwarf2
>of gas ? :
>On one hand, if it is supposed to make the .debug_info section be
>generated, the latter should include all relevant debugging information.
>On the other hand, if it not supposed to make the .debug_info section be
>created, what is its use ?
When the assembler is invoked by the compiler to assemble the code
generated for compiled sources the assembler should NOT be invoked with the
-gdwarf2. The compiler supplies the DWARF2 debugging information for the
sources being compiled by the compiler. It is therefore the
responsibility of the compiler to supply the DWARF2 information to describe
the source file being compiled.
When the assembler is being invoked to assembler user supplied assembler
files then the -gdwarf2 flag can be used to make the assembler generate the
DWARF2 debugging information which describes the assembler file. [This
is primarily the line to address table.] In this case it is the
responsibility of the assembler to supply the DWARF2 information to
describe the file being assembled.
>I also noticed that option -g passed to the C compiler is sufficient for
>getting a .debug_info section. So my question is : why would I use the
>option -gdwarf-2 instead of -g ?...
gcc can be build for different targets (e.g. arm-elf-gcc, arm-linux-gcc).
When you use -g the compiler will generate the debugging information in
the default format for the appropriate target. For arm-elf-gcc this is
usually DWARF2 and for arm-linux-gcc this is usually STABS. The
-gdwarf2 flag therefore overides the default format and explicitly
specifies that DWARF2 debuggging information is required.
Keith
Keith Walker keith.walker@arm.com Tel:+44 (1628) 427732
ARM Ltd http://www.arm.com
next prev parent reply other threads:[~2002-09-16 10:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-12 2:42 Pierre Habraken
2002-09-12 4:46 ` Keith.Walker
2002-09-14 4:49 ` Pierre Habraken
2002-09-16 3:10 ` Keith.Walker [this message]
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=4.1.20020916105507.02b9c080@mhsun1.maidenhead.arm.com \
--to=keith.walker@arm.com \
--cc=Pierre.Habraken@imag.fr \
--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