Open jrmuizel opened 4 years ago
Right, symbolic
does have support for inline frames in PDBs. However, the interface to DebugSession
might not be super ergonomic, I'm up for suggestions.
Under the hood, symbolic shells out to pdb
for all these operations, so we'll have to fix willglynn/pdb#78 first.
@mstange what's needed to fix this?
I'm not sure why, but fix-stacks currently does a full pre-pass over the debuginfo and converts it into its own representation, maybe so that it can query it more efficiently or maybe to save memory. During the conversion, any inline info is lost.
We could potentially switch it to use a symbolic symcache; those can be queried very efficiently and preserve inline info. However, this would probably break the macOS OSO path, and it has a big startup cost.
Another alternative would be to switch to the Firefox profiler's symbolication infrastructure. I'm currently improving its API so this might become an option soon. The profiler symbolication code can deal with macOS OSOs and it's optimized for fast time-to-first-symbol, i.e. it tries to do only minimal preprocessing.
The Firefox profiler's symbolication infrastructure is https://github.com/mstange/samply/tree/main/samply-symbols
In the meantime I've polished up "The Firefox profiler's symbolication infrastructure" into a crate called wholesym
.
So the next step here would be to switch fix-stacks to wholesym, which I've attempted in this branch: https://github.com/mstange/fix-stacks/commits/use-wholesym/
I'm not sure how easy this is or whether
symbolic
supports it but it would be nice to have.As an aside: I was able to get inline frames working for my hacked together https://github.com/jrmuizel/pdb-addr2line but needed to work around https://github.com/willglynn/pdb/issues/78