Git Product home page Git Product logo

Comments (5)

haberman avatar haberman commented on May 4, 2024

Thanks for the kind words about Bloaty!

I need to implement this. You're right that the existing info is all for ELF.

Mach-O gets build IDs by default in the LC_UUID load command. No special flag is required. It should be relatively simple to make this work by implementing MachOObjectFile::GetBuildId() to read this id.

We could go further and try to automatically find the debug info file, running dsymutil if we can't find it. But for now I'll just implement the simple thing.

from bloaty.

jfirebaugh avatar jfirebaugh commented on May 4, 2024

Thanks for #133. I'm a bit confused by this TODO though. Without DWARF support, it's still not possible to profile a stripped MachO binary via the .dSYM, right?

from bloaty.

haberman avatar haberman commented on May 4, 2024

You can use a symbol table from a non-stripped binary to profile a stripped binary. This is what is documented above that TODO, and it works for both ELF and Mach-O. It doesn't require .dSYM files.

$ cp bloaty bloaty.stripped
$ strip bloaty.stripped
$ ./bloaty -d compileunits --debug-file=bloaty bloaty.stripped

from bloaty.

haberman avatar haberman commented on May 4, 2024

Unfortunately dsymutil doesn't appear to put a full symbol table in the .dSYM file, so I don't think this technique will work via dsymutil.

from bloaty.

haberman avatar haberman commented on May 4, 2024

I take it back, dsymutil does appear to put a symbol table in .dSYM. This works as expected:

$ strip bloaty
$ dsymutil bloaty
$ $ ./bloaty --debug-file bloaty.dSYM/Contents/Resources/DWARF/bloaty  bloaty -d symbols

I should update the docs accordingly. Maybe this means I can also enable -d compileunits for Mach-O!

from bloaty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.