Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 0/2] More uses of make_unique_xstrdup
Date: Thu, 15 Jan 2026 10:33:17 -0700	[thread overview]
Message-ID: <20260115-xstrdup-v1-0-72e13ba99851@adacore.com> (raw)

This replaces some uses of '.reset(xstrdup())' with
'= make_unique_xstrdup()'.  I think explicit uses of reset
should be avoided when possible.

Regression tested on x86-64 Fedora 41.

Signed-off-by: Tom Tromey <tromey@adacore.com>
---
Tom Tromey (2):
      Use make_unique_xstrdup in more places
      Use make_unique_xstrdup in tracepoint

 gdb/breakpoint.c            |  4 ++--
 gdb/buildsym.h              |  8 +++++---
 gdb/cli/cli-dump.c          |  2 +-
 gdb/mi/mi-cmd-env.c         |  2 +-
 gdb/python/py-framefilter.c |  2 +-
 gdb/python/py-function.c    |  2 +-
 gdb/python/py-lazy-string.c |  5 ++++-
 gdb/python/py-param.c       |  2 +-
 gdb/solib.c                 |  4 ++--
 gdb/source.c                |  4 ++--
 gdb/stack.c                 | 16 +++++++++++-----
 gdb/tracectf.c              |  4 ++--
 gdb/tracepoint.c            | 10 ++++------
 gdb/tracepoint.h            | 12 ++++++------
 14 files changed, 43 insertions(+), 34 deletions(-)
---
base-commit: 44c39324673cd9bb18db67234253f288497d66a1
change-id: 20260115-xstrdup-00eb39b61e16

Best regards,
-- 
Tom Tromey <tromey@adacore.com>


             reply	other threads:[~2026-01-15 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 17:33 Tom Tromey [this message]
2026-01-15 17:33 ` [PATCH 1/2] Use make_unique_xstrdup in more places Tom Tromey
2026-01-15 17:33 ` [PATCH 2/2] Use make_unique_xstrdup in tracepoint Tom Tromey
2026-01-15 17:39 ` [PATCH 0/2] More uses of make_unique_xstrdup Guinevere Larsen
2026-01-15 18:01   ` Simon Marchi
2026-01-15 18:16     ` Guinevere Larsen
2026-01-16 14:14 ` Andrew Burgess

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=20260115-xstrdup-v1-0-72e13ba99851@adacore.com \
    --to=tromey@adacore.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