public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] gdb: make gdbpy_parse_command_name return a unique_xmalloc_ptr
Date: Wed, 12 May 2021 13:29:48 -0400	[thread overview]
Message-ID: <abf0f9cd-a51f-af9d-9274-d201187d89e8@polymtl.ca> (raw)
In-Reply-To: <87tuopopmg.fsf@tromey.com>

On 2021-04-01 1:56 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> 	* python/python-internal.h (gdbpy_parse_command_name): Return
> Simon> 	gdb::unique_xmalloc_ptr.
> Simon> 	* python/py-cmd.c (gdbpy_parse_command_name): Likewise.
> Simon> 	(cmdpy_init): Adjust.
> Simon> 	* python/py-param.c (parmpy_init): Adjust.
> Simon> 	(add_setshow_generic): Take gdb::unique_xmalloc_ptr, release it
> Simon> 	when done.
> 
> Looks good.
> 
> Simon> +  /* We (unfortunately) currently leak the command name.  */
> Simon> +  cmd_name.release ();
> 
> I wonder if the issue here is that two copies would need to be made,
> because add_setshow_* makes two commands.

Exactly.  It's the same as before my patch, the comment only documents
what is happening.  This is really low prio, so I do not intend to fix
it.

Simon


  reply	other threads:[~2021-05-12 17:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 17:55 [PATCH] " Simon Marchi
2021-03-23 18:07 ` Andreas Schwab
2021-03-23 18:11   ` Simon Marchi
2021-03-23 18:21     ` Simon Marchi
2021-04-01 17:54       ` Tom Tromey
2021-03-23 18:38 ` [PATCH v2] " Simon Marchi
2021-04-01 17:56   ` Tom Tromey
2021-05-12 17:29     ` Simon Marchi [this message]
2021-05-12 14:12   ` Marco Barisione
2021-05-12 14:18     ` Simon Marchi
2021-05-12 17:51   ` [pushed] " 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=abf0f9cd-a51f-af9d-9274-d201187d89e8@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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).