[Lldb-commits] [lldb] r151072 - in /lldb/trunk/source/Plugins: DynamicLoader/POSIX-DYLD/ Platform/Linux/ Process/Linux/ Process/POSIX/ Process/Utility/

Greg Clayton gclayton at apple.com
Tue Feb 21 10:40:07 PST 2012


Author: gclayton
Date: Tue Feb 21 12:40:07 2012
New Revision: 151072

URL: http://llvm.org/viewvc/llvm-project?rev=151072&view=rev
Log:
Linux fix patch from Dmitry Vyukov.


Modified:
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
    lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h
    lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
    lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
    lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h
    lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
    lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
    lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h
    lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
    lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp
    lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.h Tue Feb 21 12:40:07 2012
@@ -15,7 +15,7 @@
 #include <vector>
 
 // Other libraries and framework includes
-#include "lldb/lldb-forward-rtti.h"
+#include "lldb/lldb-forward.h"
 
 namespace lldb_private {
 class DataExtractor;

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Tue Feb 21 12:40:07 2012
@@ -307,7 +307,7 @@
         return thread_plan_sp;
 
     SymbolContextList target_symbols;
-    Target &target = thread.GetProcess().GetTarget();
+    Target &target = thread.GetProcess()->GetTarget();
     ModuleList &images = target.GetImages();
 
     images.FindSymbolsWithNameAndType(sym_name, eSymbolTypeCode, target_symbols);

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Tue Feb 21 12:40:07 2012
@@ -128,7 +128,8 @@
         {
             error = m_remote_platform_sp->ResolveExecutable (exe_file,
                                                              exe_arch,
-                                                             exe_module_sp);
+                                                             exe_module_sp,
+                                                             NULL);
         }
         else
         {
@@ -152,6 +153,7 @@
                                                  0, 
                                                  exe_module_sp, 
                                                  NULL, 
+                                                 NULL,
                                                  NULL);
         
             if (exe_module_sp->GetObjectFile() == NULL)
@@ -180,6 +182,7 @@
                                                      0, 
                                                      exe_module_sp, 
                                                      NULL, 
+                                                     NULL,
                                                      NULL);
                 // Did we find an executable using one of the 
                 if (error.Success())
@@ -367,7 +370,9 @@
         {
             debugger.GetTargetList().SetSelectedTarget(target);
 
-            process_sp = target->CreateProcess (listener, attach_info.GetProcessPluginName());
+            process_sp = target->CreateProcess (listener,
+                                                attach_info.GetProcessPluginName(),
+                                                NULL);
 
             if (process_sp)
                 error = process_sp->Attach (attach_info);

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp Tue Feb 21 12:40:07 2012
@@ -31,10 +31,10 @@
 //------------------------------------------------------------------------------
 // Static functions.
 
-Process*
-ProcessLinux::CreateInstance(Target& target, Listener &listener)
+ProcessSP
+ProcessLinux::CreateInstance(Target &target, Listener &listener, const FileSpec *)
 {
-    return new ProcessLinux(target, listener);
+    return ProcessSP(new ProcessLinux(target, listener));
 }
 
 void
@@ -105,8 +105,10 @@
     // FIXME: We should be using tid, not pid.
     assert(m_monitor);
     ThreadSP thread_sp (old_thread_list.FindThreadByID (GetID(), false));
-    if (!thread_sp)
-        thread_sp.reset(new POSIXThread(*this, GetID()));
+    if (!thread_sp) {
+        ProcessSP me = this->shared_from_this();
+        thread_sp.reset(new POSIXThread(me, GetID()));
+    }
 
     if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
         log->Printf ("ProcessLinux::%s() updated pid = %i", __FUNCTION__, GetID());

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h Tue Feb 21 12:40:07 2012
@@ -30,9 +30,10 @@
     //------------------------------------------------------------------
     // Static functions.
     //------------------------------------------------------------------
-    static Process*
+    static lldb::ProcessSP
     CreateInstance(lldb_private::Target& target,
-                   lldb_private::Listener &listener);
+                   lldb_private::Listener &listener,
+                   const lldb_private::FileSpec *);
 
     static void
     Initialize();

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Tue Feb 21 12:40:07 2012
@@ -966,6 +966,7 @@
 {
     ProcessMonitor *monitor = args->m_monitor;
     ProcessLinux &process = monitor->GetProcess();
+    lldb::ProcessSP processSP = process.shared_from_this();
     const char **argv = args->m_argv;
     const char **envp = args->m_envp;
     const char *stdin_path = args->m_stdin_path;
@@ -1104,7 +1105,7 @@
     // Update the process thread list with this new thread.
     // FIXME: should we be letting UpdateThreadList handle this?
     // FIXME: by using pids instead of tids, we can only support one thread.
-    inferior.reset(new POSIXThread(process, pid));
+    inferior.reset(new POSIXThread(processSP, pid));
     if (log)
         log->Printf ("ProcessMonitor::%s() adding pid = %i", __FUNCTION__, pid);
     process.GetThreadList().AddThread(inferior);
@@ -1166,6 +1167,7 @@
 
     ProcessMonitor *monitor = args->m_monitor;
     ProcessLinux &process = monitor->GetProcess();
+    lldb::ProcessSP processSP = process.shared_from_this();
     lldb::ThreadSP inferior;
     LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS));
 
