Modified the ArchSpec to take an optional "Platform *" when setting the triple.
This allows you to have a platform selected, then specify a triple using
"i386" and have the remaining triple items (vendor, os, and environment) set
automatically.
Many interpreter commands take the "--arch" option to specify an architecture
triple, so now the command options needed to be able to get to the current
platform, so the Options class now take a reference to the interpreter on
construction.
Modified the build LLVM building in the Xcode project to use the new
Xcode project level user definitions:
LLVM_BUILD_DIR - a path to the llvm build directory
LLVM_SOURCE_DIR - a path to the llvm sources for the llvm that will be used to build lldb
LLVM_CONFIGURATION - the configuration that lldb is built for (Release,
Release+Asserts, Debug, Debug+Asserts).
I also changed the LLVM build to not check if "lldb/llvm" is a symlink and
then assume it is a real llvm build directory versus the unzipped llvm.zip
package, so now you can actually have a "lldb/llvm" directory in your lldb
sources.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129112 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectArgs.cpp b/source/Commands/CommandObjectArgs.cpp
index f75ac0b..26ffa19 100644
--- a/source/Commands/CommandObjectArgs.cpp
+++ b/source/Commands/CommandObjectArgs.cpp
@@ -36,8 +36,8 @@
// calling functions.
//
-CommandObjectArgs::CommandOptions::CommandOptions () :
- Options()
+CommandObjectArgs::CommandOptions::CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter)
{
// Keep only one place to reset the values to their defaults
ResetOptionValues();
@@ -80,7 +80,8 @@
CommandObject (interpreter,
"args",
"When stopped at the start of a function, reads function arguments of type (u?)int(8|16|32|64)_t, (void|char)*",
- "args")
+ "args"),
+ m_options (interpreter)
{
}
diff --git a/source/Commands/CommandObjectArgs.h b/source/Commands/CommandObjectArgs.h
index 544d343..b6a7f32 100644
--- a/source/Commands/CommandObjectArgs.h
+++ b/source/Commands/CommandObjectArgs.h
@@ -28,7 +28,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectBreakpoint.cpp b/source/Commands/CommandObjectBreakpoint.cpp
index 8208ea8..c828701 100644
--- a/source/Commands/CommandObjectBreakpoint.cpp
+++ b/source/Commands/CommandObjectBreakpoint.cpp
@@ -47,8 +47,8 @@
//-------------------------------------------------------------------------
#pragma mark Set::CommandOptions
-CommandObjectBreakpointSet::CommandOptions::CommandOptions() :
- Options (),
+CommandObjectBreakpointSet::CommandOptions::CommandOptions(CommandInterpreter &interpreter) :
+ Options (interpreter),
m_filename (),
m_line_num (0),
m_column (0),
@@ -259,7 +259,8 @@
CommandObject (interpreter,
"breakpoint set",
"Sets a breakpoint or set of breakpoints in the executable.",
- "breakpoint set <cmd-options>")
+ "breakpoint set <cmd-options>"),
+ m_options (interpreter)
{
}
@@ -637,8 +638,8 @@
//-------------------------------------------------------------------------
#pragma mark List::CommandOptions
-CommandObjectBreakpointList::CommandOptions::CommandOptions() :
- Options (),
+CommandObjectBreakpointList::CommandOptions::CommandOptions(CommandInterpreter &interpreter) :
+ Options (interpreter),
m_level (lldb::eDescriptionLevelBrief) // Breakpoint List defaults to brief descriptions
{
}
@@ -717,7 +718,8 @@
CommandObject (interpreter,
"breakpoint list",
"List some or all breakpoints at configurable levels of detail.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData bp_id_arg;
@@ -1045,8 +1047,8 @@
//-------------------------------------------------------------------------
#pragma mark Clear::CommandOptions
-CommandObjectBreakpointClear::CommandOptions::CommandOptions() :
- Options (),
+CommandObjectBreakpointClear::CommandOptions::CommandOptions(CommandInterpreter &interpreter) :
+ Options (interpreter),
m_filename (),
m_line_num (0)
{
@@ -1114,7 +1116,8 @@
CommandObject (interpreter,
"breakpoint clear",
"Clears a breakpoint or set of breakpoints in the executable.",
- "breakpoint clear <cmd-options>")
+ "breakpoint clear <cmd-options>"),
+ m_options (interpreter)
{
}
@@ -1348,8 +1351,8 @@
//-------------------------------------------------------------------------
#pragma mark Modify::CommandOptions
-CommandObjectBreakpointModify::CommandOptions::CommandOptions() :
- Options (),
+CommandObjectBreakpointModify::CommandOptions::CommandOptions(CommandInterpreter &interpreter) :
+ Options (interpreter),
m_ignore_count (0),
m_thread_id(LLDB_INVALID_THREAD_ID),
m_thread_id_passed(false),
@@ -1504,7 +1507,8 @@
"Modify the options on a breakpoint or set of breakpoints in the executable. "
"If no breakpoint is specified, acts on the last created breakpoint. "
"With the exception of -e, -d and -i, passing an empty argument clears the modification.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData bp_id_arg;
diff --git a/source/Commands/CommandObjectBreakpoint.h b/source/Commands/CommandObjectBreakpoint.h
index fdfd1d9..c624dc5 100644
--- a/source/Commands/CommandObjectBreakpoint.h
+++ b/source/Commands/CommandObjectBreakpoint.h
@@ -76,7 +76,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
@@ -142,7 +142,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
@@ -243,7 +243,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
@@ -303,7 +303,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index c3d50ea..f481515 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -31,8 +31,8 @@
// CommandObjectBreakpointCommandAdd::CommandOptions
//-------------------------------------------------------------------------
-CommandObjectBreakpointCommandAdd::CommandOptions::CommandOptions () :
- Options (),
+CommandObjectBreakpointCommandAdd::CommandOptions::CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter),
m_use_commands (false),
m_use_script_language (false),
m_script_language (eScriptLanguageNone),
@@ -153,7 +153,8 @@
CommandObject (interpreter,
"add",
"Add a set of commands to a breakpoint, to be executed whenever the breakpoint is hit.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
SetHelpLong (
"\nGeneral information about entering breakpoint commands \n\
diff --git a/source/Commands/CommandObjectBreakpointCommand.h b/source/Commands/CommandObjectBreakpointCommand.h
index 5e3e1a1..5cfa848 100644
--- a/source/Commands/CommandObjectBreakpointCommand.h
+++ b/source/Commands/CommandObjectBreakpointCommand.h
@@ -95,7 +95,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectCommands.cpp b/source/Commands/CommandObjectCommands.cpp
index b3a974b..8f8dd96 100644
--- a/source/Commands/CommandObjectCommands.cpp
+++ b/source/Commands/CommandObjectCommands.cpp
@@ -34,7 +34,10 @@
{
public:
- CommandOptions (){}
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter)
+ {
+ }
virtual
~CommandOptions (){}
@@ -106,7 +109,8 @@
CommandObject (interpreter,
"commands source",
"Read in debugger commands from the file <filename> and execute them.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData file_arg;
diff --git a/source/Commands/CommandObjectDisassemble.cpp b/source/Commands/CommandObjectDisassemble.cpp
index 6567a08..84630ff 100644
--- a/source/Commands/CommandObjectDisassemble.cpp
+++ b/source/Commands/CommandObjectDisassemble.cpp
@@ -32,8 +32,8 @@
using namespace lldb;
using namespace lldb_private;
-CommandObjectDisassemble::CommandOptions::CommandOptions () :
- Options(),
+CommandObjectDisassemble::CommandOptions::CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter),
num_lines_context(0),
num_instructions (0),
func_name(),
@@ -128,7 +128,7 @@
break;
case 'a':
- arch.SetTriple (option_arg);
+ arch.SetTriple (option_arg, m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform().get());
break;
default:
@@ -195,7 +195,8 @@
CommandObject (interpreter,
"disassemble",
"Disassemble bytes in the current function, or elsewhere in the executable program as specified by the user.",
- "disassemble [<cmd-options>]")
+ "disassemble [<cmd-options>]"),
+ m_options (interpreter)
{
}
@@ -248,10 +249,7 @@
if (command.GetArgumentCount() != 0)
{
result.AppendErrorWithFormat ("\"disassemble\" arguments are specified as options.\n");
- GetOptions()->GenerateOptionUsage (m_interpreter,
- result.GetErrorStream(),
- this);
-
+ GetOptions()->GenerateOptionUsage (result.GetErrorStream(), this);
result.SetStatus (eReturnStatusFailed);
return false;
}
diff --git a/source/Commands/CommandObjectDisassemble.h b/source/Commands/CommandObjectDisassemble.h
index 46b4bac..ac354a8 100644
--- a/source/Commands/CommandObjectDisassemble.h
+++ b/source/Commands/CommandObjectDisassemble.h
@@ -30,7 +30,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectExpression.cpp b/source/Commands/CommandObjectExpression.cpp
index 220801f..5e5f968 100644
--- a/source/Commands/CommandObjectExpression.cpp
+++ b/source/Commands/CommandObjectExpression.cpp
@@ -37,8 +37,8 @@
using namespace lldb;
using namespace lldb_private;
-CommandObjectExpression::CommandOptions::CommandOptions () :
- Options()
+CommandObjectExpression::CommandOptions::CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter)
{
// Keep only one place to reset the values to their defaults
ResetOptionValues();
@@ -115,6 +115,7 @@
"expression",
"Evaluate a C/ObjC/C++ expression in the current program context, using variables currently in scope.",
NULL),
+ m_options (interpreter),
m_expr_line_count (0),
m_expr_lines ()
{
diff --git a/source/Commands/CommandObjectExpression.h b/source/Commands/CommandObjectExpression.h
index 5ddb0db..fcf308a 100644
--- a/source/Commands/CommandObjectExpression.h
+++ b/source/Commands/CommandObjectExpression.h
@@ -29,7 +29,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectFile.cpp b/source/Commands/CommandObjectFile.cpp
index 6f1267e..e0c81bb 100644
--- a/source/Commands/CommandObjectFile.cpp
+++ b/source/Commands/CommandObjectFile.cpp
@@ -25,8 +25,8 @@
using namespace lldb;
using namespace lldb_private;
-CommandObjectFile::CommandOptions::CommandOptions() :
- Options (),
+CommandObjectFile::CommandOptions::CommandOptions(CommandInterpreter &interpreter) :
+ Options (interpreter),
m_arch () // Breakpoint info defaults to brief descriptions
{
}
@@ -58,7 +58,8 @@
{
case 'a':
{
- ArchSpec option_arch (option_arg);
+ PlatformSP platform_sp (m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ ArchSpec option_arch (option_arg, platform_sp.get());
if (option_arch.IsValid())
m_arch = option_arch;
else
@@ -88,7 +89,8 @@
CommandObject (interpreter,
"file",
"Set the file to be used as the main executable by the debugger.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData file_arg;
diff --git a/source/Commands/CommandObjectFile.h b/source/Commands/CommandObjectFile.h
index bccb4bc..bbbacdb 100644
--- a/source/Commands/CommandObjectFile.h
+++ b/source/Commands/CommandObjectFile.h
@@ -44,7 +44,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectFrame.cpp b/source/Commands/CommandObjectFrame.cpp
index 8c83b67..3b697fd 100644
--- a/source/Commands/CommandObjectFrame.cpp
+++ b/source/Commands/CommandObjectFrame.cpp
@@ -99,8 +99,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter)
{
ResetOptionValues ();
}
@@ -155,7 +155,8 @@
"frame select",
"Select a frame by index from within the current thread and make it the current frame.",
NULL,
- eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
+ eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData index_arg;
@@ -224,7 +225,7 @@
else
{
result.AppendError ("invalid arguments.\n");
- m_options.GenerateOptionUsage (m_interpreter, result.GetErrorStream(), this);
+ m_options.GenerateOptionUsage (result.GetErrorStream(), this);
}
}
@@ -289,8 +290,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter)
{
ResetOptionValues ();
}
@@ -407,7 +408,8 @@
"Children of aggregate variables can be specified such as "
"'var->child.x'.",
NULL,
- eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
+ eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData var_name_arg;
diff --git a/source/Commands/CommandObjectHelp.cpp b/source/Commands/CommandObjectHelp.cpp
index 98fe2ad..bbf1552 100644
--- a/source/Commands/CommandObjectHelp.cpp
+++ b/source/Commands/CommandObjectHelp.cpp
@@ -140,7 +140,7 @@
else
m_interpreter.OutputFormattedHelpText (output_strm, "", "", sub_cmd_obj->GetHelp(), 1);
output_strm.Printf ("\nSyntax: %s\n", sub_cmd_obj->GetSyntax());
- sub_cmd_obj->GetOptions()->GenerateOptionUsage (m_interpreter, output_strm, sub_cmd_obj);
+ sub_cmd_obj->GetOptions()->GenerateOptionUsage (output_strm, sub_cmd_obj);
const char *long_help = sub_cmd_obj->GetHelpLong();
if ((long_help != NULL)
&& (strlen (long_help) > 0))
diff --git a/source/Commands/CommandObjectImage.cpp b/source/Commands/CommandObjectImage.cpp
index d684bb2..a59aff0 100644
--- a/source/Commands/CommandObjectImage.cpp
+++ b/source/Commands/CommandObjectImage.cpp
@@ -603,7 +603,8 @@
CommandObjectImageDumpModuleList (interpreter,
"image dump symtab",
"Dump the symbol table from one or more executable images.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
}
@@ -719,8 +720,8 @@
{
public:
- CommandOptions () :
- Options(),
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter),
m_sort_order (eSortOrderNone)
{
}
@@ -1140,8 +1141,8 @@
{
public:
- CommandOptions () :
- Options(),
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter),
m_format_array()
{
}
@@ -1188,7 +1189,8 @@
CommandObject (interpreter,
"image list",
"List current executable and dependent shared library images.",
- "image list [<cmd-options>]")
+ "image list [<cmd-options>]"),
+ m_options (interpreter)
{
}
@@ -1346,8 +1348,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(m_interpreter)
{
ResetOptionValues();
}
@@ -1463,7 +1465,8 @@
CommandObject (interpreter,
"image lookup",
"Look up information within executable and dependent shared library images.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData file_arg;
@@ -1572,7 +1575,7 @@
break;
default:
- m_options.GenerateOptionUsage (m_interpreter, result.GetErrorStream(), this);
+ m_options.GenerateOptionUsage (result.GetErrorStream(), this);
syntax_error = true;
break;
}
diff --git a/source/Commands/CommandObjectLog.cpp b/source/Commands/CommandObjectLog.cpp
index 383e299..b10e8ec 100644
--- a/source/Commands/CommandObjectLog.cpp
+++ b/source/Commands/CommandObjectLog.cpp
@@ -62,7 +62,8 @@
CommandObject (interpreter,
"log enable",
"Enable logging for a single log channel.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg1;
@@ -168,8 +169,8 @@
{
public:
- CommandOptions () :
- Options (),
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter),
log_file (),
log_options (0)
{
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index f63848c..c731c61 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -36,8 +36,8 @@
class CommandOptions : public Options
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
ResetOptionValues();
}
@@ -198,7 +198,8 @@
"memory read",
"Read from the memory of the process being debugged.",
NULL,
- eFlagProcessMustBeLaunched)
+ eFlagProcessMustBeLaunched),
+ m_options (interpreter)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
@@ -434,8 +435,8 @@
class CommandOptions : public Options
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
ResetOptionValues();
}
@@ -521,7 +522,8 @@
"Write to the memory of the process being debugged.",
//"memory write [<cmd-options>] <addr> [value1 value2 ...]",
NULL,
- eFlagProcessMustBeLaunched)
+ eFlagProcessMustBeLaunched),
+ m_options (interpreter)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
diff --git a/source/Commands/CommandObjectPlatform.cpp b/source/Commands/CommandObjectPlatform.cpp
index 12515ce..a72b0db4 100644
--- a/source/Commands/CommandObjectPlatform.cpp
+++ b/source/Commands/CommandObjectPlatform.cpp
@@ -19,8 +19,10 @@
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
+#include "lldb/Interpreter/Options.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Platform.h"
+#include "lldb/Target/Process.h"
using namespace lldb;
using namespace lldb_private;
@@ -36,7 +38,8 @@
"platform create",
"Create a platform instance by name and select it as the current platform.",
"platform create <platform-name>",
- 0)
+ 0),
+ m_options (interpreter)
{
}
@@ -86,7 +89,8 @@
{
public:
- CommandOptions () :
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter),
os_version_major (UINT32_MAX),
os_version_minor (UINT32_MAX),
os_version_update (UINT32_MAX)
@@ -418,11 +422,12 @@
{
public:
CommandObjectPlatformProcessList (CommandInterpreter &interpreter) :
- CommandObject (interpreter,
- "platform process list",
- "List processes on a remote platform by name, pid, or many other matching attributes.",
- "platform process list",
- 0)
+ CommandObject (interpreter,
+ "platform process list",
+ "List processes on a remote platform by name, pid, or many other matching attributes.",
+ "platform process list",
+ 0),
+ m_options (interpreter)
{
}
@@ -529,7 +534,8 @@
{
public:
- CommandOptions () :
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter),
match_info ()
{
}
@@ -585,7 +591,7 @@
break;
case 'a':
- match_info.GetProcessInfo().GetArchitecture().SetTriple (option_arg);
+ match_info.GetProcessInfo().GetArchitecture().SetTriple (option_arg, m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform().get());
break;
case 'n':
diff --git a/source/Commands/CommandObjectProcess.cpp b/source/Commands/CommandObjectProcess.cpp
index 8287481..116309d 100644
--- a/source/Commands/CommandObjectProcess.cpp
+++ b/source/Commands/CommandObjectProcess.cpp
@@ -40,8 +40,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
// Keep default values of all options in one place: ResetOptionValues ()
ResetOptionValues ();
@@ -121,7 +121,8 @@
CommandObject (interpreter,
"process launch",
"Launch the executable in the debugger.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData run_args_arg;
@@ -433,8 +434,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
// Keep default values of all options in one place: ResetOptionValues ()
ResetOptionValues ();
@@ -494,8 +495,7 @@
}
virtual bool
- HandleOptionArgumentCompletion (CommandInterpreter &interpeter,
- Args &input,
+ HandleOptionArgumentCompletion (Args &input,
int cursor_index,
int char_pos,
OptionElementVector &opt_element_vector,
@@ -521,7 +521,7 @@
const char *partial_name = NULL;
partial_name = input.GetArgumentAtIndex(opt_arg_pos);
- PlatformSP platform_sp (interpeter.GetDebugger().GetPlatformList().GetSelectedPlatform ());
+ PlatformSP platform_sp (m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform ());
if (platform_sp)
{
ProcessInfoList process_infos;
@@ -563,7 +563,8 @@
CommandObject (interpreter,
"process attach",
"Attach to a process.",
- "process attach <cmd-options>")
+ "process attach <cmd-options>"),
+ m_options (interpreter)
{
}
@@ -983,8 +984,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
// Keep default values of all options in one place: ResetOptionValues ()
ResetOptionValues ();
@@ -1035,11 +1036,12 @@
};
CommandObjectProcessConnect (CommandInterpreter &interpreter) :
- CommandObject (interpreter,
- "process connect",
- "Connect to a remote debug service.",
- "process connect <remote-url>",
- 0)
+ CommandObject (interpreter,
+ "process connect",
+ "Connect to a remote debug service.",
+ "process connect <remote-url>",
+ 0),
+ m_options (interpreter)
{
}
@@ -1568,8 +1570,8 @@
{
public:
- CommandOptions () :
- Options ()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter)
{
ResetOptionValues ();
}
@@ -1632,7 +1634,8 @@
CommandObject (interpreter,
"process handle",
"Show or update what the process and debugger should do with various signals received from the OS.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
SetHelpLong ("If no signals are specified, update them all. If no update option is specified, list the current values.\n");
CommandArgumentEntry arg;
diff --git a/source/Commands/CommandObjectRegister.cpp b/source/Commands/CommandObjectRegister.cpp
index 55a4782..d50d7d7 100644
--- a/source/Commands/CommandObjectRegister.cpp
+++ b/source/Commands/CommandObjectRegister.cpp
@@ -19,6 +19,7 @@
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
+#include "lldb/Interpreter/Options.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/RegisterContext.h"
@@ -37,7 +38,8 @@
"Dump the contents of one or more register values from the current frame. If no register is specified, dumps them all.",
//"register read [<reg-name1> [<reg-name2> [...]]]",
NULL,
- eFlagProcessMustBeLaunched | eFlagProcessMustBePaused)
+ eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData register_arg;
@@ -154,8 +156,8 @@
class CommandOptions : public Options
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
ResetOptionValues();
}
diff --git a/source/Commands/CommandObjectSettings.cpp b/source/Commands/CommandObjectSettings.cpp
index 82a4929..b5cf326 100644
--- a/source/Commands/CommandObjectSettings.cpp
+++ b/source/Commands/CommandObjectSettings.cpp
@@ -66,7 +66,7 @@
"settings set",
"Set or change the value of a single debugger setting variable.",
NULL),
- m_options ()
+ m_options (interpreter)
{
CommandArgumentEntry arg1;
CommandArgumentEntry arg2;
@@ -237,8 +237,8 @@
// CommandObjectSettingsSet::CommandOptions
//-------------------------------------------------------------------------
-CommandObjectSettingsSet::CommandOptions::CommandOptions () :
- Options (),
+CommandObjectSettingsSet::CommandOptions::CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter),
m_override (true),
m_reset (false)
{
diff --git a/source/Commands/CommandObjectSettings.h b/source/Commands/CommandObjectSettings.h
index 7d78c08..170b7f2 100644
--- a/source/Commands/CommandObjectSettings.h
+++ b/source/Commands/CommandObjectSettings.h
@@ -59,7 +59,7 @@
{
public:
- CommandOptions ();
+ CommandOptions (CommandInterpreter &interpreter);
virtual
~CommandOptions ();
diff --git a/source/Commands/CommandObjectSource.cpp b/source/Commands/CommandObjectSource.cpp
index 7435b85..9fbf602 100644
--- a/source/Commands/CommandObjectSource.cpp
+++ b/source/Commands/CommandObjectSource.cpp
@@ -37,8 +37,8 @@
class CommandOptions : public Options
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
}
@@ -98,7 +98,8 @@
CommandObject (interpreter,
"source info",
"Display information about the source lines from the current executable's debug info.",
- "source info [<cmd-options>]")
+ "source info [<cmd-options>]"),
+ m_options (interpreter)
{
}
@@ -148,8 +149,8 @@
class CommandOptions : public Options
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
}
@@ -227,7 +228,8 @@
CommandObject (interpreter,
"source list",
"Display source code (as specified) based on the current executable's debug info.",
- NULL)
+ NULL),
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData file_arg;
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 1780f2b..7686620 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -489,8 +489,8 @@
class CommandOptions : public Options
{
public:
- CommandOptions () :
- Options(),
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter),
m_line_start(0),
m_line_end (UINT_MAX),
m_func_name_type_mask (eFunctionNameTypeAuto),
@@ -634,7 +634,8 @@
CommandObject (interpreter,
"target stop-hook add ",
"Add a hook to be executed when the target stops.",
- "target stop-hook add")
+ "target stop-hook add"),
+ m_options (interpreter)
{
}
diff --git a/source/Commands/CommandObjectThread.cpp b/source/Commands/CommandObjectThread.cpp
index d5da880..abb6f5f 100644
--- a/source/Commands/CommandObjectThread.cpp
+++ b/source/Commands/CommandObjectThread.cpp
@@ -249,8 +249,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options(interpreter)
{
// Keep default values of all options in one place: ResetOptionValues ()
ResetOptionValues ();
@@ -325,7 +325,7 @@
"Show the stack for one or more threads. If no threads are specified, show the currently selected thread. Use the thread-index \"all\" to see all threads.",
NULL,
eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
- m_options()
+ m_options(interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData thread_idx_arg;
@@ -487,8 +487,8 @@
{
public:
- CommandOptions () :
- Options()
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter)
{
// Keep default values of all options in one place: ResetOptionValues ()
ResetOptionValues ();
@@ -575,7 +575,7 @@
CommandObject (interpreter, name, help, syntax, flags),
m_step_type (step_type),
m_step_scope (step_scope),
- m_options ()
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData thread_id_arg;
@@ -976,8 +976,8 @@
uint32_t m_thread_idx;
uint32_t m_frame_idx;
- CommandOptions () :
- Options(),
+ CommandOptions (CommandInterpreter &interpreter) :
+ Options (interpreter),
m_thread_idx(LLDB_INVALID_THREAD_ID),
m_frame_idx(LLDB_INVALID_FRAME_ID)
{
@@ -1069,7 +1069,7 @@
"Run the current or specified thread until it reaches a given line number or leaves the current function.",
NULL,
eFlagProcessMustBeLaunched | eFlagProcessMustBePaused),
- m_options ()
+ m_options (interpreter)
{
CommandArgumentEntry arg;
CommandArgumentData line_num_arg;