Added new OptionGroup classes for UInt64, UUID, File and Boolean values.
Removed the "image" command and moved it to "target modules". Added an alias
for "image" to "target modules".
Added some new target commands to be able to add and load modules to a target:
(lldb) target modules add <path>
(lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...]
So you can load individual sections without running a target:
(lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000
Or you can rigidly slide an entire shared library:
(lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000
This should improve bare board debugging when symbol files need to be slid around manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130796 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/OptionGroupUUID.cpp b/source/Interpreter/OptionGroupUUID.cpp
new file mode 100644
index 0000000..e436f61
--- /dev/null
+++ b/source/Interpreter/OptionGroupUUID.cpp
@@ -0,0 +1,75 @@
+//===-- OptionGroupUUID.cpp -------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "OptionGroupUUID.h"
+
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
+
+using namespace lldb;
+using namespace lldb_private;
+
+OptionGroupUUID::OptionGroupUUID() :
+ m_uuid ()
+{
+}
+
+OptionGroupUUID::~OptionGroupUUID ()
+{
+}
+
+static OptionDefinition
+g_option_table[] =
+{
+{ LLDB_OPT_SET_1 , false, "uuid", 'u', required_argument, NULL, 0, eArgTypeNone, "A module UUID value."},
+};
+
+const uint32_t k_num_file_options = sizeof(g_option_table)/sizeof(OptionDefinition);
+
+uint32_t
+OptionGroupUUID::GetNumDefinitions ()
+{
+ return k_num_file_options;
+}
+
+const OptionDefinition *
+OptionGroupUUID::GetDefinitions ()
+{
+ return g_option_table;
+}
+
+Error
+OptionGroupUUID::SetOptionValue (CommandInterpreter &interpreter,
+ uint32_t option_idx,
+ const char *option_arg)
+{
+ Error error;
+ char short_option = (char) g_option_table[option_idx].short_option;
+
+ switch (short_option)
+ {
+ case 'u':
+ error = m_uuid.SetValueFromCString (option_arg);
+ break;
+
+ default:
+ error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ break;
+ }
+
+ return error;
+}
+
+void
+OptionGroupUUID::OptionParsingStarting (CommandInterpreter &interpreter)
+{
+ m_uuid.Clear();
+}