Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Aditya Vidyadhar Kamath <akamath996@gmail.com>
Cc: ulrich.weigand@de.ibm.com,  simon.marchi@polymtl.ca,
	 tom@tromey.com, gdb-patches@sourceware.org,
	 Aditya.Kamath1@ibm.com, sangamesh.swamy@in.ibm.com
Subject: Re: [PATCH] Use UTF-32 as the wide charset for 64-bit
Date: Mon, 19 Oct 2026 10:04:01 -0600	[thread overview]
Message-ID: <87v76x1xu6.fsf@tromey.com> (raw)
In-Reply-To: <20261015134722.81702-2-akamath996@gmail.com> (Aditya Vidyadhar Kamath's message of "Thu, 15 Oct 2026 19:17:23 +0530")

>>>>> Aditya Vidyadhar Kamath <akamath996@gmail.com> writes:

> From: Aditya Vidyadhar Kamath <aditya.kamath1@ibm.com>
> On AIX, wchar_t is 4 bytes in 64-bit mode and 2 bytes in 32-bit mode,
> and rs6000_aix_init_osabi sets wchar_bit accordingly.  The
> auto_wide_charset method however always returned "UTF-16", so a 64-bit
> inferior's wide strings were decoded as 2-byte units.  This printed
> L'\000\000a' for L'a', and GDB crashed with SIGSEGV on the following
> print in gdb.base/wchar.exp.

> Return "UTF-32" for 64-bit and keep "UTF-16" for 32-bit.  wchar.exp now
> passes in 64-bit mode.

Thanks for the patch.

>  static const char *
> -rs6000_aix_auto_wide_charset (void)
> +rs6000_aix_auto_wide_charset_32 (void)

Could you remove the 'void' here?

> +static const char *
> +rs6000_aix_auto_wide_charset_64 (void)

Here too?

'void' is only needed here for C, it's an anachronism in the gdb code,
so when touching one of these lines it's nice to remove it; and not to
add new instances.

Ok with this change.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

  parent reply	other threads:[~2026-10-19 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 13:47 Aditya Vidyadhar Kamath
2026-10-15 14:05 ` Tom Tromey
2026-10-16 12:02   ` Aditya Kamath
2026-10-19 16:04 ` Tom Tromey [this message]
2026-10-21  6:32   ` Aditya Kamath

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=87v76x1xu6.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Aditya.Kamath1@ibm.com \
    --cc=akamath996@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=ulrich.weigand@de.ibm.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