From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104153 invoked by alias); 24 Jan 2017 16:22:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 104139 invoked by uid 89); 24 Jan 2017 16:22:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=gdb.texinfo, GDBN, @kindex, UD:gdb.texinfo X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Jan 2017 16:22:19 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cW3rN-0003zv-R6 from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Tue, 24 Jan 2017 08:22:17 -0800 Received: from [172.30.8.148] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 24 Jan 2017 08:22:14 -0800 Subject: Re: [PATCH, v2] Improve load command's help text References: <1483744529-22462-1-git-send-email-lgustavo@codesourcery.com> <798e9e1e-e579-783f-94ae-a46f359a9454@codesourcery.com> To: Reply-To: Luis Machado From: Luis Machado Message-ID: Date: Tue, 24 Jan 2017 16:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <798e9e1e-e579-783f-94ae-a46f359a9454@codesourcery.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00501.txt.bz2 ping? On 01/17/2017 07:08 AM, Luis Machado wrote: > ping? I suppose this is in good shape now? > > On 01/06/2017 05:15 PM, Luis Machado wrote: >> 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 >> >> * symfile (_initialize_symfile): Add usage text to the load command's >> help text. >> >> gdb/doc/ChangeLog: >> >> 2017-01-06 Luis Machado >> >> * 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, >> > >