Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DWARF types information #774

Open
radare opened this issue Apr 7, 2014 · 13 comments · Fixed by #17111
Open

DWARF types information #774

radare opened this issue Apr 7, 2014 · 13 comments · Fixed by #17111
Assignees
Labels
debug-info DWARF DWARF symbols and types debug information hackaton RBin refactor types Parsing, propagating and inferring simple and complex types

Comments

@radare
Copy link
Collaborator

radare commented Apr 7, 2014

The DWARF type information must be loaded in the same sdb database used by cparse. both source formats (dwarf and .c/.h files) must provide the same (or almost the same) information so it can be merged in a single place to be used by structs parsing or variable types.

@montekki
Copy link
Contributor

montekki commented May 5, 2014

ok, time to have a discussion about this. how is info stored now and how is it used?
types in dwarf are tree-like structures, how do we store them in sdb?

@radare
Copy link
Collaborator Author

radare commented May 5, 2014

We should reuse and extend what's already done with cparse sdb storage. The idea is that cparse and dwarf (and future pdb) use the same database structure so you can use .h, or other kind of human readable forms to read or serialize type information.

I guess dwarf have more type info than plain C, so we should check that

On 05 May 2014, at 12:20, Fedor Sakharov [email protected] wrote:

ok, time to have a discussion about this. how is info stored now and how is it used?
types in dwarf are tree-like structures, how do we store them in sdb?


Reply to this email directly or view it on GitHub.

@radare radare added this to the 1.0.0 milestone Nov 20, 2015
@Maijin Maijin added the types Parsing, propagating and inferring simple and complex types label Mar 19, 2016
@XVilka
Copy link
Contributor

XVilka commented May 12, 2016

Related to your task, @oddcoder

@radare radare modified the milestones: 1.1.0, 1.0.0 Nov 3, 2016
@oddcoder oddcoder modified the milestones: 1.2.0, 1.1.0 Dec 13, 2016
@radare radare modified the milestones: 1.3.0, 1.2.0 Jan 16, 2017
@radare radare modified the milestones: 1.5.0, 1.3.0 Mar 10, 2017
@radare
Copy link
Collaborator Author

radare commented Mar 10, 2017

@oddcoder pls

@radare
Copy link
Collaborator Author

radare commented May 20, 2017

OMG THIS IS NOT GONNA HAPPEN EVER. UNASSIGNING ODDCODER AND MOVING FORWARD

@radare radare modified the milestones: 1.7.0, 1.5.0 May 20, 2017
@radare
Copy link
Collaborator Author

radare commented May 20, 2017

@jpenalbae you are the one intested on this here. maybe you can find some time to do it or push someone to do it

@MaskRay
Copy link
Contributor

MaskRay commented Sep 4, 2017

Oh DWARF is underappreciated... Any idea to make the current type system more DWARF-friendly and incorporate more information from DWARF?

DWARF 5 introduces a bunch of tags and attributes for type support DW_TAG_formal_parameter DW_TAG_call_site ...

@XVilka
Copy link
Contributor

XVilka commented Sep 4, 2017

I think we need to better define our current format of the types storage.
Currently it's stored in types SDB namespace, but I think the exact format of SDB is not efficient for more metainformation. So parsing DWARF just should insert proper SDB records, thats it.

@Maijin
Copy link
Contributor

Maijin commented Sep 4, 2017

Have you tried the dwarf r2-extras plugin?

@XVilka
Copy link
Contributor

XVilka commented Sep 4, 2017

@MaskRay my current plan (after r2con) is to port some useful changes from the mainstream tcc to our code, I already know what and how to port, to improve parsing of the C structs/types, then improve the SDB storage layout. We can discuss the exact layout in just couple days during the hackaton.

@radare
Copy link
Collaborator Author

radare commented Sep 4, 2017 via email

@Maijin
Copy link
Contributor

Maijin commented Sep 4, 2017

dwarf-parser [syslib] dwarf parser
libdwarf [syspkg] libdwarf - git

See https://github.com/radare/radare2-regressions/blob/master/t.extras/dwarf/dwarf please before wanting reiventing what's already been done by @p4n74

@XVilka
Copy link
Contributor

XVilka commented Sep 25, 2017

Import should be done, otherwise the whole point of loading DWARF is worth nothing.

@XVilka XVilka modified the milestones: 1.7.0, 1.9.0 Sep 25, 2017
@radare radare modified the milestones: 2.2.0, 9999 Dec 23, 2017
@XVilka XVilka modified the milestones: 9999, 2.8.0 Jul 10, 2018
@XVilka XVilka modified the milestones: 2.8.0, 2.9.0 - pre-r2con Aug 1, 2018
@XVilka XVilka modified the milestones: 2.9.0, 3.0 Aug 31, 2018
@ret2libc ret2libc removed this from the 3.0 milestone Oct 11, 2018
@XVilka XVilka added the DWARF DWARF symbols and types debug information label Oct 19, 2018
@XVilka XVilka added the GSoC label Nov 16, 2018
@XVilka XVilka removed the GSoC label Feb 26, 2019
@HoundThe HoundThe linked a pull request Jul 21, 2020 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug-info DWARF DWARF symbols and types debug information hackaton RBin refactor types Parsing, propagating and inferring simple and complex types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants