Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2022, 10:21
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 379
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 63 Times in 33 Posts
jonwil Reputation: 21
How to dump data structures from DWARF debug info?

I have an ELF file with DWARF debug information, how can I dump the data structures in some kind of C-like form? I know of quite a few tools that can do it for Microsoft PDB debug information but I can't find one that can do it for DWARF information.
Reply With Quote
  #2  
Old 06-29-2022, 04:36
atom0s's Avatar
atom0s atom0s is offline
Family
 
Join Date: Jan 2015
Location: 127.0.0.1
Posts: 371
Rept. Given: 26
Rept. Rcvd 114 Times in 58 Posts
Thanks Given: 54
Thanks Rcvd at 656 Times in 259 Posts
atom0s Reputation: 100-199 atom0s Reputation: 100-199
There's a handful of DWARF parsers up on GitHub in various languages:
Code:
https://github.com/search?q=dwarf
(You will need to weed through all the Dwarf Fortress side projects but there are a handful available on there.)

One I've had success with in the past:
Code:
https://github.com/seilweiss/dwarf2cpp
__________________
Personal Projects Site: https://atom0s.com
Reply With Quote
The Following User Gave Reputation+1 to atom0s For This Useful Post:
TQN (06-29-2022)
The Following User Says Thank You to atom0s For This Useful Post:
tonyweb (06-30-2022)
  #3  
Old 07-01-2022, 19:13
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 379
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 63 Times in 33 Posts
jonwil Reputation: 21
In the end I was able to get IDA to load this elf file (its a debug build of a PlayStation 3 game) and read the DWARF debug info at the same time. And I was able to find a debug build of an xbox 360 game by the same developers that contains a PDB file and that happens to use the particular library code I was interested in.

So with the combination of the PS3 game debug build and the 360 game debug build (and some other code and things from this same developer that are out there) I am making progress on reverse engineering this library (its code for reading an archive format used by games from this developer and I want to make a tool for working with said archive format
Reply With Quote
The Following User Says Thank You to jonwil For This Useful Post:
sh3dow (07-17-2022)
  #4  
Old 07-02-2022, 02:49
atom0s's Avatar
atom0s atom0s is offline
Family
 
Join Date: Jan 2015
Location: 127.0.0.1
Posts: 371
Rept. Given: 26
Rept. Rcvd 114 Times in 58 Posts
Thanks Given: 54
Thanks Rcvd at 656 Times in 259 Posts
atom0s Reputation: 100-199 atom0s Reputation: 100-199
You may be able to find additional useful info / PDB / debug symbols for the game as well from resources like this:
Code:
http://debugging.games/
__________________
Personal Projects Site: https://atom0s.com
Reply With Quote
The Following 2 Users Say Thank You to atom0s For This Useful Post:
niculaita (07-02-2022), sh3dow (07-17-2022)
  #5  
Old 07-02-2022, 07:08
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 379
Rept. Given: 2
Rept. Rcvd 21 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 63 Times in 33 Posts
jonwil Reputation: 21
Yes that's where I got the debug builds I am working with from.
Reply With Quote
  #6  
Old 07-15-2022, 22:23
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 882
Rept. Given: 325
Rept. Rcvd 217 Times in 111 Posts
Thanks Given: 171
Thanks Rcvd at 393 Times in 220 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
a friend of mine recommended this repo for the DWARF exploration goal
https://github.com/marakew/dwarf2cpp
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 06:25.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2022 )