[Lldb-commits] [PATCH] D11129: Fix for remote-linux test fails: use currently selected platform on target launch
Muhammad Omair Javaid
omair.javaid at linaro.org
Sun Jul 12 21:16:04 PDT 2015
omjavaid created this revision.
omjavaid added reviewers: lldb-commits, clayborg, vharron, tberghammer.
This patch fixes a bug which was causing test failures on remote targets.
LLDB was select default platform instead of currently select target platform due to which following use case ended up launching a local debug server instead of spawning a server on currently connect + select platform.
file a.out
target select remote-linux
target connect connect://hostname:5432
run
on issuing run command lldb will launch the target with old platform pointer select by default on creating Target with command file a.out.
This patch fixes this behavior by updating the sp_platform to currently selected platform making sure we launch debugserver on the right platform.
This should fix all remote tests that issues a command sequence following a file command.
http://reviews.llvm.org/D11129
Files:
source/Target/Target.cpp
Index: source/Target/Target.cpp
===================================================================
--- source/Target/Target.cpp
+++ source/Target/Target.cpp
@@ -2545,7 +2545,7 @@
Debugger &debugger = GetDebugger();
const bool synchronous_execution = debugger.GetCommandInterpreter().GetSynchronous ();
- PlatformSP platform_sp (GetPlatform());
+ const auto platform_sp = GetDebugger ().GetPlatformList ().GetSelectedPlatform ();
// Finalize the file actions, and if none were given, default to opening
// up a pseudo terminal
@@ -2577,6 +2577,7 @@
if (log)
log->Printf ("Target::%s asking the platform to debug the process", __FUNCTION__);
+ SetPlatform (platform_sp);
// Get a weak pointer to the previous process if we have one
ProcessWP process_wp;
if (m_process_sp)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11129.29528.patch
Type: text/x-patch
Size: 867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150713/020ce45f/attachment.bin>
More information about the lldb-commits
mailing list