[Lldb-commits] [lldb] r236802 - Remove tailing " (deleted)" from executable name returned by readlink

Ying Chen chying at google.com
Thu May 7 18:25:10 PDT 2015


Author: chying
Date: Thu May  7 20:25:10 2015
New Revision: 236802

URL: http://llvm.org/viewvc/llvm-project?rev=236802&view=rev
Log:
Remove tailing " (deleted)" from executable name returned by readlink

Summary: When calling readlink, " (deleted)" is appended to executable path if it's deleted. Remove if it's there.

Reviewers: chaoren, sivachandra, vharron

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9583

Modified:
    lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py

Modified: lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py?rev=236802&r1=236801&r2=236802&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py (original)
+++ lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py Thu May  7 20:25:10 2015
@@ -159,7 +159,9 @@ class GdbRemoteTestCaseBase(TestBase):
             err = platform.Run(shell_command)
             if err.Fail():
                 raise Exception("remote_platform.RunShellCommand('readlink /proc/%d/exe') failed: %s" % (pid, err))
-            self.debug_monitor_exe = shell_command.GetOutput().strip()
+            // If the binary has been deleted, the link name has " (deleted)" appended.
+            // Remove if it's there.
+            self.debug_monitor_exe = re.sub(r' \(deleted\)$', '', shell_command.GetOutput().strip())
             dname = self.dbg.GetSelectedPlatform().GetWorkingDirectory()
         else:
             self.debug_monitor_exe = get_lldb_server_exe()





More information about the lldb-commits mailing list