[Lldb-commits] [lldb] r141593 - in /lldb/trunk/source: Plugins/DynamicLoader/Linux-DYLD/DynamicLoaderLinuxDYLD.cpp Plugins/Process/Linux/ProcessLinux.cpp Plugins/Process/Linux/ProcessLinux.h Plugins/Process/Linux/ProcessMonitor.cpp lldb.cpp

Johnny Chen johnny.chen at apple.com
Mon Oct 10 16:11:50 PDT 2011


Author: johnny
Date: Mon Oct 10 18:11:50 2011
New Revision: 141593

URL: http://llvm.org/viewvc/llvm-project?rev=141593&view=rev
Log:
Patch from dawn at burble.org to build on linux!

Modified:
    lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DynamicLoaderLinuxDYLD.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/lldb.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DynamicLoaderLinuxDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DynamicLoaderLinuxDYLD.cpp?rev=141593&r1=141592&r2=141593&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DynamicLoaderLinuxDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DynamicLoaderLinuxDYLD.cpp Mon Oct 10 18:11:50 2011
@@ -112,7 +112,7 @@
     executable = m_process->GetTarget().GetExecutableModule();
     load_offset = ComputeLoadOffset();
 
-    if (!executable.empty() && load_offset != LLDB_INVALID_ADDRESS)
+    if (executable.get() && load_offset != LLDB_INVALID_ADDRESS)
     {
         ModuleList module_list;
         module_list.Append(executable);
@@ -132,7 +132,7 @@
     executable = m_process->GetTarget().GetExecutableModule();
     load_offset = ComputeLoadOffset();
 
-    if (!executable.empty() && load_offset != LLDB_INVALID_ADDRESS)
+    if (executable.get() && load_offset != LLDB_INVALID_ADDRESS)
     {
         ModuleList module_list;
         module_list.Append(executable);
@@ -264,7 +264,7 @@
         {
             FileSpec file(I->path.c_str(), true);
             ModuleSP module_sp = LoadModuleAtAddress(file, I->base_addr);
-            if (!module_sp.empty())
+            if (module_sp.get())
                 new_modules.Append(module_sp);
         }
         m_process->GetTarget().ModulesDidLoad(new_modules);
@@ -280,7 +280,7 @@
             FileSpec file(I->path.c_str(), true);
             ModuleSP module_sp = 
                 loaded_modules.FindFirstModuleForFileSpec(file, NULL, NULL);
-            if (!module_sp.empty())
+            if (module_sp.get())
                 old_modules.Append(module_sp);
         }
         m_process->GetTarget().ModulesDidUnload(old_modules);
@@ -355,7 +355,7 @@
     {
         FileSpec file(I->path.c_str(), false);
         ModuleSP module_sp = LoadModuleAtAddress(file, I->base_addr);
-        if (!module_sp.empty())
+        if (module_sp.get())
             module_list.Append(module_sp);
     }
 

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=141593&r1=141592&r2=141593&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp Mon Oct 10 18:11:50 2011
@@ -437,6 +437,13 @@
     return m_thread_list.GetSize(false);
 }
 
+uint32_t
+ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list)
+{
+    // FIXME: Should this be implemented?
+    return 0;
+}
+
 ByteOrder
 ProcessLinux::GetByteOrder() const
 {

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=141593&r1=141592&r2=141593&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h Mon Oct 10 18:11:50 2011
@@ -129,6 +129,10 @@
     virtual uint32_t
     UpdateThreadListIfNeeded();
 
+    uint32_t
+    UpdateThreadList(lldb_private::ThreadList &old_thread_list, 
+                     lldb_private::ThreadList &new_thread_list);
+
     virtual lldb::ByteOrder
     GetByteOrder() const;
 

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=141593&r1=141592&r2=141593&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Mon Oct 10 18:11:50 2011
@@ -241,7 +241,7 @@
 
     // Set errno to zero so that we can detect a failed peek.
     errno = 0;
-    unsigned long data = ptrace(PTRACE_PEEKUSER, pid, m_offset, NULL);
+    uint32_t data = ptrace(PTRACE_PEEKUSER, pid, m_offset, NULL);
 
     if (data == -1UL && errno)
         m_result = false;

Modified: lldb/trunk/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=141593&r1=141592&r2=141593&view=diff
==============================================================================
--- lldb/trunk/source/lldb.cpp (original)
+++ lldb/trunk/source/lldb.cpp Mon Oct 10 18:11:50 2011
@@ -94,7 +94,9 @@
         UnwindAssemblyInstEmulation::Initialize();
         UnwindAssembly_x86::Initialize();
         EmulateInstructionARM::Initialize ();
+#if !defined (__linux__)
         ObjectFilePECOFF::Initialize ();
+#endif
 #if defined (__APPLE__)
         //----------------------------------------------------------------------
         // Apple/Darwin hosted plugins
@@ -166,7 +168,9 @@
     UnwindAssembly_x86::Terminate();
     UnwindAssemblyInstEmulation::Terminate();
     EmulateInstructionARM::Terminate ();
+#if !defined (__linux__)
     ObjectFilePECOFF::Terminate ();
+#endif
 
 #if defined (__APPLE__)
     DynamicLoaderMacOSXDYLD::Terminate();





More information about the lldb-commits mailing list