7

How to switch between source code debug mode and disassembly debug mode in LLDB,like "Xcode->Debug->Debug Workflow->Always show disassembly" menu function?

1 Answer 1

13

These four settings control how lldb displays source/assembly when you stop:

  stop-disassembly-count   -- The number of disassembly lines to show when displaying a stopped context.
  stop-disassembly-display -- Control when to display disassembly when displaying a stopped context.
  stop-line-count-after    -- The number of sources lines to display that come after the current source line when displaying a stopped context.
  stop-line-count-before   -- The number of sources lines to display that come before the current source line when displaying a stopped context.

So for instance, at the LLDB prompt:

set set stop-disassembly-display always
set set stop-line-count-before 0
set set stop-line-count-after 0

Will only display assembly.

Sign up to request clarification or add additional context in comments.

2 Comments

There's a sample command in the lldb sources: llvm.org/svn/llvm-project/lldb/trunk/examples/python/… that toggles between this "convenient for assembly" mode and "convenient for source" mode, if you do that sort of thing a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.