* i387-tdep.c, i386-tdep.c i386v-nat.c, i386aix-nat.c,
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 28 Feb 1994 06:06:05 +0000 (06:06 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 28 Feb 1994 06:06:05 +0000 (06:06 +0000)
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.

gdb/config/i960/tm-i960.h
gdb/config/m88k/tm-m88k.h
gdb/findvar.c
gdb/i386-tdep.c
gdb/i386aix-nat.c
gdb/i386m3-nat.c
gdb/i960-tdep.c
gdb/m88k-tdep.c
gdb/remote-nindy.c
gdb/sparc-tdep.c

index f93b5aa711eb692bf02397e03d5965f0b9d8dab9..f13795ece07d17e6b30e9cb02ef197d21d02c500 100644 (file)
@@ -166,15 +166,15 @@ extern CORE_ADDR saved_pc_after_call ();
 
 #define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM)
 
+#include "floatformat.h"
+
 /* Convert data from raw format for register REGNUM in buffer FROM
    to virtual format with type TYPE in buffer TO.  */
 
-extern struct ext_format ext_format_i960;
-
 #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO)       \
 { \
   double val; \
-  ieee_extended_to_double (&ext_format_i960, (FROM), &val); \
+  floatformat_to_double (&floatformat_i960_ext, (FROM), &val); \
   store_floating ((TO), TYPE_LENGTH (TYPE), val); \
 }
 
@@ -184,7 +184,7 @@ extern struct ext_format ext_format_i960;
 #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO)   \
 { \
   double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
-  double_to_ieee_extended (&ext_format_i960, &val, (TO)); \
+  floatformat_from_double (&floatformat_i960_ext, &val, (TO)); \
 }
 
 /* Return the GDB type object for the "standard" data type
index 9b50dcf74cb7979576968ce7bba47754ae9590f8..022890704da1d6c9e7c741a290f1612628f9fa89 100644 (file)
@@ -18,8 +18,6 @@ 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.  */
 
-#include "ieee-float.h"
-
 /* g++ support is not yet included.  */
 
 /* Define the bit, byte, and word ordering of the machine.  */
@@ -388,7 +386,7 @@ if (!target_is_m88110) \
 
 #define REGISTER_CONVERTIBLE(N) ((N) >= XFP_REGNUM)
 
-extern const struct ext_format ext_format_m88110;
+#include "floatformat.h"
 
 /* Convert data from raw format for register REGNUM in buffer FROM
    to virtual format with type TYPE in buffer TO.  */
@@ -396,7 +394,7 @@ extern const struct ext_format ext_format_m88110;
 #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
 { \
   double val; \
-  ieee_extended_to_double (&ext_format_m88110, (FROM), &val); \
+  floatformat_to_double (&floatformat_m88110_ext, (FROM), &val); \
   store_floating ((TO), TYPE_LENGTH (TYPE), val); \
 }
 
@@ -406,7 +404,7 @@ extern const struct ext_format ext_format_m88110;
 #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO)   \
 { \
   double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
-  double_to_ieee_extended (&ext_format_m88110, &val, (TO)); \
+  floatformat_from_double (&floatformat_m88110_ext, &val, (TO)); \
 }
 
 /* Return the GDB type object for the "standard" data type
index 8f28b90c12a39ec7ab39fa834b49b87c8c1063ca..531075eabcc8506538954c9056f0a15b5a072fa2 100644 (file)
@@ -195,9 +195,8 @@ store_address (addr, len, val)
    formats.  So if host is IEEE floating and target is VAX floating,
    or vice-versa, it loses.  This means that we can't (yet) use these
    routines for extendeds.  Extendeds are handled by
-   REGISTER_CONVERTIBLE.  What we want is a fixed version of
-   ieee-float.c (the current version can't deal with single or double,
-   and I suspect it is probably broken for some extendeds too).
+   REGISTER_CONVERTIBLE.  What we want is to use floatformat.h, but that
+   doesn't yet handle VAX floating at all.
 
    2.  We can't deal with it if there is more than one floating point
    format in use.  This has to be fixed at the unpack_double level.
@@ -423,14 +422,14 @@ value_of_register (regnum)
 {
   CORE_ADDR addr;
   int optim;
-  register value val;
+  register value reg_val;
   char raw_buffer[MAX_REGISTER_RAW_SIZE];
   enum lval_type lval;
 
   get_saved_register (raw_buffer, &optim, &addr,
                      selected_frame, regnum, &lval);
 
-  val = allocate_value (REGISTER_VIRTUAL_TYPE (regnum));
+  reg_val = allocate_value (REGISTER_VIRTUAL_TYPE (regnum));
 
   /* Convert raw data to virtual format if necessary.  */
 
@@ -438,17 +437,17 @@ value_of_register (regnum)
   if (REGISTER_CONVERTIBLE (regnum))
     {
       REGISTER_CONVERT_TO_VIRTUAL (regnum, REGISTER_VIRTUAL_TYPE (regnum),
-                                  raw_buffer, VALUE_CONTENTS_RAW (val));
+                                  raw_buffer, VALUE_CONTENTS_RAW (reg_val));
     }
   else
 #endif
