From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29857 invoked by alias); 3 Jul 2019 22:13:45 -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 29849 invoked by uid 89); 3 Jul 2019 22:13:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=burgess, Burgess, sal, explicit_line X-HELO: mail-wr1-f44.google.com Received: from mail-wr1-f44.google.com (HELO mail-wr1-f44.google.com) (209.85.221.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Jul 2019 22:13:43 +0000 Received: by mail-wr1-f44.google.com with SMTP id n4so4484895wrs.3 for ; Wed, 03 Jul 2019 15:13:43 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id c1sm5404554wrh.1.2019.07.03.15.13.40 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 15:13:40 -0700 (PDT) Subject: Re: [PATCHv2 1/2] gdb: Remove unneeded parameter from set_breakpoint_location_function To: Andrew Burgess , gdb-patches@sourceware.org References: <4b2521dc5cecc0c83728219638aab3fc46133153.1562003938.git.andrew.burgess@embecosm.com> From: Pedro Alves Message-ID: <225a77a9-a002-0275-0d40-2b8d5f5201e7@redhat.com> Date: Wed, 03 Jul 2019 22:13:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <4b2521dc5cecc0c83728219638aab3fc46133153.1562003938.git.andrew.burgess@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00076.txt.bz2 On 7/1/19 7:02 PM, Andrew Burgess wrote: > The explicit_loc parameter in set_breakpoint_location_function is not > useful. This parameter is set from two possible fields of the > symtab_and_line used to create the breakpoint; the explicit_pc field, > and the explicit_line field. > > First, the explicit_line field, this is not currently set for any > breakpoint command, so will never be true. > > Next, the explicit_pc field. This can be true but will never be true > at the same time that the sal->msymbol field is also true - the > sal->msymbol is only ever set in linespec.c:minsym_found, which > doesn't allow for explicitly setting the pc. > > The result of this is that if we are setting a breakpoint on an > msymbol that could turn out to be an ifunc, then we will not also have > either an explicit_pc or an explicit_line, this check can therefore be > removed. > > There should be no user visible changes after this commit. > > gdb/ChangeLog: > > * breakpoint.c (set_breakpoint_location_function): Remove > explicit_loc parameter. > (momentary_breakpoint_from_master): Update call to > set_breakpoint_location_function. > (add_location_to_breakpoint): Likewise. OK. Thanks, Pedro Alves