* difference between -g, -ggdb and -ggdb3
@ 2009-02-18 16:28 lehe
2009-02-18 16:44 ` John (Eljay) Love-Jensen
2009-02-18 16:44 ` Diego Novillo
0 siblings, 2 replies; 3+ messages in thread
From: lehe @ 2009-02-18 16:28 UTC (permalink / raw)
To: gcc-help
Hi,
I was wondering what the difference between -g, -ggdb and -ggdb3 as option
for gcc?
Thanks in advance!
--
View this message in context: http://www.nabble.com/difference-between--g%2C--ggdb-and--ggdb3-tp22082494p22082494.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: difference between -g, -ggdb and -ggdb3
2009-02-18 16:28 difference between -g, -ggdb and -ggdb3 lehe
@ 2009-02-18 16:44 ` John (Eljay) Love-Jensen
2009-02-18 16:44 ` Diego Novillo
1 sibling, 0 replies; 3+ messages in thread
From: John (Eljay) Love-Jensen @ 2009-02-18 16:44 UTC (permalink / raw)
To: lehe, GCC-help
Hi lehe,
> I was wondering what the difference between -g, -ggdb and -ggdb3 as option for
gcc?
-g produces debugging information in the OS¹s native format (stabs, COFF,
XCOFF, or DWARF 2).
-ggdb produces debugging information specifically intended for gdb.
-ggdb3 produces extra debugging information, for example: including macro
definitions. -ggdb by itself without specifying the level defaults to
-ggdb2 (i.e., gdb for level 2).
It is *possible* (I've heard) that the -ggdb can produce debugging
information that can confuse other debuggers if you are not using gdb. I
only use gdb, so I cannot confirm or refute that rumor.
So...
If you use gdb, use -ggdb (same as -ggdb2), or -ggdb1 (to help reduce the
debug footprint), or -ggdb3 (for additional debugging info).
If you do not use gdb...
Use -g and keep in mind that gdb works with the OS's native format too.
I use -g even though I use gdb exclusively when I use gcc/g++. I could use
-ggdb ... but I forget to type those extra three characters.
HTH,
--Eljay
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: difference between -g, -ggdb and -ggdb3
2009-02-18 16:28 difference between -g, -ggdb and -ggdb3 lehe
2009-02-18 16:44 ` John (Eljay) Love-Jensen
@ 2009-02-18 16:44 ` Diego Novillo
1 sibling, 0 replies; 3+ messages in thread
From: Diego Novillo @ 2009-02-18 16:44 UTC (permalink / raw)
To: lehe; +Cc: gcc-help
On Wed, Feb 18, 2009 at 11:28, lehe <timlee126@yahoo.com> wrote:
> I was wondering what the difference between -g, -ggdb and -ggdb3 as option
> for gcc?
> Thanks in advance!
The manual has all these answers:
http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options
Diego.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-18 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-18 16:28 difference between -g, -ggdb and -ggdb3 lehe
2009-02-18 16:44 ` John (Eljay) Love-Jensen
2009-02-18 16:44 ` Diego Novillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).