From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94692 invoked by alias); 7 Feb 2017 11:12:51 -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 94678 invoked by uid 89); 7 Feb 2017 11:12:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Nowadays, weren't, werent, understands X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Feb 2017 11:12:48 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EB1E3B74F; Tue, 7 Feb 2017 11:12:48 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id CECCFAE2F6; Tue, 7 Feb 2017 11:12:47 +0000 (UTC) Subject: Re: [PATCH, v2] Improve load command's help text To: Luis Machado , gdb-patches@sourceware.org References: <1483744529-22462-1-git-send-email-lgustavo@codesourcery.com> From: Pedro Alves Message-ID: <8f18d4de-e91d-a781-e1eb-394d80c1d988@redhat.com> Date: Tue, 07 Feb 2017 11:12:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1483744529-22462-1-git-send-email-lgustavo@codesourcery.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00148.txt.bz2 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