FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-19-2008, 03:13 PM
"Robert P. J. Day"
 
Default DWARF 2 the most advanced debugging format?

a friend who's just getting into development on linux was reading
the gcc manual and ran across the variety of available debugging
formats here:

http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Debugging-Options.html

and asked me, out of all those formats, which was the "best" one to
start working with.

i suggested he'd be best off getting familiar with the DWARF 2
format, since fedora already comes with a yum-installable "dwarves"
package containing various DWARF-related examination utilities.

that seemed like an easy answer at the time, but is there a better
choice? i realize stabs is still common but, in terms of being
technically advanced, is DWARF 2 the most informative and most useful
of the formats? thanks.

rday
--

================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-19-2008, 06:51 PM
Michael Eager
 
Default DWARF 2 the most advanced debugging format?

Robert P. J. Day wrote:

a friend who's just getting into development on linux was reading
the gcc manual and ran across the variety of available debugging
formats here:

http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Debugging-Options.html

and asked me, out of all those formats, which was the "best" one to
start working with.

i suggested he'd be best off getting familiar with the DWARF 2
format, since fedora already comes with a yum-installable "dwarves"
package containing various DWARF-related examination utilities.

that seemed like an easy answer at the time, but is there a better
choice? i realize stabs is still common but, in terms of being
technically advanced, is DWARF 2 the most informative and most useful
of the formats? thanks.


Well, DWARF version 3 was released a few years ago. :-)

DWARF is an extensible, block structured debugging format. It has
a significant user community which is involved in upgrading and
extending it. Other formats, such as stabs or coff debug, are either
not block structured, difficult to extend, limited to specific
architectures, poorly documented, antiquated, or moribund.

DWARF is the default debugging format for most GCC compilers,
including those on Linux on x86 and PowerPC. Linux migrated away
from stabs some time ago.

You can find an Introduction to DWARF article which I wrote a
couple years ago on the DWARF website: http://dwarfstd.org

--
Michael Eager Chair, DWARF Standards Committee eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-19-2008, 09:21 PM
Tom Horsley
 
Default DWARF 2 the most advanced debugging format?

On Sat, 19 Jul 2008 11:13:34 -0400 (EDT)
"Robert P. J. Day" <rpjday@crashcourse.ca> wrote:

> that seemed like an easy answer at the time, but is there a better
> choice? i realize stabs is still common but, in terms of being
> technically advanced, is DWARF 2 the most informative and most useful
> of the formats? thanks.

Well, there is the DWARF standards document, then there is the debug
info gcc/g++ generates, which is in many ways somewhat similar, but
as part of the overall linux conspiracy to make the lives of developers
who work on debuggers a living hell, gcc often deviates in interesting
ways (sez this debugger developer :-).

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-20-2008, 07:38 PM
Les
 
Default DWARF 2 the most advanced debugging format?

On Sat, 2008-07-19 at 11:51 -0700, Michael Eager wrote:
> Robert P. J. Day wrote:
> > a friend who's just getting into development on linux was reading
> > the gcc manual and ran across the variety of available debugging
> > formats here:
> >
> > http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Debugging-Options.html
> >
> > and asked me, out of all those formats, which was the "best" one to
> > start working with.
> >
> > i suggested he'd be best off getting familiar with the DWARF 2
> > format, since fedora already comes with a yum-installable "dwarves"
> > package containing various DWARF-related examination utilities.
> >
> > that seemed like an easy answer at the time, but is there a better
> > choice? i realize stabs is still common but, in terms of being
> > technically advanced, is DWARF 2 the most informative and most useful
> > of the formats? thanks.
>
> Well, DWARF version 3 was released a few years ago. :-)
>
> DWARF is an extensible, block structured debugging format. It has
> a significant user community which is involved in upgrading and
> extending it. Other formats, such as stabs or coff debug, are either
> not block structured, difficult to extend, limited to specific
> architectures, poorly documented, antiquated, or moribund.
>
> DWARF is the default debugging format for most GCC compilers,
> including those on Linux on x86 and PowerPC. Linux migrated away
> from stabs some time ago.
>
> You can find an Introduction to DWARF article which I wrote a
> couple years ago on the DWARF website: http://dwarfstd.org
>
> --
> Michael Eager Chair, DWARF Standards Committee eager@eagercon.com
> 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
>
Thank you Michael, For a very well written paper. I had dug into COFF
before, but had stumbled upon some of its limitations. DWARF seems very
well thought out. Do you think it will become as widely implemented as
COFF?

Which debuggers use it effectively?

Regards,
Les H

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-20-2008, 09:02 PM
Tom Horsley
 
Default DWARF 2 the most advanced debugging format?

On Sun, 20 Jul 2008 12:38:25 -0700
Les <hlhowell@pacbell.net> wrote:

