From 980111642db44891500f53c12a939487d95deb68 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 14 Aug 2023 18:27:02 +0200 Subject: [PATCH] [gdb] Fix maint print symbols/psymbols help text Consider the help text of "maint print symbols": ... (gdb) help maint print symbols Print dump of current symbol definitions. Usage: mt print symbols [-pc ADDRESS] [--] [OUTFILE] mt print symbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE] Entries in the full symbol table are dumped to file OUTFILE, or the terminal if OUTFILE is unspecified. If ADDRESS is provided, dump only the file for that address. If SOURCE is provided, dump only that file's symbols. If OBJFILE is provided, dump only that file's minimal symbols. ... and "maint print psymbols": ... (gdb) help maint print psymbols Print dump of current partial symbol definitions. Usage: mt print psymbols [-objfile OBJFILE] [-pc ADDRESS] [--] [OUTFILE] mt print psymbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE] Entries in the partial symbol table are dumped to file OUTFILE, or the terminal if OUTFILE is unspecified. If ADDRESS is provided, dump only the file for that address. If SOURCE is provided, dump only that file's symbols. If OBJFILE is provided, dump only that file's minimal symbols. ... The OBJFILE lines mistakingly mention minimal symbols. Fix this by reformulating as "dump only that object file's symbols". Also make the ADDRESS lines more clear by using the formulation: "dump only the symbols for the file with code at that address". Tested on x86_64-linux. Co-Authored-By: Eli Zaretskii PR gdb/30742 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30742 --- gdb/psymtab.c | 4 ++-- gdb/symmisc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 64b67078641..fc450ac0e22 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1685,9 +1685,9 @@ Usage: mt print psymbols [-objfile OBJFILE] [-pc ADDRESS] [--] [OUTFILE]\n\ mt print psymbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\ Entries in the partial symbol table are dumped to file OUTFILE,\n\ or the terminal if OUTFILE is unspecified.\n\ -If ADDRESS is provided, dump only the file for that address.\n\ +If ADDRESS is provided, dump only the symbols for the file with code at that address.\n\ If SOURCE is provided, dump only that file's symbols.\n\ -If OBJFILE is provided, dump only that file's minimal symbols."), +If OBJFILE is provided, dump only that object file's symbols."), &maintenanceprintlist); add_cmd ("psymtabs", class_maintenance, maintenance_info_psymtabs, _("\ diff --git a/gdb/symmisc.c b/gdb/symmisc.c index a65552aa2d2..c1a6ab5cd7d 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -1050,9 +1050,9 @@ Usage: mt print symbols [-pc ADDRESS] [--] [OUTFILE]\n\ mt print symbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\ Entries in the full symbol table are dumped to file OUTFILE,\n\ or the terminal if OUTFILE is unspecified.\n\ -If ADDRESS is provided, dump only the file for that address.\n\ +If ADDRESS is provided, dump only the symbols for the file with code at that address.\n\ If SOURCE is provided, dump only that file's symbols.\n\ -If OBJFILE is provided, dump only that file's minimal symbols."), +If OBJFILE is provided, dump only that object file's symbols."), &maintenanceprintlist); add_cmd ("msymbols", class_maintenance, maintenance_print_msymbols, _("\ -- 2.30.2