std::vector<const Property *> properties;
const size_t num_properties =
- m_interpreter.GetDebugger().Apropos(search_word, properties);
+ GetDebugger().Apropos(search_word, properties);
if (num_properties) {
const bool dump_qualified_name = true;
result.AppendMessageWithFormatv(
const bool show_locations = false;
bp_sp->GetDescription(&output_stream, lldb::eDescriptionLevelInitial,
show_locations);
- if (target == m_interpreter.GetDebugger().GetDummyTarget())
+ if (target == GetDebugger().GetDummyTarget())
output_stream.Printf("Breakpoint set in dummy target, will get copied "
"into future targets.\n");
else {
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("There is not a current executable; there are no "
llvm::StringRef bytes_strref(lines[i]);
Status error = AppendRegexSubstitution(bytes_strref, check_only);
if (error.Fail()) {
- if (!m_interpreter.GetDebugger()
- .GetCommandInterpreter()
- .GetBatchCommandMode()) {
- StreamSP out_stream =
- m_interpreter.GetDebugger().GetAsyncOutputStream();
+ if (!GetDebugger().GetCommandInterpreter().GetBatchCommandMode()) {
+ StreamSP out_stream = GetDebugger().GetAsyncOutputStream();
out_stream->Printf("error: %s\n", error.AsCString());
}
}
true);
if (argc == 1) {
- Debugger &debugger = m_interpreter.GetDebugger();
+ Debugger &debugger = GetDebugger();
bool color_prompt = debugger.GetUseColor();
const bool multiple_lines = true; // Get multiple lines
IOHandlerSP io_handler_sp(new IOHandlerEditline(
};
bool DoExecute(Args &command, CommandReturnObject &result) override {
- if (m_interpreter.GetDebugger().GetScriptLanguage() !=
- lldb::eScriptLanguagePython) {
+ if (GetDebugger().GetScriptLanguage() != lldb::eScriptLanguagePython) {
result.AppendError("only scripting language supported for module "
"importing is currently Python");
result.SetStatus(eReturnStatusFailed);
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- if (m_interpreter.GetDebugger().GetScriptLanguage() !=
- lldb::eScriptLanguagePython) {
+ if (GetDebugger().GetScriptLanguage() != lldb::eScriptLanguagePython) {
result.AppendError("only scripting language supported for scripted "
"commands is currently Python");
result.SetStatus(eReturnStatusFailed);
bool CommandObjectDisassemble::DoExecute(Args &command,
CommandReturnObject &result) {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
ConstString name(m_options.func_name.c_str());
if (Disassembler::Disassemble(
- m_interpreter.GetDebugger(), m_options.arch, plugin_name,
- flavor_string, m_exe_ctx, name,
+ GetDebugger(), m_options.arch, plugin_name, flavor_string,
+ m_exe_ctx, name,
nullptr, // Module *
m_options.num_instructions, m_options.show_mixed,
m_options.show_mixed ? m_options.num_lines_context : 0, options,
bool print_sc_header = ranges.size() > 1;
for (AddressRange cur_range : ranges) {
if (Disassembler::Disassemble(
- m_interpreter.GetDebugger(), m_options.arch, plugin_name,
- flavor_string, m_exe_ctx, cur_range.GetBaseAddress(),
+ GetDebugger(), m_options.arch, plugin_name, flavor_string,
+ m_exe_ctx, cur_range.GetBaseAddress(),
m_options.num_instructions, m_options.show_mixed,
m_options.show_mixed ? m_options.num_lines_context : 0, options,
result.GetOutputStream())) {
cur_range.SetByteSize(DEFAULT_DISASM_BYTE_SIZE);
if (Disassembler::Disassemble(
- m_interpreter.GetDebugger(), m_options.arch, plugin_name,
- flavor_string, m_exe_ctx, cur_range, m_options.num_instructions,
+ GetDebugger(), m_options.arch, plugin_name, flavor_string,
+ m_exe_ctx, cur_range, m_options.num_instructions,
m_options.show_mixed,
m_options.show_mixed ? m_options.num_lines_context : 0, options,
result.GetOutputStream())) {
} else {
if (result_valobj_sp->GetError().GetError() ==
UserExpression::kNoResult) {
- if (format != eFormatVoid &&
- m_interpreter.GetDebugger().GetNotifyVoid()) {
+ if (format != eFormatVoid && GetDebugger().GetNotifyVoid()) {
error_stream->PutCString("(void)\n");
}
bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
#ifndef LLDB_DISABLE_CURSES
if (args.GetArgumentCount() == 0) {
- Debugger &debugger = m_interpreter.GetDebugger();
+ Debugger &debugger = GetDebugger();
lldb::StreamFileSP input_sp = debugger.GetInputFile();
if (input_sp && input_sp->GetFile().GetIsRealTerminal() &&
std::string error;
llvm::raw_string_ostream error_stream(error);
- bool success = m_interpreter.GetDebugger().EnableLog(
- channel, args.GetArgumentArrayRef(), log_file, m_options.log_options,
- error_stream);
+ bool success =
+ GetDebugger().EnableLog(channel, args.GetArgumentArrayRef(), log_file,
+ m_options.log_options, error_stream);
result.GetErrorStream() << error_stream.str();
if (success)
PlatformSP platform_sp(m_platform_options.CreatePlatformWithOptions(
m_interpreter, ArchSpec(), select, error, platform_arch));
if (platform_sp) {
- m_interpreter.GetDebugger().GetPlatformList().SetSelectedPlatform(
- platform_sp);
+ GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp);
platform_sp->GetStatus(result.GetOutputStream());
result.SetStatus(eReturnStatusSuccessFinishResult);
bool DoExecute(Args &args, CommandReturnObject &result) override {
Stream &ostrm = result.GetOutputStream();
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
PlatformSP platform_sp;
if (target) {
platform_sp = target->GetPlatform();
}
if (!platform_sp) {
- platform_sp =
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform();
+ platform_sp = GetDebugger().GetPlatformList().GetSelectedPlatform();
}
if (platform_sp) {
platform_sp->GetStatus(ostrm);
Stream &ostrm = result.GetOutputStream();
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
Status error(platform_sp->ConnectRemote(args));
if (error.Success()) {
platform_sp->GetStatus(ostrm);
result.SetStatus(eReturnStatusSuccessFinishResult);
- platform_sp->ConnectToWaitingProcesses(m_interpreter.GetDebugger(),
- error);
+ platform_sp->ConnectToWaitingProcesses(GetDebugger(), error);
if (error.Fail()) {
result.AppendError(error.AsCString());
result.SetStatus(eReturnStatusFailed);
Options *GetOptions() override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
OptionGroupOptions *m_platform_options = nullptr;
if (platform_sp) {
m_platform_options = platform_sp->GetConnectionOptions(m_interpreter);
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
if (args.GetArgumentCount() == 0) {
Status error;
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
if (m_option_working_dir.GetOptionValue().OptionWasSet())
platform_sp->SetWorkingDirectory(
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
std::string cmd_line;
args.GetCommandString(cmd_line);
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
Status error;
std::string cmd_line;
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
std::string cmd_line;
args.GetCommandString(cmd_line);
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
std::string cmd_line;
args.GetCommandString(cmd_line);
bool DoExecute(Args &args, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
std::string cmd_line;
args.GetCommandString(cmd_line);
}
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
const char *remote_file_path = args.GetArgumentAtIndex(0);
const char *local_file_path = args.GetArgumentAtIndex(1);
}
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
std::string remote_file_path(args.GetArgumentAtIndex(0));
user_id_t size = platform_sp->GetFileSize(FileSpec(remote_file_path));
FileSpec dst_fs(dst ? dst : src_fs.GetFilename().GetCString());
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
Status error(platform_sp->PutFile(src_fs, dst_fs));
if (error.Success()) {
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
PlatformSP platform_sp;
if (target) {
platform_sp = target->GetPlatform();
}
if (!platform_sp) {
- platform_sp =
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform();
+ platform_sp = GetDebugger().GetPlatformList().GetSelectedPlatform();
}
if (platform_sp) {
}
if (m_options.launch_info.GetExecutableFile()) {
- Debugger &debugger = m_interpreter.GetDebugger();
+ Debugger &debugger = GetDebugger();
if (argc == 0)
target->GetRunArguments(m_options.launch_info.GetArguments());
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
PlatformSP platform_sp;
if (target) {
platform_sp = target->GetPlatform();
}
if (!platform_sp) {
- platform_sp =
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform();
+ platform_sp = GetDebugger().GetPlatformList().GetSelectedPlatform();
}
if (platform_sp) {
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
PlatformSP platform_sp;
if (target) {
platform_sp = target->GetPlatform();
}
if (!platform_sp) {
- platform_sp =
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform();
+ platform_sp = GetDebugger().GetPlatformList().GetSelectedPlatform();
}
if (platform_sp) {
bool DoExecute(Args &command, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (platform_sp) {
Status err;
ProcessSP remote_process_sp = platform_sp->Attach(
- m_options.attach_info, m_interpreter.GetDebugger(), nullptr, err);
+ m_options.attach_info, GetDebugger(), nullptr, err);
if (err.Fail()) {
result.AppendError(err.AsCString());
result.SetStatus(eReturnStatusFailed);
return false;
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
Status error;
if (platform_sp) {
FileSpec working_dir{};
return false;
}
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
if (!platform_sp) {
result.AppendError("no platform currently selected");
result.SetStatus(eReturnStatusFailed);
FileSpec dylib_fspec(command[0].ref);
FileSystem::Instance().Resolve(dylib_fspec);
- if (m_interpreter.GetDebugger().LoadPlugin(dylib_fspec, error))
+ if (GetDebugger().LoadPlugin(dylib_fspec, error))
result.SetStatus(eReturnStatusSuccessFinishResult);
else {
result.AppendError(error.AsCString());
protected:
bool DoExecute(Args &launch_args, CommandReturnObject &result) override {
- Debugger &debugger = m_interpreter.GetDebugger();
+ Debugger &debugger = GetDebugger();
Target *target = debugger.GetSelectedTarget().get();
// If our listener is nullptr, users aren't allows to launch
ModuleSP exe_module_sp = target->GetExecutableModule();
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
PlatformSP platform_sp(
- m_interpreter.GetDebugger().GetPlatformList().GetSelectedPlatform());
+ GetDebugger().GetPlatformList().GetSelectedPlatform());
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
// N.B. The attach should be synchronous. It doesn't help much to get the
// prompt back between initiating the attach and the target actually
// stopping. So even if the interpreter is set to be asynchronous, we wait
TargetSP new_target_sp;
Status error;
- error = m_interpreter.GetDebugger().GetTargetList().CreateTarget(
- m_interpreter.GetDebugger(), "", "", eLoadDependentsNo,
+ error = GetDebugger().GetTargetList().CreateTarget(
+ GetDebugger(), "", "", eLoadDependentsNo,
nullptr, // No platform options
new_target_sp);
target = new_target_sp.get();
result.AppendError(error.AsCString("Error creating target"));
return false;
}
- m_interpreter.GetDebugger().GetTargetList().SetSelectedTarget(target);
+ GetDebugger().GetTargetList().SetSelectedTarget(target);
}
// Record the old executable module, we want to issue a warning if the
plugin_name = m_options.plugin_name.c_str();
Status error;
- Debugger &debugger = m_interpreter.GetDebugger();
+ Debugger &debugger = GetDebugger();
PlatformSP platform_sp = m_interpreter.GetPlatform(true);
ProcessSP process_sp = platform_sp->ConnectProcess(
command.GetArgumentAtIndex(0), plugin_name, debugger,
protected:
bool DoExecute(Args &signal_args, CommandReturnObject &result) override {
- TargetSP target_sp = m_interpreter.GetDebugger().GetSelectedTarget();
+ TargetSP target_sp = GetDebugger().GetSelectedTarget();
if (!target_sp) {
result.AppendError("No current target;"
const char *setting_var_name =
request.GetParsedLine().GetArgumentAtIndex(setting_var_idx);
Status error;
- lldb::OptionValueSP value_sp(
- m_interpreter.GetDebugger().GetPropertyValue(
- &m_exe_ctx, setting_var_name, false, error));
+ lldb::OptionValueSP value_sp(GetDebugger().GetPropertyValue(
+ &m_exe_ctx, setting_var_name, false, error));
if (value_sp) {
value_sp->AutoComplete(m_interpreter, request);
}
// A missing value corresponds to clearing the setting when "force" is
// specified.
if (argc == 1 && m_options.m_force) {
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationClear, var_name, llvm::StringRef()));
if (error.Fail()) {
result.AppendError(error.AsCString());
Status error;
if (m_options.m_global) {
- error = m_interpreter.GetDebugger().SetPropertyValue(
- nullptr, eVarSetOperationAssign, var_name, var_value_cstr);
+ error = GetDebugger().SetPropertyValue(nullptr, eVarSetOperationAssign,
+ var_name, var_value_cstr);
}
if (error.Success()) {
// if we did not clear the command's exe_ctx first
ExecutionContext exe_ctx(m_exe_ctx);
m_exe_ctx.Clear();
- error = m_interpreter.GetDebugger().SetPropertyValue(
- &exe_ctx, eVarSetOperationAssign, var_name, var_value_cstr);
+ error = GetDebugger().SetPropertyValue(&exe_ctx, eVarSetOperationAssign,
+ var_name, var_value_cstr);
}
if (error.Fail()) {
if (!args.empty()) {
for (const auto &arg : args) {
- Status error(m_interpreter.GetDebugger().DumpPropertyValue(
+ Status error(GetDebugger().DumpPropertyValue(
&m_exe_ctx, result.GetOutputStream(), arg.ref,
OptionValue::eDumpGroupValue));
if (error.Success()) {
}
}
} else {
- m_interpreter.GetDebugger().DumpAllPropertyValues(
- &m_exe_ctx, result.GetOutputStream(), OptionValue::eDumpGroupValue);
+ GetDebugger().DumpAllPropertyValues(&m_exe_ctx, result.GetOutputStream(),
+ OptionValue::eDumpGroupValue);
}
return result.Succeeded();
ExecutionContext clean_ctx;
if (args.empty()) {
- m_interpreter.GetDebugger().DumpAllPropertyValues(
- &clean_ctx, out_file, OptionValue::eDumpGroupExport);
+ GetDebugger().DumpAllPropertyValues(&clean_ctx, out_file,
+ OptionValue::eDumpGroupExport);
return result.Succeeded();
}
for (const auto &arg : args) {
- Status error(m_interpreter.GetDebugger().DumpPropertyValue(
+ Status error(GetDebugger().DumpPropertyValue(
&clean_ctx, out_file, arg.ref, OptionValue::eDumpGroupExport));
if (!error.Success()) {
result.AppendError(error.AsCString());
const char *property_path = args.GetArgumentAtIndex(i);
const Property *property =
- m_interpreter.GetDebugger().GetValueProperties()->GetPropertyAtPath(
+ GetDebugger().GetValueProperties()->GetPropertyAtPath(
&m_exe_ctx, will_modify, property_path);
if (property) {
}
}
} else {
- m_interpreter.GetDebugger().DumpAllDescriptions(m_interpreter,
- result.GetOutputStream());
+ GetDebugger().DumpAllDescriptions(m_interpreter,
+ result.GetOutputStream());
}
return result.Succeeded();
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationRemove, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationReplace, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
const char *var_value_cstr =
Args::StripSpaces(var_value_string, true, true, false);
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationAppend, var_name, var_value_cstr));
if (error.Fail()) {
result.AppendError(error.AsCString());
return false;
}
- Status error(m_interpreter.GetDebugger().SetPropertyValue(
+ Status error(GetDebugger().SetPropertyValue(
&m_exe_ctx, eVarSetOperationClear, var_name, llvm::StringRef()));
if (error.Fail()) {
result.AppendError(error.AsCString());
Target *target = m_exe_ctx.GetTargetPtr();
if (target == nullptr) {
- target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command.");
m_options.num_lines >= 10 ? 5 : m_options.num_lines / 2;
const uint32_t column =
- (m_interpreter.GetDebugger().GetStopShowColumn() !=
- eStopShowColumnNone)
+ (GetDebugger().GetStopShowColumn() != eStopShowColumnNone)
? sc.line_entry.column
: 0;
target->GetSourceManager().DisplaySourceLinesWithLineNumbers(
bool must_set_platform_path = false;
- Debugger &debugger = m_interpreter.GetDebugger();
+ Debugger &debugger = GetDebugger();
TargetSP target_sp;
llvm::StringRef arch_cstr = m_arch_option.GetArchitectureName();
target_sp->AppendExecutableSearchPaths(core_file_dir);
ProcessSP process_sp(target_sp->CreateProcess(
- m_interpreter.GetDebugger().GetListener(), llvm::StringRef(),
- &core_file));
+ GetDebugger().GetListener(), llvm::StringRef(), &core_file));
if (process_sp) {
// Seems weird that we Launch a core file, but that is what we
Stream &strm = result.GetOutputStream();
bool show_stopped_process_status = false;
- if (DumpTargetList(m_interpreter.GetDebugger().GetTargetList(),
+ if (DumpTargetList(GetDebugger().GetTargetList(),
show_stopped_process_status, strm) == 0) {
strm.PutCString("No targets.\n");
}
uint32_t target_idx =
StringConvert::ToUInt32(target_idx_arg, UINT32_MAX, 0, &success);
if (success) {
- TargetList &target_list = m_interpreter.GetDebugger().GetTargetList();
+ TargetList &target_list = GetDebugger().GetTargetList();
const uint32_t num_targets = target_list.GetNumTargets();
if (target_idx < num_targets) {
TargetSP target_sp(target_list.GetTargetAtIndex(target_idx));
bool DoExecute(Args &args, CommandReturnObject &result) override {
const size_t argc = args.GetArgumentCount();
std::vector<TargetSP> delete_target_list;
- TargetList &target_list = m_interpreter.GetDebugger().GetTargetList();
+ TargetList &target_list = GetDebugger().GetTargetList();
TargetSP target_sp;
if (m_all_option.GetOptionValue()) {
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target) {
const size_t argc = command.GetArgumentCount();
if (argc & 1) {
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target) {
bool notify = true;
target->GetImageSearchPathList().Clear(notify);
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target) {
size_t argc = command.GetArgumentCount();
// check for at least 3 arguments and an odd number of parameters
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target) {
if (command.GetArgumentCount() != 0) {
result.AppendError("list takes no arguments\n");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target) {
if (command.GetArgumentCount() != 1) {
result.AppendError("query requires one argument\n");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
OptionGroupFile m_symbol_file;
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
protected:
bool DoExecute(Args &args, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
const bool load = m_load_option.GetOptionValue().GetCurrentValue();
const bool set_pc = m_pc_option.GetOptionValue().GetCurrentValue();
if (target == nullptr) {
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
const bool use_global_module_list = m_options.m_use_global_module_list;
// Define a local module list here to ensure it lives longer than any
// "locker" object which might lock its contents below (through the
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
m_stop_hook_sp->GetID());
error_sp->Flush();
}
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target)
target->RemoveStopHookByID(m_stop_hook_sp->GetID());
} else {
// First step, make the specifier.
std::unique_ptr<SymbolContextSpecifier> specifier_up;
if (m_options.m_sym_ctx_specified) {
- specifier_up.reset(new SymbolContextSpecifier(
- m_interpreter.GetDebugger().GetSelectedTarget()));
+ specifier_up.reset(
+ new SymbolContextSpecifier(GetDebugger().GetSelectedTarget()));
if (!m_options.m_module_name.empty()) {
specifier_up->AddSpecification(
bool DoExecute(Args &command, CommandReturnObject &result) override {
bool synchronous_execution = m_interpreter.GetSynchronous();
- if (!m_interpreter.GetDebugger().GetSelectedTarget()) {
+ if (!GetDebugger().GetSelectedTarget()) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
result.SetStatus(eReturnStatusFailed);
bool DoExecute(Args &command, CommandReturnObject &result) override {
bool synchronous_execution = m_interpreter.GetSynchronous();
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("invalid target, create a debug target using the "
"'target create' command");
protected:
bool DoExecute(llvm::StringRef command,
CommandReturnObject &result) override {
- TargetSP target_sp = m_interpreter.GetDebugger().GetSelectedTarget();
+ TargetSP target_sp = GetDebugger().GetSelectedTarget();
Thread *thread = GetDefaultThread();
if (!thread) {
result.AppendError("no default thread");
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("Invalid target. No current target or watchpoints.");
result.SetStatus(eReturnStatusSuccessFinishNoResult);
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (!CheckTargetForWatchpointOperations(target, result))
return false;
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (!CheckTargetForWatchpointOperations(target, result))
return false;
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (!CheckTargetForWatchpointOperations(target, result))
return false;
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (!CheckTargetForWatchpointOperations(target, result))
return false;
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (!CheckTargetForWatchpointOperations(target, result))
return false;
}
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
StackFrame *frame = m_exe_ctx.GetFramePtr();
// If no argument is present, issue an error message. There's no way to
m_option_group.NotifyOptionParsingStarting(
&exe_ctx); // This is a raw command, so notify the option group
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
StackFrame *frame = m_exe_ctx.GetFramePtr();
OptionsWithRaw args(raw_command);
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("There is not a current executable; there are no "
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("There is not a current executable; there are no "
protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
- Target *target = m_interpreter.GetDebugger().GetSelectedTarget().get();
+ Target *target = GetDebugger().GetSelectedTarget().get();
if (target == nullptr) {
result.AppendError("There is not a current executable; there are no "