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

Use .debug_aranges #95

Closed
JunyiXie opened this issue Jun 24, 2018 · 13 comments
Closed

Use .debug_aranges #95

JunyiXie opened this issue Jun 24, 2018 · 13 comments

Comments

@JunyiXie
Copy link

give a sample, thanks.

@philipc
Copy link
Contributor

philipc commented Jun 24, 2018

Not sure what you mean by "use it alone". There's sample usage in the example, the tests and also in the backtrace-rs crate.

@JunyiXie
Copy link
Author

Like using addr2line. In terminal.

@philipc
Copy link
Contributor

philipc commented Jun 24, 2018

You'll need to install rust, checkout a copy of the addr2line source code, and build the example with cargo build --examples --release. The binary will be at target/release/examples/addr2line.

@JunyiXie
Copy link
Author

Does this tool support dsym?

@philipc
Copy link
Contributor

philipc commented Jun 24, 2018

Yes, but you need to specify the dsym on the command line instead of the executable.

@JunyiXie
Copy link
Author

thanks.
How to do it?
use --help, don't find the relevant information.

@philipc
Copy link
Contributor

philipc commented Jun 24, 2018

I'm not able to run it right now to test, but something like echo 0x1234 | addr2line -e <path-to-dsym>.

@JunyiXie
Copy link
Author

thanks. It's work well.

@JunyiXie
Copy link
Author

21:05:03 › echo 0x0000b1e7 | ./addr2line  -s -i -f -p -a -e /Users/xiejunyi/Desktop/atosl/atosl/test/res/CrashTest3Dwarf.thin
0x000000000000b1e7: -[QDCViewController sendCrash:] ??:0

Is there a problem with the line number and file name?

@philipc
Copy link
Contributor

philipc commented Jun 24, 2018

Not sure, I can look into it later. I assume this is from https://github.com/dechaoqiu/atosl/tree/master/test/res. Does the x86_64 file work? Maybe we are missing something specific to arm.

@JunyiXie
Copy link
Author

yes. It's from there. x86_64 file:

echo 0x00000001000010a0 | ./addr2line  -s -i -f -p -a -e /Users/xiejunyi/Desktop/atosl/atosl/test/res/TestMac1.thin
0x00000001000010a0: -[QDCAppDelegate applicationDidFinishLaunching:] ??:0

@philipc
Copy link
Contributor

philipc commented Jun 25, 2018

Those files have neither DW_AT_high_pc nor DW_AT_ranges attributes on their DW_TAG_compile_unit entries as required by the DWARF spec, so we're ignoring them. They do have a valid .debug_aranges though, so maybe the best fix would be to start using that.

@philipc philipc changed the title Could you tell me how to use it alone? Use .debug_aranges Feb 23, 2019
@philipc
Copy link
Contributor

philipc commented Jun 22, 2021

Fixed in #200

@philipc philipc closed this as completed Jun 22, 2021
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

No branches or pull requests

2 participants