[Lldb-commits] [lldb] r118399 - /lldb/trunk/source/Host/macosx/Host.mm
Greg Clayton
gclayton at apple.com
Sun Nov 7 19:06:10 PST 2010
Author: gclayton
Date: Sun Nov 7 21:06:10 2010
New Revision: 118399
URL: http://llvm.org/viewvc/llvm-project?rev=118399&view=rev
Log:
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.
Modified:
lldb/trunk/source/Host/macosx/Host.mm
Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=118399&r1=118398&r2=118399&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Sun Nov 7 21:06:10 2010
@@ -428,6 +428,9 @@
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 @@
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);
}
More information about the lldb-commits
mailing list