* coredep.c: Renamed to core-aout.c

* core-svr4.c: Renamed to core-regset.c
	* Makefile.in (ALLDEPFILES): Account for renamings.
	* corelow.c (core_file_fns): Add, points to chain of structs.
	(add_core_fns): New function to build chain of structs.
	(get_core_registers): Modify to search core functions chain and call
 	appropriate fetch_core_registers function based on core file flavour.
	* gdbcore.h (fetch_core_registers):  Remove declaration.
	(struct core_fns): Define struct for core function info.
	* i386m3-nat.c: Update comment for filename change (coredep->core-aout)
	* a68v-nat.c (fetch_core_registers): Remove stub, not needed now.
	* alpha-nat.c (fetch_core_registers): Make static.
	(alpha_core_fns, _initialize_core_alpha): New struct and func.
	* core-aout.c (fetch_core_registers): Make static
	(aout_core_fns, _initialize_core_aout): New struct and func.
	* core-regset.c (fetch_core_registers): Make static.
	(regset_core_fns, _initialize_core_regset): New struct and func.
	* core-sol2.c (fetch_core_registers): Make static.
	(solaris_core_fns, _initialize_core_solaris): New struct and func.
	* hp300ux-nat.c (fetch_core_registers): Make static.
	(hp300ux_core_fns, _initialize_core_hp300ux): New struct and func.
	* i386aix-nat.c (fetch_core_registers): Make static.
	(i386aix_core_fns, _initialize_core_i386aix): New struct and func.
	* i386mach-nat.c (fetch_core_registers: Make static.
	(i386mach_core_fns, _initialize_core_i386mach): New struct and func.
	* irix4-nat.c (fetch_core_registers): Make static.
	(irix4_core_fns, _initialize_core_irix4): New struct and func.
	* irix5-nat.c (fetch_core_registers):
	(irix5_core_fns, _initialize_core_irix5): New struct and func.
	* lynx-nat.c (fetch_core_registers): Make static.
	(lynx_core_fns, _initialize_core_lynx): New struct and func.
	* mips-nat.c (fetch_core_registers): Make static.
	(mips_core_fns, _initialize_core_mips): New struct and func.
	* ns32km3-nat.c (fetch_core_registers): Remove stub.
	* rs6000-nat.c (fetch_core_registers): Make static.
	(rs6000_core_fns, _initialize_core_rs6000): New struct and func.
	* sparc-nat.c (fetch_core_registers): Make static.
	(sparc_core_fns, _initialize_core_sparc): New struct and func.
	* sun3-nat.c (fetch_core_registers):
	(sun3_core_fns, _initialize_core_sun3): New struct and func.
	* sun386-nat.c (fetch_core_registers): Remove stub.
	* ultra3-nat.c (fetch_core_registers): Make static.
	(ultra3_core_fns, _initialize_core_ultra3): New struct and func.
	* config/gould/pn.mh (XDEPFILES),
 	config/i386/fbsd.mh (NATDEPFILES),
	config/i386/i386bsd.mh (NATDEPFILES),
 	config/i386/i386m3.mh (XDEPFILES),
	config/i386/i386sco.mh (NATDEPFILES),
	config/i386/i386sco4.mh (NATDEPFILES),
	config/i386/i386v.mh (NATDEPFILES),
	config/i386/i386v32.mh (NATDEPFILES),
	config/i386/nbsd.mh (NATDEPFILES),
	config/i386/ptx.mh (XDEPFILES),
	config/i386/ptx4.mh (XDEPFILES),
	config/i386/symmetry.mh (NATDEPFILES),
	config/m68k/3b1.mh (XDEPFILES),
	config/m68k/cisco.mt (TDEPFILES),
	config/m68k/delta68.mh (NATDEPFILES),
	config/m68k/dpx2.mh (NATDEPFILES),
	config/m68k/hp300bsd.mh (NATDEPFILES),
	config/m68k/hp300hpux.mh (NATDEPFILES),
	config/m68k/isi.mh (XDEPFILES),
	config/m68k/news.mh (NATDEPFILES),
	config/m68k/news1000.mh (XDEPFILES),
	config/m88k/cxux.mh (NATDEPFILES),
	config/m88k/delta88.mh (NATDEPFILES),
	config/mips/littlemips.mh (XDEPFILES),
	config/mips/mipsm3.mh (XDEPFILES),
	config/ns32k/merlin.mh (XDEPFILES),
	config/ns32k/nbsd.mh (NATDEPFILES),
	config/ns32k/ns32km3.mh (NATDEPFILES),
	config/pa/hppabsd.mh (NATDEPFILES),
	config/pa/hppahpux.mh (NATDEPFILES),
	config/romp/rtbsd.mh (XDEPFILES),
	config/tahoe/tahoe.mh (XDEPFILES),
	config/vax/vaxbsd.mh (XDEPFILES),
	config/vax/vaxult.mh (NATDEPFILES),
	config/vax/vaxult2.mh (NATDEPFILES),
	Account for coredep.o to core-aout.o name change.
	* config/i386/i386dgux (NATDEPFILES),
	config/i386/i386sol2.mh (NATDEPFILES),
	config/i386/i386v4.mh (NATDEPFILES),
	config/i386/linux.mh (NATDEPFILES),
	config/i386/ncr3000.mh (NATDEPFILES),
	config/m68k/m68kv4.mh (NATDEPFILES),
	config/m88k/delta88v4.mh (NATDEPFILES),
	config/mips/mipsv4.mh (NATDEPFILES),
	Account for core-svr4.o to core-regset.o name change.
This commit is contained in:
Fred Fish 1996-01-11 20:08:15 +00:00
parent e4ee6fb776
commit a1df8e780c
57 changed files with 566 additions and 216 deletions

View File

@ -139,10 +139,10 @@ convex-tdep.c
convex-xdep.c
copying.awk
copying.c
core-aout.c
core-regset.c
core-sol2.c
core-svr4.c
corefile.c
coredep.c
corelow.c
cp-valprint.c
cpu32bug-rom.c

View File

@ -1,3 +1,94 @@
Wed Jan 10 11:25:37 1996 Fred Fish <fnf@cygnus.com>
* coredep.c: Renamed to core-aout.c
* core-svr4.c: Renamed to core-regset.c
* Makefile.in (ALLDEPFILES): Account for renamings.
* corelow.c (core_file_fns): Add, points to chain of structs.
(add_core_fns): New function to build chain of structs.
(get_core_registers): Modify to search core functions chain and call
appropriate fetch_core_registers function based on core file flavour.
* gdbcore.h (fetch_core_registers): Remove declaration.
(struct core_fns): Define struct for core function info.
* i386m3-nat.c: Update comment for filename change (coredep->core-aout)
* a68v-nat.c (fetch_core_registers): Remove stub, not needed now.
* alpha-nat.c (fetch_core_registers): Make static.
(alpha_core_fns, _initialize_core_alpha): New struct and func.
* core-aout.c (fetch_core_registers): Make static
(aout_core_fns, _initialize_core_aout): New struct and func.
* core-regset.c (fetch_core_registers): Make static.
(regset_core_fns, _initialize_core_regset): New struct and func.
* core-sol2.c (fetch_core_registers): Make static.
(solaris_core_fns, _initialize_core_solaris): New struct and func.
* hp300ux-nat.c (fetch_core_registers): Make static.
(hp300ux_core_fns, _initialize_core_hp300ux): New struct and func.
* i386aix-nat.c (fetch_core_registers): Make static.
(i386aix_core_fns, _initialize_core_i386aix): New struct and func.
* i386mach-nat.c (fetch_core_registers: Make static.
(i386mach_core_fns, _initialize_core_i386mach): New struct and func.
* irix4-nat.c (fetch_core_registers): Make static.
(irix4_core_fns, _initialize_core_irix4): New struct and func.
* irix5-nat.c (fetch_core_registers):
(irix5_core_fns, _initialize_core_irix5): New struct and func.
* lynx-nat.c (fetch_core_registers): Make static.
(lynx_core_fns, _initialize_core_lynx): New struct and func.
* mips-nat.c (fetch_core_registers): Make static.
(mips_core_fns, _initialize_core_mips): New struct and func.
* ns32km3-nat.c (fetch_core_registers): Remove stub.
* rs6000-nat.c (fetch_core_registers): Make static.
(rs6000_core_fns, _initialize_core_rs6000): New struct and func.
* sparc-nat.c (fetch_core_registers): Make static.
(sparc_core_fns, _initialize_core_sparc): New struct and func.
* sun3-nat.c (fetch_core_registers):
(sun3_core_fns, _initialize_core_sun3): New struct and func.
* sun386-nat.c (fetch_core_registers): Remove stub.
* ultra3-nat.c (fetch_core_registers): Make static.
(ultra3_core_fns, _initialize_core_ultra3): New struct and func.
* config/gould/pn.mh (XDEPFILES),
config/i386/fbsd.mh (NATDEPFILES),
config/i386/i386bsd.mh (NATDEPFILES),
config/i386/i386m3.mh (XDEPFILES),
config/i386/i386sco.mh (NATDEPFILES),
config/i386/i386sco4.mh (NATDEPFILES),
config/i386/i386v.mh (NATDEPFILES),
config/i386/i386v32.mh (NATDEPFILES),
config/i386/nbsd.mh (NATDEPFILES),
config/i386/ptx.mh (XDEPFILES),
config/i386/ptx4.mh (XDEPFILES),
config/i386/symmetry.mh (NATDEPFILES),
config/m68k/3b1.mh (XDEPFILES),
config/m68k/cisco.mt (TDEPFILES),
config/m68k/delta68.mh (NATDEPFILES),
config/m68k/dpx2.mh (NATDEPFILES),
config/m68k/hp300bsd.mh (NATDEPFILES),
config/m68k/hp300hpux.mh (NATDEPFILES),
config/m68k/isi.mh (XDEPFILES),
config/m68k/news.mh (NATDEPFILES),
config/m68k/news1000.mh (XDEPFILES),
config/m88k/cxux.mh (NATDEPFILES),
config/m88k/delta88.mh (NATDEPFILES),
config/mips/littlemips.mh (XDEPFILES),
config/mips/mipsm3.mh (XDEPFILES),
config/ns32k/merlin.mh (XDEPFILES),
config/ns32k/nbsd.mh (NATDEPFILES),
config/ns32k/ns32km3.mh (NATDEPFILES),
config/pa/hppabsd.mh (NATDEPFILES),
config/pa/hppahpux.mh (NATDEPFILES),
config/romp/rtbsd.mh (XDEPFILES),
config/tahoe/tahoe.mh (XDEPFILES),
config/vax/vaxbsd.mh (XDEPFILES),
config/vax/vaxult.mh (NATDEPFILES),
config/vax/vaxult2.mh (NATDEPFILES),
Account for coredep.o to core-aout.o name change.
* config/i386/i386dgux (NATDEPFILES),
config/i386/i386sol2.mh (NATDEPFILES),
config/i386/i386v4.mh (NATDEPFILES),
config/i386/linux.mh (NATDEPFILES),
config/i386/ncr3000.mh (NATDEPFILES),
config/m68k/m68kv4.mh (NATDEPFILES),
config/m88k/delta88v4.mh (NATDEPFILES),
config/mips/mipsv4.mh (NATDEPFILES),
Account for core-svr4.o to core-regset.o name change.
Wed Jan 10 16:08:49 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
* configure.in, configure: Recognize rs6000-*-aix4*.

View File

@ -875,9 +875,9 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
a29k-tdep.c a68v-nat.c alpha-nat.c alpha-tdep.c \
altos-xdep.c arm-convert.s \
arm-tdep.c arm-xdep.c coff-solib.c \
convex-tdep.c \
convex-xdep.c core-sol2.c core-svr4.c coredep.c corelow.c dcache.c \
delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
convex-tdep.c convex-xdep.c \
core-sol2.c core-regset.c core-aout.c corelow.c \
dcache.c delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
go32-xdep.c gould-tdep.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
hp300ux-nat.c hppa-tdep.c hppab-nat.c hppah-nat.c \
hpread.c \
@ -1060,17 +1060,17 @@ convex-xdep.o: convex-xdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
copying.o: copying.c $(defs_h) $(gdbcmd_h)
core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(inferior_h)
core-sol2.o: core-sol2.c $(command_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) target.h
core-svr4.o: core-svr4.c $(command_h) $(defs_h) $(gdbcore_h) \
core-regset.o: core-regset.c $(command_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) target.h
corefile.o: corefile.c $(dis-asm_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) target.h language.h
coredep.o: coredep.c $(defs_h) $(gdbcore_h) $(value_h) $(inferior_h)
corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h thread.h

View File

@ -60,7 +60,7 @@ as unused statics functions.
Perhaps "i source" should take an argument like that of "list".
See if coredep.c's fetch_core_registers can be used on more machines.
See if core-aout.c's fetch_core_registers can be used on more machines.
E.g. MIPS (mips-xdep.c).
unpack_double() does not handle IEEE float on the target unless the host

View File

@ -121,12 +121,3 @@ store_inferior_registers (regno)
(PTRACE_ARG3_TYPE) &inferior_control_registers,
ptrace_$control_set_m68k);
}
/* Apollos don't dump cores */
void
fetch_core_registers (core_reg_sect, core_reg_size, which)
char *core_reg_sect;
unsigned core_reg_size;
int which;
{
}

