[Lldb-commits] [PATCH] Fix problem where 32-bit statically built lldb-platform cannot find lldb-gdbserver.

Chaoren Lin chaorenl at google.com
Tue Feb 10 10:28:28 PST 2015


http://reviews.llvm.org/D7519

Files:
  include/lldb/Host/linux/HostInfoLinux.h
  source/Host/linux/HostInfoLinux.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp

Index: include/lldb/Host/linux/HostInfoLinux.h
===================================================================
--- include/lldb/Host/linux/HostInfoLinux.h
+++ include/lldb/Host/linux/HostInfoLinux.h
@@ -40,6 +40,7 @@
     static FileSpec GetProgramFileSpec();
 
   protected:
+    static bool ComputeSharedLibraryDirectory(FileSpec &file_spec);
     static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
     static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
     static void ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64);
Index: source/Host/linux/HostInfoLinux.cpp
===================================================================
--- source/Host/linux/HostInfoLinux.cpp
+++ source/Host/linux/HostInfoLinux.cpp
@@ -223,6 +223,15 @@
 }
 
 bool
+HostInfoLinux::ComputeSharedLibraryDirectory(FileSpec &file_spec)
+{
+    if (HostInfoPosix::ComputeSharedLibraryDirectory(file_spec))
+        return true;
+    file_spec.GetDirectory() = GetProgramFileSpec().GetDirectory();
+    return (bool)file_spec.GetDirectory();
+}
+
+bool
 HostInfoLinux::ComputeSystemPluginsDirectory(FileSpec &file_spec)
 {
     FileSpec temp_file("/usr/lib/lldb", true);
Index: source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
===================================================================
--- source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
+++ source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
@@ -112,6 +112,7 @@
     switch (m_target_arch.GetMachine())
     {
         case llvm::Triple::x86:            
+        case llvm::Triple::x86_64:
             return g_register_infos_i386;
         default:
             assert(false && "Unhandled target architecture.");

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7519.19694.patch
Type: text/x-patch
Size: 1735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150210/12555c11/attachment.bin>


More information about the lldb-commits mailing list