Improve load command's help text
authorLuis Machado <lgustavo@codesourcery.com>
Mon, 13 Feb 2017 13:29:30 +0000 (07:29 -0600)
committerLuis Machado <lgustavo@codesourcery.com>
Mon, 13 Feb 2017 13:29:30 +0000 (07:29 -0600)
This fairly obvious patch adds usage text to the load command's help text.

Originally it did not have usage and mentioned things like FILE and OFFSET
without explaining how those should be passed in the command.

gdb/ChangeLog:

2017-02-13  Luis Machado  <lgustavo@codesourcery.com>

* symfile (_initialize_symfile): Add usage text to the load command's
help text.

gdb/doc/ChangeLog:

2017-02-13  Luis Machado  <lgustavo@codesourcery.com>

* gdb.texinfo (Target Commands): Document the optional offset
argument for the load command.

gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/symfile.c

index dcd047a04640d136161e9fb8071ed2ba4f815543..e274191663d0cba1f1e9451346644e26a3512978 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
+
+       * symfile (_initialize_symfile): Add usage text to the load command's
+       help text.
+
 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
 
        * utils.c (defaulted_query): Don't query on secondary UIs.
index 8acc48257e4e0585668934fe70f910cc56d53c68..7f125bccc9f6a3b2191170a35fc609815e93c9ef 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
+
+       * gdb.texinfo (Target Commands): Document the optional offset
+       argument for the load command.
+
 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
 
        PR gdb/21122
index 35804c1cae381da3b4ad63b849459a5a507ec620..f619470e964cf876ac0656d53bb82a1ae1e5545e 100644 (file)
@@ -19600,8 +19600,8 @@ Show the current status of displaying communications between
 
 @table @code
 
-@kindex load @var{filename}
-@item load @var{filename}
+@kindex load @var{filename} @var{offset}
+@item load @var{filename} @var{offset}
 @anchor{load}
 Depending on what remote debugging facilities are configured into
 @value{GDBN}, the @code{load} command may be available.  Where it exists, it
@@ -19620,6 +19620,10 @@ link the program; for other formats, like a.out, the object file format
 specifies a fixed address.
 @c FIXME! This would be a good place for an xref to the GNU linker doc.
 
+It is also possible to tell @value{GDBN} to load the executable file at a
+specific offset described by the optional argument @var{offset}.  When
+@var{offset} is provided, @var{filename} must also be provided.
+
 Depending on the remote side capabilities, @value{GDBN} may be able to
 load programs into flash memory.
 
index f31075d0ebf39bc547473d21817fd8eb16ea691f..f2528fcea92b7edaa5d8fb1ddf8ad3cfb50439c3 100644 (file)
@@ -3927,7 +3927,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\
-A load OFFSET may also be given."), &cmdlist);
+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);
   set_cmd_completer (c, filename_completer);
 
   add_prefix_cmd ("overlay", class_support, overlay_command,
This page took 0.051502 seconds and 4 git commands to generate.