Patches to add Irix6 host support.

This commit is contained in:
Jim Wilson
1996-11-12 23:33:32 +00:00
parent cf13e3fc30
commit 119dfbb7c1
14 changed files with 50 additions and 35 deletions

View File

@ -1,3 +1,16 @@
Tue Nov 12 12:18:29 1996 Jim Wilson <wilson@cygnus.com>
* defs.h (ULONGEST): New macro.
* alpha-tdep.c, breakpoint.c, c-exp.y, ch-exp.c, convex-xdep.c,
corefile.c, defs.h, f-exp.y, findvar.c, gdbcore.h, m2-exp.y,
m88k-tdep.c, printcmd.c, remote-hms.c, remote-mips.c, sparc-tdep.c,
valarith.c, valops.c, values.c, config/gould/tm-np1.h,
config/mips/tm-mips.h, mswin/prebuilt/gdb/cexptab.c,
mswin/prebuilt/gdb/fexptab.c, mswin/prebuilt/gdb/m2exptab.c:
Change all occurances of unsigned LONGEST to ULONGEST.
* configure.host (mips-sgi-irix6): Add.
Tue Nov 12 12:16:40 1996 Michael Snyder <msnyder@cleaver.cygnus.com> Tue Nov 12 12:16:40 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
* sh-tdep.c: Add functionality for target function calls. * sh-tdep.c: Add functionality for target function calls.

View File

@ -1253,7 +1253,7 @@ alpha_register_convert_to_virtual (regnum, valtype, raw_buffer, virtual_buffer)
} }
else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4) else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4)
{ {
unsigned LONGEST l; ULONGEST l;
l = extract_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum)); l = extract_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum));
l = ((l >> 32) & 0xc0000000) | ((l >> 29) & 0x3fffffff); l = ((l >> 32) & 0xc0000000) | ((l >> 29) & 0x3fffffff);
store_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype), l); store_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype), l);
@ -1282,7 +1282,7 @@ alpha_register_convert_to_raw (valtype, regnum, virtual_buffer, raw_buffer)
} }
else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4) else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4)
{ {
unsigned LONGEST l; ULONGEST l;
if (TYPE_UNSIGNED (valtype)) if (TYPE_UNSIGNED (valtype))
l = extract_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype)); l = extract_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype));
else else

View File

