Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb: pass type name directly to arch_composite_type
Date: Fri, 21 Aug 2026 09:23:23 -0600	[thread overview]
Message-ID: <87h5knsdjo.fsf@tromey.com> (raw)
In-Reply-To: <20260813161905.345483-2-simon.marchi@efficios.com> (Simon Marchi's message of "Thu, 13 Aug 2026 12:18:59 -0400")

>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> First, it's not necessary to duplicate the string, we can pass the
Simon> literal string directly, and its lifetime will be appropriate.  Second,
Simon> we can pass the name directly to arch_composite_type, instead of doing a
Simon> separate set_name call.  So, replace the above with:

Simon>   sigval_type = arch_composite_type (gdbarch, "sigval", TYPE_CODE_UNION);

Thanks.  One tiny nit below.

Simon>    /* sival_t */
Simon> -  type *sigval_union_type = arch_composite_type (gdbarch, nullptr,
Simon> +  type *sigval_union_type = arch_composite_type (gdbarch, "sigval_t",
Simon>  						 TYPE_CODE_UNION);

The comment says "sival_t" but the type says "sigval_t".
The Linux headers say the latter, so the comment is wrong.

Personally I think this comment isn't so useful and could be removed,
but fixing it would also be fine.

Approved-By: Tom Tromey <tom@tromey.com>

Tom

  reply	other threads:[~2026-08-21 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 16:18 [PATCH 1/2] gdb/linux-tdep: clearer variable names in linux_get_siginfo_type Simon Marchi
2026-08-13 16:18 ` [PATCH 2/2] gdb: pass type name directly to arch_composite_type Simon Marchi
2026-08-21 15:23   ` Tom Tromey [this message]
2026-08-21 15:20 ` [PATCH 1/2] gdb/linux-tdep: clearer variable names in linux_get_siginfo_type Tom Tromey

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=87h5knsdjo.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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