From: Simon Marchi <simark@simark.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] [gdb/symtab] Simplify memory management in parse_macro_definition
Date: Wed, 24 Jul 2024 12:07:16 -0400 [thread overview]
Message-ID: <91690c44-2946-4413-be8d-9f94b8435641@simark.ca> (raw)
In-Reply-To: <20240626063233.19408-1-tdevries@suse.de>
On 6/26/24 2:32 AM, Tom de Vries wrote:
> I noticed that parse_macro_definition does malloc and free, both for the
> argv array and its elements.
>
> Make memory management simpler by introducing a new class
> vector_c_string (copied from temporary_macro_definition here [1]) that uses an
> std::vector for the argv array.
Is there a reason to keep using C strings here, instead of a let's say,
a vector of std::string? I gave it a quick try, I have something that
builds, just need to test and polish it.
Here is it if you want to take a peek: https://review.lttng.org/c/binutils-gdb/+/13009
Simon
next prev parent reply other threads:[~2024-07-24 16:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 6:32 Tom de Vries
2024-07-24 14:46 ` [PING] " Tom de Vries
2024-07-24 16:07 ` Simon Marchi [this message]
2024-07-24 16:12 ` Tom de Vries
2024-07-29 16:13 ` Tom de Vries
2024-07-29 16:28 ` 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=91690c44-2946-4413-be8d-9f94b8435641@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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