-    memcpy (VALUE_CONTENTS_RAW (val), raw_buffer,
+    memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
            REGISTER_RAW_SIZE (regnum));
-  VALUE_LVAL (val) = lval;
-  VALUE_ADDRESS (val) = addr;
-  VALUE_REGNO (val) = regnum;
-  VALUE_OPTIMIZED_OUT (val) = optim;
-  return val;
+  VALUE_LVAL (reg_val) = lval;
+  VALUE_ADDRESS (reg_val) = addr;
+  VALUE_REGNO (reg_val) = regnum;
+  VALUE_OPTIMIZED_OUT (reg_val) = optim;
+  return reg_val;
 }
 \f
 /* Low level examining and depositing of registers.
index 4b2471fa6fe370d38190186ddce75cb4b39adbac..3ddb2ffd833903aaa1cdc97e58932fc631a2a703 100644 (file)
@@ -22,12 +22,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "inferior.h"
 #include "gdbcore.h"
 #include "target.h"
-<<<<<<< i386-tdep.c
 #include "floatformat.h"
-||||||| 1.26
-=======
 #include "symtab.h"
->>>>>>> 1.27
 
 static long
 i386_get_frame_setup PARAMS ((int));
index 15e02b0fb401b6e0125a74a77a077050c1f85649..6a26380a89612fb7deb92d45dbe802434a3eb196 100644 (file)
@@ -47,11 +47,10 @@ extern int errno;
 #include <sys/reg.h>
 #endif
 
-#include "ieee-float.h"
+#include "floatformat.h"
 
 #include "target.h"
 
-extern struct ext_format ext_format_i387;
 \f
 /* this table must line up with REGISTER_NAMES in tm-i386v.h */
 /* symbols like 'EAX' come from <sys/reg.h> */
index 7f1d47b159386174ad9e764c5f5db72448ed3c95..8892e1670234b30a9bfb81e3a14015b2827f6ae1 100644 (file)
@@ -55,8 +55,6 @@ FIXME!! UPAGES is neither 2 nor 16
 extern void print_387_control_word ();         /* i387-tdep.h */
 extern void print_387_status_word ();
 
-extern struct ext_format ext_format_i387;
-
 #define private static
 
 \f
@@ -313,7 +311,7 @@ print_387_status (status, ep)
       for (i = 9; i >= 0; i--)
        printf_unfiltered ("%02x", ep->regs[fpreg][i]);
       
-      ieee_extended_to_double (&ext_format_i387, (char *)ep->regs[fpreg],
+      floatformat_to_double (&floatformat_i387_ext, (char *)ep->regs[fpreg],
                               &val);
       printf_unfiltered ("  %g\n", val);
     }
index 2df0f57625d0c821eb65107171a6219a647796c9..d7b2ca63b68ed88f96abcffe2340cb4241f2804a 100644 (file)
@@ -27,16 +27,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symtab.h"
 #include "value.h"
 #include "frame.h"
-#include "ieee-float.h"
+#include "floatformat.h"
 #include "target.h"
 
-/* Structure of i960 extended floating point format.  */
-
-const struct ext_format ext_format_i960 = {
-/* tot sbyte smask expbyte manbyte */
-   12, 9,    0x80, 9,8,           4,0,         /* i960 */
-};
-
 /* gdb960 is always running on a non-960 host.  Check its characteristics.
    This routine must be called as part of gdb initialization.  */
 
index 189db6ffef91984ca8bc606a320d101391b14cb0..a9d9e1278fe3fe2f8029ca03097ccbe3f5672180 100644 (file)
@@ -26,7 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "symtab.h"
 #include "setjmp.h"
 #include "value.h"
-#include "ieee-float.h"        /* for ext_format & friends */
 
 /* Size of an instruction */
 #define        BYTES_PER_88K_INSN      4
@@ -37,13 +36,6 @@ void frame_find_saved_regs ();
    relevance for the ways in which we screw with instruction pointers.  */ 
 int target_is_m88110 = 0;
 