View File

@ -73,7 +73,7 @@ get_longjmp_target (pc)
Original upage address X is at location core_reg_sect+x+reg_addr.
*/
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -225,3 +225,19 @@ fill_fpregset (fpregsetp, regno)
}
}
#endif
/* Register that we are able to handle alpha core file formats. */
static struct core_fns alpha_core_fns =
{
bfd_target_aout_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_alpha ()
{
add_core_fns (&alpha_core_fns);
}

View File

@ -4,4 +4,4 @@ XM_FILE= xm-i386bsd.h
XDEPFILES=
NAT_FILE= nm-i386bsd.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o coredep.o i386b-nat.o
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o core-aout.o i386b-nat.o

View File

@ -6,7 +6,7 @@ XDEPFILES= ser-tcp.o
XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-i386v4.h
NATDEPFILES= corelow.o core-svr4.o solib.o procfs.o fork-child.o i386v4-nat.o
NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
# SVR4 comes standard with terminfo, and in some implementations, the
# old termcap descriptions are incomplete. So ensure that we use the

View File

@ -1,6 +1,6 @@
# Host: Intel 386 running Mach3
XDEPFILES= i387-tdep.o coredep.o
XDEPFILES= i387-tdep.o core-aout.o
NATDEPFILES= i386m3-nat.o m3-nat.o fork-child.o
NAT_CLIBS= -lmachid -lnetname -lmach
XM_FILE= xm-i386m3.h

View File

@ -5,5 +5,5 @@ XDEPFILES=
XM_CLIBS= -lPW
NAT_FILE= nm-i386v.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o i386v-nat.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o i386v-nat.o

View File

@ -1,5 +1,5 @@
# Host: Intel 386 running NetBSD
XDEPFILES=
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o coredep.o i386b-nat.o
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o core-aout.o i386b-nat.o
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h

View File

@ -1,7 +1,7 @@
# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
XM_FILE= xm-ptx.h
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o coredep.o
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o
XM_CLIBS= -lPW -lseq
NAT_FILE= nm-symmetry.h

View File

@ -1,7 +1,7 @@
# Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
XM_FILE= xm-ptx4.h
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o coredep.o solib.o core-svr4.o
XDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o solib.o core-regset.o
XM_CLIBS= -lseq
NAT_FILE= nm-ptx4.h

View File

@ -2,4 +2,4 @@
XDEPFILES=
XM_FILE= xm-symmetry.h
NAT_FILE= nm-symmetry.h
NATDEPFILES= inftarg.o fork-child.o coredep.o corelow.o symm-nat.o
NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o symm-nat.o

View File

@ -8,5 +8,5 @@ CC= gcc -traditional
# know what works and what fails on the 3B1.
#PINSN_CC= cc
XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
XM_FILE= xm-3b1.h

View File

@ -3,4 +3,4 @@
XM_FILE= xm-delta68.h
NAT_FILE= nm-delta68.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o delta68-nat.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o delta68-nat.o

View File

@ -4,6 +4,6 @@ XM_FILE= xm-dpx2.h
XDEPFILES=
NAT_FILE= nm-dpx2.h
NATDEPFILES= infptrace.o coredep.o corelow.o inftarg.o dpx2-nat.o fork-child.o
NATDEPFILES= infptrace.o corelow.o core-aout.o inftarg.o dpx2-nat.o fork-child.o
TERMCAP=-lcurses

View File

@ -4,4 +4,4 @@ XM_FILE= xm-hp300bsd.h
XDEPFILES=
NAT_FILE= nm-hp300bsd.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o

View File

@ -5,4 +5,4 @@
XM_FILE= xm-hp300hpux.h
NAT_FILE= nm-hp300hpux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o coredep.o corelow.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o corelow.o core-aout.o

View File

@ -1,5 +1,5 @@
# Host: ISI Optimum V (3.05) under 4.3bsd.
# corelow.o commented out because core dumps are broken on this machine,
# as of GDB 4.8, according to lam@tfs.com
XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o isi-xdep.o
XDEPFILES= infptrace.o inftarg.o fork-child.o core-aout.o isi-xdep.o
XM_FILE= xm-isi.h

View File

@ -4,7 +4,7 @@ XM_FILE= xm-m68kv4.h
XDEPFILES=
NAT_FILE= nm-sysv4.h
NATDEPFILES= corelow.o core-svr4.o solib.o procfs.o fork-child.o
NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o
# SVR4 comes standard with terminfo, and in some implementations, the
# old termcap descriptions are incomplete. So ensure that we use the

View File

@ -2,4 +2,4 @@
XDEPFILES= news-xdep.o
XM_FILE= xm-news.h
NAT_FILE= nm-news.h
NATDEPFILES= inftarg.o fork-child.o coredep.o corelow.o infptrace.o
NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o infptrace.o

View File

@ -1,3 +1,3 @@
# Host: Sony news series 1000 (68030) running NewsOS version 3.
XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o news-xdep.o
XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o news-xdep.o
XM_FILE= xm-news1000.h

View File

@ -4,7 +4,7 @@ XM_FILE= xm-cxux.h
XDEPFILES=
NAT_FILE= nm-cxux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o cxux-nat.o corelow.o coredep.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o cxux-nat.o corelow.o core-aout.o
MMALLOC=
MMALLOC_DISABLE= -DNO_MMALLOC

View File

@ -4,5 +4,4 @@ XM_FILE= xm-delta88.h
XDEPFILES=
NAT_FILE= nm-m88k.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o \
corelow.o coredep.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o core-aout.o

View File

@ -4,5 +4,4 @@ XM_FILE= xm-delta88v4.h
XDEPFILES=
NAT_FILE= nm-delta88v4.h
NATDEPFILES= fork-child.o m88k-nat.o corelow.o \
core-svr4.o procfs.o solib.o
NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o procfs.o solib.o

View File

@ -1,3 +1,3 @@
# Host: Little-endian MIPS machine such as DECstation.
XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
XM_FILE= xm-mips.h

View File

@ -1,7 +1,7 @@
# Host: Little endian MIPS machine such as pmax
# running Mach 3.0 operating system
XDEPFILES= coredep.o
XDEPFILES= core-aout.o
NATDEPFILES= mipsm3-nat.o m3-nat.o
XM_FILE= xm-mipsm3.h
NAT_FILE= ../nm-m3.h

View File

@ -1,4 +1,4 @@
# Host: Mips running SVR4
XM_FILE= xm-mipsv4.h
NAT_FILE= ../nm-sysv4.h
NATDEPFILES= fork-child.o procfs.o mipsv4-nat.o corelow.o core-svr4.o solib.o
NATDEPFILES= fork-child.o procfs.o mipsv4-nat.o corelow.o core-regset.o solib.o

View File

@ -1,5 +1,5 @@
# Host: Merlin running utek 2.1
XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
XM_FILE= xm-merlin.h
# FIXME: M_INSTALL is gone from the gdb makefile. If anyone cares

View File

@ -1,4 +1,4 @@
# Host: PC532 running NetBSD
XM_FILE= xm-nbsd.h
NAT_FILE= nm-nbsd.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o coredep.o ns32k-nat.o
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o core-aout.o ns32k-nat.o

View File

@ -1,7 +1,7 @@
# Host: ns32k running Mach3
XDEPFILES=
NATDEPFILES= m3-nat.o ns32km3-nat.o fork-child.o coredep.o corelow.o
NATDEPFILES= m3-nat.o ns32km3-nat.o fork-child.o corelow.o core-aout.o
NAT_CLIBS= -L/usr/mach/lib -lnetname -lmachid -lmach
XM_FILE= xm-ns32km3.h
NAT_FILE= nm-m3.h

View File

@ -2,6 +2,6 @@
XDEPFILES= ser-tcp.o
XM_FILE= xm-hppab.h
NAT_FILE= nm-hppab.h
NATDEPFILES= hppab-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
NATDEPFILES= hppab-nat.o corelow.o core-aout.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
GDBSERVER_DEPFILES= low-hppabsd.o

View File

@ -6,6 +6,6 @@ XM_FILE= xm-hppah.h
XDEPFILES= ser-tcp.o
NAT_FILE= nm-hppah.h
NATDEPFILES= hppah-nat.o coredep.o corelow.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
NATDEPFILES= hppah-nat.o corelow.o core-aout.o inftarg.o fork-child.o somread.o infptrace.o hpread.o somsolib.o
HOST_IPC=-DBSD_IPC -DPOSIX_WAIT

View File

@ -8,6 +8,6 @@
#msg (but see comments in Makefile.dist about compiling with gcc).
XM_FILE= xm-vaxbsd.h
XDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
XDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
NAT_FILE= nm-vax.h

View File

@ -4,4 +4,4 @@ XM_FILE= xm-vaxult.h
XDEPFILES=
NAT_FILE= nm-vax.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o

View File

@ -4,4 +4,4 @@ XM_FILE= xm-vaxult2.h
XDEPFILES=
NAT_FILE= nm-vax.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o

View File

@ -1,5 +1,5 @@
/* Extract registers from a "standard" core file, for GDB.
Copyright (C) 1988-1991 Free Software Foundation, Inc.
Copyright (C) 1988-1995 Free Software Foundation, Inc.
This file is part of GDB.
@ -17,8 +17,10 @@ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* corefile.c is supposed to be the more machine-independent aspects of this;
this file is more machine-specific. */
/* Typically used on systems that have a.out format executables.
corefile.c is supposed to contain the more machine-independent
aspects of reading registers from core files, while this file is
more machine specific. */
#include "defs.h"
#include <sys/types.h>
@ -63,7 +65,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Original upage address X is at location core_reg_sect+x+reg_addr.
*/
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -123,3 +125,19 @@ register_addr (regno, blockend)
}
#endif /* REGISTER_U_ADDR */
/* Register that we are able to handle aout (trad-core) file formats. */
static struct core_fns aout_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_aout ()
{
add_core_fns (&aout_core_fns);
}

