From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 157CA3858CDB for ; Wed, 24 May 2023 13:00:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 157CA3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684933222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eTMCEZECx1vGBegIr/f/p4c1gVy23N3qapc2MmW3TjA=; b=hWlh+QnIXp7yudis7WtO+wFW3DEU7armLIpK9ecN9MljYbY/NPjzHx55VIK7vcKwIlxBNV s/lREEU6T6pEvNCOHbZlE7MMdV981+FyWMDbQs/EZgYIbiE5kwN36OeQhREHiN+P3SEonR ++BDP0ado4q7SUK+NOIxoGqiZ1RY3cE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-258-j4qXMcIkNCmsKW-dB2n4mw-1; Wed, 24 May 2023 09:00:21 -0400 X-MC-Unique: j4qXMcIkNCmsKW-dB2n4mw-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-307814dd87eso360343f8f.0 for ; Wed, 24 May 2023 06:00:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684933219; x=1687525219; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eTMCEZECx1vGBegIr/f/p4c1gVy23N3qapc2MmW3TjA=; b=eG4fq9iJvtc410d9giNbwDY+pzKI8cDDKXb24w3Sl7g6gKcCgfBGM5UiIFB3Q7kNSo xN0zFUSV2jdp0JrHpQathyzKFemRkK872v/1vImc1+ksLnMeuolhAGMHjs5MkJq6NTKi xwJ3D0iAVFbQsYy/QGp2lKjLLuGcJMU6Hqko471WXQOB+Ie9DMezmrllXCSOE3mbUwR4 F93JVXLe8EN2VdsNZmGw51qdoqdl9nMNcNlsXKqiZgJ55dJ5/+Pa4qo0eE+guGaqvOw1 K1o74PKAnN39ivELQl+E3faDu37T5PVnMX3+EWSz3McG76Yfv0PXFmJLjA4k2+JkCK5A zWLA== X-Gm-Message-State: AC+VfDwalDaZTKc7mDt1U+WJ7Vy1tiRA+3CjYmqxC/USe8cy47irb17I EiOydcMVtUKSlaRtt8/iWcah2JuP+RJcW6ijLqzaWTLjvy4TsMjXLSQ1oR+9rIJA6nZruo142vj R2m2NABd2X8rpb4sgf8y1LapNOVkubw== X-Received: by 2002:a5d:54ca:0:b0:309:3b8d:16af with SMTP id x10-20020a5d54ca000000b003093b8d16afmr12294454wrv.49.1684933219274; Wed, 24 May 2023 06:00:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4P+j5oA7UWZPzDWvG/7gpcyFmobqST6WetUeRPvGwnyWRPCDlLVQlcVTs9wrPZ+kbGrPyApA== X-Received: by 2002:a5d:54ca:0:b0:309:3b8d:16af with SMTP id x10-20020a5d54ca000000b003093b8d16afmr12294437wrv.49.1684933218921; Wed, 24 May 2023 06:00:18 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id e9-20020adffc49000000b003078a3f3a24sm14533197wrs.114.2023.05.24.06.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 06:00:18 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , Simon Marchi via Gdb-patches Cc: Simon Marchi Subject: Re: [PATCH 05/12] gdb: add breakpoint::first_loc methods In-Reply-To: <30acd91d-90ad-9f44-a859-e13765d644c7@simark.ca> References: <20230511144832.17974-1-simon.marchi@efficios.com> <20230511144832.17974-6-simon.marchi@efficios.com> <87edndajm8.fsf@redhat.com> <30acd91d-90ad-9f44-a859-e13765d644c7@simark.ca> Date: Wed, 24 May 2023 14:00:16 +0100 Message-ID: <87edn57ulb.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: Simon Marchi writes: > On 5/18/23 08:50, Andrew Burgess via Gdb-patches wrote: >> Simon Marchi via Gdb-patches writes: >> >>> Add convenience first_loc methods to struct breakpoint (const and >>> non-const overloads). A subsequent patch changes the list of locations >>> to be an intrusive_list and makes the actual list private, so these >>> spots would need to become something ugly like: >>> >>> -b->loc >>> +*b->locations ().begin () >> >> It took me longer than I'd like to admit to realise the leading -/+ here >> were indicating that this was an extract from a diff. Maybe there's >> some way to make it clearer? Or just drop the first line, I think the >> second line is clear enough (given the description before). > > Sorry, I thought I was being smart writing it this way. I'll change it > to say, these spots would need from: > > b->loc > > to something ugly like: > > b->locations ().begin () Looks great. Thanks, Andrew > >>> @@ -8178,17 +8177,18 @@ momentary_breakpoint_from_master (struct breakpoint *orig, >>> std::unique_ptr copy >>> (new_momentary_breakpoint (orig->gdbarch, type, orig->pspace, >>> orig->frame_id, thread)); >>> + bp_location &orig_loc = orig->first_loc (); >> >> Maybe 'const bp_location &' ? > > Yes, changed. > >> Otherwise, looks good. > > Thanks, > > Simon