From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92805 invoked by alias); 9 Apr 2015 18:12:13 -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 92755 invoked by uid 89); 9 Apr 2015 18:12:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Apr 2015 18:12:11 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NMJ00100WWS2M00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Thu, 09 Apr 2015 21:12:08 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMJ00199X874Z00@a-mtaout20.012.net.il>; Thu, 09 Apr 2015 21:12:08 +0300 (IDT) Date: Thu, 09 Apr 2015 18:12:00 -0000 From: Eli Zaretskii Subject: Re: [doc patch] compile: missing bits [Re: [PATCH v2 7/9] compile: New 'compile print'] In-reply-to: <20150409173950.GA3400@host1.jankratochvil.net> To: Jan Kratochvil Cc: Paul_Koning@dell.com, gdb-patches@sourceware.org, pmuldoon@redhat.com Reply-to: Eli Zaretskii Message-id: <83pp7ddvcq.fsf@gnu.org> References: <20150406172623.31404.58833.stgit@host1.jankratochvil.net> <20150406172716.31404.8551.stgit@host1.jankratochvil.net> <83bnj1jgsw.fsf@gnu.org> <021F612D-0E51-44ED-BA7F-894A8B51F5BF@dell.com> <20150406175250.GA314@host1.jankratochvil.net> <0484210C-BBE9-4C64-8F51-7DC74ACF8F86@dell.com> <20150408200315.GA6777@host1.jankratochvil.net> <83egntg37h.fsf@gnu.org> <20150409173950.GA3400@host1.jankratochvil.net> X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00351.txt.bz2 > Date: Thu, 9 Apr 2015 19:39:50 +0200 > From: Jan Kratochvil > Cc: Paul_Koning@dell.com, gdb-patches@sourceware.org, pmuldoon@redhat.com > > On Thu, 09 Apr 2015 09:39:46 +0200, Eli Zaretskii wrote: > > So I think we should tell the story in the manual, yes. > > there were various missing bits for the 'compile' feature so adding them here. Thanks. > +@value{GDBN} needs to specify the right compilation options for the code > +to be injected. In part to make its ABI compatible with the inferior > +and in part to make the injected code compatible with GDB's injecting > +process. The second sentence is not a complete sentence; suggest to make it part of the first (as in "...to be injected, in part to make its ABI..."). Also, there's a bare "GDB" there. > +@value{NGCC} (since version 4.7) stores the options used for compilation > +into @code{DW_AT_producer} part of DWARF debugging information according > +to the @value{NGCC} option @code{-grecord-gcc-switches}. One has to > +explicitly specify @code{-g} during inferior compilation otherwise > +@value{NGCC} produces no DWARF. Hmm... Are you sure -g always produces DWARF? Maybe we should say that for targets where DWARF is not the default, -gdwarf-N should be used, and also that -gstabs etc. should _not_ be used? > +@item set compile-args > +@value{GDBN} contains default compilation options to set and possibly > +override the options required for proper injection of the compiled code. > +@end table > + > +@noindent > +The options mentioned last can be specified with command: > + > +@table @code > +@item set compile-args This is slightly confusing. I suggest the following text instead: @item compilation options set by @code{set compile-args} @end table @noindent You can override compilation options using the following command: @table @code @item set compile-args @cindex compile command options override Set compilation options used for compiling and injecting code with the @code{compile} commands. These options override any conflicting ones from the target architecture and/or options stored during inferior compilation. @item show compile-args Displays the current state of compilation options override. This does not show all the options actually used during compilation, use @ref{set debug compile} for that. @end table > +@value{GDBN} needs to find @value{NGCC} for the inferior being debugged which > +may not be obvious for remote targets of different architecture than where > +@value{GDBN} is running. Environment variable @code{PATH} (@code{PATH} from > +shell that executed @value{GDBN}, not the one set by @value{GDBN} > +command @code{set environment}. @xref{Environment}. @code{PATH} on There's a right parenthesis missing here. > +Specifically @code{PATH} is searched for binaries matching regular expression > +@code{@var{ARCH}(-[^-]*)?-@var{OS}-gcc} according to the inferior target being > +debugged. @code{@var{ARCH}} is processor name - multiarch is supported, Please don't up-case ARCH and OS, makeinfo will do that when needed. Also, please use "---" instead of just one dash. > +for pattern @code{s390x?}. @code{OS} is currently supported only for > ^^^^^^^^^ @var{os}.