@@ -1191,7 +1193,7 @@
     }
 
     // Update the process thread list with the attached thread.
-    inferior.reset(new POSIXThread(process, pid));
+    inferior.reset(new POSIXThread(processSP, pid));
     if (log)
         log->Printf ("ProcessMonitor::%s() adding tid = %i", __FUNCTION__, pid);
     process.GetThreadList().AddThread(inferior);

Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp Tue Feb 21 12:40:07 2012
@@ -29,10 +29,11 @@
 
 #include "UnwindLLDB.h"
 
+using namespace lldb;
 using namespace lldb_private;
 
 
-POSIXThread::POSIXThread(Process &process, lldb::tid_t tid)
+POSIXThread::POSIXThread(ProcessSP &process, lldb::tid_t tid)
     : Thread(process, tid),
       m_frame_ap(0)
 {
@@ -49,7 +50,8 @@
 ProcessMonitor &
 POSIXThread::GetMonitor()
 {
-    ProcessPOSIX &process = static_cast<ProcessPOSIX&>(GetProcess());
+    ProcessSP base = GetProcess();
+    ProcessPOSIX &process = static_cast<ProcessPOSIX&>(*base);
     return process.GetMonitor();
 }
 
@@ -62,7 +64,8 @@
 
     // Let all threads recover from stopping and do any clean up based
     // on the previous thread state (if any).
-    ProcessPOSIX &process = static_cast<ProcessPOSIX&>(GetProcess());
+    ProcessSP base = GetProcess();
+    ProcessPOSIX &process = static_cast<ProcessPOSIX&>(*base);
     process.GetThreadList().RefreshStateAfterStop();
 }
 
@@ -237,7 +240,7 @@
     lldb::addr_t pc = GetRegisterContext()->GetPC();
     if (log)
         log->Printf ("POSIXThread::%s () PC=0x%8.8llx", __FUNCTION__, pc);
-    lldb::BreakpointSiteSP bp_site(GetProcess().GetBreakpointSiteList().FindByAddress(pc));
+    lldb::BreakpointSiteSP bp_site(GetProcess()->GetBreakpointSiteList().FindByAddress(pc));
     assert(bp_site);
     lldb::break_id_t bp_id = bp_site->GetID();
     assert(bp_site && bp_site->ValidForThisThread(this));

Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h Tue Feb 21 12:40:07 2012
@@ -29,7 +29,7 @@
     : public lldb_private::Thread
 {
 public:
-    POSIXThread(lldb_private::Process &process, lldb::tid_t tid);
+    POSIXThread(lldb::ProcessSP &process, lldb::tid_t tid);
 
     virtual ~POSIXThread();
 

Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Tue Feb 21 12:40:07 2012
@@ -500,8 +500,10 @@
     // FIXME: We should be using tid, not pid.
     assert(m_monitor);
     ThreadSP thread_sp (old_thread_list.FindThreadByID (GetID(), false));
-    if (!thread_sp)
-        thread_sp.reset(new POSIXThread(*this, GetID()));
+    if (!thread_sp) {
+        ProcessSP me = this->shared_from_this();
+        thread_sp.reset(new POSIXThread(me, GetID()));
+    }
 
     if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
         log->Printf ("ProcessPOSIX::%s() updated pid = %i", __FUNCTION__, GetID());

Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp Tue Feb 21 12:40:07 2012
@@ -44,44 +44,38 @@
 }
 
 void
