diff options
author | Greg Clayton <gclayton@apple.com> | 2011-06-23 17:59:56 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-06-23 17:59:56 +0000 |
commit | 4a33d3188c6d8d6f7f6ecd4963fcfd083c2e3325 (patch) | |
tree | c017ed69136cda3e55390dbbd1767c87be819d6c /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 3a0c5e52ff3ea056329fbbacd6f7e2bf281bf3ee (diff) | |
download | bcm5719-llvm-4a33d3188c6d8d6f7f6ecd4963fcfd083c2e3325.tar.gz bcm5719-llvm-4a33d3188c6d8d6f7f6ecd4963fcfd083c2e3325.zip |
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 <format> <typename1> [<typename2> ...]
type format delete <typename1> [<typename2> ...]
type format list [<typename1> [<typename2>] ...]
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
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 <getopt.h> #include <stdlib.h> +#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<CommandObjectRegexCommand> |