From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3003 invoked by alias); 1 Dec 2017 17:41:40 -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 2984 invoked by uid 89); 1 Dec 2017 17:41:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,TRACKER_ID,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; Fri, 01 Dec 2017 17:41:38 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCB6E4E4C2 for ; Fri, 1 Dec 2017 17:41:37 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC24560BE3; Fri, 1 Dec 2017 17:41:37 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches Subject: Re: [PATCH v4] Make '{add-,}symbol-file' not care about the position of command line arguments References: <20171129214451.14257-1-sergiodj@redhat.com> <20171130195950.872-1-sergiodj@redhat.com> <452db1ef-5ca5-0fd7-9029-e2047d24798c@redhat.com> Date: Fri, 01 Dec 2017 17:41:00 -0000 In-Reply-To: <452db1ef-5ca5-0fd7-9029-e2047d24798c@redhat.com> (Pedro Alves's message of "Fri, 1 Dec 2017 12:11:31 +0000") Message-ID: <87wp26e46m.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00028.txt.bz2 On Friday, December 01 2017, Pedro Alves wrote: > On 11/30/2017 07:59 PM, Sergio Durigan Junior wrote: >> Changes from v3: >> >> - 'add-symbol-file -s' now accepts sections whose names start with a >> dash. >> >> - Use a better way to test must-ask questions on the testsuite. >> >> >> This is a bug that's been detected while doing the readnever work. >> >> If you use 'symbol-file' or 'add-symbol-file', the position of each >> argument passed to the command matters. This means that if you do: >> >> (gdb) symbol-file -readnow /foo/bar >> >> The symbol file specified will (correctly) have all of its symbols >> read by GDB (because of the -readnow flag). However, if you do: >> >> (gdb) symbol-file /foo/bar -readnow >> >> GDB will silently ignore the -readnow flag, because it was specified >> after the filename. This is not a good thing to do and may confuse >> the user. >> >> To address that, I've modified the argument parsing mechanisms of >> symbol_file_command and add_symbol_file_command to be >> "position-independent". I have also added one error call at the end >> of add_symbol_file_command's argument parsing logic, which now clearly >> complains if no filename has been specified. Both commands now >> support the "--" option to stop argument processing. >> >> This patch provides a testcase for both commands, in order to make >> sure that the argument order does not matter. It has been >> regression-tested on BuildBot. >> >> gdb/ChangeLog: >> >> 2017-11-30 Sergio Durigan Junior >> >> * symfile.c (symbol_file_command): Call >> 'symbol_file_add_main_1' only after processing all command >> line options. >> (add_symbol_file_command): Modify logic to make arguments >> position-independent. >> >> gdb/testsuite/ChangeLog: >> >> 2017-11-30 Sergio Durigan Junior >> >> * gdb.base/relocate.exp: Add tests to guarantee that arguments >> to 'symbol-file' and 'add-symbol-file' can be >> position-independent. > > OK. Pushed. e2e321740ce2e36a97be2a410cd56eebaa2304aa Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/