-ProcessPOSIXLog::DisableLog (Args &args, Stream *feedback_strm)
+ProcessPOSIXLog::DisableLog (const char **args, Stream *feedback_strm)
 {
     LogSP log (GetLog ());
     if (log)
     {
         uint32_t flag_bits = 0;
         
-        const size_t argc = args.GetArgumentCount ();
-        if (argc > 0)
+        flag_bits = log->GetMask().Get();
+        for (; args[0]; args++)
         {
-            flag_bits = log->GetMask().Get();
-            for (size_t i = 0; i < argc; ++i)
-            {
-                const char *arg = args.GetArgumentAtIndex (i);
-                
+            const char *arg = args[0];
 
-                if      (::strcasecmp (arg, "all")        == 0 ) flag_bits &= ~POSIX_LOG_ALL;
-                else if (::strcasecmp (arg, "async")      == 0 ) flag_bits &= ~POSIX_LOG_ASYNC;
-                else if (::strncasecmp (arg, "break", 5)  == 0 ) flag_bits &= ~POSIX_LOG_BREAKPOINTS;
-                else if (::strncasecmp (arg, "comm", 4)   == 0 ) flag_bits &= ~POSIX_LOG_COMM;
-                else if (::strcasecmp (arg, "default")    == 0 ) flag_bits &= ~POSIX_LOG_DEFAULT;
-                else if (::strcasecmp (arg, "packets")    == 0 ) flag_bits &= ~POSIX_LOG_PACKETS;
-                else if (::strcasecmp (arg, "memory")     == 0 ) flag_bits &= ~POSIX_LOG_MEMORY;
-                else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~POSIX_LOG_MEMORY_DATA_SHORT;
-                else if (::strcasecmp (arg, "data-long")  == 0 ) flag_bits &= ~POSIX_LOG_MEMORY_DATA_LONG;
-                else if (::strcasecmp (arg, "process")    == 0 ) flag_bits &= ~POSIX_LOG_PROCESS;
-                else if (::strcasecmp (arg, "ptrace")     == 0 ) flag_bits &= ~POSIX_LOG_PTRACE;
-                else if (::strcasecmp (arg, "registers")  == 0 ) flag_bits &= ~POSIX_LOG_REGISTERS;
-                else if (::strcasecmp (arg, "step")       == 0 ) flag_bits &= ~POSIX_LOG_STEP;
-                else if (::strcasecmp (arg, "thread")     == 0 ) flag_bits &= ~POSIX_LOG_THREAD;
-                else if (::strcasecmp (arg, "verbose")    == 0 ) flag_bits &= ~POSIX_LOG_VERBOSE;
-                else if (::strncasecmp (arg, "watch", 5)  == 0 ) flag_bits &= ~POSIX_LOG_WATCHPOINTS;
-                else
-                {
-                    feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
-                    ListLogCategories (feedback_strm);
-                }
-                
+            if      (::strcasecmp (arg, "all")        == 0 ) flag_bits &= ~POSIX_LOG_ALL;
+            else if (::strcasecmp (arg, "async")      == 0 ) flag_bits &= ~POSIX_LOG_ASYNC;
+            else if (::strncasecmp (arg, "break", 5)  == 0 ) flag_bits &= ~POSIX_LOG_BREAKPOINTS;
+            else if (::strncasecmp (arg, "comm", 4)   == 0 ) flag_bits &= ~POSIX_LOG_COMM;
+            else if (::strcasecmp (arg, "default")    == 0 ) flag_bits &= ~POSIX_LOG_DEFAULT;
+            else if (::strcasecmp (arg, "packets")    == 0 ) flag_bits &= ~POSIX_LOG_PACKETS;
+            else if (::strcasecmp (arg, "memory")     == 0 ) flag_bits &= ~POSIX_LOG_MEMORY;
+            else if (::strcasecmp (arg, "data-short") == 0 ) flag_bits &= ~POSIX_LOG_MEMORY_DATA_SHORT;
+            else if (::strcasecmp (arg, "data-long")  == 0 ) flag_bits &= ~POSIX_LOG_MEMORY_DATA_LONG;
+            else if (::strcasecmp (arg, "process")    == 0 ) flag_bits &= ~POSIX_LOG_PROCESS;
+            else if (::strcasecmp (arg, "ptrace")     == 0 ) flag_bits &= ~POSIX_LOG_PTRACE;
+            else if (::strcasecmp (arg, "registers")  == 0 ) flag_bits &= ~POSIX_LOG_REGISTERS;
+            else if (::strcasecmp (arg, "step")       == 0 ) flag_bits &= ~POSIX_LOG_STEP;
+            else if (::strcasecmp (arg, "thread")     == 0 ) flag_bits &= ~POSIX_LOG_THREAD;
+            else if (::strcasecmp (arg, "verbose")    == 0 ) flag_bits &= ~POSIX_LOG_VERBOSE;
+            else if (::strncasecmp (arg, "watch", 5)  == 0 ) flag_bits &= ~POSIX_LOG_WATCHPOINTS;
+            else
+            {
+                feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
+                ListLogCategories (feedback_strm);
             }
         }
         
@@ -95,7 +89,7 @@
 }
 
 LogSP
-ProcessPOSIXLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, Args &args, Stream *feedback_strm)
+ProcessPOSIXLog::EnableLog (StreamSP &log_stream_sp, uint32_t log_options, const char **args, Stream *feedback_strm)
 {
     // Try see if there already is a log - that way we can reuse its settings.
     // We could reuse the log in toto, but we don't know that the stream is the same.
@@ -107,17 +101,16 @@
     // Now make a new log with this stream if one was provided
     if (log_stream_sp)
     {
-        log = make_shared<Log>(log_stream_sp);
+        log = LogSP(new Log(log_stream_sp));
         GetLog () = log;
     }
 
     if (log)
     {
         bool got_unknown_category = false;
-        const size_t argc = args.GetArgumentCount();
-        for (size_t i=0; i<argc; ++i)
+        for (; args[0]; args++)
         {
-            const char *arg = args.GetArgumentAtIndex(i);
+            const char *arg = args[0];
 
             if      (::strcasecmp (arg, "all")        == 0 ) flag_bits |= POSIX_LOG_ALL;
             else if (::strcasecmp (arg, "async")      == 0 ) flag_bits |= POSIX_LOG_ASYNC;

Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h Tue Feb 21 12:40:07 2012
@@ -54,11 +54,11 @@
     GetLogIfAllCategoriesSet(uint32_t mask = 0);
 
     static void
-    DisableLog (lldb_private::Args &args, lldb_private::Stream *feedback_strm);
+    DisableLog (const char **args, lldb_private::Stream *feedback_strm);
 
     static lldb::LogSP
     EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options,
-               lldb_private::Args &args, lldb_private::Stream *feedback_strm);
+               const char **args, lldb_private::Stream *feedback_strm);
 
     static void
     ListLogCategories (lldb_private::Stream *strm);

Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_i386.cpp Tue Feb 21 12:40:07 2012
@@ -364,7 +364,8 @@
 ProcessMonitor &
 RegisterContext_i386::GetMonitor()
 {
-    ProcessPOSIX *process = static_cast<ProcessPOSIX*>(CalculateProcess());
+    ProcessSP base = CalculateProcess();
+    ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
     return process->GetMonitor();
 }
 

Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContext_x86_64.cpp Tue Feb 21 12:40:07 2012
@@ -434,7 +434,8 @@
 ProcessMonitor &
 RegisterContext_x86_64::GetMonitor()
 {
-    ProcessPOSIX *process = static_cast<ProcessPOSIX*>(CalculateProcess());
+    ProcessSP base = CalculateProcess();
+    ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
     return process->GetMonitor();
 }
 

Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp?rev=151072&r1=151071&r2=151072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Tue Feb 21 12:40:07 2012
@@ -34,7 +34,7 @@
     {
         ExecutionContext exe_ctx (m_thread.shared_from_this());
         Target *target = exe_ctx.GetTargetPtr();
-        const llvm::Triple::ArchType cpu = target ? target->GetArchitecture().GetMachine() : llvm::Triple::InvalidArch;
+        const llvm::Triple::ArchType cpu = target ? target->GetArchitecture().GetMachine() : llvm::Triple::UnknownArch;
 
         const char *exc_desc = NULL;
         const char *code_label = "code";
@@ -257,7 +257,7 @@
     {
         ExecutionContext exe_ctx (thread.shared_from_this());
         Target *target = exe_ctx.GetTargetPtr();
-        const llvm::Triple::ArchType cpu = target ? target->GetArchitecture().GetMachine() : llvm::Triple::InvalidArch;
+        const llvm::Triple::ArchType cpu = target ? target->GetArchitecture().GetMachine() : llvm::Triple::UnknownArch;
 
         switch (exc_type)
         {





More information about the lldb-commits mailing list