This is an archive of the discontinued LLVM Phabricator instance.

Report more precise error message when attach fails
ClosedPublic

Authored by labath on Apr 12 2018, 8:47 AM.

Details

Summary

If the remote stub sends a specific error message instead of just a E??
code, we can use this to display a more informative error message
instead of just the generic "unable to attach" message.

I write a test for this using the SB API.
On the console this will show up like:
(lldb) process attach ...
error: attach failed: <STUB-MESSAGE>

if the stub supports error messages, or:
error: attach failed: "Error ??"

if it doesn't.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Apr 12 2018, 8:47 AM
JDevlieghere accepted this revision.EditedApr 12 2018, 9:09 AM

LGTM module comment

source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
3809 ↗(On Diff #142194)

Outdated comment

This revision is now accepted and ready to land.Apr 12 2018, 9:09 AM
jingham accepted this revision.Apr 12 2018, 4:32 PM

That looks fine.

This revision was automatically updated to reflect the committed changes.
labath marked an inline comment as done.