From: Jim Wilson Date: Tue, 12 Nov 1996 23:33:32 +0000 (+0000) Subject: Patches to add Irix6 host support. X-Git-Tag: gdb-4_18~7194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=119dfbb7c16c594e26b4745e5efaf836b48d8c1b;p=external%2Fbinutils.git Patches to add Irix6 host support. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c266de3..18e45a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +Tue Nov 12 12:18:29 1996 Jim Wilson + + * 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 * sh-tdep.c: Add functionality for target function calls. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index e07d75a..b19d85f 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -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) { - unsigned LONGEST l; + ULONGEST l; l = extract_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum)); l = ((l >> 32) & 0xc0000000) | ((l >> 29) & 0x3fffffff); 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) { - unsigned LONGEST l; + ULONGEST l; if (TYPE_UNSIGNED (valtype)) l = extract_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype)); else diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 03691ef..0572e12 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -915,7 +915,7 @@ parse_number (p, len, parsed_float, putithere) here, and we do kind of silly things like cast to unsigned. */ register LONGEST n = 0; register LONGEST prevn = 0; - unsigned LONGEST un; + ULONGEST un; register int i = 0; register int c; @@ -928,7 +928,7 @@ parse_number (p, len, parsed_float, putithere) /* We have found a "L" or "U" suffix. */ int found_suffix = 0; - unsigned LONGEST high_bit; + ULONGEST high_bit; struct type *signed_type; struct type *unsigned_type; @@ -1051,7 +1051,7 @@ parse_number (p, len, parsed_float, putithere) on 0x123456789 when LONGEST is 32 bits. */ 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."); } 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 once, with fewer bits each time. */ - un = (unsigned LONGEST)n >> 2; + un = (ULONGEST)n >> 2; if (long_p == 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 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 && (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; signed_type = builtin_type_long; } else { - high_bit = (((unsigned LONGEST)1) + high_bit = (((ULONGEST)1) << (TARGET_LONG_LONG_BIT - 32 - 1) << 16 << 16); if (high_bit == 0) /* A long long does not fit in a LONGEST. */ 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; signed_type = builtin_type_long_long; } diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c index c33429b..cc7d7f7 100644 --- a/gdb/ch-exp.c +++ b/gdb/ch-exp.c @@ -63,7 +63,7 @@ typedef union { LONGEST lval; - unsigned LONGEST ulval; + ULONGEST ulval; struct { LONGEST val; struct type *type; diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index d903e20..7ba58db 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -411,13 +411,13 @@ extern void mips_pop_frame PARAMS ((void)); if (mips_fpu == MIPS_FPU_NONE) \ { \ store_unsigned_integer (dummyname + 3 * 4, 4, \ - (unsigned LONGEST) 0); \ + (ULONGEST) 0); \ store_unsigned_integer (dummyname + 4 * 4, 4, \ - (unsigned LONGEST) 0); \ + (ULONGEST) 0); \ store_unsigned_integer (dummyname + 5 * 4, 4, \ - (unsigned LONGEST) 0); \ + (ULONGEST) 0); \ store_unsigned_integer (dummyname + 6 * 4, 4, \ - (unsigned LONGEST) 0); \ + (ULONGEST) 0); \ } \ else if (mips_fpu == MIPS_FPU_SINGLE) \ { \ diff --git a/gdb/configure.host b/gdb/configure.host index db8e3b2..7b7266a 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -108,6 +108,8 @@ mips-little-*) gdb_host=littlemips ;; mips-sgi-irix3*) gdb_host=irix3 ;; mips-sgi-irix4*) gdb_host=irix4 ;; mips-sgi-irix5*) gdb_host=irix5 ;; +# Close enough for now. +mips-sgi-irix6*) gdb_host=irix5 ;; mips-sony-*) gdb_host=news-mips ;; mips-*-mach3*) gdb_host=mach3 ;; mips-*-sysv4*) gdb_host=mipsv4 ;; diff --git a/gdb/convex-xdep.c b/gdb/convex-xdep.c index 9a3d995..8bfc0d8 100644 --- a/gdb/convex-xdep.c +++ b/gdb/convex-xdep.c @@ -193,7 +193,7 @@ static struct type *vector_type (); static long *read_vector_register (); static long *read_vector_register_1 (); static void write_vector_register (); -static unsigned LONGEST read_comm_register (); +static ULONGEST read_comm_register (); static void write_comm_register (); static void convex_cont_command (); static void thread_continue (); @@ -442,7 +442,7 @@ read_vector_register_1 (reg) static void write_vector_register (reg, element, val) int reg, element; - unsigned LONGEST val; + ULONGEST val; { if (have_inferior_p ()) { @@ -481,7 +481,7 @@ write_vector_register (reg, element, val) /* Return the contents of communication register NUM. */ -static unsigned LONGEST +static ULONGEST read_comm_register (num) int num; { @@ -503,7 +503,7 @@ read_comm_register (num) static void write_comm_register (num, val) int num; - unsigned LONGEST val; + ULONGEST val; { if (have_inferior_p ()) { diff --git a/gdb/corefile.c b/gdb/corefile.c index b792514..6581420 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -283,12 +283,12 @@ read_memory_integer (memaddr, len) return extract_signed_integer (buf, len); } -unsigned LONGEST +ULONGEST read_memory_unsigned_integer (memaddr, len) CORE_ADDR memaddr; int len; { - char buf[sizeof (unsigned LONGEST)]; + char buf[sizeof (ULONGEST)]; read_memory (memaddr, buf, len); return extract_unsigned_integer (buf, len); diff --git a/gdb/f-exp.y b/gdb/f-exp.y index caf0ca6..4a1f747 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -643,7 +643,7 @@ parse_number (p, len, parsed_float, putithere) register int base = input_radix; int unsigned_p = 0; int long_p = 0; - unsigned LONGEST high_bit; + ULONGEST high_bit; struct type *signed_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 */ || 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; signed_type = builtin_type_long; } else { - high_bit = ((unsigned LONGEST)1) << (TARGET_INT_BIT-1); + high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1); unsigned_type = builtin_type_unsigned_int; signed_type = builtin_type_int; } diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 08a11ce..507e5bc 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -135,7 +135,7 @@ static struct block *modblock=0; %union { LONGEST lval; - unsigned LONGEST ulval; + ULONGEST ulval; DOUBLEST dval; struct symbol *sym; struct type *tval; diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c index a21bd96..f74560e 100644 --- a/gdb/m88k-tdep.c +++ b/gdb/m88k-tdep.c @@ -514,7 +514,7 @@ frame_saved_pc (frame) static void write_word (sp, word) CORE_ADDR sp; - unsigned LONGEST word; + ULONGEST word; { register int len = REGISTER_SIZE; char buffer[MAX_REGISTER_RAW_SIZE]; diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c index 2f43e20..6051c4f 100644 --- a/gdb/remote-hms.c +++ b/gdb/remote-hms.c @@ -924,7 +924,7 @@ hms_fetch_register (dummy) int s; int gottok; - unsigned LONGEST reg[NUM_REGS]; + ULONGEST reg[NUM_REGS]; check_open (); diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index c0c1686..4956e22 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -1732,7 +1732,7 @@ static void mips_fetch_registers (regno) int regno; { - unsigned LONGEST val; + ULONGEST val; int err; if (regno == -1) diff --git a/gdb/values.c b/gdb/values.c index 0c3a6b9..3f9e7bb 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -676,10 +676,10 @@ unpack_double (type, valaddr, invp) { /* Unsigned -- be sure we compensate for signed LONGEST. */ #ifndef _MSC_VER - return (unsigned LONGEST) unpack_long (type, valaddr); + return (ULONGEST) unpack_long (type, valaddr); #else #if (_MSC_VER > 800) - return (unsigned LONGEST) unpack_long (type, valaddr); + return (ULONGEST) unpack_long (type, valaddr); #else /* FIXME!!! msvc22 doesn't support unsigned __int64 -> double */ return (LONGEST) unpack_long (type, valaddr); @@ -1147,8 +1147,8 @@ unpack_field_as_long (type, valaddr, fieldno) char *valaddr; int fieldno; { - unsigned LONGEST val; - unsigned LONGEST valmask; + ULONGEST val; + ULONGEST valmask; int bitpos = TYPE_FIELD_BITPOS (type, fieldno); int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); int lsbcount; @@ -1168,7 +1168,7 @@ unpack_field_as_long (type, valaddr, fieldno) if ((bitsize > 0) && (bitsize < 8 * (int) sizeof (val))) { - valmask = (((unsigned LONGEST) 1) << bitsize) - 1; + valmask = (((ULONGEST) 1) << bitsize) - 1; val &= valmask; 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 */ if (bitsize < 8 * (int) sizeof (oword)) - oword &= ~(((((unsigned LONGEST)1) << bitsize) - 1) << bitpos); + oword &= ~(((((ULONGEST)1) << bitsize) - 1) << bitpos); else - oword &= ~((~(unsigned LONGEST)0) << bitpos); + oword &= ~((~(ULONGEST)0) << bitpos); oword |= fieldval << bitpos; store_signed_integer (addr, sizeof oword, oword);