[Lldb-commits] [PATCH] D12877: [LLDB] Switch to assembly view if source is moved

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 20:35:16 PDT 2015


jasonmolenda added a subscriber: jasonmolenda.
jasonmolenda added a comment.

Maybe I'm an outlier here -- but I don't think we should show assembly code, unless specifically requested by the user, when we can't find a source file (but we have source-level debug information).

lldb used to behave the other way - when a source file could not be found, we would show assembly before the prompt.  There were many complaints from users about this behavior; users who are thinking at a source level and using source commands like "step" and "next", did not want to see assembly, it was meaningless to them.  If they stepi into an assembly routine or put a breakpoint on it - where we have no debug information, then presenting the assembly makes sense.

IIRC, gdb behaves the same way that lldb does today.  e.g.

clang -g a.c
rm a.c
lldb a.out
(lldb) br s -n main
(lldb) r

- thread #1: tid = 0x5e8d52, 0x0000000100000ed7 a.out`main(argc=1, argv=0x00007fff5fbff958) + 39 at a.c:10, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x0000000100000ed7 a.out`main(argc=1, argv=0x00007fff5fbff958) + 39 at a.c:10

(lldb) n
Process 38732 stopped

- thread #1: tid = 0x5e8d52, 0x0000000100000eea a.out`main(argc=1, argv=0x00007fff5fbff958) + 58 at a.c:11, queue = 'com.apple.main-thread', stop reason = step over frame #0: 0x0000000100000eea a.out`main(argc=1, argv=0x00007fff5fbff958) + 58 at a.c:11

(lldb)

I feel pretty strongly that this behavior should not be changed.  Seeing mixed source and assembly is meaningful to me and I may personally like to see that -- but the vast majority of our users do not interact with their programs at that level.


Repository:
  rL LLVM

http://reviews.llvm.org/D12877





More information about the lldb-commits mailing list