126
gdb/core-regset.c Normal file
View File

@ -0,0 +1,126 @@
/* Machine independent GDB support for core files on systems using "regsets".
Copyright 1993-1996 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* N O T E S
This file is used by most systems that implement /proc. For these systems,
the general registers are laid out the same way in both the core file and
the gregset_p structure. The current exception to this is Irix-4.*, where
the gregset_p structure is split up into two pieces in the core file.
The general register and floating point register sets are manipulated by
separate ioctl's. This file makes the assumption that if FP0_REGNUM is
defined, then support for the floating point register set is desired,
regardless of whether or not the actual target has floating point hardware.
*/
#include "defs.h"
#include <time.h>
#include <sys/procfs.h>
#include <fcntl.h>
#include <errno.h>
#include "gdb_string.h"
#include "inferior.h"
#include "target.h"
#include "command.h"
#include "gdbcore.h"
/*
GLOBAL FUNCTION
fetch_core_registers -- fetch current registers from core file
SYNOPSIS
void fetch_core_registers (char *core_reg_sect,
unsigned core_reg_size,
int which, unsigned in reg_addr)
DESCRIPTION
Read the values of either the general register set (WHICH equals 0)
or the floating point register set (WHICH equals 2) from the core
file data (pointed to by CORE_REG_SECT), and update gdb's idea of
their current values. The CORE_REG_SIZE parameter is ignored.
NOTES
Use the indicated sizes to validate the gregset and fpregset
structures.
*/
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
int which;
unsigned int reg_addr; /* Unused in this version */
{
gregset_t gregset;
fpregset_t fpregset;
if (which == 0)
{
if (core_reg_size != sizeof (gregset))
{
warning ("wrong size gregset struct in core file");
}
else
{
memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
supply_gregset (&gregset);
}
}
else if (which == 2)
{
if (core_reg_size != sizeof (fpregset))
{
warning ("wrong size fpregset struct in core file");
}
else
{
memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
#if defined (FP0_REGNUM)
supply_fpregset (&fpregset);
#endif
}
}
}
/* Register that we are able to handle ELF file formats using standard
procfs "regset" structures. */
static struct core_fns regset_core_fns =
{
bfd_target_elf_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_regset ()
{
add_core_fns (&regset_core_fns);
}

View File

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
an ELF executable and cores generated by programs that were
run under BCP (the part of Solaris which allows it to run SunOS4
a.out files).
This file combines the core register fetching from core-svr4.c
This file combines the core register fetching from core-regset.c
and sparc-nat.c to be able to read both flavours. */
#include "defs.h"
@ -41,7 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "command.h"
#include "gdbcore.h"
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -115,3 +115,19 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
}
}
}
/* Register that we are able to handle solaris core file formats. */
static struct core_fns solaris_core_fns =
{
bfd_target_elf_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_solaris ()
{
add_core_fns (&solaris_core_fns);
}

View File

@ -1,109 +0,0 @@
/* Machine independent support for SVR4 core files for GDB.
Copyright 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* N O T E S
This version of fetch_core_registers() is used by most systems that
implement /proc. For these systems, the general registers are laid out
the same way in both the core file and the gregset_p structure. The
current exception to this is Irix-4.*, where the gregset_p structure is
split up into two pieces in the core file.
The general register and floating point register sets are manipulated by
separate ioctl's. This file makes the assumption that if FP0_REGNUM is
defined, then support for the floating point register set is desired,
regardless of whether or not the actual target has floating point hardware.
*/
#include "defs.h"
#include <time.h>
#include <sys/procfs.h>
#include <fcntl.h>
#include <errno.h>
#include "gdb_string.h"
#include "inferior.h"
#include "target.h"
#include "command.h"
#include "gdbcore.h"
/*
GLOBAL FUNCTION
fetch_core_registers -- fetch current registers from core file data
SYNOPSIS
void fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
int which, unsigned in reg_addr)
DESCRIPTION
Read the values of either the general register set (WHICH equals 0)
or the floating point register set (WHICH equals 2) from the core
file data (pointed to by CORE_REG_SECT), and update gdb's idea of
their current values. The CORE_REG_SIZE parameter is ignored.
NOTES
Use the indicated sizes to validate the gregset and fpregset
structures.
*/
void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
int which;
unsigned int reg_addr; /* Unused in this version */
{
gregset_t gregset;
fpregset_t fpregset;
if (which == 0)
{
if (core_reg_size != sizeof (gregset))
{
warning ("wrong size gregset struct in core file");
}
else
{
memcpy ((char *) &gregset, core_reg_sect, sizeof (gregset));
supply_gregset (&gregset);
}
}
else if (which == 2)
{
if (core_reg_size != sizeof (fpregset))
{
warning ("wrong size fpregset struct in core file");
}
else
{
memcpy ((char *) &fpregset, core_reg_sect, sizeof (fpregset));
#if defined (FP0_REGNUM)
supply_fpregset (&fpregset);
#endif
}
}
}

View File

@ -32,6 +32,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdbcore.h"
#include "thread.h"
/* List of all available core_fns. On gdb startup, each core file register
reader calls add_core_fns() to register information on each core format it
is prepared to read. */
static struct core_fns *core_file_fns = NULL;
static void core_files_info PARAMS ((struct target_ops *));
#ifdef SOLIB_ADD
@ -46,6 +52,20 @@ static void core_close PARAMS ((int));
static void get_core_registers PARAMS ((int));
/* Link a new core_fns into the global core_file_fns list. Called on gdb
startup by the _initialize routine in each core file register reader, to
register information about each format the the reader is prepared to
handle. */
void
add_core_fns (cf)
struct core_fns *cf;
{
cf -> next = core_file_fns;
core_file_fns = cf;
}
/* Discard all vestiges of any previous core file and mark data and stack
spaces as empty. */
@ -253,6 +273,15 @@ get_core_registers (regno)
unsigned size;
char *the_regs;
char secname[10];
enum bfd_flavour our_flavour = bfd_get_flavour (core_bfd);
struct core_fns *cf;
if (core_file_fns == NULL)
{
fprintf_filtered (gdb_stderr,
"Can't fetch registers from this type of core file\n");
return;
}
/* Thread support. If inferior_pid is non-zero, then we have found a core
file with threads (or multiple processes). In that case, we need to
@ -270,10 +299,25 @@ get_core_registers (regno)
goto cant;
size = bfd_section_size (core_bfd, reg_sec);
the_regs = alloca (size);
if (bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr)0, size))
/* Look for the core functions that match this flavor. Default to the
first one if nothing matches. */
for (cf = core_file_fns; cf != NULL; cf = cf -> next)
{
fetch_core_registers (the_regs, size, 0,
(unsigned) bfd_section_vma (abfd,reg_sec));
if (our_flavour == cf -> core_flavour)
{
break;
}
}
if (cf == NULL)
{
cf = core_file_fns;
}
if (cf != NULL &&
bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr)0, size) &&
cf -> core_read_registers != NULL)
{
(cf -> core_read_registers (the_regs, size, 0,
(unsigned) bfd_section_vma (abfd,reg_sec)));
}
else
{
@ -289,11 +333,12 @@ cant:
{
size = bfd_section_size (core_bfd, reg_sec);
the_regs = alloca (size);
if (bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr)0,
size))
if (cf != NULL &&
bfd_get_section_contents (core_bfd, reg_sec, the_regs, (file_ptr)0, size) &&
cf -> core_read_registers != NULL)
{
fetch_core_registers (the_regs, size, 2,
(unsigned) bfd_section_vma (abfd,reg_sec));
(cf -> core_read_registers (the_regs, size, 2,
(unsigned) bfd_section_vma (abfd,reg_sec)));
}
else
{

View File

@ -1,3 +1,8 @@
Wed Jan 10 14:16:37 1996 Fred Fish <fnf@fishpond.amigalib.com>
* gdbint.texinfo (Native): Document name change, coredep.c to
core-aout.c.
Wed Dec 13 12:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
* stabs.texinfo (Include Files): Document the values the SunOS4

View File

@ -223,7 +223,7 @@ store_inferior_registers (regno)
#define e_PC e_regs[PC]
#endif /* HPUX_VERSION_5 */
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned int core_reg_size;
@ -266,3 +266,20 @@ getpagesize ()
{
return 4096;
}
/* Register that we are able to handle hp300ux core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns hp300ux_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_hp300ux ()
{
add_core_fns (&hp300ux_core_fns);
}

View File

@ -312,7 +312,7 @@ static int core_regmap[] =
CD_DS, CD_ES, CD_FS, CD_GS,
};
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -341,3 +341,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
}
}
/* Register that we are able to handle i386aix core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns i386aix_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_i386aix ()
{
add_core_fns (&i386aix_core_fns);
}

View File

@ -216,7 +216,7 @@ store_inferior_registers (regno)
* core file. If your UX does something else, adapt the routine
* below to return the offset to the given register.
*
* Called by coredep.c(fetch_core_registers)
* Called by core-aout.c(fetch_core_registers)
*/
unsigned int

View File

@ -113,7 +113,7 @@ store_inferior_registers (regno)
/* Work with core files, for GDB. */
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -144,3 +144,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
break;
}
}
/* Register that we are able to handle i386mach core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns i386mach_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_i386mach ()
{
add_core_fns (&i386mach_core_fns);
}

View File

@ -157,7 +157,7 @@ get_longjmp_target (pc)
return 1;
}
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -172,3 +172,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
memcpy ((char *)registers, core_reg_sect, core_reg_size);
}
/* Register that we are able to handle irix4 core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns irix4_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_irix4 ()
{
add_core_fns (&irix4_core_fns);
}

View File

@ -159,7 +159,7 @@ get_longjmp_target (pc)
return 1;
}
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -1047,3 +1047,20 @@ must be loaded manually, using `sharedlibrary'.",
&setlist),
&showlist);
}
/* Register that we are able to handle irix5 core file formats.
This really is bfd_target_unknown_flavour */
static struct core_fns irix5_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_irix5 ()
{
add_core_fns (&irix5_core_fns);
}

