Initial creation of sourceware repository

This commit is contained in:
Stan Shebs
1999-04-16 01:35:26 +00:00
parent cd946cff9e
commit c906108c21
2470 changed files with 976797 additions and 0 deletions
gdb
29k-share
COPYINGChangeLogChangeLog-3.xChangeLog-9091ChangeLog-92ChangeLog-93ChangeLog-94ChangeLog-95ChangeLog-96ChangeLog-97ChangeLog-98Makefile.inNEWSREADMETODOa29k-tdep.ca68v-nat.cabug-rom.cacconfig.hacinclude.m4aclocal.m4alpha-nat.calpha-tdep.caltos-xdep.cannotate.cannotate.harc-tdep.carm-convert.sarm-tdep.carm-xdep.cax-gdb.cax-gdb.hax-general.cax.hbcache.cbcache.hblockframe.cbreakpoint.cbreakpoint.hbuildsym.cbuildsym.hc-exp.yc-lang.cc-lang.hc-typeprint.cc-valprint.ccall-cmds.hch-exp.cch-lang.cch-lang.hch-typeprint.cch-valprint.ccoff-solib.ccoff-solib.hcoffread.ccommand.ccommand.hcomplaints.ccomplaints.hconfig.in
config
a29k
alpha
arc
arm
convex
d10v
d30v
fr30
gould
h8300
h8500
i386
i960
m32r
m68k
m88k
mips
mn10200
mn10300
nm-empty.hnm-gnu.hnm-lynx.hnm-m3.hnm-nbsd.hnm-sysv4.h
none
ns32k
pa
powerpc
pyr
romp
rs6000
sh
sparc
tahoe
tm-lynx.htm-nbsd.htm-sunos.htm-sysv4.h
v850
vax
w65
xm-aix4.hxm-lynx.hxm-mpw.hxm-nbsd.hxm-sysv4.h
z8k
configureconfigure.hostconfigure.inconfigure.tgtconvex-tdep.cconvex-xdep.ccopying.awkcopying.ccore-aout.ccore-regset.ccore-sol2.ccorefile.ccorelow.ccp-valprint.ccpu32bug-rom.ccxux-nat.cd10v-tdep.cd30v-tdep.cdbug-rom.cdbxread.cdcache.cdcache.hdebugify.cdebugify.hdefs.hdelta68-nat.cdemangle.cdink32-rom.c
doc
dpx2-nat.cdsrec.cdst.hdstread.cdve3900-rom.cdwarf2read.cdwarfread.celfread.cenviron.cenviron.heval.cexc_request.defsexec.cexpprint.cexpression.hf-exp.yf-lang.cf-lang.hf-typeprint.cf-valprint.cfindvar.cfork-child.cfr30-tdep.cframe.hgdb-stabs.hgdb.1gdb.gdbgdb_stat.hgdb_string.hgdba.elgdbarch.cgdbarch.hgdbcmd.hgdbcore.hgdbinit.in
gdbserver
gdbthread.hgdbtypes.cgdbtypes.hgnu-nat.cgnu-nat.hgnu-regex.cgnu-regex.hgould-tdep.cgould-xdep.ch8300-tdep.ch8500-tdep.chp-psymtab-read.chp-symtab-read.chp300ux-nat.chppa-tdep.chppab-nat.chppah-nat.chppam3-nat.chpread.chpread.hhpux-thread.ci386-stub.ci386-tdep.ci386aix-nat.ci386b-nat.ci386gnu-nat.ci386ly-tdep.ci386m3-nat.ci386mach-nat.ci386v-nat.ci386v4-nat.ci387-tdep.ci960-tdep.cinfcmd.cinferior.hinflow.cinfptrace.cinfrun.cinftarg.cinfttrace.cirix4-nat.cirix5-nat.cisi-xdep.cjv-exp.yjv-lang.cjv-lang.hjv-typeprint.cjv-valprint.ckdb-start.clanguage.clanguage.hlynx-nat.cm2-exp.ym2-lang.cm2-lang.hm2-typeprint.cm2-valprint.cm3-nat.cm32r-rom.cm32r-stub.cm32r-tdep.cm68k-stub.cm68k-tdep.cm68klinux-nat.cm68knbsd-nat.cm88k-nat.cm88k-tdep.cmac-defs.hmac-gdb.rmac-nat.cmac-xdep.cmain.cmaint.cmdebugread.cmem-break.cminimon.hminsyms.cmips-nat.cmips-tdep.cmipsm3-nat.cmipsread.cmipsv4-nat.cmn10200-tdep.cmn10300-tdep.cmon960-rom.cmonitor.cmonitor.hmpw-config.inmpw-make.sedmsg.defsmsg_reply.defsnews-xdep.c
nindy-share
nindy-tdep.c
nlm
nlmread.cnotify.defsns32k-tdep.cns32km3-nat.cns32knbsd-nat.cobjfiles.cobjfiles.hocd.cocd.hop50-rom.cos9kread.c
osf-share
osfsolib.cparse.cparser-defs.hpartial-stab.hppc-bdm.cppcbug-rom.cprintcmd.cprocess_reply.defsprocfs.cptx4-nat.cpyr-tdep.cpyr-xdep.c
rdi-share
remote-adapt.cremote-array.cremote-bug.cremote-d10v.cremote-e7000.cremote-eb.cremote-es.cremote-est.cremote-hms.cremote-mips.cremote-mm.cremote-nindy.cremote-nrom.cremote-os9k.cremote-rdi.cremote-rdp.cremote-sds.cremote-sim.cremote-st.cremote-udi.cremote-utils.cremote-utils.hremote-vx.cremote-vx29k.cremote-vx68.cremote-vx960.cremote-vxmips.cremote-vxsparc.cremote.creply_mig_hack.awkrom68k-rom.crs6000-nat.crs6000-tdep.csaber.suppressscm-exp.cscm-lang.cscm-lang.hscm-tags.hscm-valprint.cser-e7kpc.cser-go32.cser-mac.cser-ocd.cser-tcp.cser-unix.cserial.cserial.hsh-stub.csh-tdep.csh3-rom.csignals.hsol-thread.csolib.csolib.hsomread.csomsolib.csomsolib.hsource.csparc-nat.csparc-stub.csparc-tdep.csparcl-stub.csparcl-tdep.csparclet-rom.csparclet-stub.csrec.hstabsread.cstabsread.hstack.cstandalone.cstop-gdb.cstuff.csun3-nat.csun386-nat.csymfile.csymfile.hsymm-nat.csymm-tdep.csymmisc.csymtab.csymtab.htahoe-tdep.ctarget.ctarget.hterminal.h
testsuite
.gdbinitChangeLogMakefile.inTODOaclocal.m4
config
configureconfigure.in
gdb.asm
gdb.base
Makefile.inREADMEa1-selftest.expa2-run.expall-bin.expall-types.carithmet.expassign.expbar.cbaz.cbitfields.cbitfields.expbitops.expbranches.cbreak.cbreak.expcall-ar-st.ccall-ar-st.expcall-rt-st.ccall-rt-st.expcall-strs.ccall-strs.expcallfuncs.ccallfuncs.expcallfuncs2.ccallfuncs2.expcommands.expcompiler.ccompletion.expcond-expr.expcondbreak.ccondbreak.expconfigureconfigure.inconstvars.cconstvars.expcorefile.expcoremaker.ccrossload.expd10v.ldd10vovly.cdefault.expdefine.expdisplay.cdisplay.expdollar.expecho.expena-dis-br.expending-run.cending-run.expenviron.expeval-skip.expexprs.cexprs.expfoo.cfuncargs.cfuncargs.expgdbvars.expgrbx.chelp.expi486-elf.ui860-elf.uint-type.cinterrupt.cinterrupt.expjump.cjump.explangs.explangs0.clangs1.clangs1.flangs2.clangs2.cxxlist.explist0.clist0.hlist1.clogical.explong_long.clong_long.expm32r.ldm32rovly.cm68k-aout.um68k-aout2.um68k-elf.umaint.expmips-ecoff.umips_pro.cmips_pro.expmiscexprs.cmiscexprs.expnodebug.cnodebug.expopaque.expopaque0.copaque1.coverlays.coverlays.expovlymgr.covlymgr.hpointers.cpointers.exppointers2.cpointers2.expprintcmds.cprintcmds.expptype.cptype.expradix.exprecurse.crecurse.expregs.exprelational.expreread.expreread1.creread2.crestore.crestore.expreturn.creturn.exprun.cscope.expscope0.cscope1.csect-cmd.expsetshow.csetshow.expsetvar.csetvar.expshlib-call.expshmain.cshr1.cshr2.csigall.csigall.expsignals.csignals.expsmoke.csmoke.ccsmoke.expso-impl-ld.cso-impl-ld.expso-indr-cl.cso-indr-cl.expsolib.csolib.expsolib1.csolib2.csparc-aout.usparc-elf.uss.hstep-test.cstep-test.expstructs2.cstructs2.expterm.exptwice.ctwice.expvarargs.cvarargs.expvolatile.expwatchpoint.cwatchpoint.expwhatis-exp.expwhatis.cwhatis.exp
gdb.c++
gdb.chill
gdb.disasm
gdb.fortran
gdb.hp
gdb.stabs
gdb.threads
gdb.trace
lib
thread.ctop.ctop.htracepoint.ctracepoint.h
tui
typeprint.ctypeprint.hultra3-nat.cultra3-xdep.cumax-xdep.cutils.cv850-tdep.cvalarith.cvalops.cvalprint.cvalprint.hvalue.hvalues.cvax-tdep.c
vx-share
w65-tdep.cw89k-rom.cwin32-nat.cxcoffread.cxcoffsolib.cxcoffsolib.hxmodem.cxmodem.hz8k-tdep.c
mmalloc
readline
sim
ChangeLogMakefile.inREADME-HACKING
arm
common
configureconfigure.in
d10v
d30v
erc32
fr30
h8300
h8500
i960
igen
m32r
mips
mn10200
mn10300
ppc
sh
testsuite
ChangeLogMakefile.in
common
config
configureconfigure.in
d10v-elf
d30v-elf
fr30-elf
lib
m32r-elf
mips64el-elf
sim
fr30
m32r
v850
w65
z8k

