diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-11-08 03:06:10 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-11-08 03:06:10 +0000 |
| commit | 21184644afefd30f76098b2b48abe6d6ae0fc115 (patch) | |
| tree | b3ddad330d5c318cfeb7fe4f75cfdf70e6ad5b47 /lldb/source | |
| parent | fab7697e42f2ad49ae7aa7243107b31a574162cc (diff) | |
| download | bcm5719-llvm-21184644afefd30f76098b2b48abe6d6ae0fc115.tar.gz bcm5719-llvm-21184644afefd30f76098b2b48abe6d6ae0fc115.zip | |
Fixed an issue where if you try and run something in a TTY that isn't
the same architecture as a default program, the attach architecture auto
detection would change the architecture to the architecture of the darwin-debug
(which was always x86_64) and hose up your debug session.
llvm-svn: 118399
Diffstat (limited to 'lldb/source')
| -rw-r--r-- | lldb/source/Host/macosx/Host.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm index 8acec961ba7..c8580b0f466 100644 --- a/lldb/source/Host/macosx/Host.mm +++ b/lldb/source/Host/macosx/Host.mm @@ -428,6 +428,9 @@ LaunchInNewTerminalWithAppleScript char launcher_path[PATH_MAX]; darwin_debug_file_spec.GetPath(launcher_path, sizeof(launcher_path)); + if (arch_spec) + command.Printf("arch -arch %s ", arch_spec->AsCString()); + command.Printf("'%s' --unix-socket=%s", launcher_path, unix_socket_name.c_str()); if (arch_spec && arch_spec->IsValid()) @@ -449,16 +452,17 @@ LaunchInNewTerminalWithAppleScript StreamString applescript_source; + const char *tty_command = command.GetString().c_str(); if (tty_name && tty_name[0]) { applescript_source.Printf (applscript_in_existing_tty, - command.GetString().c_str(), + tty_command, tty_name); } else { applescript_source.Printf (applscript_in_new_tty, - command.GetString().c_str()); + tty_command); } |

