diff options
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/Platform.cpp | 26 | ||||
| -rw-r--r-- | lldb/source/Target/Process.cpp | 14 |
2 files changed, 25 insertions, 15 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 8236a66691c..2abff2b9e95 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1593,7 +1593,7 @@ OptionGroupPlatformRSync::GetDefinitions () } void -OptionGroupPlatformRSync::OptionParsingStarting (CommandInterpreter &interpreter) +OptionGroupPlatformRSync::OptionParsingStarting(ExecutionContext *execution_context) { m_rsync = false; m_rsync_opts.clear(); @@ -1602,9 +1602,9 @@ OptionGroupPlatformRSync::OptionParsingStarting (CommandInterpreter &interpreter } lldb_private::Error -OptionGroupPlatformRSync::SetOptionValue (CommandInterpreter &interpreter, - uint32_t option_idx, - const char *option_arg) +OptionGroupPlatformRSync::SetOptionValue(uint32_t option_idx, + const char *option_arg, + ExecutionContext *execution_context) { Error error; char short_option = (char) GetDefinitions()[option_idx].short_option; @@ -1653,16 +1653,17 @@ OptionGroupPlatformSSH::GetDefinitions () } void -OptionGroupPlatformSSH::OptionParsingStarting (CommandInterpreter &interpreter) +OptionGroupPlatformSSH::OptionParsingStarting(ExecutionContext + *execution_context) { m_ssh = false; m_ssh_opts.clear(); } lldb_private::Error -OptionGroupPlatformSSH::SetOptionValue (CommandInterpreter &interpreter, - uint32_t option_idx, - const char *option_arg) +OptionGroupPlatformSSH::SetOptionValue(uint32_t option_idx, + const char *option_arg, + ExecutionContext *execution_context) { Error error; char short_option = (char) GetDefinitions()[option_idx].short_option; @@ -1697,15 +1698,16 @@ OptionGroupPlatformCaching::GetDefinitions () } void -OptionGroupPlatformCaching::OptionParsingStarting (CommandInterpreter &interpreter) +OptionGroupPlatformCaching::OptionParsingStarting(ExecutionContext + *execution_context) { m_cache_dir.clear(); } lldb_private::Error -OptionGroupPlatformCaching::SetOptionValue (CommandInterpreter &interpreter, - uint32_t option_idx, - const char *option_arg) +OptionGroupPlatformCaching::SetOptionValue(uint32_t option_idx, + const char *option_arg, + ExecutionContext *execution_context) { Error error; char short_option = (char) GetDefinitions()[option_idx].short_option; diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 94e4f961064..e95c8ee7f25 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -442,7 +442,9 @@ ProcessInstanceInfo::DumpAsTableRow (Stream &s, Platform *platform, bool show_ar } Error -ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *option_arg) +ProcessLaunchCommandOptions::SetOptionValue(uint32_t option_idx, + const char *option_arg, + ExecutionContext *execution_context) { Error error; const int short_option = m_getopt_table[option_idx].val; @@ -503,8 +505,14 @@ ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *op break; case 'a': - if (!launch_info.GetArchitecture().SetTriple (option_arg, m_interpreter.GetPlatform(true).get())) - launch_info.GetArchitecture().SetTriple (option_arg); + { + TargetSP target_sp = execution_context ? + execution_context->GetTargetSP() : TargetSP(); + PlatformSP platform_sp = target_sp ? + target_sp->GetPlatform() : PlatformSP(); + if (!launch_info.GetArchitecture().SetTriple (option_arg, platform_sp.get())) + launch_info.GetArchitecture().SetTriple (option_arg); + } break; case 'A': // Disable ASLR. |