147
gdb/core-aout.c Normal file

@ -0,0 +1,147 @@
/* Extract registers from a "standard" core file, for GDB.
Copyright (C) 1988-1998 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. */
/* 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"
#ifdef HAVE_PTRACE_H
# include <ptrace.h>
#else
# ifdef HAVE_SYS_PTRACE_H
# include <sys/ptrace.h>
# endif
#endif
#include <sys/types.h>
#include <sys/param.h>
#include "gdbcore.h"
#include "value.h" /* For supply_register. */
#include "inferior.h" /* For ARCH_NUM_REGS. */
/* These are needed on various systems to expand REGISTER_U_ADDR. */
#ifndef USG
#include <sys/dir.h>
#include <sys/file.h>
#include "gdb_stat.h"
#include <sys/user.h>
#endif
#ifndef CORE_REGISTER_ADDR
#define CORE_REGISTER_ADDR(regno, regptr) register_addr(regno, regptr)
#endif /* CORE_REGISTER_ADDR */
#ifdef NEED_SYS_CORE_H
#include <sys/core.h>
#endif
static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR));
void _initialize_core_aout PARAMS ((void));
/* Extract the register values out of the core file and store
them where `read_register' will find them.
CORE_REG_SECT points to the register values themselves, read into memory.
CORE_REG_SIZE is the size of that area.
WHICH says which set of registers we are handling (0 = int, 2 = float
on machines where they are discontiguous).
REG_ADDR is the offset from u.u_ar0 to the register values relative to
core_reg_sect. This is used with old-fashioned core files to
locate the registers in a large upage-plus-stack ".reg" section.
Original upage address X is at location core_reg_sect+x+reg_addr.
*/
static void
fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
char *core_reg_sect;
unsigned core_reg_size;
int which;
CORE_ADDR reg_addr;
{
int regno;
CORE_ADDR addr;
int bad_reg = -1;
CORE_ADDR reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */
int numregs = ARCH_NUM_REGS;
/* If u.u_ar0 was an absolute address in the core file, relativize it now,
so we can use it as an offset into core_reg_sect. When we're done,
"register 0" will be at core_reg_sect+reg_ptr, and we can use
CORE_REGISTER_ADDR to offset to the other registers. If this is a modern
core file without a upage, reg_ptr will be zero and this is all a big
NOP. */
if (reg_ptr > core_reg_size)
reg_ptr -= KERNEL_U_ADDR;
for (regno = 0; regno < numregs; regno++)
{
addr = CORE_REGISTER_ADDR (regno, reg_ptr);
if (addr >= core_reg_size
&& bad_reg < 0)
bad_reg = regno;
else
supply_register (regno, core_reg_sect + addr);
}
if (bad_reg >= 0)
error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
}
#ifdef REGISTER_U_ADDR
/* Return the address in the core dump or inferior of register REGNO.
BLOCKEND is the address of the end of the user structure. */
CORE_ADDR
register_addr (regno, blockend)
int regno;
CORE_ADDR blockend;
{
CORE_ADDR addr;
if (regno < 0 || regno >= ARCH_NUM_REGS)
error ("Invalid register number %d.", regno);
REGISTER_U_ADDR (addr, blockend, regno);
return addr;
}
#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);
}