aboutsummaryrefslogtreecommitdiff
path: root/gdb/i387-tdep.c
AgeCommit message (Collapse)AuthorFilesLines
2001-11-12* i386-tdep.h (FPU_REG_RAW_SIZE): Define unconditionally.Mark Kettenis1-2/+0
* i387-nat.c, i387-tdep.c: Unconditionally include "i386-tdep.h". * config/i386/tm-i386.h (FPU_REG_RAW_SIZE): Removed. (SIZEOF_FPU_REGS): Don't use FPU_REG_RAW_SIZE here.
2001-10-28* i387-tdep.c (print_i387_value): Use extract_typed_floating toMark Kettenis1-18/+5
convert RAW to a DOUBLEST instead of extract_floating.
2001-09-21* i386-tdep.h: New file.Jiri Smid1-0/+3
* i387-nat.c: Include i386-tdep.h when multiarch. * i387-tdep.c: Ditto.
2001-08-01* defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney1-0/+1
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT) (HOST_LONG_DOUBLE_FORMAT, DOUBLEST) (floatformat_to_doublest, floatformat_from_doublest) (floatformat_is_negative, floatformat_is_nan) (floatformat_mantissa, store_floating) (extract_floating): Move declaration from here. * doublest.h: To here. New file. * utils.c (get_field, floatformat_to_doublest, put_field) (ldfrexp, floatformat_from_doublest, floatformat_is_negative) (floatformat_is_nan, floatformat_mantissa) (FLOATFORMAT_CHAR_BIT): Move from here. * doublest.c: To here. New file. * findvar.c (store_floating, extract_floating): Move from here. * doublest.c: To here. * Makefile.in (SFILES): Add doublest.c. (COMMON_OBS): Add doublest.o. (doublest.o): Specify dependencies. (doublest_h): Define. * config/m88k/tm-m88k.h: Include "doublest.h". * config/i960/tm-i960.h: Ditto. * config/i386/tm-symmetry.h: Ditto. * rs6000-tdep.c, valarith.c: Ditto. * valprint.c, stabsread.c, sh-tdep.c: Ditto. * ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto. * values.c, arm-tdep.c, arm-linux-tdep.c: Ditto. * alpha-tdep.c, ax.h, expression.h: Ditto. * sh-tdep.c, parse.c, top.c, value.h: Ditto. * Makefile.in (arm-tdep.o): Add $(doublest_h). (i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto. (rs6000-tdep.o, stabsread.o, valarith.o): Ditto. (values.o, valprint.o, arm-linux-tdep.o): Ditto. (alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto. (parser_defs_h): Ditto. (expression_h): Add $(doublest_h) and $(symtab_h).
2001-07-07I'm using the obvious fix rule to commit this.Michael Chastain1-2/+2
Testing: I tested on native Red Hat Linux 7 using gcc 3.0. The "info float" command exercises print_i387_value. 2001-07-06 Michael Chastain <chastain@redhat.com> * i387-tdep.c (print_i387_value): Fix pointer glitch. === Index: i387-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i387-tdep.c,v retrieving revision 1.11 diff -c -1 -0 -p -r1.11 i387-tdep.c *** gdb/i387-tdep.c 2001/07/04 21:14:05 1.11 --- gdb/i387-tdep.c 2001/07/06 12:47:00 *************** print_i387_value (char *raw) *** 163,184 **** DOUBLEST value; int len = TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT; char *tmp = alloca (len); /* This code only works on targets where ... */ gdb_assert (TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext); /* Take care of the padding. FP reg is 80 bits. The same value in memory is 96 bits. */ gdb_assert (FPU_REG_RAW_SIZE < len); ! memcpy (&tmp, raw, FPU_REG_RAW_SIZE); ! memset (&tmp + FPU_REG_RAW_SIZE, 0, len - FPU_REG_RAW_SIZE); /* Extract the value as a DOUBLEST. */ /* Use extract_floating() rather than floatformat_to_doublest(). The latter is lossy in nature. Once GDB gets a host/target independent and non-lossy FP it will become possible to bypass extract_floating() and call floatformat*() directly. Note also the assumptions about TARGET_LONG_DOUBLE above. */ value = extract_floating (tmp, len); /* We try to print 19 digits. The last digit may or may not contain --- 163,184 ---- DOUBLEST value; int len = TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT; char *tmp = alloca (len); /* This code only works on targets where ... */ gdb_assert (TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext); /* Take care of the padding. FP reg is 80 bits. The same value in memory is 96 bits. */ gdb_assert (FPU_REG_RAW_SIZE < len); ! memcpy (tmp, raw, FPU_REG_RAW_SIZE); ! memset (tmp + FPU_REG_RAW_SIZE, 0, len - FPU_REG_RAW_SIZE); /* Extract the value as a DOUBLEST. */ /* Use extract_floating() rather than floatformat_to_doublest(). The latter is lossy in nature. Once GDB gets a host/target independent and non-lossy FP it will become possible to bypass extract_floating() and call floatformat*() directly. Note also the assumptions about TARGET_LONG_DOUBLE above. */ value = extract_floating (tmp, len); /* We try to print 19 digits. The last digit may or may not contain
2001-07-04* i387-tdep.c (print_i387_value): Add extra space after final fullMark Kettenis1-1/+1
stop in comment.
2001-07-04* i387-tdep.c: Include "gdb_assert.h".Andrew Cagney1-14/+18
(print_i387_value): Use extract_floating to extract the FP value from a zero padded local buffer.
2001-03-09* i387-tdep.c (print_i387_status_word): Fix printing of StackMark Kettenis1-1/+1
fault flag. It is bit 6 of the x87 FPU status word, not bit 7.
2001-03-06Update/correct copyright notices.Kevin Buettner1-2/+2
2001-03-01Create new file regcache.h. Update all uses.Andrew Cagney1-1/+3
2000-07-30Protoization.Kevin Buettner1-14/+6
2000-05-28PARAMS removal.Kevin Buettner1-4/+4
2000-05-21* i387-tdep.c (print_i387_value): Cast &value to (char *) inMark Kettenis1-1/+2
pointer arithmetic. Fixes a bug which manifested itself on FreeBSD.
2000-04-122000-04-12 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-2/+15
* i387-tdep.c (print_i387_value): Avoid call to floatformat_to_doublest if long double type is the same on host and target.
2000-03-262000-03-26 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-49/+1
Provide `long double' support for most i386 targets. * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT): Define as &floatformat_i387_ext. (TARGET_LONG_DOUBLE_BITS): Define as 96. (REGISTER_VIRTUAL_TYPE): Change type for FPU registers to `builtin_type_long_double'. (REGISTER_CONVERT_TO_VIRTUAL): Call i386_register_convert_to_virtual. (REGISTER_CONVERT_TO_RAW): Call i386_register_convert_to_raw. (i387_to_double, double_to_i387): Remove prototypes. (i386_extract_return_value): Change prototype to match definition in i386-tdep.c. * config/i386/tm-i386mk.h (TARGET_LONG_DOUBLE_FORMAT): #undef. (TARGET_LONG_DOUBLE_BITS): #undef. * config/i386/tm-linux.h (TARGET_LONG_DOUBLE_BIT): Remove. [HAVE_LONG_DOUBLE && HOST_I386] (LD_I387): Remove. (i387_extract_floating, i387_store_floating): Remove prototypes. (TARGET_EXTRACT_FLOATING, TARGET_STORE_FLOATING): Remove. (REGISTER_CONVERT_TO_VIRTUAL, REGOISTER_CONVERT_TO_RAW): Remove. (REGISTER_VIRTUAL_TYPE): Remove. * i386-tdep.c (i386_register_convert_to_virtual): New function. (i386_register_convert_to_raw): New function. * i387-tdep.c [LD_I387] (i387_extract_floating): Remove. (i387_store_floating): Remove.
1999-12-08import gdb-1999-12-07 snapshotJason Molenda1-7/+252
1999-09-22import gdb-1999-09-21Jason Molenda1-139/+0
1999-09-13import gdb-1999-09-13 snapshotJason Molenda1-1/+1
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-46/+235
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-46/+77
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+111
1999-04-16Initial creation of sourceware repositoryStan Shebs1-111/+0
1998-10-161998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-1/+5
* command.c copying.c copying.awk core-aout.c core-regset.c corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c symmisc.c valarith.c: Add prototypes. * defs.h: Add prototype for utils.c::do_run_cleanups. * gdbtypes.c: Add prototypes. (make_pointer_type): Add braces to remove nested if-else ambiguity. (make_reference_type): Ditto. * printcmd.c (printf_command): Initialize 'f' and 'string' at function startup to suppress possibly-used-before-initialized warning. * remote-utils.c: Add prototypes. (sr_pollchar): Add braces to remove nested if-else ambiguity. * ser-tcp.c: Add prototypes. (wait_for): Add braces to remove nested if-else ambiguity. (tcp_readchar): Ditto. * ser-unix.c: Add prototypes. (get_tty_state): Don't define errno here. (get_tty_state): Don't define errno here. (hardwire_readchar): Only define 't' if we are compiling in a Cygwin environment. * symtab.c: Add prototypes. (find_methods): Add braces to remove nested if-else ambiguity. (search_symbols): Set 'i' to an initial value to suppress a possibly-used-before-initialized warning. * valops.c: Add prototypes. (value_cast): Set 'eltype2' to an initial value to suppress a possibly-used-before-initialized warning. (value_of_variable): Add braces to remove nested if-else ambiguity. (value_of_this): Ditto. * valprint.c: Add prototypes. (print_floating): Add braces to remove nested if-else ambiguity. Looks like a big change, but it is really just a lot of small stuff. In the cases where GCC was flagging a possible use-before-initialized warning on variables, it turned out that these were being used properly but GCC couldn't see that.
1995-08-02Update FSF address.Fred Fish1-1/+1
1994-02-28 * i387-tdep.c, i386-tdep.c i386v-nat.c, i386aix-nat.c,Jim Kingdon1-8/+3
i386m3-nat.c, config/m68k/tm-m68k.h, i960-tdep.c config/i960/tm-i960.h, remote-nindy.c, config/m88k/tm-m88k.h, m88k-tdep.c: Use floatformat.h instead of ieee-float.h. * sparc-tdep.c: Remove now-obsolete ieee-float.h stuff * findvar.c: Update comment regarding ieee-float.h.
1994-01-22 * i386aix-nat.c (i386_float_info): Reverse order of registers beforeJim Kingdon1-3/+0
passing them to print_387_status. (print_387_status): Don't subtract top from 7 before using it. * i387-tdep.c: Remove comment about AIX wanting "top" subtracted from 7; the above explains it.
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-32/+32
Change all references to stdout/stderr to gdb_stdout/gdb_stderr. Replace all calls to stdio output functions with calls to corresponding _unfiltered functions (`fprintf_unfiltered') Replaced calls to fopen for output to gdb_fopen. Added sufficient goo to utils.c and defs.h to make the above work. The net effect is that stdio output functions are only directly used in utils.c. Elsewhere, the _unfiltered and _filtered functions and GDB_FILE type are used. In the near future, GDB_FILE will stop being equivalant to FILE. The semantics of some commands has changed in a very subtle way: called in the right context, they may cause new occurences of prompt_for_continue() behavior. The testsuite doesn't notice anything like this, though. Please respect this change by not reintroducing stdio output dependencies in the main body of gdb code. All output from commands should go to a GDB_FILE. Target-specific code can still use stdio directly to communicate with targets.
1993-06-21 * config/i386/*aix*, i386aix-nat.c: New files.Jim Kingdon1-1/+4
* configure.in: Use them. * alldeps.mak: List them. * coffread.c (decode_base_type): Deal with anonymous enum type. * i387-tdep.c (print_387_status_word): Add comment re "top". * i386-tdep.c [I386_AIX_TARGET] (i386_extract_return_value): New func. * dbxread.c: Use SEEK_SET and SEEK_CUR, not L_*. Define them if and only if not defined by a header file. * mipsread.c: Don't define L_SET or L_INCR.
1993-04-19changes for SVR3.2Jim Kingdon1-15/+0
1992-11-15 * Makefile.in (SFILES_MAINDIR): Add ch-exp.y.Fred Fish1-1/+0
* Makefile.in (YYFILES): Add ch-exp.tab.c. * Makefile.in (YYOBJ): Add ch-exp.tab.o. * Makefile.in (saber_gdb): Add unload of ch-exp.y and load of ch-exp.tab.c. * Makefile.in (distclean): Add target ch-exp.tab.c. * Makefile.in (realclean): Add rm of ch-exp.tab.c. * Makefile.in (c-exp.tab.c, m2-exp.tab.c): Add dependency on Makefile since it contains sed patterns used in generation. Add sed pattern to also delete #include of any malloc.h. * Makefile.in (ch-exp.tab.o, ch-exp.tab.c): New targets. * ch-exp.y: New expression parser, for GNU-Chill. * c-exp.y, expr.c, expression.h, language.c, m2-exp.y, parser-defs.h, valarith.c, valops.c, value.h: Remap macros and function names to conform to K&R terminology with respect to logical and bitwise operators: UNOP_ZEROP => UNOP_LOGICAL_NOT UNOP_LOGNOT => UNOP_COMPLEMENT BINOP_LOGAND => BINOP_BITWISE_AND BINOP_LOGXOR => BINOP_BITWISE_XOR BINOP_LOGIOR => BINOP_BITWISE_IOR BINOP_AND => BINOP_LOGICAL_AND BINOP_OR => BINOP_LOGICAL_OR PREC_OR => PREC_LOGICAL_OR PREC_AND => PREC_LOGICAL_AND PREC_LOGIOR => PREC_BITWISE_IOR PREC_LOGXOR => PREC_BITWISE_XOR PREC_LOGAND => PREC_BITWISE_AND value_zerop() => value_logical_not() value_lognot() => value_complement() * c-exp.y (c_op_print_tab): Add explicit empty terminator. * m2-exp.y (m2_op_print_tab): Add explicit empty terminator. * defs.h (enum language): Add language_chill. * dwarfread.c (set_cu_language): Add LANG_CHILL case and make LANG_MODULA2 a recognized language. * eval.c (evaluate_subexp): Add OP_BOOL case. * expprint.c (print_subexp): Add OP_BOOL case. * gdbtypes.h (enum_typecode): Note TYPE_CODE_BOOL used for Chill as well as Modula-2. * gdbtypes.y (builtin_type_chill_bool, builtin_type_chill_long, builtin_type_chill_ulong, builtin_type_chill_real): Add. * i387-tdep.c (sys/dir.h): Remove, appears to be unnecessary and is nonexistant in some SVR4 based systems. * language.c (DEFAULT_ALLOCSIZE): Change from 3 => 4. * language.c (set_language_command): Add chill. * language.c (binop_result_type, integral_type, character_type, boolean_type, structured_type, value_true, binop_type_check): Add language_chill cases. * language.h (_LANG_chill): Define. * m2-exp.y (number_sign, modblock): Make static, #ifdef out unused modblock. * m2-exp.y (ANDAND): Rename to LOGICAL_AND. * source.c (source_info): Fix minor nits, print "1 line" rather than "1 lines", and "language is <lang>". * symfile.c (deduce_language_from_filename): Recognize the filename extensions ".chill", ".c186", and ".c286" for Chill. * valarith.c (value_binop): Handle TYPE_CODE_BOOL as well as TYPE_CODE_INT and TYPE_CODE_FLOAT. * valprint.c (val_print): Print TYPE_CODE_BOOL type values as "TRUE" or "FALSE". * valprint.c (typedef_print): Add case for language_chill. * values.c (value_from_longest): Handle TYPE_CODE_BOOL.
1992-03-15Globs of changes. See the ChangeLog for details. Most related toFred Fish1-1/+1
using the new mmalloc package.
1992-03-03Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)Michael Tiemann1-1/+0
* All GDB files that #include defs.h: Removed stdio.h. (defs.h): #include stdio.h. This has been tested by building GDBs for all targets hosted on Sun4. None of the build problems were related to stdio.h inclusion. (n.b. many configurations don't build for other reasons.)
1992-02-22* Check in Fred Fish's changes in these modules. FredJohn Gilmore1-4/+7
will make ChangeLog entries for all of them.
1991-11-21* defs.h: Incorporate param.h. All users changed.John Gilmore1-1/+0
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
1991-10-15Changes from Fred Fish:John Gilmore1-1/+1
* tm-68k.h (FPI_REGNUM): Add. * infrun.c (child_create_inferior): flush stdout and stderr before forking. * configure.in: Handle amigados, amix hosts and targets. * inflow.c: Handle TIOCGLTC_BROKEN for Amiga. From Andreas Schwab: * values.c (show_convenience): Use printf_filtered. * main.c (define_command): Check result of lookup_command for exact match. (echo_command): Use printf_filtered, and force output out. * dbxread.c (read_enum_type): Avoid Modula-2 kludge that breaks C programs. * i387-tdep.c (double_to_i387): Fix typo for double_to_ieee_extended. * utils.c (_initialize_utils): If !ISATTY, don't paginate.
1991-09-19Output hex with local_hex_string for Modula-2 support.John Gilmore1-3/+3
1991-09-18* i387-tdep.c: New file, consolidates most 80387 support,John Gilmore1-0/+127
and eliminates host dependency on double<->extended conversions.