getsentry/symbolic

How to use `symbolic` to symbolicate a stack trace?

fzyzcjy opened this issue · 7 comments

Thanks for the library! Suppose I have something.so (with symbols, Android ARM architecture), and some addresses to be symbolicated. How can I use the library to symbolicate them?

I checked https://github.com/getsentry/symbolic/blob/master/examples/addr2line/src/main.rs and it looks promising. However, I do not find equivalent functions at Python side...

Hi, I'm afraid we don't expose that functionality in the Python bindings. What you can try:

  1. Create a symcache file from your debug file using cargo run -p symcache_debug -- -d <debug file> -c out.sym
  2. Load the symcache file in Python with SymCache.open
  3. Use Symcache.lookup to look up an address

Would that work for you?

@loewenheim Hi thank you for the information! I will try for that and reply soon.

EDIT: It works for Rust :) (I will experiment other lang soon)

Then I wonder how should I demangle the symbols? It seems it is in Rust API

print!("{}", name.try_demangle(DemangleOptions::name_only()));
, but searching demangle in py folder yields nothing

Yeah demangling unfortunately has no Python bindings.

@loewenheim So will it be supported? Or if I make a PR, will it be merged?

It used to exist, but we removed it in #730 because we don't want to commit to maintaining those bindings.

Ah I see... Thanks, so I will not PR for that.