From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel Berlin" To: "Robert Lipe" , "Brian Ford" Cc: Subject: Re: dwarf2 debug dependent upon GAS? Date: Tue, 23 Feb 1999 17:39:00 -0000 Message-id: <003401be5f95$bc8f5b30$788f9780@DANIELBE> References: <19990222233200.P325@rjlhome.sco.com> <19990223104109.E2294@rjlhome.sco.com> X-SW-Source: 1999-02/msg01176.html > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel Berlin" To: "Robert Lipe" , "Brian Ford" Cc: Subject: Re: dwarf2 debug dependent upon GAS? Date: Sun, 28 Feb 1999 22:53:00 -0000 Message-ID: <003401be5f95$bc8f5b30$788f9780@DANIELBE> References: <19990222233200.P325@rjlhome.sco.com> <19990223104109.E2294@rjlhome.sco.com> X-SW-Source: 1999-02n/msg01182.html Message-ID: <19990228225300.OxK5cM3LrBXT_Q_wwDpVyz12Mu9YCn_5EsNFl_YBYJM@z> > 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