From 0603aa9dc8434e15ef4d49e6e3dbcb2666aae6b6 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 4 Oct 2010 01:05:56 +0000 Subject: There are now to new "settings set" variables that live in each debugger instance: settings set frame-format settings set thread-format This allows users to control the information that is seen when dumping threads and frames. The default values are set such that they do what they used to do prior to changing over the the user defined formats. This allows users with terminals that can display color to make different items different colors using the escape control codes. A few alias examples that will colorize your thread and frame prompts are: settings set frame-format 'frame #${frame.index}: \033[0;33m${frame.pc}\033[0m{ \033[1;4;36m${module.file.basename}\033[0;36m ${function.name}{${function.pc-offset}}\033[0m}{ \033[0;35mat \033[1;35m${line.file.basename}:${line.number}}\033[0m\n' settings set thread-format 'thread #${thread.index}: \033[1;33mtid\033[0;33m = ${thread.id}\033[0m{, \033[0;33m${frame.pc}\033[0m}{ \033[1;4;36m${module.file.basename}\033[0;36m ${function.name}{${function.pc-offset}}\033[0m}{, \033[1;35mstop reason\033[0;35m = ${thread.stop-reason}\033[0m}{, \033[1;36mname = \033[0;36m${thread.name}\033[0m}{, \033[1;32mqueue = \033[0;32m${thread.queue}}\033[0m\n' A quick web search for "colorize terminal output" should allow you to see what you can do to make your output look like you want it. The "settings set" commands above can of course be added to your ~/.lldbinit file for permanent use. Changed the pure virtual void ExecutionContextScope::Calculate (ExecutionContext&); To: void ExecutionContextScope::CalculateExecutionContext (ExecutionContext&); I did this because this is a class that anything in the execution context heirarchy inherits from and "target->Calculate (exe_ctx)" didn't always tell you what it was really trying to do unless you look at the parameter. llvm-svn: 115485 --- lldb/source/Commands/CommandObjectCommands.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lldb/source/Commands/CommandObjectCommands.cpp') diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 913577b087b..f21938f5fe2 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -70,14 +70,10 @@ public: // char '#' while (pos != commands.end()) { - bool remove_string = false; size_t non_space = pos->find_first_not_of (k_space_characters); - if (non_space == std::string::npos) - remove_string = true; // Empty line - else if ((*pos)[non_space] == '#') - remove_string = true; // Comment line that starts with '#' - - if (remove_string) + // Check for empty line or comment line (lines whose first + // non-space character is a '#') + if (non_space == std::string::npos || (*pos)[non_space] == '#') pos = commands.erase(pos); else ++pos; -- cgit v1.2.3