diff options
-rw-r--r-- | gdb/ChangeLog | 16 | ||||
-rw-r--r-- | gdb/config/i386/nm-go32.h | 11 | ||||
-rw-r--r-- | gdb/config/i386/tm-go32.h | 42 | ||||
-rw-r--r-- | gdb/config/i386/xm-go32.h | 1 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 11 |
5 files changed, 59 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 28484c9..e1626c2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,19 @@ +Tue Feb 29 18:47:58 2000 Andrew Cagney <cagney@b1.cygnus.com> + + From 2000-02-23 Eli Zaretskii <eliz@is.elta.co.il>: + * config/i386/nm-go32.h (FLOAT_INFO): Remove macro definition. + (top level): Add prototypes for go32_* functions. + * config/i386/tm-go32.h (I386_DJGPP_TARGET): Define. + (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): + Override definitions from tm-i386.h. + (REGISTER_VIRTUAL_TYPE): Remove macro definition. + * i386-tdep.c (i386_extract_return_value) + [I386_AIX_TARGET || I386_GNULINUX_TARGET]: Add I386_DJGPP_TARGET + to the list of targets which return FP values in FP registers. + + * i386-tdep.c (i386_extract_return_value): Add FIXME recommending + that this function be re-implemented using multi-arch. + Tue Feb 29 18:40:08 2000 Andrew Cagney <cagney@b1.cygnus.com> From 2000-02-23 Eli Zaretskii <eliz@is.elta.co.il>: 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; diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 3e913fb..4df478e 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -702,9 +702,12 @@ i386_extract_return_value (type, regbuf, valbuf) char regbuf[REGISTER_BYTES]; char *valbuf; { - /* On AIX and i386 GNU/Linux, floating point values are returned in - floating point registers. */ -#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET) + /* On AIX, i386 GNU/Linux and DJGPP, floating point values are + returned in floating point registers. */ + /* FIXME: cagney/2000-02-29: This function needs to be rewritten + using multi-arch. Please don't keep adding to this #ifdef + spaghetti. */ +#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET) || defined(I386_DJGPP_TARGET) if (TYPE_CODE_FLT == TYPE_CODE (type)) { double d; @@ -720,7 +723,7 @@ i386_extract_return_value (type, regbuf, valbuf) store_floating (valbuf, TYPE_LENGTH (type), d); } else -#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET*/ +#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET || I386_DJGPP_TARGET */ { #if defined(LOW_RETURN_REGNUM) int len = TYPE_LENGTH (type); |