[Lldb-commits] [lldb] r222182 - Fix broken Linux build after signature change of ResolveExecutable.

Oleksiy Vyalov ovyalov at google.com
Mon Nov 17 14:16:42 PST 2014


Author: ovyalov
Date: Mon Nov 17 16:16:42 2014
New Revision: 222182

URL: http://llvm.org/viewvc/llvm-project?rev=222182&view=rev
Log:
Fix broken Linux build after signature change of ResolveExecutable.

Modified:
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
    lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp

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=222182&r1=222181&r2=222182&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Mon Nov 17 16:16:42 2014
@@ -823,10 +823,10 @@ PlatformLinux::LaunchNativeProcess (
 
     // Retrieve the exe module.
     lldb::ModuleSP exe_module_sp;
+    ModuleSpec exe_module_spec(launch_info.GetExecutableFile(), launch_info.GetArchitecture());
 
     Error error = ResolveExecutable (
-        launch_info.GetExecutableFile (),
-        launch_info.GetArchitecture (),
+        exe_module_spec,
         exe_module_sp,
         NULL);
 

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=222182&r1=222181&r2=222182&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Mon Nov 17 16:16:42 2014
@@ -48,6 +48,7 @@
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Core/Module.h"
+#include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Core/Scalar.h"
 #include "lldb/Core/State.h"
@@ -158,10 +159,10 @@ namespace
 
         // Resolve the executable module.
         ModuleSP exe_module_sp;
+        ModuleSpec exe_module_spec(process_info.GetExecutableFile(), platform.GetSystemArchitecture ());
         FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths ());
         Error error = platform.ResolveExecutable(
             process_info.GetExecutableFile (),
-            platform.GetSystemArchitecture (),
             exe_module_sp,
             executable_search_paths.GetSize () ? &executable_search_paths : NULL);
 
@@ -1441,8 +1442,8 @@ NativeProcessLinux::AttachToInferior (ll
     // Resolve the executable module
     ModuleSP exe_module_sp;
     FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
-
-    error = platform_sp->ResolveExecutable(process_info.GetExecutableFile(), HostInfo::GetArchitecture(), exe_module_sp,
+    ModuleSpec exe_module_spec(process_info.GetExecutableFile(), HostInfo::GetArchitecture());
+    error = platform_sp->ResolveExecutable(exe_module_spec, exe_module_sp,
                                            executable_search_paths.GetSize() ? &executable_search_paths : NULL);
     if (!error.Success())
         return;

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=222182&r1=222181&r2=222182&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Mon Nov 17 16:16:42 2014
@@ -16,6 +16,7 @@
 // Other libraries and framework includes
 #include "lldb/Breakpoint/Watchpoint.h"
 #include "lldb/Core/Module.h"
+#include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/State.h"
 #include "lldb/Host/FileSpec.h"
@@ -140,8 +141,8 @@ ProcessPOSIX::DoAttachToProcessWithID(ll
     // Resolve the executable module
     ModuleSP exe_module_sp;
     FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
-    error = platform_sp->ResolveExecutable(process_info.GetExecutableFile(),
-                                           m_target.GetArchitecture(),
+    ModuleSpec exe_module_spec(process_info.GetExecutableFile(), m_target.GetArchitecture());
+    error = platform_sp->ResolveExecutable(exe_module_spec,
                                            exe_module_sp,
                                            executable_search_paths.GetSize() ? &executable_search_paths : NULL);
     if (!error.Success())
@@ -365,11 +366,11 @@ ProcessPOSIX::DoDidExec()
             ProcessInstanceInfo process_info;
             platform_sp->GetProcessInfo(GetID(), process_info);
             ModuleSP exe_module_sp;
+            ModuleSpec exe_module_spec(process_info.GetExecutableFile(), target->GetArchitecture());
             FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
-            Error error = platform_sp->ResolveExecutable(process_info.GetExecutableFile(),
-                                                   target->GetArchitecture(),
-                                                   exe_module_sp,
-                                                   executable_search_paths.GetSize() ? &executable_search_paths : NULL);
+            Error error = platform_sp->ResolveExecutable(exe_module_spec,
+                                                         exe_module_sp,
+                                                         executable_search_paths.GetSize() ? &executable_search_paths : NULL);
             if (!error.Success())
                 return;
             target->SetExecutableModule(exe_module_sp, true);





More information about the lldb-commits mailing list