@ -915,7 +915,7 @@ parse_number (p, len, parsed_float, putithere)
here, and we do kind of silly things like cast to unsigned. */ here, and we do kind of silly things like cast to unsigned. */
register LONGEST n = 0; register LONGEST n = 0;
register LONGEST prevn = 0; register LONGEST prevn = 0;
unsigned LONGEST un; ULONGEST un;
register int i = 0; register int i = 0;
register int c; register int c;
@ -928,7 +928,7 @@ parse_number (p, len, parsed_float, putithere)
/* We have found a "L" or "U" suffix. */ /* We have found a "L" or "U" suffix. */
int found_suffix = 0; int found_suffix = 0;
unsigned LONGEST high_bit; ULONGEST high_bit;
struct type *signed_type; struct type *signed_type;
struct type *unsigned_type; struct type *unsigned_type;
@ -1051,7 +1051,7 @@ parse_number (p, len, parsed_float, putithere)
on 0x123456789 when LONGEST is 32 bits. */ on 0x123456789 when LONGEST is 32 bits. */
if (c != 'l' && c != 'u' && n != 0) if (c != 'l' && c != 'u' && n != 0)
{ {
if ((unsigned_p && (unsigned LONGEST) prevn >= (unsigned LONGEST) n)) if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
error ("Numeric constant too large."); error ("Numeric constant too large.");
} }
prevn = n; prevn = n;
@ -1069,11 +1069,11 @@ parse_number (p, len, parsed_float, putithere)
the case where it is we just always shift the value more than the case where it is we just always shift the value more than
once, with fewer bits each time. */ once, with fewer bits each time. */
un = (unsigned LONGEST)n >> 2; un = (ULONGEST)n >> 2;
if (long_p == 0 if (long_p == 0
&& (un >> (TARGET_INT_BIT - 2)) == 0) && (un >> (TARGET_INT_BIT - 2)) == 0)
{ {
high_bit = ((unsigned LONGEST)1) << (TARGET_INT_BIT-1); high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1);
/* A large decimal (not hex or octal) constant (between INT_MAX /* A large decimal (not hex or octal) constant (between INT_MAX
and UINT_MAX) is a long or unsigned long, according to ANSI, and UINT_MAX) is a long or unsigned long, according to ANSI,
@ -1087,20 +1087,20 @@ parse_number (p, len, parsed_float, putithere)
else if (long_p <= 1 else if (long_p <= 1
&& (un >> (TARGET_LONG_BIT - 2)) == 0) && (un >> (TARGET_LONG_BIT - 2)) == 0)
{ {
high_bit = ((unsigned LONGEST)1) << (TARGET_LONG_BIT-1); high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
unsigned_type = builtin_type_unsigned_long; unsigned_type = builtin_type_unsigned_long;
signed_type = builtin_type_long; signed_type = builtin_type_long;
} }
else else
{ {
high_bit = (((unsigned LONGEST)1) high_bit = (((ULONGEST)1)
<< (TARGET_LONG_LONG_BIT - 32 - 1) << (TARGET_LONG_LONG_BIT - 32 - 1)
<< 16 << 16
<< 16); << 16);
if (high_bit == 0) if (high_bit == 0)
/* A long long does not fit in a LONGEST. */ /* A long long does not fit in a LONGEST. */
high_bit = high_bit =
(unsigned LONGEST)1 << (sizeof (LONGEST) * HOST_CHAR_BIT - 1); (ULONGEST)1 << (sizeof (LONGEST) * HOST_CHAR_BIT - 1);
unsigned_type = builtin_type_unsigned_long_long; unsigned_type = builtin_type_unsigned_long_long;
signed_type = builtin_type_long_long; signed_type = builtin_type_long_long;
} }

View File

@ -63,7 +63,7 @@ typedef union
{ {
LONGEST lval; LONGEST lval;
unsigned LONGEST ulval; ULONGEST ulval;
struct { struct {
LONGEST val; LONGEST val;
struct type *type; struct type *type;

View File

@ -411,13 +411,13 @@ extern void mips_pop_frame PARAMS ((void));
if (mips_fpu == MIPS_FPU_NONE) \ if (mips_fpu == MIPS_FPU_NONE) \
{ \ { \
store_unsigned_integer (dummyname + 3 * 4, 4, \ store_unsigned_integer (dummyname + 3 * 4, 4, \
(unsigned LONGEST) 0); \ (ULONGEST) 0); \
store_unsigned_integer (dummyname + 4 * 4, 4, \ store_unsigned_integer (dummyname + 4 * 4, 4, \
(unsigned LONGEST) 0); \ (ULONGEST) 0); \
store_unsigned_integer (dummyname + 5 * 4, 4, \ store_unsigned_integer (dummyname + 5 * 4, 4, \
(unsigned LONGEST) 0); \ (ULONGEST) 0); \
store_unsigned_integer (dummyname + 6 * 4, 4, \ store_unsigned_integer (dummyname + 6 * 4, 4, \
(unsigned LONGEST) 0); \ (ULONGEST) 0); \
} \ } \
else if (mips_fpu == MIPS_FPU_SINGLE) \ else if (mips_fpu == MIPS_FPU_SINGLE) \
{ \ { \

View File

@ -108,6 +108,8 @@ mips-little-*) gdb_host=littlemips ;;
mips-sgi-irix3*) gdb_host=irix3 ;; mips-sgi-irix3*) gdb_host=irix3 ;;
mips-sgi-irix4*) gdb_host=irix4 ;; mips-sgi-irix4*) gdb_host=irix4 ;;
mips-sgi-irix5*) gdb_host=irix5 ;; mips-sgi-irix5*) gdb_host=irix5 ;;
# Close enough for now.
mips-sgi-irix6*) gdb_host=irix5 ;;
mips-sony-*) gdb_host=news-mips ;; mips-sony-*) gdb_host=news-mips ;;
mips-*-mach3*) gdb_host=mach3 ;; mips-*-mach3*) gdb_host=mach3 ;;
mips-*-sysv4*) gdb_host=mipsv4 ;; mips-*-sysv4*) gdb_host=mipsv4 ;;

