db2302cb93
match_bitstring_literal): Guard tolower calls with isupper, tolower on old BSD systems blindly subtracts a constant. * dbxread.c (read_ofile_symtab): Check for __gnu_compiled_* as well when determining the producer of the object file. * mdebugread.c (has_opaque_xref): New function to check for cross reference to an opaque aggregate. * mdebugread.c (parse_symbol, parse_partial_symbols): Do not enter typedefs to opaque aggregates into the symbol tables. * mdebugread.c (parse_external): Remove skip_procedures argument, it has always been 1. Remove code that handled stProc symbols, it was never executed and was wrong, as the index of a stProc symbol points to the local symbol table and not to the auxiliary symbol info. Update caller. * mdebugread.c (parse_partial_symbols): Do not enter external stProc symbols into the partial symbol table, they are already entered into the minimal symbol table. * config/i386/tm-symmetry.h: Clean up, it is now only used for Dynix. Remove all conditionals and definitions for ptx. I386_REGNO_TO_SYMMETRY moved to here from symm-tdep.c. Fix addresses of floating point registers in REGISTER_U_ADDR. STORE_STRUCT_RETURN now handles cc and gcc conventions. FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET defined to make backtracing through signal trampoline code work. * config/i386/xm-symmetry.h: Clean up, it is now only used for Dynix. Remove all conditionals and definitions for ptx. Remove KDB definitions. * symm-nat.c (store_inferior_registers): Fetch registers before storing them to obtain valid floating point control registers. Store fpu registers. * symm-nat.c (print_1167_control_word): Dynix 3.1.1 defines FPA_PCR_CC_C0 and FPA_PCR_CC_C1, avoid duplicate case value. * symm-nat.c (fetch_inferior_registers, child_xfer_memory): Fix typos. * symm-nat.c (child_resume): Update type of `signal' parameter. * symm-tdep.c (I386_REGNO_TO_SYMMETRY): Moved to tm-symmetry.h.
94 lines
2.6 KiB
C
94 lines
2.6 KiB
C
/* Sequent Symmetry target interface, for GDB.
|
|
Copyright (C) 1986, 1987, 1989, 1991, 1994 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
/* many 387-specific items of use taken from i386-dep.c */
|
|
|
|
#include "defs.h"
|
|
#include "frame.h"
|
|
#include "inferior.h"
|
|
#include "symtab.h"
|
|
|
|
#include <signal.h>
|
|
#include <sys/param.h>
|
|
#include <sys/user.h>
|
|
#include <sys/dir.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/stat.h>
|
|
#include "gdbcore.h"
|
|
#include <fcntl.h>
|
|
|
|
void
|
|
symmetry_extract_return_value(type, regbuf, valbuf)
|
|
struct type *type;
|
|
char *regbuf;
|
|
char *valbuf;
|
|
{
|
|
union {
|
|
double d;
|
|
int l[2];
|
|
} xd;
|
|
struct minimal_symbol *msymbol;
|
|
float f;
|
|
|
|
if (TYPE_CODE_FLT == TYPE_CODE(type)) {
|
|
msymbol = lookup_minimal_symbol ("1167_flt", (struct objfile *) NULL);
|
|
if (msymbol != NULL) {
|
|
/* found "1167_flt" means 1167, %fp2-%fp3 */
|
|
/* float & double; 19= %fp2, 20= %fp3 */
|
|
/* no single precision on 1167 */
|
|
xd.l[1] = *((int *)®buf[REGISTER_BYTE(19)]);
|
|
xd.l[0] = *((int *)®buf[REGISTER_BYTE(20)]);
|
|
switch (TYPE_LENGTH(type)) {
|
|
case 4:
|
|
/* FIXME: broken for cross-debugging. */
|
|
f = (float) xd.d;
|
|
memcpy (valbuf, &f, TYPE_LENGTH(type));
|
|
break;
|
|
case 8:
|
|
/* FIXME: broken for cross-debugging. */
|
|
memcpy (valbuf, &xd.d, TYPE_LENGTH(type));
|
|
break;
|
|
default:
|
|
error("Unknown floating point size");
|
|
break;
|
|
}
|
|
} else {
|
|
/* 387 %st(0), gcc uses this */
|
|
i387_to_double(((int *)®buf[REGISTER_BYTE(3)]),
|
|
&xd.d);
|
|
switch (TYPE_LENGTH(type)) {
|
|
case 4: /* float */
|
|
f = (float) xd.d;
|
|
/* FIXME: broken for cross-debugging. */
|
|
memcpy (valbuf, &f, 4);
|
|
break;
|
|
case 8: /* double */
|
|
/* FIXME: broken for cross-debugging. */
|
|
memcpy (valbuf, &xd.d, 8);
|
|
break;
|
|
default:
|
|
error("Unknown floating point size");
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
memcpy (valbuf, regbuf, TYPE_LENGTH (type));
|
|
}
|
|
}
|