Skip to content

lldb should have a way to show valid enum values for a setting #137172

@DavidSpickett

Description

@DavidSpickett

Inspired by a question on Discord about how to discover the values for the follow fork mode. settings list doesn't show them:

(lldb) settings list target.process.follow-fork-mode
  target.process.follow-fork-mode -- Debugger's behavior upon fork or vfork.

Which I understand to be the equivalent of help but for settings.

(lldb) help settings list
List and describe matching debugger settings.  Defaults to all listing all settings.

Syntax: settings list [<setting-variable-name | setting-prefix>]

(though I first looked for a help sub-command)

The only way to see them is to give it a bogus value:

(lldb) settings set target.process.follow-fork-mode food
error: invalid enumeration value 'food', valid values are: child, parent

Which is not very intuitive.

I think we could add them to the description, which might also make them show up in apropos which would be cool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImproving things as opposed to bug fixing, e.g. new or missing featurelldb

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions