public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: 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: Thu, 01 Apr 2021 11:56:23 -0600	[thread overview]
Message-ID: <87tuopopmg.fsf@tromey.com> (raw)
In-Reply-To: <20210323183846.3886585-1-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Tue, 23 Mar 2021 14:38:46 -0400")

>>>>> "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.

Tom

  reply	other threads:[~2021-04-01 17:56 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 [this message]
2021-05-12 17:29     ` Simon Marchi
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=87tuopopmg.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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).