From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by sourceware.org (Postfix) with ESMTPS id 9868D3856DC7 for ; Mon, 30 May 2022 15:42:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9868D3856DC7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f43.google.com with SMTP id h62-20020a1c2141000000b0039aa4d054e2so2576820wmh.1 for ; Mon, 30 May 2022 08:42:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=JzTLC7TN/FzxbwbLM2dynoGtwAbTfOZsXa3qCHPLCHA=; b=tVb2BSnmOg+mwSa8bHpedwssWsmLXzLpgd5yHObQougEm4z+qOwAnptSvSgofE7D3x sOzR3PFW8kNstBvIeKKBxgkqP/8rboiN16zy3ExsqMAUFqhcds3yPw7W0v/mMIv/lFT1 zjP0P+yUWb2IYPlmON1+IEPVxUFHvDzBzuuz9A4+5/n9ZNagnrgMpnHs4OelNtph/Oh5 bdGR8y6R9+4WeBwnH85XVfqIEycxtkEnhst5f648eZwCF3+7lAiDRutwcvpN/z/3Kfwo Ydjvc9sibhGVhS/6of/m6OFQZlU9LKkEm1dFYNntR+nuaMDSCUetUl/gufdvQSAkjerc ZR/Q== X-Gm-Message-State: AOAM5320e36PDnzfEa9PF+zHYZ2Dc26jNLQNy5AI7elWa10trd3dnB2V d4tGurpV9x/COquGeDpPTqLxvXZMoEw= X-Google-Smtp-Source: ABdhPJyrWID4r+rnv6p/pzD2vk3NN/p5mhmOQFDM1nWxdabHwYw5imepU/0UjxM1GuoiZ18/o1QDaA== X-Received: by 2002:a7b:c394:0:b0:397:32b4:76f8 with SMTP id s20-20020a7bc394000000b0039732b476f8mr19881131wmj.33.1653925334401; Mon, 30 May 2022 08:42:14 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b003973e27b789sm13806774wms.27.2022.05.30.08.42.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 May 2022 08:42:10 -0700 (PDT) Message-ID: Date: Mon, 30 May 2022 16:42:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 3/3] Move decode_location to code_breakpoint Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20220528024231.474534-1-tom@tromey.com> <20220528024231.474534-4-tom@tromey.com> From: Pedro Alves In-Reply-To: <20220528024231.474534-4-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2022 15:42:17 -0000 On 2022-05-28 03:42, Tom Tromey wrote: > diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h > index 5ce6edf6efc..663c939c162 100644 > --- a/gdb/breakpoint.h > +++ b/gdb/breakpoint.h > @@ -709,16 +709,6 @@ struct breakpoint > /* Print to FP the CLI command that recreates this breakpoint. */ > virtual void print_recreate (struct ui_file *fp) const; > > - /* Given the location (second parameter), this method decodes it and > - returns the SAL locations related to it. For ordinary > - breakpoints, it calls `decode_line_full'. If SEARCH_PSPACE is > - not NULL, symbol search is restricted to just that program space. > - > - This function is called inside `location_to_sals'. */ > - virtual std::vector decode_location > - (struct event_location *location, > - struct program_space *search_pspace); > - > /* Return true if this breakpoint explains a signal. See > bpstat_explains_signal. */ > virtual bool explains_signal (enum gdb_signal) > @@ -882,12 +872,19 @@ struct code_breakpoint : public breakpoint > const address_space *aspace, > CORE_ADDR bp_addr, > const target_waitstatus &ws) override; > - std::vector decode_location > - (struct event_location *location, > - struct program_space *search_pspace) override; > > protected: > > + /* Given the location (second parameter), this method decodes it and I've noticed that "second" here got stale when this was first converted to a method. I think we should just remove the parenthetical remark and be done with it. Would you mind doing that while at it? The patch looks OK, regardless. Pedro Alves > + returns the SAL locations related to it. For ordinary > + breakpoints, it calls `decode_line_full'. If SEARCH_PSPACE is > + not NULL, symbol search is restricted to just that program space. > + > + This function is called inside `location_to_sals'. */ > + virtual std::vector decode_location > + (struct event_location *location, > + struct program_space *search_pspace); > + > /* Helper method that does the basic work of re_set. */ > void re_set_default (); >