symbolic icon indicating copy to clipboard operation
symbolic copied to clipboard

Clarification or example for README bullet

Open frostmourne8 opened this issue 5 years ago • 2 comments

There is a bullet in the README that drew me to this crate: "Generate Breakpad symbol files from Mach, ELF and PDBs" which would be perfect for something I am trying to accomplish. I am having trouble figuring out how to perform this generation though. Any chance someone could offer clarification and/or update the README with a more detailed explanation?

frostmourne8 avatar Mar 19 '20 21:03 frostmourne8

We never implemented a full dump_syms equivalent, but only the CFI part of it. To do that, you'll want to use AsciiCfiWriter.

To write FUNC and PUBLIC records, you would roughly have to do the following:

  • Open an Object from the input file.
  • Get the debug_session and generate FUNC records for all functions returned by functions. Skip inlinees, since Breakpad doesn't support that.
  • Iterate through symbols and emit missing ones as PUBLIC record.
  • You can have a look at this function for an example of how to iterate functions and symbols to emit those in order.

It makes sense to add a dump_syms example program to showcase this. I'll leave this issue open for that.

You might also want to have a look at Mozilla's dump_syms which is a more complete implementation that's partially based on symbolic.

jan-auer avatar Mar 19 '20 23:03 jan-auer

I'd vote for closing this as out-of-scope, considering dump_syms existence.

vaind avatar Feb 17 '23 13:02 vaind