From Eli. Bring go32 target up-to-date with recent GDB i386 changes.
This commit is contained in:
parent
9d271fd8b3
commit
024094993c
5 changed files with 60 additions and 23 deletions
|
@ -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>
|
Tue Feb 29 18:40:08 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
From 2000-02-23 Eli Zaretskii <eliz@is.elta.co.il>:
|
From 2000-02-23 Eli Zaretskii <eliz@is.elta.co.il>:
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr,len) \
|
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr,len) \
|
||||||
go32_region_ok_for_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
|
/* 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.
|
one that caused the trap. Therefore we don't need to step over it.
|
||||||
|
@ -60,24 +61,24 @@
|
||||||
|
|
||||||
#define target_stopped_data_address() \
|
#define target_stopped_data_address() \
|
||||||
go32_stopped_by_watchpoint (inferior_pid, 1)
|
go32_stopped_by_watchpoint (inferior_pid, 1)
|
||||||
|
extern CORE_ADDR go32_stopped_by_watchpoint (int, int);
|
||||||
|
|
||||||
/* Use these macros for watchpoint insertion/removal. */
|
/* Use these macros for watchpoint insertion/removal. */
|
||||||
|
|
||||||
#define target_insert_watchpoint(addr, len, type) \
|
#define target_insert_watchpoint(addr, len, type) \
|
||||||
go32_insert_watchpoint (inferior_pid, 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) \
|
#define target_remove_watchpoint(addr, len, type) \
|
||||||
go32_remove_watchpoint (inferior_pid, 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) \
|
#define target_insert_hw_breakpoint(addr, shadow) \
|
||||||
go32_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) \
|
#define target_remove_hw_breakpoint(addr, shadow) \
|
||||||
go32_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
|
#define DECR_PC_AFTER_HW_BREAK 0
|
||||||
|
|
||||||
#undef FLOAT_INFO
|
|
||||||
#define FLOAT_INFO { i386_go32_float_info (); }
|
|
||||||
|
|
||||||
extern void i386_go32_float_info (void);
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Target-dependent definitions for Intel x86 running DJGPP.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -18,6 +18,10 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
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 */
|
#undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */
|
||||||
#define HAVE_I387_REGS
|
#define HAVE_I387_REGS
|
||||||
|
|
||||||
|
@ -60,18 +64,30 @@ extern int i387_hex_long_double_input (char *p, long double *putithere);
|
||||||
*((long double *)(TO)) = val; \
|
*((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. */
|
|
||||||
|
|
||||||
#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)
|
|
||||||
|
|
||||||
#endif /* LD_I387 */
|
|
||||||
|
|
||||||
#undef TARGET_LONG_DOUBLE_BIT
|
#undef TARGET_LONG_DOUBLE_BIT
|
||||||
#define TARGET_LONG_DOUBLE_BIT 96
|
#define TARGET_LONG_DOUBLE_BIT 96
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
#endif /* TM_GO32_H */
|
||||||
|
|
|
@ -36,3 +36,4 @@
|
||||||
#define DIRNAME_SEPARATOR ';'
|
#define DIRNAME_SEPARATOR ';'
|
||||||
|
|
||||||
#define HOST_I386
|
#define HOST_I386
|
||||||
|
typedef unsigned char fd_mask;
|
||||||
|
|
|
@ -702,9 +702,12 @@ i386_extract_return_value (type, regbuf, valbuf)
|
||||||
char regbuf[REGISTER_BYTES];
|
char regbuf[REGISTER_BYTES];
|
||||||
char *valbuf;
|
char *valbuf;
|
||||||
{
|
{
|
||||||
/* On AIX and i386 GNU/Linux, floating point values are returned in
|
/* On AIX, i386 GNU/Linux and DJGPP, floating point values are
|
||||||
floating point registers. */
|
returned in floating point registers. */
|
||||||
#if defined(I386_AIX_TARGET) || defined(I386_GNULINUX_TARGET)
|
/* 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))
|
if (TYPE_CODE_FLT == TYPE_CODE (type))
|
||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
|
@ -720,7 +723,7 @@ i386_extract_return_value (type, regbuf, valbuf)
|
||||||
store_floating (valbuf, TYPE_LENGTH (type), d);
|
store_floating (valbuf, TYPE_LENGTH (type), d);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET*/
|
#endif /* I386_AIX_TARGET || I386_GNULINUX_TARGET || I386_DJGPP_TARGET */
|
||||||
{
|
{
|
||||||
#if defined(LOW_RETURN_REGNUM)
|
#if defined(LOW_RETURN_REGNUM)
|
||||||
int len = TYPE_LENGTH (type);
|
int len = TYPE_LENGTH (type);
|
||||||
|
|
Loading…
Reference in a new issue