View File

@ -193,7 +193,7 @@ static struct type *vector_type ();
static long *read_vector_register (); static long *read_vector_register ();
static long *read_vector_register_1 (); static long *read_vector_register_1 ();
static void write_vector_register (); static void write_vector_register ();
static unsigned LONGEST read_comm_register (); static ULONGEST read_comm_register ();
static void write_comm_register (); static void write_comm_register ();
static void convex_cont_command (); static void convex_cont_command ();
static void thread_continue (); static void thread_continue ();
@ -442,7 +442,7 @@ read_vector_register_1 (reg)
static void static void
write_vector_register (reg, element, val) write_vector_register (reg, element, val)
int reg, element; int reg, element;
unsigned LONGEST val; ULONGEST val;
{ {
if (have_inferior_p ()) if (have_inferior_p ())
{ {
@ -481,7 +481,7 @@ write_vector_register (reg, element, val)
/* Return the contents of communication register NUM. */ /* Return the contents of communication register NUM. */
static unsigned LONGEST static ULONGEST
read_comm_register (num) read_comm_register (num)
int num; int num;
{ {
@ -503,7 +503,7 @@ read_comm_register (num)
static void static void
write_comm_register (num, val) write_comm_register (num, val)
int num; int num;
unsigned LONGEST val; ULONGEST val;
{ {
if (have_inferior_p ()) if (have_inferior_p ())
{ {

View File

@ -283,12 +283,12 @@ read_memory_integer (memaddr, len)
return extract_signed_integer (buf, len); return extract_signed_integer (buf, len);
} }
unsigned LONGEST ULONGEST
read_memory_unsigned_integer (memaddr, len) read_memory_unsigned_integer (memaddr, len)
CORE_ADDR memaddr; CORE_ADDR memaddr;
int len; int len;
{ {
char buf[sizeof (unsigned LONGEST)]; char buf[sizeof (ULONGEST)];
read_memory (memaddr, buf, len); read_memory (memaddr, buf, len);
return extract_unsigned_integer (buf, len); return extract_unsigned_integer (buf, len);

View File

@ -643,7 +643,7 @@ parse_number (p, len, parsed_float, putithere)
register int base = input_radix; register int base = input_radix;
int unsigned_p = 0; int unsigned_p = 0;
int long_p = 0; int long_p = 0;
unsigned LONGEST high_bit; ULONGEST high_bit;
struct type *signed_type; struct type *signed_type;
struct type *unsigned_type; struct type *unsigned_type;
@ -745,13 +745,13 @@ parse_number (p, len, parsed_float, putithere)
&& ((n >> 2) >> (TARGET_INT_BIT-2))) /* Avoid shift warning */ && ((n >> 2) >> (TARGET_INT_BIT-2))) /* Avoid shift warning */
|| long_p) || long_p)
{ {
high_bit = ((unsigned LONGEST)1) << (TARGET_LONG_BIT-1); high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
unsigned_type = builtin_type_unsigned_long; unsigned_type = builtin_type_unsigned_long;
signed_type = builtin_type_long; signed_type = builtin_type_long;
} }
else else
{ {
high_bit = ((unsigned LONGEST)1) << (TARGET_INT_BIT-1); high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1);
unsigned_type = builtin_type_unsigned_int; unsigned_type = builtin_type_unsigned_int;
signed_type = builtin_type_int; signed_type = builtin_type_int;
} }

View File

@ -135,7 +135,7 @@ static struct block *modblock=0;
%union %union
{ {
LONGEST lval; LONGEST lval;
unsigned LONGEST ulval; ULONGEST ulval;
DOUBLEST dval; DOUBLEST dval;
struct symbol *sym; struct symbol *sym;
struct type *tval; struct type *tval;

View File

@ -514,7 +514,7 @@ frame_saved_pc (frame)
static void static void
write_word (sp, word) write_word (sp, word)
CORE_ADDR sp; CORE_ADDR sp;
unsigned LONGEST word; ULONGEST word;
{ {
register int len = REGISTER_SIZE; register int len = REGISTER_SIZE;
char buffer[MAX_REGISTER_RAW_SIZE]; char buffer[MAX_REGISTER_RAW_SIZE];

View File

@ -924,7 +924,7 @@ hms_fetch_register (dummy)
int s; int s;
int gottok; int gottok;
unsigned LONGEST reg[NUM_REGS]; ULONGEST reg[NUM_REGS];
check_open (); check_open ();

View File

@ -1732,7 +1732,7 @@ static void
mips_fetch_registers (regno) mips_fetch_registers (regno)
int regno; int regno;
{ {
unsigned LONGEST val; ULONGEST val;
int err; int err;
if (regno == -1) if (regno == -1)

View File

@ -676,10 +676,10 @@ unpack_double (type, valaddr, invp)
{ {
/* Unsigned -- be sure we compensate for signed LONGEST. */ /* Unsigned -- be sure we compensate for signed LONGEST. */
#ifndef _MSC_VER #ifndef _MSC_VER
return (unsigned LONGEST) unpack_long (type, valaddr); return (ULONGEST) unpack_long (type, valaddr);
#else #else
#if (_MSC_VER > 800) #if (_MSC_VER > 800)
return (unsigned LONGEST) unpack_long (type, valaddr); return (ULONGEST) unpack_long (type, valaddr);
#else #else
/* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */ /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */
return (LONGEST) unpack_long (type, valaddr); return (LONGEST) unpack_long (type, valaddr);
@ -1147,8 +1147,8 @@ unpack_field_as_long (type, valaddr, fieldno)
char *valaddr; char *valaddr;
int fieldno; int fieldno;
{ {
unsigned LONGEST val; ULONGEST val;
unsigned LONGEST valmask; ULONGEST valmask;
int bitpos = TYPE_FIELD_BITPOS (type, fieldno); int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
int lsbcount; int lsbcount;
@ -1168,7 +1168,7 @@ unpack_field_as_long (type, valaddr, fieldno)
if ((bitsize > 0) && (bitsize < 8 * (int) sizeof (val))) if ((bitsize > 0) && (bitsize < 8 * (int) sizeof (val)))
{ {
valmask = (((unsigned LONGEST) 1) << bitsize) - 1; valmask = (((ULONGEST) 1) << bitsize) - 1;
val &= valmask; val &= valmask;
if (!TYPE_UNSIGNED (TYPE_FIELD_TYPE (type, fieldno))) if (!TYPE_UNSIGNED (TYPE_FIELD_TYPE (type, fieldno)))
{ {
@ -1220,9 +1220,9 @@ modify_field (addr, fieldval, bitpos, bitsize)
/* Mask out old value, while avoiding shifts >= size of oword */ /* Mask out old value, while avoiding shifts >= size of oword */
if (bitsize < 8 * (int) sizeof (oword)) if (bitsize < 8 * (int) sizeof (oword))
oword &= ~(((((unsigned LONGEST)1) << bitsize) - 1) << bitpos); oword &= ~(((((ULONGEST)1) << bitsize) - 1) << bitpos);
else else
oword &= ~((~(unsigned LONGEST)0) << bitpos); oword &= ~((~(ULONGEST)0) << bitpos);
oword |= fieldval << bitpos; oword |= fieldval << bitpos;
store_signed_integer (addr, sizeof oword, oword); store_signed_integer (addr, sizeof oword, oword);