• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Good tool for viewing disassembly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Good tool for viewing disassembly?


  • Subject: Good tool for viewing disassembly?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 29 Oct 2009 10:16:13 -0700

I'm doing a bunch of optimizations, and sometimes I need to look at the assembly code that's being generated for a C++ function. Are there any good tools for doing this, ideally showing the source and assembly side-by-side?

What I'm doing currently is first using the Show Assembly Code command in Xcode, copying that, then in a shell running:
pbpaste | grep -v '^L[A-Z]' | c++filt | mate
This strips out the zillions of unnecessary labels that make the disassembly unreadable, unmangles the C++ names, and opens the result in a TextMate window.


The result is fairly comprehensible, for assembly code, but it loses the correspondence with the source, and given the scrambling the -O3 optimizer does, and the amount of inlining in this codebase, it can be hard to figure out what's going on without looking at the implementations of all the inline functions it calls.

(Shark can do something like this, but I haven't found it to be reliable. On many functions it refuses to show source at all, and sometimes the source line numbers are obviously wrong, enough so that I don't trust it.)

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Xcode Font sizes
  • Next by Date: Re: string::stringstream broken with gg 4.2
  • Previous by thread: Xcode Font sizes
  • Next by thread: libSystem.B.dylib not found
  • Index(es):
    • Date
    • Thread