public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Berlin" <dberlin@msn.com>
To: "Robert Lipe" <robertlipe@usa.net>, "Brian Ford" <ford@vss.fsi.com>
Cc: <egcs@egcs.cygnus.com>
Subject: Re: dwarf2 debug dependent upon GAS?
Date: Tue, 23 Feb 1999 17:39:00 -0000	[thread overview]
Message-ID: <003401be5f95$bc8f5b30$788f9780@DANIELBE> (raw)
In-Reply-To: <19990223104109.E2294@rjlhome.sco.com>

> Brian Ford wrote:
>
> > On Mon, 22 Feb 1999, Robert Lipe wrote:
> >
> > > Is there some sort of tool that a human can use to help read [dwarf]
> > > tables?
> >
> > I'm not exactly sure what you are asking for, but would dwarfdump do
> > the trick?
>
> From the name, it sounds interesting.  Does dwarfdump exist outside of
> the SGI/MIPS tool kit?
>
> If it doesn't, it doesn't do me much good.
>
>

I have a dwarf2 dumper (more of a reader, it can dump it in a nicely
readable format as a side effect) written in python, which means it should
be portable just about anywhere.
It only works on ELF executables , but if you can give it the offsets of the
various debug sections, and such, it'll happily read them and process them.
The only thing it doesn't do right now is location expressions, because i
just haven't gotten around to it (it's rather easy, you just need to
describe the structure to it).
It's part of a debugger i wrote for BeOS.  I got tired of writing the dwarf2
reading/processing code in C++, it was just much easier in python, and
easier to maintain.  In addition to dumping the info, it also builds and
keeps track of a hashtable and a proper "general" tree of each compilation
unit, keyed on the offsets.
I also have a c module for the structure unpacker i wrote that it uses,
which makes it take 3 seconds to read and process large amount of debug info
(3 meg in this case), as opposed to 20 for the straight python code ( You
shouldn't run into alignment issues on the C code, as it was written with
avoiding them in mind. I could be wrong, however.)

Lemme know if you want it (or anyone else for that matter, just put "python
dwarf2 code" in the subject so it goes into the right folder)
Dan


WARNING: multiple messages have this Message-ID
From: "Daniel Berlin" <dberlin@msn.com>
To: "Robert Lipe" <robertlipe@usa.net>, "Brian Ford" <ford@vss.fsi.com>
Cc: <egcs@egcs.cygnus.com>
Subject: Re: dwarf2 debug dependent upon GAS?
Date: Sun, 28 Feb 1999 22:53:00 -0000	[thread overview]
Message-ID: <003401be5f95$bc8f5b30$788f9780@DANIELBE> (raw)
Message-ID: <19990228225300.OxK5cM3LrBXT_Q_wwDpVyz12Mu9YCn_5EsNFl_YBYJM@z> (raw)
In-Reply-To: <19990223104109.E2294@rjlhome.sco.com>

> Brian Ford wrote:
>
> > On Mon, 22 Feb 1999, Robert Lipe wrote:
> >
> > > Is there some sort of tool that a human can use to help read [dwarf]
> > > tables?
> >
> > I'm not exactly sure what you are asking for, but would dwarfdump do
> > the trick?
>
> From the name, it sounds interesting.  Does dwarfdump exist outside of
> the SGI/MIPS tool kit?
>
> If it doesn't, it doesn't do me much good.
>
>

I have a dwarf2 dumper (more of a reader, it can dump it in a nicely
readable format as a side effect) written in python, which means it should
be portable just about anywhere.
It only works on ELF executables , but if you can give it the offsets of the
various debug sections, and such, it'll happily read them and process them.
The only thing it doesn't do right now is location expressions, because i
just haven't gotten around to it (it's rather easy, you just need to
describe the structure to it).
It's part of a debugger i wrote for BeOS.  I got tired of writing the dwarf2
reading/processing code in C++, it was just much easier in python, and
easier to maintain.  In addition to dumping the info, it also builds and
keeps track of a hashtable and a proper "general" tree of each compilation
unit, keyed on the offsets.
I also have a c module for the structure unpacker i wrote that it uses,
which makes it take 3 seconds to read and process large amount of debug info
(3 meg in this case), as opposed to 20 for the straight python code ( You
shouldn't run into alignment issues on the C code, as it was written with
avoiding them in mind. I could be wrong, however.)

