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

Add a debuginfo_debug example #716

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

mstange
Copy link
Contributor

@mstange mstange commented Nov 23, 2022

This example prints out the parsed debuginfo Function tree in a similar format to the snapshot tests in test_objects. (The only difference is that this also prints the end address for each line.)

It also performs some consistency checks.
Those checks should make it easier to ensure that all our parsers are creating debuginfo with the shape that the consumers (symcache writer and dump_syms) expect.

You can run it as follows:

cargo run --release -p debuginfo_debug -- symbolic-testutils/fixtures/macos/crash.dSYM/Contents/Resources/DWARF/crash

@mstange mstange requested a review from a team November 23, 2022 20:50
Copy link
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

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

Very nice, thank you. My suggestions are all cosmetic because I prefer format arguments "in place" when possible, but it's totally fine to leave it as it is.

examples/debuginfo_debug/src/main.rs Outdated Show resolved Hide resolved
examples/debuginfo_debug/src/main.rs Outdated Show resolved Hide resolved
examples/debuginfo_debug/src/main.rs Outdated Show resolved Hide resolved
examples/debuginfo_debug/src/main.rs Outdated Show resolved Hide resolved
@mstange
Copy link
Contributor Author

mstange commented Nov 24, 2022

Oh nice, thanks for those suggestions! It's about time I learn to get used to the new syntax :)

And I wasn't aware that you could get the 0x prefix with {:#x}, nice.

This example prints out the parsed debuginfo Function tree in a similar
format to the snapshot tests in test_objects. (The only difference is
that this also prints the end address for each line.)

It also performs some consistency checks.
Those checks should make it easier to ensure that all our parsers are
creating debuginfo with the shape that the consumers (symcache writer
and dump_syms) expect.

You can run it as follows:

`cargo run --release -p debuginfo_debug -- symbolic-testutils/fixtures/macos/crash.dSYM/Contents/Resources/DWARF/crash`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants