Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disassembler in Xcode?

I'm working on a project, and on a machine without Xcode, I'm getting a crash. (of course it works on my machine B-/) I have a crash log, with a PC offset for the crash. I'd like to be able to see where that actually is in the code. I know that Code Warrior can disassemble the code (presumably, only debugable code) and show it interspersed with the C code, then I just have to look for that address, and I'm done.

Is there an easy way to do this in Xcode?

thanks.

like image 754
Brian Postow Avatar asked Oct 27 '25 18:10

Brian Postow


1 Answers

There are two things in Xcode you may want to look at. The first would be to select your source code file and choose Build->Show Assembly Code. What this won't give you though is offsets.

The second assembly capability is in the debugger. Choose Run->Debugger Display->Source and Disassembly, and the debugger will show you both source and assembly code side-by-side. However, the two are not interspersed.

If neither of these Xcode facilities give you what you need, your only recourse may be the otool command line tool.

I've never found a way to generate or view source and assembly interspersed.

like image 123
Jay O'Conor Avatar answered Oct 29 '25 18:10

Jay O'Conor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!