From 024094993c3579f62dab27d33e63668ec05400fd Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 29 Feb 2000 08:16:40 +0000 Subject: From Eli. Bring go32 target up-to-date with recent GDB i386 changes. --- gdb/config/i386/nm-go32.h | 11 ++++++----- gdb/config/i386/tm-go32.h | 42 +++++++++++++++++++++++++++++------------- gdb/config/i386/xm-go32.h | 1 + 3 files changed, 36 insertions(+), 18 deletions(-) (limited to 'gdb/config') diff --git a/gdb/config/i386/nm-go32.h b/gdb/config/i386/nm-go32.h index 3a9d224..2258c84 100644 --- a/gdb/config/i386/nm-go32.h +++ b/gdb/config/i386/nm-go32.h @@ -48,6 +48,7 @@ #define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr,len) \ go32_region_ok_for_watchpoint(addr,len) +extern int go32_region_ok_for_watchpoint (CORE_ADDR, int); /* After a watchpoint trap, the PC points to the instruction after the one that caused the trap. Therefore we don't need to step over it. @@ -60,24 +61,24 @@ #define target_stopped_data_address() \ go32_stopped_by_watchpoint (inferior_pid, 1) +extern CORE_ADDR go32_stopped_by_watchpoint (int, int); /* Use these macros for watchpoint insertion/removal. */ #define target_insert_watchpoint(addr, len, type) \ go32_insert_watchpoint (inferior_pid, addr, len, type) +extern int go32_insert_watchpoint (int, CORE_ADDR, int, int); #define target_remove_watchpoint(addr, len, type) \ go32_remove_watchpoint (inferior_pid, addr, len, type) +extern int go32_remove_watchpoint (int, CORE_ADDR, int, int); #define target_insert_hw_breakpoint(addr, shadow) \ go32_insert_hw_breakpoint(addr, shadow) +extern int go32_insert_hw_breakpoint (CORE_ADDR, void *); #define target_remove_hw_breakpoint(addr, shadow) \ go32_remove_hw_breakpoint(addr, shadow) +extern int go32_remove_hw_breakpoint (CORE_ADDR, void *); #define DECR_PC_AFTER_HW_BREAK 0 - -#undef FLOAT_INFO -#define FLOAT_INFO { i386_go32_float_info (); } - -extern void i386_go32_float_info (void); diff --git a/gdb/config/i386/tm-go32.h b/gdb/config/i386/tm-go32.h index 3db97f9..fb6eabd 100644 --- a/gdb/config/i386/tm-go32.h +++ b/gdb/config/i386/tm-go32.h @@ -1,5 +1,5 @@ /* Target-dependent definitions for Intel x86 running DJGPP. - Copyright 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GDB. @@ -18,6 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef TM_GO32_H +#define TM_GO32_H + +#define I386_DJGPP_TARGET #undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */ #define HAVE_I387_REGS @@ -60,18 +64,30 @@ extern int i387_hex_long_double_input (char *p, long double *putithere); *((long double *)(TO)) = val; \ } -/* Return the GDB type object for the "standard" data type of data in - register N. Perhaps si and di should go here, but potentially they - could be used for things other than address. */ +#undef TARGET_LONG_DOUBLE_BIT +#define TARGET_LONG_DOUBLE_BIT 96 -#define REGISTER_VIRTUAL_TYPE(N) \ - (((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM) \ - ? lookup_pointer_type (builtin_type_void) \ - : IS_FP_REGNUM(N) ? builtin_type_long_double \ - : IS_SSE_REGNUM(N) ? builtin_type_v4sf \ - : builtin_type_int) +/* FRAME_CHAIN takes a frame's nominal address and produces the frame's + chain-pointer. + In the case of the i386, the frame's nominal address + is the address of a 4-byte word containing the calling frame's address. + DJGPP doesn't have any special frames for signal handlers, they are + just normal C functions. */ +#undef FRAME_CHAIN +#define FRAME_CHAIN(thisframe) \ + (!inside_entry_file ((thisframe)->pc) ? \ + read_memory_integer ((thisframe)->frame, 4) :\ + 0) + +/* A macro that tells us whether the function invocation represented + by FI does not have a frame on the stack associated with it. If it + does not, FRAMELESS is set to 1, else 0. */ +#undef FRAMELESS_FUNCTION_INVOCATION +#define FRAMELESS_FUNCTION_INVOCATION(FI) \ + (frameless_look_for_prologue(FI)) + +#undef FRAME_SAVED_PC +#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4)) #endif /* LD_I387 */ - -#undef TARGET_LONG_DOUBLE_BIT -#define TARGET_LONG_DOUBLE_BIT 96 +#endif /* TM_GO32_H */ diff --git a/gdb/config/i386/xm-go32.h b/gdb/config/i386/xm-go32.h index 868074d..871b121 100644 --- a/gdb/config/i386/xm-go32.h +++ b/gdb/config/i386/xm-go32.h @@ -36,3 +36,4 @@ #define DIRNAME_SEPARATOR ';' #define HOST_I386 +typedef unsigned char fd_mask; -- cgit v1.1