public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make addrmap const-correct in cooked index
Date: Mon, 30 Jan 2023 10:22:12 -0500	[thread overview]
Message-ID: <fb373fbd-cca1-5c4a-dd10-079afc7fcda5@simark.ca> (raw)
In-Reply-To: <874js8p08f.fsf@tromey.com>

On 1/30/23 09:26, Tom Tromey via Gdb-patches wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
> 
> Simon> So, I redesigned my patch to instead provide both const and non-const
> Simon> versions of find and foreach.  I think it's typical for containers in
> Simon> C++ anyway.  See v2 below:
> 
> This looks good to me.  It addresses my objections.

Thanks, will push.

> Simon> diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
> Simon> index ced58eab6612..7b1b2d6520cb 100644
> Simon> --- a/gdb/dwarf2/index-write.c
> Simon> +++ b/gdb/dwarf2/index-write.c
> Simon> @@ -474,7 +474,7 @@ add_address_entry (data_buf &addr_vec,
> Simon>  int
> Simon>  addrmap_index_data::operator() (CORE_ADDR start_addr, void *obj)
> Simon>  {
> Simon> -  dwarf2_per_cu_data *per_cu = (dwarf2_per_cu_data *) obj;
> Simon> +  dwarf2_per_cu_data *per_cu = static_cast<dwarf2_per_cu_data *> (obj);
> 
> This area could probably be constified at some point.

I think it will be, when applying you patch that constifies
cooked_index_vector::get_addrmaps.

Simon

  reply	other threads:[~2023-01-30 15:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 16:26 Tom Tromey
2023-01-27 19:58 ` Simon Marchi
2023-01-27 21:15   ` Tom Tromey
2023-01-27 21:18   ` Tom Tromey
2023-01-27 21:20     ` Simon Marchi
2023-01-27 21:26       ` Simon Marchi
2023-01-30 14:15         ` Tom Tromey
2023-01-27 22:00     ` Simon Marchi
2023-01-30 14:26       ` Tom Tromey
2023-01-30 15:22         ` Simon Marchi [this message]
2023-01-30 15:29           ` [PATCH v2] " Simon Marchi
2023-01-30 16:54             ` Tom Tromey
2023-01-30 16:55               ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb373fbd-cca1-5c4a-dd10-079afc7fcda5@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).