View disassembly in XCode 4 (or Xcode 5 or Xcode 6

2019-01-18 09:18发布

I'm having trouble finding much in the way of information about the new XCode layout. How can I view the disassembly of my source file, rather than just the C++ code?

5条回答
疯言疯语
2楼-- · 2019-01-18 10:00

From what I read in a very thorough XCode 4 review (http://fireballed.org/linked/2011/03/09/xcode-pilkington/), the ability to show a file as assembly code is now gone in XCode 4. I guess you could always set a breakpoint in a method, and look at it disassembled in the debugger console with something like the "x/100i" command to treat print out the next 100 instructions in assembly, but that is a lot less convenient.

查看更多
爷、活的狠高调
3楼-- · 2019-01-18 10:01

Follow these simple steps inside of Xcode:

enter image description here

enter image description here

enter image description here

enter image description here

查看更多
看我几分像从前
4楼-- · 2019-01-18 10:04

You can also display disassembly by navigating to:

Debug->Debug Workflow->Show Disassembly while debugging.

This will display source and disassembly in the main window view.

查看更多
我想做一个坏孩纸
5楼-- · 2019-01-18 10:05

In Xcode 4.2 (and Xcode 5), you can see the assembly or disassembly for a file by:

  1. Showing the assistant editor (command+option+Enter is the default shortcut).
  2. In the JumpBar, select the tuxedo icon and select "Assembly" or "Disassembly" from the drop-down list.

You can view the Assembly for a file whether or not you're running the application. Disassembly is only available when the application is running and being debugged.

查看更多
女痞
6楼-- · 2019-01-18 10:10

On Xcode 6 you can go to the menu "Debug -> Debug Workflow -> Always show disassembly".

查看更多
登录 后发表回答