From 0fee20633e641d87856c10956097a9898e43fefc Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 4 Jun 2019 16:29:49 +0000 Subject: gdb-7.12: introduced amd64-winnt-tdep.c. --- gdb-7.12.midipix.patch | 65 ++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 31 deletions(-) (limited to 'gdb-7.12.midipix.patch') diff --git a/gdb-7.12.midipix.patch b/gdb-7.12.midipix.patch index 1abe827..cc84ad2 100644 --- a/gdb-7.12.midipix.patch +++ b/gdb-7.12.midipix.patch @@ -139,7 +139,7 @@ diff -ru --new-file a/gdb/configure.tgt b/gdb/configure.tgt ;; +x86_64-*-midipix) + # Target: Midipix -+ gdb_target_obs="amd64-tdep.o amd64-windows-tdep.o \ ++ gdb_target_obs="amd64-tdep.o amd64-winnt-tdep.o \ + i386-tdep.o i387-tdep.o \ + windows-tdep.o i386-winnt-tdep.o" + build_gdbserver=no @@ -240,44 +240,44 @@ 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); - } -+ +diff -ru --new-file a/gdb/amd64-winnt-tdep.c b/gdb/amd64-winnt-tdep.c +--- a/gdb/amd64-winnt-tdep.c 1970-01-01 00:00:00.000000000 +0000 ++++ b/gdb/amd64-winnt-tdep.c 2019-06-04 16:22:12.929814200 +0000 +@@ -0,0 +1,47 @@ ++#include "defs.h" ++#include "osabi.h" ++#include "frame-unwind.h" ++#include "windows-tdep.h" ++#include "amd64-windows-tdep.c" + ++#define amd64_winnt_push_dummy_call amd64_windows_push_dummy_call ++#define amd64_winnt_return_value amd64_windows_return_value ++#define amd64_winnt_skip_trampoline_code amd64_windows_skip_trampoline_code + ++#define amd64_winnt_skip_prologue amd64_windows_skip_prologue ++#define amd64_winnt_skip_main_prologue amd64_skip_main_prologue + -+/* 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); ++ /* abi */ ++ amd64_init_abi (info, gdbarch); ++ windows_init_abi (info, gdbarch); + -+ /* auto wide charset hack */ -+ set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset); ++ /* out-of-band function calls */ ++ set_gdbarch_push_dummy_call (gdbarch, amd64_winnt_push_dummy_call); ++ set_gdbarch_return_value (gdbarch, amd64_winnt_return_value); ++ set_gdbarch_skip_trampoline_code (gdbarch, amd64_winnt_skip_trampoline_code); + -+ /* TODO: SEH unwinder */ -+ frame_unwind_append_unwinder (gdbarch, 0); ++ /* skip prologue methods */ ++ set_gdbarch_skip_prologue (gdbarch, amd64_windows_skip_prologue); ++ set_gdbarch_skip_main_prologue (gdbarch, amd64_skip_main_prologue); + -+ /* TODO: inferior-specific, dynamically detected size of long */ -+ set_gdbarch_long_bit (gdbarch, 64); ++ /* 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; @@ -285,8 +285,11 @@ diff -ru --new-file a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c +void +_initialize_amd64_winnt_tdep (void) +{ -+ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_WINNT, -+ amd64_winnt_init_abi); ++ 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 -- cgit v1.2.3