-/* FIXME: this is really just a guess based on m88110 being big
-   endian. */
-const struct ext_format ext_format_m88110 = {
-/* tot sbyte smask expbyte     manbyte */
-   10, 0,    0x80, 0,1,                4,8             /* m88110 */
-};
-
 /* Given a GDB frame, determine the address of the calling function's frame.
    This will be used to create a new GDB frame struct, and then
    INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
index f9cac2bad2681ccb6bf17c20fe4f5fb9550c5bce..8c9c624b49808fd9db122c40eee68e1b0f107f03 100644 (file)
@@ -107,7 +107,7 @@ NINDY ROM monitor at the other end of the line.
 #include "target.h"
 #include "gdbcore.h"
 #include "command.h"
-#include "ieee-float.h"
+#include "floatformat.h"
 
 #include "wait.h"
 #include <sys/file.h>
@@ -129,7 +129,6 @@ extern void generic_mourn_inferior ();
 
 extern struct target_ops nindy_ops;
 extern GDB_FILE *instream;
-extern struct ext_format ext_format_i960;      /* i960-tdep.c */
 
 extern char ninStopWhy ();
 extern int ninMemGet ();
@@ -442,7 +441,7 @@ nindy_fetch_registers(regno)
                         &nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
                         &inv);
     /* dub now in host byte order */
-    double_to_ieee_extended (&ext_format_i960, &dub,
+    floatformat_from_double (&floatformat_i960_ext, &dub,
                             &registers[REGISTER_BYTE (regnum)]);
   }
 
@@ -471,8 +470,8 @@ nindy_store_registers(regno)
   memcpy (nindy_regs.tcw, &registers[REGISTER_BYTE (TCW_REGNUM)], 1*4);
   for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++)
     {
-      ieee_extended_to_double (&ext_format_i960,
-                              &registers[REGISTER_BYTE (regnum)], &dub);
+      floatformat_to_double (&floatformat_i960_ext,
+                            &registers[REGISTER_BYTE (regnum)], &dub);
       store_floating (&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
                      REGISTER_VIRTUAL_SIZE (regnum),
                      dub);
index da7fd2cf1c93b3587c68526b8f074e18dd5abf16..7deca286020ff46b1a7e5c387a003d70bf2f4bbc 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "inferior.h"
 #include "obstack.h"
 #include "target.h"
-#include "ieee-float.h"
+#include "value.h"
 
 #include "symfile.h" /* for objfiles.h */
 #include "objfiles.h" /* for find_pc_section */
@@ -164,6 +164,29 @@ sparc_frame_saved_pc (frame)
   char buf[MAX_REGISTER_RAW_SIZE];
   CORE_ADDR addr;
 
+  if (frame->signal_handler_caller)
+    {
+      /* This is the signal trampoline frame.
+        Get the saved PC from the sigcontext structure.  */
+
+#ifndef SIGCONTEXT_PC_OFFSET
+#define SIGCONTEXT_PC_OFFSET 12
+#endif
+
+      CORE_ADDR sigcontext_addr;
+      char scbuf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+
+      /* The sigcontext address is contained in register O2.  */
+      get_saved_register (buf, (int *)NULL, (CORE_ADDR *)NULL,
+                         frame, O0_REGNUM + 2, (enum lval_type *)NULL);
+      sigcontext_addr = extract_address (buf, REGISTER_RAW_SIZE (O0_REGNUM));
+
+      /* Don't cause a memory_error when accessing sigcontext in case the
+        stack layout has changed or the stack is corrupt.  */
+      target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET,
+                         scbuf, sizeof (scbuf));
+      return extract_address (scbuf, sizeof (scbuf));
+    }
   addr = (frame->bottom + FRAME_SAVED_I0 +
          REGISTER_RAW_SIZE (I7_REGNUM) * (I7_REGNUM - I0_REGNUM));
   read_memory (addr, buf, REGISTER_RAW_SIZE (I7_REGNUM));
@@ -568,16 +591,6 @@ sparc_pc_adjust(pc)
   else
     return pc+8;
 }
-
-
-/* Structure of SPARC extended floating point numbers.
-   This information is not currently used by GDB, since no current SPARC
-   implementations support extended float.  */
-
-const struct ext_format ext_format_sparc = {
-/* tot sbyte smask expbyte manbyte */
-   16, 0,    0x80, 0,1,           4,8,         /* sparc */
-};
 \f
 #ifdef USE_PROC_FS     /* Target dependent support for /proc */
 
This page took 0.033772 seconds and 4 git commands to generate.