- int regi;
- char *from, *to;
-
- for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- from = (char *) ®isters[REGISTER_BYTE (regi)];
- to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
- memcpy(to, from, REGISTER_RAW_SIZE (regi));
- }
- }
-
- if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) ®isters[REGISTER_BYTE(FCRCS_REGNUM)];
-}
-
-
-/* Figure out where the longjmp will land.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
- This routine returns true on success. */
-
-int
-get_longjmp_target (pc)
- CORE_ADDR *pc;
-{
- char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
- CORE_ADDR jb_addr;
-
- jb_addr = read_register (A0_REGNUM);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- return 1;
-}
-
-static void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
- char *core_reg_sect;
- unsigned core_reg_size;
- int which; /* Unused */
- CORE_ADDR reg_addr; /* Unused */
-{
- if (core_reg_size != REGISTER_BYTES)
- {
- warning ("wrong size gregset struct in core file");
- return;
- }
-
- memcpy ((char *)registers, core_reg_sect, core_reg_size);
-}
-\f
-/* Irix 5 uses what appears to be a unique form of shared library
- support. This is a copy of solib.c modified for Irix 5. */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <fcntl.h>
-
-/* <obj.h> includes <sym.h> and <symconst.h>, which causes conflicts
- with our versions of those files included by tm-mips.h. Prevent
- <obj.h> from including them with some appropriate defines. */
-#define __SYM_H__
-#define __SYMCONST_H__
-#include <obj.h>
-
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "command.h"
-#include "frame.h"
-#include "gnu-regex.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcmd.h"
-
-/* The symbol which starts off the list of shared libraries. */
-#define DEBUG_BASE "__rld_obj_head"
-
-/* How to get the loaded address of a shared library. */
-#define LM_ADDR(so) ((so)->lm.o_praw)
-
-char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */
-
-struct so_list {
- struct so_list *next; /* next structure in linked list */
- struct obj_list ll;
- struct obj lm; /* copy of link map from inferior */
- struct obj_list *lladdr; /* addr in inferior lm was read from */
- CORE_ADDR lmend; /* upper addr bound of mapped object */
- char symbols_loaded; /* flag: symbols read in yet? */
- char from_tty; /* flag: print msgs? */
- struct objfile *objfile; /* objfile for loaded lib */
- struct section_table *sections;
- struct section_table *sections_end;
- struct section_table *textsection;
- bfd *abfd;
-};
-
-static struct so_list *so_list_head; /* List of known shared objects */
-static CORE_ADDR debug_base; /* Base of dynamic linker structures */
-static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
-
-/* Local function prototypes */
-
-static void
-sharedlibrary_command PARAMS ((char *, int));
-
-static int
-enable_break PARAMS ((void));
-
-static int
-disable_break PARAMS ((void));
-
-static void
-info_sharedlibrary_command PARAMS ((char *, int));
-
-static int
-symbol_add_stub PARAMS ((char *));