Unless clang's asm output directives have changed substantially since I
wrote it, my improve-xcode-asm-output script should work:
https://github.com/tom-seddon/bin/blob/master/improve-xcode-asm-output.py
Documentation, also found in the README in the repo:
Takes asm output from Xcode on stdin, and prints it to stdout, only
with |.loc| directives replaced with the actual lines from the
original source code. This is what Visual C++ does, and it’s very handy…
(To get asm output from Xcode, click the button at the top left of the
text edit window - it looks like a little 4x2 grid, I’ve no idea what
it’s supposed to be - and select |Assembly| from the menu.)
You can copy the result from Xcode and use |pbpaste| to pipe it
through |improve-xcode-asm-output|, e.g.:
pbpaste | ./improve-xcode-asm-output.py
--Tom
On 09/02/2016 19:18, Jens Alfke wrote:
One nice feature of Instruments is its side-by-side display of source code next
to assembly code. This is a great help when trying to figure out what the
compiled code for a function or a line of code looks like.
Is there any way to get something like that when not using Instruments? Right
now I’m looking at the Assembly assistant view in Xcode, which is really hard
to work with — I have to search through the huge output to find the function I
want, and the listing is full of jump labels and assembler directives that make
it hard to pick out the actual instructions.
I’d even be happy to have a shellscript that would post-process the assembly
and output a more readable form. (Which yeah, I could write myself, but I’d
rather spend that hour debugging my current crasher, not remembering how sed
works.)
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/xcode-users%40tomseddon.plus.com
This email sent to xcode-us...@tomseddon.plus.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com
This email sent to arch...@mail-archive.com