Good tool for viewing disassembly?
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