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

Load split DWARF #3833

Merged
merged 8 commits into from
Oct 21, 2023
Merged

Load split DWARF #3833

merged 8 commits into from
Oct 21, 2023

Conversation

imbillow
Copy link
Contributor

@imbillow imbillow commented Sep 5, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

...

Test plan

...

Closing issues

Closes #1805

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need also a small test for splitdebug

librz/core/cbin.c Outdated Show resolved Hide resolved
@ret2libc
Copy link
Member

ret2libc commented Sep 5, 2023

Is this about loading DWARF information from a separate file??? That would be awesome <3

@XVilka XVilka added this to the 0.7.0 milestone Sep 6, 2023
@XVilka
Copy link
Member

XVilka commented Oct 13, 2023

@imbillow any updates on this one?

@imbillow
Copy link
Contributor Author

not yet

@imbillow
Copy link
Contributor Author

@XVilka

Do I need to do the debuginfod integration in this PR, or should I merge it first and leave the debuginfod part for the next?

@XVilka
Copy link
Member

XVilka commented Oct 17, 2023

Better to do debuginfod support in a separate PR. Let's focus on simple splitdebug here.

librz/bin/dwarf/str.c Outdated Show resolved Hide resolved
librz/bin/dwarf/str_offsets.c Outdated Show resolved Hide resolved
librz/core/cbin.c Outdated Show resolved Hide resolved
Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test failing. Please also rebase on top of the latest dev

@@ -3230,6 +3230,9 @@ RZ_API int rz_core_config_init(RzCore *core) {
SETI("bin.baddr", -1, "Base address of the binary");
SETI("bin.laddr", 0, "Base address for loading library ('*.so')");
SETCB("bin.dbginfo", "true", &cb_bindbginfo, "Load debug information at startup if available");
SETCB("bin.dbginfo.dwo_path", "", NULL, "Load separate debug information (DWARF) file if available");
SETCB("bin.dbginfo.debug_file_directory", "/usr/lib/debug", NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it support multiple paths?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, multiple paths can be separated by ;.

Add `read_debuglink` and `read_build_id`

Fix dwo loading

add is_dwo

Fix DW_LNCT_MD5

- Try process DW_UT_skeleton
- Fix dwo_id
- Check buffer size
Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

librz/bin/dwarf/str_offsets.c Show resolved Hide resolved
@XVilka XVilka merged commit 7982454 into dev Oct 21, 2023
46 of 47 checks passed
@XVilka XVilka deleted the dwarf-dwo branch October 21, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow loading DWARF information from the separate files
3 participants