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 Import #3206

Closed
psifertex opened this issue Jun 18, 2022 · 7 comments
Closed

DWARF Import #3206

psifertex opened this issue Jun 18, 2022 · 7 comments
Assignees
Labels
Component: DebugInfo Issue requires changes to the DebugInfo API DebugInfo: DWARF Effort: Medium Issue should take < 1 month Impact: Medium Issue is impactful with a bad, or no, workaround Type: Enhancement Issue is a small enhancement to existing functionality
Milestone

Comments

@psifertex
Copy link
Member

We started to create a rust plugin that could use the DebugInfo APIs to parse dwarf information (indeed, it's what DebugInfo was designed for) but it was not completed. The current plugin has a number of limitations that would be eliminated by finishing this plugin.

@psifertex psifertex added the Type: Enhancement Issue is a small enhancement to existing functionality label Jun 18, 2022
@psifertex psifertex added this to the 3.3 (Embedded) milestone Jun 18, 2022
@fuzyll fuzyll added Effort: Medium Issue should take < 1 month Impact: Medium Issue is impactful with a bad, or no, workaround labels Jun 20, 2022
@fuzyll fuzyll modified the milestones: 3.3 (Embedded), 3.2 (Windows) Jun 20, 2022
@plafosse plafosse removed this from the 3.2 (Windows) milestone Oct 3, 2022
@plafosse plafosse added this to the Braize milestone Jan 9, 2023
@plafosse plafosse modified the milestones: Braize, Coruscant Mar 28, 2023
@plafosse plafosse changed the title finish dwarf plugin migration to rust DWARF Import May 24, 2023
@plafosse plafosse added Component: DebugInfo Issue requires changes to the DebugInfo API DebugInfo: DWARF labels Jun 22, 2023
KyleMiles added a commit that referenced this issue Jul 9, 2023
KyleMiles added a commit that referenced this issue Jul 9, 2023
KyleMiles added a commit that referenced this issue Jul 9, 2023
KyleMiles added a commit that referenced this issue Jul 9, 2023
KyleMiles added a commit that referenced this issue Jul 9, 2023
KyleMiles added a commit that referenced this issue Jul 9, 2023
@KyleMiles
Copy link
Member

KyleMiles commented Jul 10, 2023

This is implemented as off 3.5.4377-dev, but disabled by default. To enable the new plugin, enable the setting corePlugins.dwarfImport:
image

After that, any ELF files that contain DWARF info should automatically apply at load time. If you'd like to apply debug info from a different file (.dwo, .debug files), you can use the load setting analysis.debugInfo.external or use "Analysis" -> "Import Debug Info from External File".

@fuzyll
Copy link
Contributor

fuzyll commented Aug 22, 2023

Reopening this as I'm continuing to have crashes on a lot of things I'm putting through it and we were hoping to be able to have this turned on by default for the upcoming 3.5 release.

We can close this again once we've got unit tests committed and have run this across a reasonable corpus of inputs. I believe we'll also need some documentation for how to use this with #3643.

@fuzyll fuzyll reopened this Aug 22, 2023
@plafosse plafosse modified the milestones: Coruscant, Dorsai Aug 23, 2023
@KyleMiles
Copy link
Member

Documentation exists here. I've now run this on all the debug files in the Debian corpus (~1TB of files), with no crashes. Parsed ~0.5B Types/Functions/Data Vars.

@psifertex
Copy link
Member Author

I think the only remaining task should be the unit test and it's good to enable by default on dev and close.

@KyleMiles
Copy link
Member

KyleMiles commented Sep 29, 2023

We talked about this over Slack, but just putting it here as well that there are unit tests.

@KyleMiles
Copy link
Member

The last thing holding this issue open is a round-trip unit test with our DWARF Export plugin, which is blocked by the issue just above, #4700.

@KyleMiles
Copy link
Member

I worked around #4700 by shelling out to a subprocess. Would still be nice to fix that, but the round trip unit test is now in and I believe we can consider this issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: DebugInfo Issue requires changes to the DebugInfo API DebugInfo: DWARF Effort: Medium Issue should take < 1 month Impact: Medium Issue is impactful with a bad, or no, workaround Type: Enhancement Issue is a small enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants