From 16f3242c055e2a740dfc42b65cc3509b6ccf71e8 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 28 Jul 2020 11:43:24 -0600 Subject: [PATCH] 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 * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble" help. Add usage. --- gdb/ChangeLog | 5 +++++ gdb/cli/cli-cmds.c | 10 +++++----- 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,3 +1,8 @@ +2020-07-28 Tom Tromey + + * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble" + help. Add usage. + 2020-07-28 Tom Tromey * dwarf2/expr.c (dwarf_expr_context::execute_stack_op) 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\ -- 2.30.2