From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75556 invoked by alias); 29 Nov 2017 22:26:42 -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 75541 invoked by uid 89); 29 Nov 2017 22:26:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= 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; Wed, 29 Nov 2017 22:26:40 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C36876525 for ; Wed, 29 Nov 2017 22:26:39 +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 AD4AC60841; Wed, 29 Nov 2017 22:26:36 +0000 (UTC) Subject: Re: [PATCH] Make 'symbol-file' not care about the position of command line arguments To: Sergio Durigan Junior , GDB Patches References: <779a2d21-badf-b54c-e1c9-2f869716fd71@redhat.com> <20171129214451.14257-1-sergiodj@redhat.com> From: Pedro Alves Message-ID: <196b7212-6a93-8c39-a86e-c5782f470d1e@redhat.com> Date: Wed, 29 Nov 2017 22:26: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: <20171129214451.14257-1-sergiodj@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-11/txt/msg00803.txt.bz2 On 11/29/2017 09:44 PM, Sergio Durigan Junior wrote: > This is a bug that's been detected while doing the readnever work. > Currently if you use the 'symbol-file' command you have to be careful > about the position of each argument you pass on the command line. > This is because while parsing its arguments, if the command detects a > filename, it promptly calls 'symbol_file_add_main_1' without waiting > to see if there are other args on the line. This only affects the > '-readnow' argument so far, but while implementing the '-readnever' > command it also affected it. > Testcase or it didn't happen? :-) I hadn't really understood what this was about in the other thread. (Now I do.) I wonder whether it's really desirable to make this work. It seems to me that it's much more usual in GDB for option processing to stop at the first argument that doesn't start with '-'? I.e., like getopt on most platforms. (The related add-symbol-file command stands out as quite odd to me for explicitly wanting '-'-options after non-'-' options...) Thanks, Pedro Alves