From: Luis Machado <lgustavo@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH, v2] Improve load command's help text
Date: Fri, 06 Jan 2017 23:15:00 -0000 [thread overview]
Message-ID: <1483744529-22462-1-git-send-email-lgustavo@codesourcery.com> (raw)
Changes in v2:
- Improved description of how FILE and OFFSET must be passed.
- Complemented description in the GDB manual since it was missing the
description for OFFSET.
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-01-06 Luis Machado <lgustavo@codesourcery.com>
* symfile (_initialize_symfile): Add usage text to the load command's
help text.
gdb/doc/ChangeLog:
2017-01-06 Luis Machado <lgustavo@codesourcery.com>
* gdb.texinfo (_initialize_symfile): Document the optional offset
argument.
---
gdb/doc/gdb.texinfo | 8 ++++++--
gdb/symfile.c | 5 ++++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ccb95ad..d9c77f7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -19591,8 +19591,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
@@ -19611,6 +19611,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 symbol 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.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 61b9e5b..6ffc86b 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3952,7 +3952,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,
--
2.7.4
next reply other threads:[~2017-01-06 23:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 23:15 Luis Machado [this message]
2017-01-17 13:08 ` Luis Machado
2017-01-24 16:22 ` Luis Machado
2017-02-07 10:21 ` Luis Machado
2017-02-07 15:53 ` Eli Zaretskii
2017-02-07 11:12 ` Pedro Alves
2017-02-13 13:32 ` Luis Machado
2017-02-13 14:57 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483744529-22462-1-git-send-email-lgustavo@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox