/* Native support for the SGI Iris running IRIX version 5, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998
Free Software Foundation, Inc.
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
{
memcpy ((char *)registers, core_reg_sect, core_reg_size);
}
- else if (core_reg_size == (2 * REGISTER_BYTES) && MIPS_REGSIZE == 4)
+ else if (MIPS_REGSIZE == 4 &&
+ core_reg_size == (2 * MIPS_REGSIZE) * NUM_REGS)
{
/* This is a core file from a N32 executable, 64 bits are saved
for all registers. */
*dstp++ = *srcp++;
*dstp++ = *srcp++;
*dstp++ = *srcp++;
- srcp += 4;
+ if (REGISTER_RAW_SIZE(regno) == 4)
+ {
+ /* copying 4 bytes from eight bytes?
+ I don't see how this can be right... */
+ srcp += 4;
+ }
+ else
+ {
+ /* copy all 8 bytes (sizeof(double)) */
+ *dstp++ = *srcp++;
+ *dstp++ = *srcp++;
+ *dstp++ = *srcp++;
+ *dstp++ = *srcp++;
+ }
}
else
{
static CORE_ADDR
locate_base PARAMS ((void));
-static void
-solib_map_sections PARAMS ((struct so_list *));
+static int
+solib_map_sections PARAMS ((char *));
/*
SYNOPSIS
- static void solib_map_sections (struct so_list *so)
+ static int solib_map_sections (struct so_list *so)
DESCRIPTION
expansion stuff?).
*/
-static void
-solib_map_sections (so)
- struct so_list *so;
+static int
+solib_map_sections (arg)
+ char *arg;
{
+ struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
char *filename;
char *scratch_pathname;
int scratch_chan;
/* Free the file names, close the file now. */
do_cleanups (old_chain);
+
+ return (1);
}
/*
#endif
}
- solib_map_sections (so_list_ptr);
+ catch_errors (solib_map_sections, (char *) so_list_ptr,
+ "Error while mapping shared library sections:\n",
+ RETURN_MASK_ALL);
}
if (so -> textsection)
text_addr = so -> textsection -> addr;
- else
+ else if (so -> abfd != NULL)
{
asection *lowest_sect;