Skip to content

Commit

Permalink
Documentation: Improve help output for examinemem (go-delve#2623)
Browse files Browse the repository at this point in the history
Before this change when you typed `help` at the Delve prompt you would
only see the following:

```
examinemem (alias: x)  Examine memory:
```

Now with this patch the output is more descriptive:

```
examinemem (alias: x)  Examine raw memory at the given address.
```
  • Loading branch information
derekparker authored Jul 28, 2021
1 parent f6681c6 commit 56731bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Documentation/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Command | Description
--------|------------
[args](#args) | Print function arguments.
[display](#display) | Print value of an expression every time the program stops.
[examinemem](#examinemem) | Examine memory:
[examinemem](#examinemem) | Examine raw memory at the given address.
[locals](#locals) | Print local variables.
[print](#print) | Evaluate an expression.
[regs](#regs) | Print contents of CPU registers.
Expand Down Expand Up @@ -291,6 +291,8 @@ If locspec is omitted edit will open the current source file in the editor, othe
Aliases: ed

## examinemem
Examine raw memory at the given address.

Examine memory:

examinemem [-fmt <format>] [-count|-len <count>] [-size <size>] <address>
Expand Down
4 changes: 3 additions & 1 deletion pkg/terminal/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ Defines <alias> as an alias to <command> or removes an alias.`},
If locspec is omitted edit will open the current source file in the editor, otherwise it will open the specified location.`},
{aliases: []string{"libraries"}, cmdFn: libraries, helpMsg: `List loaded dynamic libraries`},

{aliases: []string{"examinemem", "x"}, group: dataCmds, cmdFn: examineMemoryCmd, helpMsg: `Examine memory:
{aliases: []string{"examinemem", "x"}, group: dataCmds, cmdFn: examineMemoryCmd, helpMsg: `Examine raw memory at the given address.
Examine memory:
examinemem [-fmt <format>] [-count|-len <count>] [-size <size>] <address>
examinemem [-fmt <format>] [-count|-len <count>] [-size <size>] -x <expression>
Expand Down

0 comments on commit 56731bd

Please sign in to comment.