Lemme know if you want it (or anyone else for that matter, just put "python
dwarf2 code" in the subject so it goes into the right folder)
Dan



  parent reply	other threads:[~1999-02-23 17:39 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19990221144644.M8783.cygnus.egcs@rjlhome.sco.com>
1999-02-22 17:24 ` Jim Wilson
     [not found]   ` < 199902230124.RAA24440@rtl.cygnus.com >
1999-02-22 21:32     ` Robert Lipe
     [not found]       ` < 19990222233200.P325@rjlhome.sco.com >
1999-02-23  7:04         ` Brian Ford
     [not found]           ` < Pine.SGI.4.03.9902230903340.512-100000@uscream.vss.fsi.com >
1999-02-23  8:41             ` Robert Lipe
     [not found]               ` < 19990223104109.E2294@rjlhome.sco.com >
1999-02-23  9:03                 ` Brian Ford
1999-02-28 22:53                   ` Brian Ford
1999-02-23 17:39               ` Daniel Berlin [this message]
1999-02-28 22:53                 ` Daniel Berlin
1999-02-28 22:53               ` Robert Lipe
1999-02-28 22:53           ` Brian Ford
1999-02-23 14:19         ` Jim Wilson
1999-02-28 22:53           ` Jim Wilson
1999-02-28 22:53       ` Robert Lipe
1999-02-28 22:53   ` Jim Wilson
     [not found] ` <199902230124.RAA24440.cygnus.egcs@rtl.cygnus.com>
1999-02-25 12:05   ` Jason Merrill
     [not found]     ` <19990225143649.I17655@rjlhome.sco.com>
1999-02-25 18:13       ` Jason Merrill
     [not found]         ` < u9u2w9j4jr.fsf@yorick.cygnus.com >
1999-02-25 20:55           ` Robert Lipe
1999-02-25 21:02             ` Jason Merrill
     [not found]               ` < u9d82xiwp5.fsf@yorick.cygnus.com >
1999-02-25 21:21                 ` Robert Lipe
1999-02-25 21:27                   ` Jason Merrill
1999-02-28 22:53                     ` Jason Merrill
1999-02-28 22:53                   ` Robert Lipe
1999-02-25 22:16                 ` Robert Lipe
1999-02-25 22:31                   ` Jason Merrill
     [not found]                     ` < u93e3tism2.fsf@yorick.cygnus.com >
1999-02-25 23:25                       ` Robert Lipe
     [not found]                         ` < 19990226012522.D17655@rjlhome.sco.com >
1999-02-28  0:57                           ` Jeffrey A Law
1999-02-28 22:53                             ` Jeffrey A Law
1999-02-28 22:53                         ` Robert Lipe
1999-02-28 22:53                     ` Jason Merrill
1999-02-28 22:53                   ` Robert Lipe
1999-02-28 22:53               ` Jason Merrill
1999-02-25 21:19             ` Jason Merrill
1999-02-28 22:53               ` Jason Merrill
1999-02-28 22:53             ` Robert Lipe
1999-02-28 22:53         ` Jason Merrill
1999-02-28 22:53     ` Jason Merrill
1999-02-21 12:47 Robert Lipe
     [not found] ` < 19990221144644.M8783@rjlhome.sco.com >
1999-02-21 14:51   ` Jeffrey A Law
1999-02-28 22:53     ` Jeffrey A Law
1999-02-28 22:53 ` Robert Lipe

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='003401be5f95$bc8f5b30$788f9780@DANIELBE' \
    --to=dberlin@msn.com \
    --cc=egcs@egcs.cygnus.com \
    --cc=ford@vss.fsi.com \
    --cc=robertlipe@usa.net \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).