From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83531 invoked by alias); 13 Feb 2017 13:32:21 -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 83502 invoked by uid 89); 13 Feb 2017 13:32:20 -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 autolearn=ham version=3.3.2 spammy=Depending, xref, 196116, FIXME! 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; Mon, 13 Feb 2017 13:32:18 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cdGjp-0002wj-7m from Luis_Gustavo@mentor.com ; Mon, 13 Feb 2017 05:32:17 -0800 Received: from [172.30.12.49] (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; Mon, 13 Feb 2017 05:32:13 -0800 Reply-To: Luis Machado Subject: Re: [PATCH, v2] Improve load command's help text References: <1483744529-22462-1-git-send-email-lgustavo@codesourcery.com> <8f18d4de-e91d-a781-e1eb-394d80c1d988@redhat.com> To: Pedro Alves , , Eli Zaretskii From: Luis Machado Message-ID: <7e814823-a8e0-b57c-30bc-8b5a4c51fb94@codesourcery.com> Date: Mon, 13 Feb 2017 13:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <8f18d4de-e91d-a781-e1eb-394d80c1d988@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00338.txt.bz2 On 02/07/2017 05:12 AM, Pedro Alves wrote: > I suspect that the reason these weren't originally mentioned > in the help was/is that the accepted arguments depend on target. > > Back when we had support for a bunch of different remote > targets, we had more target_load implementations. > Nowadays, there's much fewer targets, though still a couple > load implemenations: > > $ grep "[.\->]to_load = " * > remote.c: remote_ops.to_load = remote_load; > remote-sim.c: gdbsim_ops.to_load = gdbsim_load; > > remote_load calls generic_load, which accepts the offset. > gdbsim_load doesn't support an offset, but understands that > what comes after the filename is an offset. > > (we could probably factor out more bits from those > two implementations to load_command.) > >> -@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 > > executable file, not symbol file. > >> +offset described by the optional argument @var{offset}. When @var{offset} is >> +provided, @var{filename} must also be provided. > > LGTM with that, but Eli should review this. > > Thanks, > Pedro Alves > > Thanks. I've addressed both the above and Eli's comments. Pushed as 5cf30ebf64d3c6da961094c615a94d2f1682a478.