This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Update usage text for add-symbol-file, symbol-file, and load


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8ca2f0b9ac024db56ca40f2b37c0b6b2bfcd139b

commit 8ca2f0b9ac024db56ca40f2b37c0b6b2bfcd139b
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Aug 21 20:01:40 2017 -0600

    Update usage text for add-symbol-file, symbol-file, and load
    
    This updates the usage text for the add-symbol-file, symbol-file, and
    load commands.
    
    gdb/ChangeLog
    2017-11-29  Tom Tromey  <tom@tromey.com>
    
    	* symfile.c (_initialize_symfile): Update usage text for
    	add-symbol-file, symbol-file, load.

Diff:
---
 gdb/ChangeLog |  5 +++++
 gdb/symfile.c | 15 +++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f3a2175..bef5793 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2017-11-29  Tom Tromey  <tom@tromey.com>
 
+	* symfile.c (_initialize_symfile): Update usage text for
+	add-symbol-file, symbol-file, load.
+
+2017-11-29  Tom Tromey  <tom@tromey.com>
+
 	* symfile.c (add_symbol_file_command): Error if some arguments to
 	-s are missing.  Change unrecognized-argument error message.
 	(_initialize_symfile): Fix usage text for add-symbol-file.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index c19cdd2..4bbe0b5 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3878,10 +3878,16 @@ _initialize_symfile (void)
 
   observer_attach_free_objfile (symfile_free_objfile);
 
+#define READNOW_HELP \
+  "The '-readnow' option will cause GDB to read the entire symbol file\n\
+immediately.  This makes the command slower, but may make future operations\n\
+faster."
+
   c = add_cmd ("symbol-file", class_files, symbol_file_command, _("\
 Load symbol table from executable file FILE.\n\
+Usage: symbol-file [-readnow] FILE\n\
 The `file' command can also load symbol tables, as well as setting the file\n\
-to execute."), &cmdlist);
+to execute.\n" READNOW_HELP), &cmdlist);
   set_cmd_completer (c, filename_completer);
 
   c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, _("\
@@ -3890,7 +3896,8 @@ Usage: add-symbol-file FILE ADDR [-readnow | -s SECT-NAME SECT-ADDR]...\n\
 ADDR is the starting address of the file's text.\n\
 Each '-s' argument provides a section name and address, and\n\
 should be specified if the data and bss segments are not contiguous\n\
-with the text.  SECT-NAME is a section name to be loaded at SECT-ADDR."),
+with the text.  SECT-NAME is a section name to be loaded at SECT-ADDR.\n"
+READNOW_HELP),
 	       &cmdlist);
   set_cmd_completer (c, filename_completer);
 
@@ -3906,10 +3913,10 @@ that lies within the boundaries of this symbol file in memory."),
   c = add_cmd ("load", class_files, load_command, _("\
 Dynamically load FILE into the running program, and record its symbols\n\
 for access from GDB.\n\
+Usage: load [FILE] [OFFSET]\n\
 An optional load OFFSET may also be given as a literal address.\n\
 When OFFSET is provided, FILE must also be provided.  FILE can be provided\n\
-on its own.\n\
-Usage: load [FILE] [OFFSET]"), &cmdlist);
+on its own."), &cmdlist);
   set_cmd_completer (c, filename_completer);
 
   add_prefix_cmd ("overlay", class_support, overlay_command,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]