forked from OSchip/llvm-project
0b4c26b2cc
mode in lldb works. I've been discussing this with Jim Ingham, Greg Clayton, and Kate Stone for the past week or two. Previously lldb would print three source lines (centered on the line table entry line for the current line) followed by the assembly. It would print the context information (module`function + offset) before those three lines of source. Now lldb will print up to two lines before/after the line table entry. It prints two '*' characters for the line table line to make it clear what line is showing assembly. There is one line of whitespace before/after the source lines so the separation between source & assembly is clearer. I don't print the context line (module`function + offset). I stop printing context lines if it's a different line table entry, or if it's a source line I've already printed as context to another source line. If I have two line table entries one after another for the same source line (I get these often with clang - with different column information in them), I only print the source line once. I'm also using the target.process.thread.step-avoid-regexp setting (which keeps you from stepping into STL functions that have been inlined into your own code) and avoid printing any source lines from functions that match that regexp. When lldb disassembles into a new function, it will try to find the declaration line # for the function and print all of the source lines between the decl and the first line table entry (usually a { curly brace) so we have a good chance of including the arguments, at least with the debug info emitted by clang. Finally, the # of source lines of context to show has been separated from whether we're doing mixed source & assembly or not. Previously specifying 0 lines of context would turn off mixed source & assembly. I think there's room for improvement, and maybe some bugs I haven't found yet, but it's in good enough shape to upstream and iterate at this point. I'm not sure how best to indicate which source line is the actual line table # versus context lines. I'm using '**' right now. Both Kate and Greg had the initial idea to reuse '->' (normally used to indicate "currently executing source line") - I tried it but I wasn't thrilled, I'm too used to the established meaning of ->. Greg had the interesting idea of avoiding context source lines only in two line table entries in the same source file. So we'd print two lines before & after a source line, and then the next line table entry (if it was on the next source line after those two context lines) we'd display only the following two lines -- the previous two had just been printed. If an inline source line was printed between these two, though, we'd print the context lines for both of them. It's an interesting idea, and I want to see how it works with both -O0 and -O3 codegen where we have different amounts of inlining. <rdar://problem/27961419> llvm-svn: 280906 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CommandCompletions.cpp | ||
CommandObjectApropos.cpp | ||
CommandObjectApropos.h | ||
CommandObjectArgs.cpp | ||
CommandObjectArgs.h | ||
CommandObjectBreakpoint.cpp | ||
CommandObjectBreakpoint.h | ||
CommandObjectBreakpointCommand.cpp | ||
CommandObjectBreakpointCommand.h | ||
CommandObjectBugreport.cpp | ||
CommandObjectBugreport.h | ||
CommandObjectCommands.cpp | ||
CommandObjectCommands.h | ||
CommandObjectDisassemble.cpp | ||
CommandObjectDisassemble.h | ||
CommandObjectExpression.cpp | ||
CommandObjectExpression.h | ||
CommandObjectFrame.cpp | ||
CommandObjectFrame.h | ||
CommandObjectGUI.cpp | ||
CommandObjectGUI.h | ||
CommandObjectHelp.cpp | ||
CommandObjectHelp.h | ||
CommandObjectLanguage.cpp | ||
CommandObjectLanguage.h | ||
CommandObjectLog.cpp | ||
CommandObjectLog.h | ||
CommandObjectMemory.cpp | ||
CommandObjectMemory.h | ||
CommandObjectMultiword.cpp | ||
CommandObjectPlatform.cpp | ||
CommandObjectPlatform.h | ||
CommandObjectPlugin.cpp | ||
CommandObjectPlugin.h | ||
CommandObjectProcess.cpp | ||
CommandObjectProcess.h | ||
CommandObjectQuit.cpp | ||
CommandObjectQuit.h | ||
CommandObjectRegister.cpp | ||
CommandObjectRegister.h | ||
CommandObjectSettings.cpp | ||
CommandObjectSettings.h | ||
CommandObjectSource.cpp | ||
CommandObjectSource.h | ||
CommandObjectSyntax.cpp | ||
CommandObjectSyntax.h | ||
CommandObjectTarget.cpp | ||
CommandObjectTarget.h | ||
CommandObjectThread.cpp | ||
CommandObjectThread.h | ||
CommandObjectType.cpp | ||
CommandObjectType.h | ||
CommandObjectVersion.cpp | ||
CommandObjectVersion.h | ||
CommandObjectWatchpoint.cpp | ||
CommandObjectWatchpoint.h | ||
CommandObjectWatchpointCommand.cpp | ||
CommandObjectWatchpointCommand.h |