summaryrefslogtreecommitdiff
path: root/gdb-7.12.midipix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gdb-7.12.midipix.patch')
-rw-r--r--gdb-7.12.midipix.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/gdb-7.12.midipix.patch b/gdb-7.12.midipix.patch
index 4a76965..629a4cf 100644
--- a/gdb-7.12.midipix.patch
+++ b/gdb-7.12.midipix.patch
@@ -227,6 +227,54 @@ diff -ru --new-file a/gdb/Makefile.in b/gdb/Makefile.in
ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
+diff -ru --new-file a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
+--- a/gdb/amd64-windows-tdep.c 2016-10-07 17:09:21.000000000 +0000
++++ b/gdb/amd64-windows-tdep.c 2019-06-04 06:35:16.705294100 +0000
+@@ -1250,3 +1250,44 @@
+ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_CYGWIN,
+ amd64_windows_init_abi);
+ }
++
++
++
++
++/* winnt (midipix) variant */
++static void
++amd64_winnt_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
++{
++ /* abi */
++ amd64_init_abi (info, gdbarch);
++ windows_init_abi (info, gdbarch);
++
++ /* out-of-band function calls */
++ set_gdbarch_push_dummy_call (gdbarch, amd64_windows_push_dummy_call);
++ set_gdbarch_return_value (gdbarch, amd64_windows_return_value);
++ set_gdbarch_skip_main_prologue (gdbarch, amd64_skip_main_prologue);
++ set_gdbarch_skip_trampoline_code (gdbarch,
++ amd64_windows_skip_trampoline_code);
++
++ /* skip prologue method */
++ set_gdbarch_skip_prologue (gdbarch, amd64_windows_skip_prologue);
++
++ /* auto wide charset hack */
++ set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset);
++
++ /* TODO: SEH unwinder */
++ frame_unwind_append_unwinder (gdbarch, 0);
++
++ /* TODO: inferior-specific, dynamically detected size of long */
++ set_gdbarch_long_bit (gdbarch, 64);
++
++}
++
++extern initialize_file_ftype _initialize_amd64_winnt_tdep;
++
++void
++_initialize_amd64_winnt_tdep (void)
++{
++ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_WINNT,
++ amd64_winnt_init_abi);
++}
diff -ru --new-file a/gdb/osabi.c b/gdb/osabi.c
--- a/gdb/osabi.c 2016-08-01 15:50:20.000000000 +0000
+++ b/gdb/osabi.c 2019-06-04 00:54:53.410635600 +0000