summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-07-28 11:43:24 -0600
committerTom Tromey <tromey@adacore.com>2020-07-28 11:43:24 -0600
commit16f3242c055e2a740dfc42b65cc3509b6ccf71e8 (patch)
tree375d911e7518f674387921109f4921c50966c0e6
parent4888741a22e1ab88b53d92f1c915ccd2bacf6280 (diff)
downloadbinutils-gdb-16f3242c055e2a740dfc42b65cc3509b6ccf71e8.tar.gz
Update "disassemble" help
Pedro pointed out that disassemble/m should be documented after disassemble/s, because /m is deprecated. This patch does so, and adds a usage line. Regression tested on x86-64 Fedora 32. gdb/ChangeLog 2020-07-28 Tom Tromey <tromey@adacore.com> * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble" help. Add usage.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cli/cli-cmds.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e10f89fc2d6..aaa2a4edfa9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-07-28 Tom Tromey <tromey@adacore.com>
+ * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
+ help. Add usage.
+
+2020-07-28 Tom Tromey <tromey@adacore.com>
+
* dwarf2/expr.c (dwarf_expr_context::execute_stack_op)
<DW_OP_GNU_variable_value>: Cast to address type.
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 14718d1181a..503128b6e91 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2528,8 +2528,13 @@ can be shown using \"show listsize\"."));
c = add_com ("disassemble", class_vars, disassemble_command, _("\
Disassemble a specified section of memory.\n\
+Usage: disassemble[/m|/r|/s] START [, END]\n\
Default is the function surrounding the pc of the selected frame.\n\
\n\
+With a /s modifier, source lines are included (if available).\n\
+In this mode, the output is displayed in PC address order, and\n\
+file names and contents for all relevant source files are displayed.\n\
+\n\
With a /m modifier, source lines are included (if available).\n\
This view is \"source centric\": the output is in source line order,\n\
regardless of any optimization that is present. Only the main source file\n\
@@ -2537,11 +2542,6 @@ is displayed, not those of, e.g., any inlined functions.\n\
This modifier hasn't proved useful in practice and is deprecated\n\
in favor of /s.\n\
\n\
-With a /s modifier, source lines are included (if available).\n\
-This differs from /m in two important respects:\n\
-- the output is still in pc address order, and\n\
-- file names and contents for all relevant source files are displayed.\n\
-\n\
With a /r modifier, raw instructions in hex are included.\n\
\n\
With a single argument, the function surrounding that address is dumped.\n\