This is an archive of the discontinued LLVM Phabricator instance.

[lldb] improve the help strings for gdb-remote and kdp-remote
ClosedPublic

Authored by lawrence_danna on Oct 17 2021, 9:18 AM.

Details

Summary

The help string can be more helpful by explaining these are
aliases for 'process connect'

Diff Detail

Event Timeline

lawrence_danna requested review of this revision.Oct 17 2021, 9:18 AM
lawrence_danna created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2021, 9:18 AM

I've seen commands print that they are an alias automatically:

(lldb) help rbreak
Sets a breakpoint or set of breakpoints in the executable.

Syntax: rbreak <cmd-options>

<...>

'rbreak' is an abbreviation for 'breakpoint set -r %1'

Is this not the case for regex commands? Showing the user a cryptic regex isn't going to help them that much anyway, so nothing against doing this change.

I've seen commands print that they are an alias automatically:

(lldb) help rbreak
Sets a breakpoint or set of breakpoints in the executable.

Syntax: rbreak <cmd-options>

<...>

'rbreak' is an abbreviation for 'breakpoint set -r %1'

Is this not the case for regex commands? Showing the user a cryptic regex isn't going to help them that much anyway, so nothing against doing this change.

A regex command is not necessarily an alias for anything. You can have a regex command that calls different lldb commands depending on the regex. So there's no way for a regex command to automatically show anything but the regex's. So if you want to provide useful help for regex commands, you kind of have to provide a hand-written help.

This revision is now accepted and ready to land.Oct 19 2021, 1:01 PM