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.patch62
1 files changed, 58 insertions, 4 deletions
diff --git a/gdb-7.12.midipix.patch b/gdb-7.12.midipix.patch
index 629a4cf..1abe827 100644
--- a/gdb-7.12.midipix.patch
+++ b/gdb-7.12.midipix.patch
@@ -119,8 +119,21 @@ diff -ru --new-file a/gdb/configure.host b/gdb/configure.host
x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
diff -ru --new-file a/gdb/configure.tgt b/gdb/configure.tgt
--- a/gdb/configure.tgt 2016-10-07 17:09:21.000000000 +0000
-+++ b/gdb/configure.tgt 2019-06-03 23:32:57.637401253 +0000
-@@ -678,6 +678,13 @@
++++ b/gdb/configure.tgt 2019-06-04 14:11:22.091870500 +0000
+@@ -229,6 +229,12 @@
+ fi
+ build_gdbserver=yes
+ ;;
++i[34567]86-*-midipix*)
++ # Target: Intel 386 running win32
++ gdb_target_obs="i386-tdep.o i387-tdep.o \
++ i386-winnt-tdep.o windows-tdep.o"
++ build_gdbserver=no
++ ;;
+ i[34567]86-*-gnu*)
+ # Target: Intel 386 running the GNU Hurd
+ gdb_target_obs="i386-tdep.o i387-tdep.o i386gnu-tdep.o solib-svr4.o"
+@@ -678,6 +684,13 @@
windows-tdep.o"
build_gdbserver=yes
;;
@@ -128,13 +141,13 @@ diff -ru --new-file a/gdb/configure.tgt b/gdb/configure.tgt
+ # Target: Midipix
+ gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \
+ i386-tdep.o i387-tdep.o \
-+ windows-tdep.o"
++ windows-tdep.o i386-winnt-tdep.o"
+ build_gdbserver=no
+ ;;
x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
# Target: NetBSD/amd64
gdb_target_obs="amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o \
-@@ -718,6 +725,7 @@
+@@ -718,6 +731,7 @@
*-*-mingw32ce*) gdb_osabi=GDB_OSABI_WINCE ;;
*-*-mingw* | *-*-cygwin*)
gdb_osabi=GDB_OSABI_CYGWIN ;;
@@ -275,6 +288,47 @@ diff -ru --new-file a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
+ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_WINNT,
+ amd64_winnt_init_abi);
+}
+diff -ru --new-file a/gdb/i386-winnt-tdep.c b/gdb/i386-winnt-tdep.c
+--- a/gdb/i386-winnt-tdep.c 1970-01-01 00:00:00.000000000 +0000
++++ b/gdb/i386-winnt-tdep.c 2019-06-04 14:43:15.890632100 +0000
+@@ -0,0 +1,37 @@
++#include "defs.h"
++#include "osabi.h"
++#include "frame-unwind.h"
++#include "windows-tdep.h"
++
++static void
++i386_winnt_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
++{
++ /* abi */
++ windows_init_abi (info, gdbarch);
++
++ /* out-of-band function calls */
++ set_gdbarch_push_dummy_call (gdbarch, 0);
++ set_gdbarch_return_value (gdbarch, 0);
++
++ /* progloue/trampoline methods */
++ set_gdbarch_skip_main_prologue (gdbarch, 0);
++ set_gdbarch_skip_trampoline_code (gdbarch, 0);
++
++ /* auto wide charset hack */
++ set_gdbarch_auto_wide_charset (gdbarch, 0);
++
++ /* unwainder */
++ frame_unwind_append_unwinder (gdbarch, 0);
++}
++
++extern initialize_file_ftype _initialize_i386_winnt_tdep;
++
++void
++_initialize_i386_winnt_tdep (void)
++{
++ gdbarch_register_osabi(
++ bfd_arch_i386,
++ 0,
++ GDB_OSABI_WINNT,
++ i386_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