> Thank you Michael, For a very well written paper. I had dug into COFF
> before, but had stumbled upon some of its limitations. DWARF seems very
> well thought out. Do you think it will become as widely implemented as
> COFF?
>
> Which debuggers use it effectively?

I'm pretty sure it is already more widely implemented than COFF. It is
certainly the default debug format for gcc/g++ as well as the intel C++
compiler, and many others. GDB uses it, the commercial debugger I work
on NightView (ccur.com) uses it, totalview uses it (another commercial
debugger). It is indeed vastly superior to COFF (which I once had to
try and get to work with mixed results :-).

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-21-2008, 05:58 PM
Michael Eager
 
Default DWARF 2 the most advanced debugging format?

Les wrote:

On Sat, 2008-07-19 at 11:51 -0700, Michael Eager wrote:

Robert P. J. Day wrote:

a friend who's just getting into development on linux was reading
the gcc manual and ran across the variety of available debugging
formats here:

http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Debugging-Options.html

and asked me, out of all those formats, which was the "best" one to
start working with.

i suggested he'd be best off getting familiar with the DWARF 2
format, since fedora already comes with a yum-installable "dwarves"
package containing various DWARF-related examination utilities.

that seemed like an easy answer at the time, but is there a better
choice? i realize stabs is still common but, in terms of being
technically advanced, is DWARF 2 the most informative and most useful
of the formats? thanks.

Well, DWARF version 3 was released a few years ago. :-)

DWARF is an extensible, block structured debugging format. It has
a significant user community which is involved in upgrading and
extending it. Other formats, such as stabs or coff debug, are either
not block structured, difficult to extend, limited to specific
architectures, poorly documented, antiquated, or moribund.

DWARF is the default debugging format for most GCC compilers,
including those on Linux on x86 and PowerPC. Linux migrated away
from stabs some time ago.

You can find an Introduction to DWARF article which I wrote a
couple years ago on the DWARF website: http://dwarfstd.org

--
Michael Eager Chair, DWARF Standards Committee eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077


Thank you Michael, For a very well written paper. I had dug into COFF
before, but had stumbled upon some of its limitations. DWARF seems very
well thought out. Do you think it will become as widely implemented as
COFF?


COFF is an object file format which incidentally includes debugging info.
COFF is no longer widely used, for a variety of reasons.

The ELF object file format is much more widely used than COFF, which is
only used on a few older architectures for mostly historical reasons.
(COFF was the object format for Unix System V Release 3, but was replaced
by ELF in Release 4. Systems derived from SVR3 might use COFF instead
of ELF.)

Microsoft adopted a modified version of COFF as the PE or PE-COFF object
file format for Windows NT, but they use an entirely different (and mostly
undocumented) debugging format.


Which debuggers use it effectively?


GDB and a number of commercial debuggers, such as TotalView.

--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-22-2008, 03:29 AM
Nifty Fedora Mitch
 
Default DWARF 2 the most advanced debugging format?

On Sat, Jul 19, 2008 at 11:13:34AM -0400, Robert P. J. Day wrote:
>
> a friend who's just getting into development on Linux was reading
> the gcc manual and ran across the variety of available debugging
> formats here:
>
> http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Debugging-Options.html
>
> and asked me, out of all those formats, which was the "best" one to
> start working with.

What development is he looking at "getting into"?
Programming language...
hardware target...
OS target...

In general the debugger hooks are transparent unless you
are writing a debugger/ compiler. Other issues apply to
embedded development and the kernel itself.

Your URL has a big HINT.

-ggdb

Produce debugging information for use by GDB. This means to use
the most expressive format available (DWARF 2, stabs, or the native
format if neither of those are supported), including GDB extensions
if at all possible.

You want the most supported format you can get. It does not matter
if formatA is better if it is not well supported top to bottom.

Missing in this is the power of the compiler itself. In debugging it can
prove helpful to have a second or third compiler. Look into compilers
like the Intel compiler (free to students last I checked) and another good compiler
is the Pathscale compiler (generated Fortran code is wonderful) and also
the PGI compiler suite.

Various compiler vendors have compile and run time hooks for uninitialized variable triggers
as well as richer static checking so give the man page a full read.

And third party debuggers like ... "Total View" etc. have their place in the mix.
..... depending on the budget.



>
> i suggested he'd be best off getting familiar with the DWARF 2
> format, since fedora already comes with a yum-installable "dwarves"
> package containing various DWARF-related examination utilities.
>
> that seemed like an easy answer at the time, but is there a better
> choice? i realize stabs is still common but, in terms of being
> technically advanced, is DWARF 2 the most informative and most useful
> of the formats? thanks.
>
> rday
> --T
>
> ================================================== ======================
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry:
> Have classroom, will lecture.
>
> http://crashcourse.ca Waterloo, Ontario, CANADA
> ================================================== ======================
>
> --
> fedora-list mailing list
> fedora-list@redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

--
T o m M i t c h e l l
Looking for a place to hang my hat :-(

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 04:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org