This is an archive of the discontinued LLVM Phabricator instance.

Remove tailing " (deleted)" from executable name returned by readlink
ClosedPublic

Authored by chying on May 7 2015, 4:17 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

chying updated this revision to Diff 25257.May 7 2015, 4:17 PM
chying retitled this revision from to Remove tailing " (deleted)" from executable name returned by readlink.
chying updated this object.
chying edited the test plan for this revision. (Show Details)
chying added reviewers: chaoren, sivachandra, vharron.
chying added a subscriber: Unknown Object (MLST).
sivachandra accepted this revision.May 7 2015, 4:56 PM
sivachandra edited edge metadata.

LGTM. Please wait for chaoren.

This revision is now accepted and ready to land.May 7 2015, 4:56 PM
chaoren added inline comments.May 7 2015, 4:57 PM
test/tools/lldb-server/gdbremote_testcase.py
164 ↗(On Diff #25257)
shell_command.GetOutput().replace('(deleted)', '').strip()

No functional difference, but I think this looks nicer.

Also, what if someone puts their lldb-server binary in a path containing the word ' (deleted)'? You never know. :)

E.g., '/usr/ (deleted)/bin/lldb-server'

chying updated this revision to Diff 25266.May 7 2015, 5:11 PM
chying edited edge metadata.

Remove ' (deleted)' only if it comes at the last

chaoren added inline comments.May 7 2015, 5:12 PM
test/tools/lldb-server/gdbremote_testcase.py
164 ↗(On Diff #25257)
re.sub(' \(deleted\)$', '', shell_command.GetOutput().strip())

For most correctness.

chying updated this revision to Diff 25271.May 7 2015, 5:44 PM

use re to match the pattern

chaoren accepted this revision.May 7 2015, 5:45 PM
chaoren edited edge metadata.
This revision was automatically updated to reflect the committed changes.