Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hannes Domani <ssbssa@yahoo.de>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 09/11] Move auto_wide_charset gdbarch method to windows-tdep
Date: Sat, 17 Jan 2026 14:54:32 +0100	[thread overview]
Message-ID: <20260117135448.2666604-9-ssbssa@yahoo.de> (raw)
In-Reply-To: <20260117134052.2660009-1-ssbssa@yahoo.de>

It's the same for all Windows ABIs.
---
 gdb/amd64-windows-tdep.c | 10 ----------
 gdb/i386-windows-tdep.c  |  8 --------
 gdb/windows-tdep.c       |  9 +++++++++
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index b46f74c6461..aeed266e713 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -1271,14 +1271,6 @@ amd64_windows_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   return destination;
 }
 
-/* Implement the "auto_wide_charset" gdbarch method.  */
-
-static const char *
-amd64_windows_auto_wide_charset (void)
-{
-  return "UTF-16";
-}
-
 /* Common parts for gdbarch initialization for Windows and Cygwin on AMD64.  */
 
 static void
@@ -1320,8 +1312,6 @@ amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
   set_gdbarch_core_xfer_shared_libraries
     (gdbarch, windows_core_xfer_shared_libraries);
   set_gdbarch_core_pid_to_str (gdbarch, windows_core_pid_to_str);
-
-  set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset);
 }
 
 /* gdbarch initialization for Windows on AMD64.  */
diff --git a/gdb/i386-windows-tdep.c b/gdb/i386-windows-tdep.c
index 2861d60fef2..daaa556d171 100644
--- a/gdb/i386-windows-tdep.c
+++ b/gdb/i386-windows-tdep.c
@@ -95,12 +95,6 @@ i386_windows_skip_trampoline_code (const frame_info_ptr &frame, CORE_ADDR pc)
   return i386_pe_skip_trampoline_code (frame, pc, NULL);
 }
 
-static const char *
-i386_windows_auto_wide_charset (void)
-{
-  return "UTF-16";
-}
-
 /* Implement the "push_dummy_call" gdbarch method.  */
 
 static CORE_ADDR
@@ -154,8 +148,6 @@ i386_windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
   set_gdbarch_core_xfer_shared_libraries
     (gdbarch, windows_core_xfer_shared_libraries);
   set_gdbarch_core_pid_to_str (gdbarch, windows_core_pid_to_str);
-
-  set_gdbarch_auto_wide_charset (gdbarch, i386_windows_auto_wide_charset);
 }
 
 /* gdbarch initialization for Windows on i386.  */
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 6164bc34312..e69db28c2dc 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -930,6 +930,14 @@ windows_solib_ops::iterate_over_objfiles_in_search_order
       }
 }
 
+/* Implement the "auto_wide_charset" gdbarch method.  */
+
+static const char *
+windows_auto_wide_charset (void)
+{
+  return "UTF-16";
+}
+
 /* Common parts for gdbarch initialization for the Windows and Cygwin OS
    ABIs.  */
 
@@ -938,6 +946,7 @@ windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   set_gdbarch_wchar_bit (gdbarch, 16);
   set_gdbarch_wchar_signed (gdbarch, 0);
+  set_gdbarch_auto_wide_charset (gdbarch, windows_auto_wide_charset);
 
   /* Canonical paths on this target look like
      `c:\Program Files\Foo App\mydll.dll', for example.  */
-- 
2.52.0


  parent reply	other threads:[~2026-01-17 13:56 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260117134052.2660009-1-ssbssa.ref@yahoo.de>
2026-01-17 13:36 ` [PATCH v2 01/11] Remove duplicate code from windows_nat_target::resume Hannes Domani
2026-01-17 13:36   ` [PATCH v2 02/11] Simplify windows_nat_target::resume Hannes Domani
2026-01-19 13:55     ` Schimpe, Christina
2026-01-21 15:42       ` Tom Tromey
2026-01-23 19:11       ` Hannes Domani
2026-01-17 13:36   ` [PATCH v2 03/11] Move struct declarations into windows-nat.h Hannes Domani
2026-01-17 13:36   ` [PATCH v2 04/11] Create x86-windows-nat.c Hannes Domani
2026-01-21 15:38     ` Tom Tromey
2026-01-17 13:36   ` [PATCH v2 05/11] Move x86 debug registers and related code into x86-windows-nat.c Hannes Domani
2026-01-19 12:49     ` Schimpe, Christina
2026-01-20 15:49       ` Hannes Domani
2026-01-21  8:06         ` Schimpe, Christina
2026-01-23 13:17     ` [PATCH v3] " Hannes Domani
2026-01-23 18:50       ` Tom Tromey
2026-01-23 19:20         ` Hannes Domani
2026-01-23 19:56           ` Tom Tromey
2026-01-17 13:36   ` [PATCH v2 06/11] Move x86 register " Hannes Domani
2026-01-19 12:50     ` Schimpe, Christina
2026-01-17 13:36   ` [PATCH v2 07/11] Move x86 selector " Hannes Domani
2026-01-19 13:56     ` Schimpe, Christina
2026-01-17 13:36   ` [PATCH v2 08/11] Move software breakpoint recognition " Hannes Domani
2026-01-19 12:51     ` Schimpe, Christina
2026-01-21 15:43       ` Tom Tromey
2026-01-23 19:12         ` Hannes Domani
2026-01-17 13:36   ` [PATCH v2 09/11] Move auto_wide_charset gdbarch method to windows-tdep Hannes Domani
2026-01-17 13:36   ` [PATCH v2 10/11] Move setting size of long " Hannes Domani
2026-01-21 15:47     ` Tom Tromey
2026-01-17 13:54   ` [PATCH v2 04/11] Create x86-windows-nat.c Hannes Domani
2026-01-17 14:01     ` Hannes Domani
2026-01-17 14:14       ` Hannes Domani
2026-01-17 15:04       ` Simon Marchi
2026-01-17 15:15         ` Hannes Domani
2026-01-17 13:54   ` [PATCH v2 05/11] Move x86 debug registers and related code into x86-windows-nat.c Hannes Domani
2026-01-17 13:54   ` [PATCH v2 06/11] Move x86 register " Hannes Domani
2026-01-21 16:08     ` Tom Tromey
2026-01-17 13:54   ` Hannes Domani [this message]
2026-01-21 15:48     ` [PATCH v2 09/11] Move auto_wide_charset gdbarch method to windows-tdep Tom Tromey
2026-01-23 19:13       ` Hannes Domani
2026-01-17 13:54   ` [PATCH v2 10/11] Move setting size of long " Hannes Domani
2026-01-21 15:59     ` Tom Tromey
2026-01-17 13:54   ` [PATCH v2 11/11] Add aarch64-windows support Hannes Domani
2026-01-17 16:04     ` Eli Zaretskii
2026-01-21 16:18     ` Tom Tromey
2026-01-23 19:14       ` Hannes Domani

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=20260117135448.2666604-9-ssbssa@yahoo.de \
    --to=ssbssa@yahoo.de \
    --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