Change ProcessGDBRemote::DidLaunchOrAttach to
authorJason Molenda <jmolenda@apple.com>
Sun, 3 Aug 2014 21:42:52 +0000 (21:42 +0000)
committerJason Molenda <jmolenda@apple.com>
Sun, 3 Aug 2014 21:42:52 +0000 (21:42 +0000)
call Target::SetArchitecture instead of modifying a
reference to the target's architecture so that the
target logging can show that the arch has been changed.

llvm-svn: 214667

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

index 1b04f42..f1ba477 100644 (file)
@@ -1048,7 +1048,7 @@ ProcessGDBRemote::DidLaunchOrAttach (ArchSpec& process_arch)
                 if (process_arch.GetMachine() == llvm::Triple::arm &&
                     process_arch.GetTriple().getVendor() == llvm::Triple::Apple)
                 {
-                    target_arch = process_arch;
+                    GetTarget().SetArchitecture (process_arch);
                 }
                 else
                 {
@@ -1073,7 +1073,7 @@ ProcessGDBRemote::DidLaunchOrAttach (ArchSpec& process_arch)
             {
                 // The target doesn't have a valid architecture yet, set it from
                 // the architecture we got from the remote GDB server
-                target_arch = process_arch;
+                GetTarget().SetArchitecture (process_arch);
             }
         }
     }