aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-10-23 15:37:03 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-10-23 15:37:03 +0000
commit83ab93c6eaf21fb4ee7b50de90f2837c20a55bd5 (patch)
tree4316ea2ee4df9be0d5378f1d16427c2a1230fd72 /gdb
parent04c3a75556c018feb1f609404c627414a7ef672e (diff)
downloadgdb-83ab93c6eaf21fb4ee7b50de90f2837c20a55bd5.zip
gdb-83ab93c6eaf21fb4ee7b50de90f2837c20a55bd5.tar.gz
gdb-83ab93c6eaf21fb4ee7b50de90f2837c20a55bd5.tar.bz2
Set default target-wide-charset setting to "UTF-16" for x86_64-windows.
Type wchar_t is only 2 bytes long on x86_64-windows. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_auto_wide_charset): New function. (amd64_windows_init_abi): Set auto_wide_charset gdbarch method to amd64_windows_auto_wide_charset.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/amd64-windows-tdep.c10
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d27f64b..3216db6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2012-10-23 Joel Brobecker <brobecker@adacore.com>
+
+ * amd64-windows-tdep.c (amd64_windows_auto_wide_charset): New
+ function.
+ (amd64_windows_init_abi): Set auto_wide_charset gdbarch method
+ to amd64_windows_auto_wide_charset.
+
2012-10-23 Yao Qi <yao@codesourcery.com>
* event-top.c (mark_async_signal_handler_wrapper): Remove.
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 528fbb6..142e141 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -190,6 +190,14 @@ amd64_windows_skip_trampoline_code (struct frame_info *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";
+}
+
static void
amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -215,6 +223,8 @@ amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_iterate_over_objfiles_in_search_order
(gdbarch, windows_iterate_over_objfiles_in_search_order);
+ set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset);
+
set_solib_ops (gdbarch, &solib_target_so_ops);
}