View File

@ -796,7 +796,7 @@ lynx_pid_to_str (pid)
Original upage address X is at location core_reg_sect+x+reg_addr.
*/
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -818,3 +818,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
fetch_inferior_registers (I0_REGNUM);
#endif
}
/* Register that we are able to handle lynx core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns lynx_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_lynx ()
{
add_core_fns (&lynx_core_fns);
}

View File

@ -162,7 +162,7 @@ get_longjmp_target(pc)
Original upage address X is at location core_reg_sect+x+reg_addr.
*/
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -223,3 +223,20 @@ register_addr (regno, blockend)
return addr;
}
/* Register that we are able to handle mips core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns mips_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_mips ()
{
add_core_fns (&mips_core_fns);
}

View File

@ -68,18 +68,6 @@ static int reg_offset[] =
&registers[REGISTER_BYTE (regnum)], \
count*REGISTER_SIZE)
/* 4.4 bfd support function */
/* jtv@hut.fi: UNIMPLEMENTED!!!!! */
void
fetch_core_registers (core_regs, core_reg_size, which)
char *core_regs;
unsigned int core_reg_size;
int which;
{
error ("Unimplemented routine fetch_core_registers called");
}
/*
* Fetch inferiors registers for gdb.
* REGNO specifies which (as gdb views it) register, -1 for all.

View File

@ -249,7 +249,7 @@ exec_one_dummy_insn ()
target_remove_breakpoint (DUMMY_INSN_ADDR, shadow_contents);
}
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -794,3 +794,18 @@ kernel_u_size ()
return (sizeof (struct user));
}
/* Register that we are able to handle rs6000 core file formats. */
static struct core_fns rs6000_core_fns =
{
bfd_target_coff_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_rs6000 ()
{
add_core_fns (&rs6000_core_fns);
}

View File

@ -238,7 +238,7 @@ store_inferior_registers (regno)
}
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
char *core_reg_sect;
unsigned core_reg_size;
@ -301,3 +301,20 @@ kernel_u_size ()
{
return (sizeof (struct user));
}
/* Register that we are able to handle sparc core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns sparc_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_sparc ()
{
add_core_fns (&sparc_core_fns);
}

View File

@ -98,7 +98,7 @@ store_inferior_registers (regno)
/* All of this stuff is only relevant if both host and target are sun3. */
/* Machine-dependent code for pulling registers out of a Sun-3 core file. */
void
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
@ -136,3 +136,20 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
}
}
/* Register that we are able to handle sun3 core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns sun3_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_sun3 ()
{
add_core_fns (&sun3_core_fns);
}

View File

@ -19,8 +19,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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if defined (GDB_TARGET_IS_SUN386)
#include "defs.h"
#include "frame.h"
#include "inferior.h"
@ -184,21 +182,6 @@ double_to_i387 (from, to)
asm ("fstpt (%eax)");
asm ("fwait");
}
#else /* Not sun386 target. */
/* These functions shouldn't be called when we're cross-debugging. */
/* ARGSUSED */
void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
int which;
unsigned int reg_addr; /* Unused in this version */
{
}
#endif /* Not sun386 target. */
void
fetch_inferior_registers (regno)
@ -273,4 +256,3 @@ store_inferior_registers (regno)
ptrace (PTRACE_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers);
}

View File

@ -241,7 +241,7 @@ fetch_register (regno)
* struct ptrace_user is the first thing in the core file
*/
void
static void
fetch_core_registers ()
{
register int regno;
@ -305,4 +305,19 @@ register_addr (regno,blockend)
}
}
/* Register that we are able to handle ultra3 core file formats.
FIXME: is this really bfd_target_unknown_flavour? */
static struct core_fns ultra3_core_fns =
{
bfd_target_unknown_flavour,
fetch_core_registers,
NULL
};
void
_initialize_core_ultra3 ()
{
add_core_fns (&ultra3_core_fns);
}