Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Cc: simon.marchi@polymtl.ca, Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb/solib-frv: remove manual memory management
Date: Tue, 17 Feb 2026 16:32:53 -0700	[thread overview]
Message-ID: <20260217163253.0a8f635e@f42-zbm-amd> (raw)
In-Reply-To: <20260217211650.3999842-1-simon.marchi@polymtl.ca>

On Tue, 17 Feb 2026 16:16:44 -0500
simon.marchi@polymtl.ca wrote:

> From: Simon Marchi <simon.marchi@efficios.com>
> 
>  - Make fetch_loadmap return a unique pointer, adjust callers
>  - Make fetch_loadmap use a unique pointer for ext_ldmbuf
>  - Replace some fields of lm_info_frv to be unique pointers
>  - Make main_executable_lm_info a unique pointer
> 
> I can only build-test this.

I haven't had access to an FR-V machine in a long, long time, so I can't
properly test it either.

I found a comment that should be updated...

> @@ -102,19 +105,20 @@ struct int_elf32_fdpic_loadmap {
>    struct int_elf32_fdpic_loadseg segs[1 /* nsegs, actually */];
>  };
>  
> +using int_elf32_fdpic_loadmap_up
> +  = gdb::unique_xmalloc_ptr<int_elf32_fdpic_loadmap>;
> +
>  /* Given address LDMADDR, fetch and decode the loadmap at that address.
>     Return NULL if there is a problem reading the target memory or if
>     there doesn't appear to be a loadmap at the given address.  The
>     allocated space (representing the loadmap) returned by this
>     function may be freed via a single call to xfree().  */

The remark about xfree should be removed and NULL should be replaced
with nullptr.

> -static struct int_elf32_fdpic_loadmap *
> +static int_elf32_fdpic_loadmap_up
>  fetch_loadmap (CORE_ADDR ldmaddr)

[Above lines included for context.]

Okay with that comment fixed...

Approved-by: Kevin Buettner <kevinb@redhat.com>


  reply	other threads:[~2026-02-17 23:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 21:16 simon.marchi
2026-02-17 23:32 ` Kevin Buettner [this message]
2026-02-18 18:34   ` Tom Tromey
2026-02-19  7:14     ` Kevin Buettner
2026-02-20 18:05   ` 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=20260217163253.0a8f635e@f42-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=simon.marchi@polymtl.ca \
    /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