From 4a33d3188c6d8d6f7f6ecd4963fcfd083c2e3325 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 23 Jun 2011 17:59:56 +0000 Subject: Committing type format code for Enrico Granata. This commit adds a new top level command named "type". Currently this command implements three commands: type format add [ ...] type format delete [ ...] type format list [ [] ...] This allows you to specify the default format that will be used to display types when you use "frame variable" or "expression", or the SBValue classes. Examples: // Format uint*_t as hex type format add x uint16_t uint32_t uint64_t // Format intptr_t as a pointer type format add p intptr_t The format characters are the same as "printf" for the most part with many additions. These format character specifiers are also used in many other commands ("frame variable" for one). The current list of format characters include: a - char buffer b - binary B - boolean c - char C - printable char d - signed decimal e - float f - float g - float i - signed decimal I - complex integer o - octal O - OSType p - pointer s - c-string u - unsigned decimal x - hex X - complex float y - bytes Y - bytes with ASCII llvm-svn: 133728 --- lldb/source/Interpreter/CommandInterpreter.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp') diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index d5f04020df1..5693e1d6ef9 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -13,13 +13,14 @@ #include #include +#include "CommandObjectScript.h" +#include "CommandObjectRegexCommand.h" + #include "../Commands/CommandObjectApropos.h" #include "../Commands/CommandObjectArgs.h" #include "../Commands/CommandObjectBreakpoint.h" -//#include "../Commands/CommandObjectCall.h" #include "../Commands/CommandObjectDisassemble.h" #include "../Commands/CommandObjectExpression.h" -//#include "../Commands/CommandObjectFile.h" #include "../Commands/CommandObjectFrame.h" #include "../Commands/CommandObjectHelp.h" #include "../Commands/CommandObjectLog.h" @@ -27,15 +28,14 @@ #include "../Commands/CommandObjectPlatform.h" #include "../Commands/CommandObjectProcess.h" #include "../Commands/CommandObjectQuit.h" -#include "lldb/Interpreter/CommandObjectRegexCommand.h" #include "../Commands/CommandObjectRegister.h" -#include "CommandObjectScript.h" #include "../Commands/CommandObjectSettings.h" #include "../Commands/CommandObjectSource.h" #include "../Commands/CommandObjectCommands.h" #include "../Commands/CommandObjectSyntax.h" #include "../Commands/CommandObjectTarget.h" #include "../Commands/CommandObjectThread.h" +#include "../Commands/CommandObjectType.h" #include "../Commands/CommandObjectVersion.h" #include "lldb/Interpreter/Args.h" @@ -261,6 +261,7 @@ CommandInterpreter::LoadCommandDictionary () m_command_dict["source"] = CommandObjectSP (new CommandObjectMultiwordSource (*this)); m_command_dict["target"] = CommandObjectSP (new CommandObjectMultiwordTarget (*this)); m_command_dict["thread"] = CommandObjectSP (new CommandObjectMultiwordThread (*this)); + m_command_dict["type"] = CommandObjectSP (new CommandObjectType (*this)); m_command_dict["version"] = CommandObjectSP (new CommandObjectVersion (*this)); std::auto_ptr -- cgit v1.2.3