diff options
author | nobody <> | 2002-05-28 18:43:09 +0000 |
---|---|---|
committer | nobody <> | 2002-05-28 18:43:09 +0000 |
commit | 0d49dda2de4c1fd23c87348f08a022bfd3ee3334 (patch) | |
tree | 592db3a187b7a55a25aa6d5e4df1f3326d298165 /gdb/procfs.c | |
parent | 0540f4547886519cdcf972d171961c0b6a33e02e (diff) | |
download | binutils-gdb-0d49dda2de4c1fd23c87348f08a022bfd3ee3334.tar.gz |
This commit was manufactured by cvs2svn to create branch
'kseitz_interps-20020528-branch'.
Sprout from cagney_regbuf-20020515-branch 2002-05-15 21:19:22 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2002-05-28 18:43:08 UTC Jason Thorpe <thorpej@netbsd.org> '* ppcnbsd-nat.c: Rewrite.':
gdb/ChangeLog
gdb/Makefile.in
gdb/mi/mi-main.c
Delete:
.cvsignore
COPYING
COPYING.LIB
COPYING.NEWLIB
ChangeLog
MAINTAINERS
Makefile.in
README
README-maintainer-mode
bfd/COPYING
bfd/ChangeLog
bfd/ChangeLog-0001
bfd/ChangeLog-9193
bfd/ChangeLog-9495
bfd/ChangeLog-9697
bfd/ChangeLog-9899
bfd/MAINTAINERS
bfd/Makefile.am
bfd/Makefile.in
bfd/PORTING
bfd/README
bfd/TODO
bfd/acinclude.m4
bfd/aclocal.m4
bfd/aix386-core.c
bfd/aix5ppc-core.c
bfd/aout-adobe.c
bfd/aout-arm.c
bfd/aout-cris.c
bfd/aout-encap.c
bfd/aout-ns32k.c
bfd/aout-sparcle.c
bfd/aout-target.h
bfd/aout-tic30.c
bfd/aout0.c
bfd/aout32.c
bfd/aout64.c
bfd/aoutf1.h
bfd/aoutx.h
bfd/archive.c
bfd/archive64.c
bfd/archures.c
bfd/armnetbsd.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/binary.c
bfd/bout.c
bfd/cache.c
bfd/cf-i386lynx.c
bfd/cf-m68klynx.c
bfd/cf-sparclynx.c
bfd/cisco-core.c
bfd/coff-a29k.c
bfd/coff-alpha.c
bfd/coff-apollo.c
bfd/coff-arm.c
bfd/coff-aux.c
bfd/coff-go32.c
bfd/coff-h8300.c
bfd/coff-h8500.c
bfd/coff-i386.c
bfd/coff-i860.c
bfd/coff-i960.c
bfd/coff-ia64.c
bfd/coff-m68k.c
bfd/coff-m88k.c
bfd/coff-mcore.c
bfd/coff-mips.c
bfd/coff-or32.c
bfd/coff-pmac.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff-sparc.c
bfd/coff-stgo32.c
bfd/coff-svm68k.c
bfd/coff-tic30.c
bfd/coff-tic54x.c
bfd/coff-tic80.c
bfd/coff-u68k.c
bfd/coff-w65.c
bfd/coff-we32k.c
bfd/coff-z8k.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/coffgen.c
bfd/cofflink.c
bfd/coffswap.h
bfd/config.bfd
bfd/config.in
bfd/configure
bfd/configure.com
bfd/configure.host
bfd/configure.in
bfd/corefile.c
bfd/cpu-a29k.c
bfd/cpu-alpha.c
bfd/cpu-arc.c
bfd/cpu-arm.c
bfd/cpu-avr.c
bfd/cpu-cris.c
bfd/cpu-d10v.c
bfd/cpu-d30v.c
bfd/cpu-fr30.c
bfd/cpu-h8300.c
bfd/cpu-h8500.c
bfd/cpu-hppa.c
bfd/cpu-i370.c
bfd/cpu-i386.c
bfd/cpu-i860.c
bfd/cpu-i960.c
bfd/cpu-ia64-opc.c
bfd/cpu-ia64.c
bfd/cpu-m10200.c
bfd/cpu-m10300.c
bfd/cpu-m32r.c
bfd/cpu-m68hc11.c
bfd/cpu-m68hc12.c
bfd/cpu-m68k.c
bfd/cpu-m88k.c
bfd/cpu-mcore.c
bfd/cpu-mips.c
bfd/cpu-mmix.c
bfd/cpu-ns32k.c
bfd/cpu-openrisc.c
bfd/cpu-or32.c
bfd/cpu-pdp11.c
bfd/cpu-pj.c
bfd/cpu-powerpc.c
bfd/cpu-rs6000.c
bfd/cpu-s390.c
bfd/cpu-sh.c
bfd/cpu-sparc.c
bfd/cpu-tic30.c
bfd/cpu-tic54x.c
bfd/cpu-tic80.c
bfd/cpu-v850.c
bfd/cpu-vax.c
bfd/cpu-w65.c
bfd/cpu-we32k.c
bfd/cpu-xstormy16.c
bfd/cpu-z8k.c
bfd/demo64.c
bfd/dep-in.sed
bfd/doc/ChangeLog
bfd/doc/Makefile.am
bfd/doc/Makefile.in
bfd/doc/bfd.texinfo
bfd/doc/bfdint.texi
bfd/doc/bfdsumm.texi
bfd/doc/chew.c
bfd/doc/doc.str
bfd/doc/header.sed
bfd/doc/makefile.vms
bfd/doc/proto.str
bfd/dwarf1.c
bfd/dwarf2.c
bfd/ecoff.c
bfd/ecofflink.c
bfd/ecoffswap.h
bfd/efi-app-ia32.c
bfd/efi-app-ia64.c
bfd/elf-bfd.h
bfd/elf-eh-frame.c
bfd/elf-hppa.h
bfd/elf-m10200.c
bfd/elf-m10300.c
bfd/elf-strtab.c
bfd/elf.c
bfd/elf32-arc.c
bfd/elf32-arm.h
bfd/elf32-avr.c
bfd/elf32-cris.c
bfd/elf32-d10v.c
bfd/elf32-d30v.c
bfd/elf32-fr30.c
bfd/elf32-gen.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-hppa.h
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-i860.c
bfd/elf32-i960.c
bfd/elf32-m32r.c
bfd/elf32-m68hc11.c
bfd/elf32-m68hc12.c
bfd/elf32-m68k.c
bfd/elf32-m88k.c
bfd/elf32-mcore.c
bfd/elf32-mips.c
bfd/elf32-openrisc.c
bfd/elf32-or32.c
bfd/elf32-pj.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh-lin.c
bfd/elf32-sh-nbsd.c
bfd/elf32-sh.c
bfd/elf32-sh64.c
bfd/elf32-sparc.c
bfd/elf32-v850.c
bfd/elf32-xstormy16.c
bfd/elf32.c
bfd/elf64-alpha.c
bfd/elf64-gen.c
bfd/elf64-hppa.c
bfd/elf64-hppa.h
bfd/elf64-mips.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-ppc.h
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elf64.c
bfd/elfarm-nabi.c
bfd/elfarm-oabi.c
bfd/elfcode.h
bfd/elfcore.h
bfd/elflink.c
bfd/elflink.h
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h
bfd/elfxx-target.h
bfd/epoc-pe-arm.c
bfd/epoc-pei-arm.c
bfd/format.c
bfd/freebsd.h
bfd/gen-aout.c
bfd/genlink.h
bfd/go32stub.h
bfd/hash.c
bfd/host-aout.c
bfd/hosts/alphalinux.h
bfd/hosts/alphavms.h
bfd/hosts/decstation.h
bfd/hosts/delta68.h
bfd/hosts/dpx2.h
bfd/hosts/hp300bsd.h
bfd/hosts/i386bsd.h
bfd/hosts/i386linux.h
bfd/hosts/i386mach3.h
bfd/hosts/i386sco.h
bfd/hosts/i860mach3.h
bfd/hosts/m68kaux.h
bfd/hosts/m68klinux.h
bfd/hosts/m88kmach3.h
bfd/hosts/mipsbsd.h
bfd/hosts/mipsmach3.h
bfd/hosts/news-mips.h
bfd/hosts/news.h
bfd/hosts/pc532mach.h
bfd/hosts/riscos.h
bfd/hosts/symmetry.h
bfd/hosts/tahoe.h
bfd/hosts/vaxbsd.h
bfd/hosts/vaxult.h
bfd/hosts/vaxult2.h
bfd/hp300bsd.c
bfd/hp300hpux.c
bfd/hppabsd-core.c
bfd/hpux-core.c
bfd/i386aout.c
bfd/i386bsd.c
bfd/i386dynix.c
bfd/i386freebsd.c
bfd/i386linux.c
bfd/i386lynx.c
bfd/i386mach3.c
bfd/i386msdos.c
bfd/i386netbsd.c
bfd/i386os9k.c
bfd/ieee.c
bfd/ihex.c
bfd/init.c
bfd/irix-core.c
bfd/libaout.h
bfd/libbfd-in.h
bfd/libbfd.c
bfd/libbfd.h
bfd/libcoff-in.h
bfd/libcoff.h
bfd/libecoff.h
bfd/libhppa.h
bfd/libieee.h
bfd/libnlm.h
bfd/liboasys.h
bfd/libpei.h
bfd/libxcoff.h
bfd/linker.c
bfd/lynx-core.c
bfd/m68k4knetbsd.c
bfd/m68klinux.c
bfd/m68klynx.c
bfd/m68knetbsd.c
bfd/m88kmach3.c
bfd/makefile.vms
bfd/merge.c
bfd/mipsbsd.c
bfd/mmo.c
bfd/mpw-config.in
bfd/mpw-make.sed
bfd/netbsd-core.c
bfd/netbsd.h
bfd/newsos3.c
bfd/nlm-target.h
bfd/nlm.c
bfd/nlm32-alpha.c
bfd/nlm32-i386.c
bfd/nlm32-ppc.c
bfd/nlm32-sparc.c
bfd/nlm32.c
bfd/nlm64.c
bfd/nlmcode.h
bfd/nlmswap.h
bfd/ns32k.h
bfd/ns32knetbsd.c
bfd/oasys.c
bfd/opncls.c
bfd/osf-core.c
bfd/pc532-mach.c
bfd/pdp11.c
bfd/pe-arm.c
bfd/pe-i386.c
bfd/pe-mcore.c
bfd/pe-mips.c
bfd/pe-ppc.c
bfd/pe-sh.c
bfd/peXXigen.c
bfd/pei-arm.c
bfd/pei-i386.c
bfd/pei-mcore.c
bfd/pei-mips.c
bfd/pei-ppc.c
bfd/pei-sh.c
bfd/peicode.h
bfd/po/.cvsignore
bfd/po/BLD-POTFILES.in
bfd/po/Make-in
bfd/po/SRC-POTFILES.in
bfd/po/bfd.pot
bfd/po/es.po
bfd/po/fr.po
bfd/po/ja.po
bfd/po/sv.po
bfd/po/tr.po
bfd/ppcboot.c
bfd/ptrace-core.c
bfd/reloc.c
bfd/reloc16.c
bfd/riscix.c
bfd/rs6000-core.c
bfd/sco5-core.c
bfd/section.c
bfd/som.c
bfd/som.h
bfd/sparclinux.c
bfd/sparclynx.c
bfd/sparcnetbsd.c
bfd/srec.c
bfd/stab-syms.c
bfd/stabs.c
bfd/stamp-h.in
bfd/sunos.c
bfd/syms.c
bfd/sysdep.h
bfd/targets.c
bfd/targmatch.sed
bfd/tekhex.c
bfd/trad-core.c
bfd/vaxnetbsd.c
bfd/versados.c
bfd/version.h
bfd/vms-gsd.c
bfd/vms-hdr.c
bfd/vms-misc.c
bfd/vms-tir.c
bfd/vms.c
bfd/vms.h
bfd/xcoff-target.h
bfd/xcofflink.c
config-ml.in
config.guess
config.if
config.sub
config/ChangeLog
config/acinclude.m4
config/mh-a68bsd
config/mh-aix386
config/mh-apollo68
config/mh-armpic
config/mh-cxux
config/mh-cygwin
config/mh-decstation
config/mh-delta88
config/mh-dgux
config/mh-dgux386
config/mh-djgpp
config/mh-elfalphapic
config/mh-hp300
config/mh-hpux
config/mh-hpux8
config/mh-i370pic
config/mh-ia64pic
config/mh-interix
config/mh-irix5
config/mh-irix6
config/mh-lynxrs6k
config/mh-m68kpic
config/mh-mingw32
config/mh-ncr3000
config/mh-ncrsvr43
config/mh-necv4
config/mh-openedition
config/mh-papic
config/mh-ppcpic
config/mh-riscos
config/mh-s390pic
config/mh-sco
config/mh-solaris
config/mh-sparcpic
config/mh-sysv
config/mh-sysv4
config/mh-sysv5
config/mh-x86pic
config/mpw-mh-mpw
config/mpw/ChangeLog
config/mpw/MoveIfChange
config/mpw/README
config/mpw/forward-include
config/mpw/g-mpw-make.sed
config/mpw/mpw-touch
config/mpw/mpw-true
config/mpw/null-command
config/mpw/open-brace
config/mpw/tr-7to8-src
config/mpw/true
config/mt-aix43
config/mt-alphaieee
config/mt-d30v
config/mt-linux
config/mt-netware
config/mt-ospace
config/mt-v810
config/mt-wince
configure
configure.in
djunpack.bat
etc/ChangeLog
etc/Makefile.in
etc/add-log.el
etc/add-log.vi
etc/configbuild.ein
etc/configbuild.fig
etc/configbuild.jin
etc/configbuild.tin
etc/configdev.ein
etc/configdev.fig
etc/configdev.jin
etc/configdev.tin
etc/configure
etc/configure.in
etc/configure.texi
etc/fdl.texi
etc/make-stds.texi
etc/standards.texi
etc/texi2pod.pl
gdb/29k-share/README
gdb/29k-share/udi/udi2go32.c
gdb/29k-share/udi/udiids.h
gdb/29k-share/udi/udip2soc.c
gdb/29k-share/udi/udiphcfg.h
gdb/29k-share/udi/udiphunix.h
gdb/29k-share/udi/udiproc.h
gdb/29k-share/udi/udipt29k.h
gdb/29k-share/udi/udiptcfg.h
gdb/29k-share/udi/udisoc.h
gdb/29k-share/udi/udr.c
gdb/29k-share/udi_soc
gdb/CONTRIBUTE
gdb/COPYING
gdb/ChangeLog-1990
gdb/ChangeLog-1991
gdb/ChangeLog-1992
gdb/ChangeLog-1993
gdb/ChangeLog-1994
gdb/ChangeLog-1995
gdb/ChangeLog-1996
gdb/ChangeLog-1997
gdb/ChangeLog-1998
gdb/ChangeLog-1999
gdb/ChangeLog-2000
gdb/ChangeLog-2001
gdb/ChangeLog-3.x
gdb/MAINTAINERS
gdb/NEWS
gdb/PROBLEMS
gdb/README
gdb/TODO
gdb/a68v-nat.c
gdb/abug-rom.c
gdb/acconfig.h
gdb/acinclude.m4
gdb/aclocal.m4
gdb/alpha-linux-tdep.c
gdb/alpha-nat.c
gdb/alpha-osf1-tdep.c
gdb/alpha-tdep.c
gdb/alpha-tdep.h
gdb/alphabsd-nat.c
gdb/alphabsd-tdep.c
gdb/alphabsd-tdep.h
gdb/alphafbsd-tdep.c
gdb/alphanbsd-tdep.c
gdb/annotate.c
gdb/annotate.h
gdb/arc-tdep.c
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-linux-nat.c
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/arm-tdep.h
gdb/armnbsd-nat.c
gdb/armnbsd-tdep.c
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/ax-gdb.h
gdb/ax-general.c
gdb/ax.h
gdb/bcache.c
gdb/bcache.h
gdb/blockframe.c
gdb/breakpoint.c
gdb/breakpoint.h
gdb/buildsym.c
gdb/buildsym.h
gdb/builtin-regs.c
gdb/builtin-regs.h
gdb/c-exp.y
gdb/c-lang.c
gdb/c-lang.h
gdb/c-typeprint.c
gdb/c-valprint.c
gdb/call-cmds.h
gdb/ch-exp.c
gdb/ch-lang.c
gdb/ch-lang.h
gdb/ch-typeprint.c
gdb/ch-valprint.c
gdb/cli-out.c
gdb/cli-out.h
gdb/cli/cli-cmds.c
gdb/cli/cli-cmds.h
gdb/cli/cli-decode.c
gdb/cli/cli-decode.h
gdb/cli/cli-dump.c
gdb/cli/cli-dump.h
gdb/cli/cli-script.c
gdb/cli/cli-script.h
gdb/cli/cli-setshow.c
gdb/cli/cli-setshow.h
gdb/cli/cli-utils.c
gdb/cli/cli-utils.h
gdb/coff-solib.c
gdb/coff-solib.h
gdb/coffread.c
gdb/command.h
gdb/complaints.c
gdb/complaints.h
gdb/completer.c
gdb/completer.h
gdb/config.in
gdb/config/alpha/alpha-linux.mh
gdb/config/alpha/alpha-linux.mt
gdb/config/alpha/alpha-osf1.mh
gdb/config/alpha/alpha-osf1.mt
gdb/config/alpha/alpha-osf2.mh
gdb/config/alpha/alpha-osf3.mh
gdb/config/alpha/fbsd.mh
gdb/config/alpha/fbsd.mt
gdb/config/alpha/nbsd.mh
gdb/config/alpha/nbsd.mt
gdb/config/alpha/nm-fbsd.h
gdb/config/alpha/nm-linux.h
gdb/config/alpha/nm-nbsd.h
gdb/config/alpha/nm-osf.h
gdb/config/alpha/nm-osf2.h
gdb/config/alpha/nm-osf3.h
gdb/config/alpha/tm-alpha.h
gdb/config/alpha/tm-alphalinux.h
gdb/config/alpha/tm-fbsd.h
gdb/config/alpha/tm-nbsd.h
gdb/config/alpha/xm-alphalinux.h
gdb/config/alpha/xm-alphaosf.h
gdb/config/arc/arc.mt
gdb/config/arc/tm-arc.h
gdb/config/arm/embed.mt
gdb/config/arm/linux.mh
gdb/config/arm/linux.mt
gdb/config/arm/nbsd.mh
gdb/config/arm/nbsd.mt
gdb/config/arm/nm-linux.h
gdb/config/arm/nm-nbsd.h
gdb/config/arm/tm-arm.h
gdb/config/arm/tm-embed.h
gdb/config/arm/tm-linux.h
gdb/config/arm/tm-wince.h
gdb/config/arm/wince.mt
gdb/config/arm/xm-linux.h
gdb/config/arm/xm-nbsd.h
gdb/config/cris/cris.mt
gdb/config/cris/tm-cris.h
gdb/config/d10v/d10v.mt
gdb/config/d30v/d30v.mt
gdb/config/d30v/tm-d30v.h
gdb/config/djgpp/README
gdb/config/djgpp/config.sed
gdb/config/djgpp/djcheck.sh
gdb/config/djgpp/djconfig.sh
gdb/config/djgpp/fnchange.lst
gdb/config/fr30/fr30.mt
gdb/config/fr30/tm-fr30.h
gdb/config/h8300/h8300.mt
gdb/config/h8300/tm-h8300.h
gdb/config/h8500/h8500.mt
gdb/config/h8500/tm-h8500.h
gdb/config/i386/cygwin.mh
gdb/config/i386/cygwin.mt
gdb/config/i386/embed.mt
gdb/config/i386/fbsd.mh
gdb/config/i386/fbsd.mt
gdb/config/i386/gdbserve.mt
gdb/config/i386/go32.mh
gdb/config/i386/go32.mt
gdb/config/i386/i386aix.mh
gdb/config/i386/i386aix.mt
gdb/config/i386/i386aout.mt
gdb/config/i386/i386bsd.mh
gdb/config/i386/i386bsd.mt
gdb/config/i386/i386dgux.mh
gdb/config/i386/i386gnu.mh
gdb/config/i386/i386gnu.mt
gdb/config/i386/i386lynx.mh
gdb/config/i386/i386lynx.mt
gdb/config/i386/i386m3.mh
gdb/config/i386/i386m3.mt
gdb/config/i386/i386mach.mh
gdb/config/i386/i386mk.mh
gdb/config/i386/i386mk.mt
gdb/config/i386/i386nw.mt
gdb/config/i386/i386os9k.mt
gdb/config/i386/i386sco.mh
gdb/config/i386/i386sco4.mh
gdb/config/i386/i386sco5.mh
gdb/config/i386/i386sco5.mt
gdb/config/i386/i386sol2.mh
gdb/config/i386/i386sol2.mt
gdb/config/i386/i386v.mh
gdb/config/i386/i386v.mt
gdb/config/i386/i386v32.mh
gdb/config/i386/i386v4.mh
gdb/config/i386/i386v4.mt
gdb/config/i386/i386v42mp.mh
gdb/config/i386/i386v42mp.mt
gdb/config/i386/linux.mh
gdb/config/i386/linux.mt
gdb/config/i386/nbsd.mh
gdb/config/i386/nbsd.mt
gdb/config/i386/nbsdelf.mh
gdb/config/i386/nbsdelf.mt
gdb/config/i386/ncr3000.mh
gdb/config/i386/ncr3000.mt
gdb/config/i386/nm-cygwin.h
gdb/config/i386/nm-fbsd.h
gdb/config/i386/nm-gnu.h
gdb/config/i386/nm-go32.h
gdb/config/i386/nm-i386.h
gdb/config/i386/nm-i386aix.h
gdb/config/i386/nm-i386bsd.h
gdb/config/i386/nm-i386lynx.h
gdb/config/i386/nm-i386mach.h
gdb/config/i386/nm-i386sco.h
gdb/config/i386/nm-i386sco4.h
gdb/config/i386/nm-i386sco5.h
gdb/config/i386/nm-i386sol2.h
gdb/config/i386/nm-i386v.h
gdb/config/i386/nm-i386v4.h
gdb/config/i386/nm-i386v42mp.h
gdb/config/i386/nm-linux.h
gdb/config/i386/nm-m3.h
gdb/config/i386/nm-nbsd.h
gdb/config/i386/nm-nbsdelf.h
gdb/config/i386/nm-obsd.h
gdb/config/i386/nm-ptx4.h
gdb/config/i386/nm-symmetry.h
gdb/config/i386/nm-x86-64.h
gdb/config/i386/obsd.mh
gdb/config/i386/obsd.mt
gdb/config/i386/ptx.mh
gdb/config/i386/ptx.mt
gdb/config/i386/ptx4.mh
gdb/config/i386/ptx4.mt
gdb/config/i386/symmetry.mh
gdb/config/i386/symmetry.mt
gdb/config/i386/tm-cygwin.h
gdb/config/i386/tm-fbsd.h
gdb/config/i386/tm-go32.h
gdb/config/i386/tm-i386.h
gdb/config/i386/tm-i386aix.h
gdb/config/i386/tm-i386bsd.h
gdb/config/i386/tm-i386gnu.h
gdb/config/i386/tm-i386lynx.h
gdb/config/i386/tm-i386m3.h
gdb/config/i386/tm-i386mk.h
gdb/config/i386/tm-i386nw.h
gdb/config/i386/tm-i386os9k.h
gdb/config/i386/tm-i386sco5.h
gdb/config/i386/tm-i386sol2.h
gdb/config/i386/tm-i386v.h
gdb/config/i386/tm-i386v4.h
gdb/config/i386/tm-i386v42mp.h
gdb/config/i386/tm-linux.h
gdb/config/i386/tm-nbsd.h
gdb/config/i386/tm-nbsdelf.h
gdb/config/i386/tm-obsd.h
gdb/config/i386/tm-ptx.h
gdb/config/i386/tm-ptx4.h
gdb/config/i386/tm-symmetry.h
gdb/config/i386/tm-vxworks.h
gdb/config/i386/vxworks.mt
gdb/config/i386/x86-64linux.mh
gdb/config/i386/x86-64linux.mt
gdb/config/i386/xm-cygwin.h
gdb/config/i386/xm-go32.h
gdb/config/i386/xm-i386.h
gdb/config/i386/xm-i386aix.h
gdb/config/i386/xm-i386bsd.h
gdb/config/i386/xm-i386gnu.h
gdb/config/i386/xm-i386m3.h
gdb/config/i386/xm-i386mach.h
gdb/config/i386/xm-i386mk.h
gdb/config/i386/xm-i386sco.h
gdb/config/i386/xm-i386v.h
gdb/config/i386/xm-i386v32.h
gdb/config/i386/xm-i386v4.h
gdb/config/i386/xm-nbsd.h
gdb/config/i386/xm-ptx.h
gdb/config/i386/xm-ptx4.h
gdb/config/i386/xm-symmetry.h
gdb/config/i960/mon960.mt
gdb/config/i960/nindy960.mt
gdb/config/i960/tm-i960.h
gdb/config/i960/tm-mon960.h
gdb/config/i960/tm-nindy960.h
gdb/config/i960/tm-vx960.h
gdb/config/i960/vxworks960.mt
gdb/config/ia64/aix.mh
gdb/config/ia64/aix.mt
gdb/config/ia64/linux.mh
gdb/config/ia64/linux.mt
gdb/config/ia64/nm-aix.h
gdb/config/ia64/nm-linux.h
gdb/config/ia64/tm-aix.h
gdb/config/ia64/tm-ia64.h
gdb/config/ia64/tm-linux.h
gdb/config/ia64/xm-aix.h
gdb/config/ia64/xm-linux.h
gdb/config/m32r/m32r.mt
gdb/config/m32r/tm-m32r.h
gdb/config/m68hc11/m68hc11.mt
gdb/config/m68k/3b1.mh
gdb/config/m68k/3b1.mt
gdb/config/m68k/apollo68b.mh
gdb/config/m68k/apollo68b.mt
gdb/config/m68k/apollo68v.mh
gdb/config/m68k/cisco.mt
gdb/config/m68k/delta68.mh
gdb/config/m68k/delta68.mt
gdb/config/m68k/dpx2.mh
gdb/config/m68k/dpx2.mt
gdb/config/m68k/es1800.mt
gdb/config/m68k/hp300bsd.mh
gdb/config/m68k/hp300bsd.mt
gdb/config/m68k/hp300hpux.mh
gdb/config/m68k/hp300hpux.mt
gdb/config/m68k/linux.mh
gdb/config/m68k/linux.mt
gdb/config/m68k/m68klynx.mh
gdb/config/m68k/m68klynx.mt
gdb/config/m68k/m68kv4.mh
gdb/config/m68k/m68kv4.mt
gdb/config/m68k/monitor.mt
gdb/config/m68k/nbsd.mh
gdb/config/m68k/nbsd.mt
gdb/config/m68k/nm-apollo68b.h
gdb/config/m68k/nm-apollo68v.h
gdb/config/m68k/nm-delta68.h
gdb/config/m68k/nm-dpx2.h
gdb/config/m68k/nm-hp300bsd.h
gdb/config/m68k/nm-hp300hpux.h
gdb/config/m68k/nm-linux.h
gdb/config/m68k/nm-m68klynx.h
gdb/config/m68k/nm-nbsd.h
gdb/config/m68k/nm-sun2.h
gdb/config/m68k/nm-sun3.h
gdb/config/m68k/nm-sysv4.h
gdb/config/m68k/os68k.mt
gdb/config/m68k/st2000.mt
gdb/config/m68k/sun2os3.mh
gdb/config/m68k/sun2os3.mt
gdb/config/m68k/sun2os4.mh
gdb/config/m68k/sun2os4.mt
gdb/config/m68k/sun3os3.mh
gdb/config/m68k/sun3os3.mt
gdb/config/m68k/sun3os4.mh
gdb/config/m68k/sun3os4.mt
gdb/config/m68k/tm-3b1.h
gdb/config/m68k/tm-apollo68b.h
gdb/config/m68k/tm-cisco.h
gdb/config/m68k/tm-delta68.h
gdb/config/m68k/tm-dpx2.h
gdb/config/m68k/tm-es1800.h
gdb/config/m68k/tm-hp300bsd.h
gdb/config/m68k/tm-hp300hpux.h
gdb/config/m68k/tm-linux.h
gdb/config/m68k/tm-m68k.h
gdb/config/m68k/tm-m68klynx.h
gdb/config/m68k/tm-m68kv4.h
gdb/config/m68k/tm-mac.h
gdb/config/m68k/tm-monitor.h
gdb/config/m68k/tm-nbsd.h
gdb/config/m68k/tm-os68k.h
gdb/config/m68k/tm-st2000.h
gdb/config/m68k/tm-sun2.h
gdb/config/m68k/tm-sun2os4.h
gdb/config/m68k/tm-sun3.h
gdb/config/m68k/tm-sun3os4.h
gdb/config/m68k/tm-vx68.h
gdb/config/m68k/vxworks68.mt
gdb/config/m68k/xm-3b1.h
gdb/config/m68k/xm-apollo68b.h
gdb/config/m68k/xm-apollo68v.h
gdb/config/m68k/xm-delta68.h
gdb/config/m68k/xm-dpx2.h
gdb/config/m68k/xm-hp300bsd.h
gdb/config/m68k/xm-hp300hpux.h
gdb/config/m68k/xm-linux.h
gdb/config/m68k/xm-m68k.h
gdb/config/m68k/xm-m68kv4.h
gdb/config/m68k/xm-nbsd.h
gdb/config/m68k/xm-sun2.h
gdb/config/m68k/xm-sun3.h
gdb/config/m68k/xm-sun3os4.h
gdb/config/m88k/delta88.mh
gdb/config/m88k/delta88.mt
gdb/config/m88k/delta88v4.mh
gdb/config/m88k/delta88v4.mt
gdb/config/m88k/m88k.mh
gdb/config/m88k/m88k.mt
gdb/config/m88k/nm-delta88v4.h
gdb/config/m88k/nm-m88k.h
gdb/config/m88k/tm-delta88.h
gdb/config/m88k/tm-delta88v4.h
gdb/config/m88k/tm-m88k.h
gdb/config/m88k/xm-delta88.h
gdb/config/m88k/xm-delta88v4.h
gdb/config/m88k/xm-dgux.h
gdb/config/mcore/mcore.mt
gdb/config/mcore/tm-mcore.h
gdb/config/mips/bigmips.mt
gdb/config/mips/bigmips64.mt
gdb/config/mips/decstation.mh
gdb/config/mips/decstation.mt
gdb/config/mips/embed.mt
gdb/config/mips/embed64.mt
gdb/config/mips/embedl.mt
gdb/config/mips/embedl64.mt
gdb/config/mips/irix3.mh
gdb/config/mips/irix3.mt
gdb/config/mips/irix4.mh
gdb/config/mips/irix5.mh
gdb/config/mips/irix5.mt
gdb/config/mips/irix6.mh
gdb/config/mips/irix6.mt
gdb/config/mips/linux.mh
gdb/config/mips/linux.mt
gdb/config/mips/littlemips.mh
gdb/config/mips/littlemips.mt
gdb/config/mips/mipsm3.mh
gdb/config/mips/mipsm3.mt
gdb/config/mips/mipsv4.mh
gdb/config/mips/mipsv4.mt
gdb/config/mips/news-mips.mh
gdb/config/mips/nm-irix3.h
gdb/config/mips/nm-irix4.h
gdb/config/mips/nm-irix5.h
gdb/config/mips/nm-irix6.h
gdb/config/mips/nm-linux.h
gdb/config/mips/nm-mips.h
gdb/config/mips/nm-news-mips.h
gdb/config/mips/nm-riscos.h
gdb/config/mips/riscos.mh
gdb/config/mips/tm-bigmips.h
gdb/config/mips/tm-bigmips64.h
gdb/config/mips/tm-embed.h
gdb/config/mips/tm-embed64.h
gdb/config/mips/tm-embedl.h
gdb/config/mips/tm-embedl64.h
gdb/config/mips/tm-irix3.h
gdb/config/mips/tm-irix5.h
gdb/config/mips/tm-irix6.h
gdb/config/mips/tm-linux.h
gdb/config/mips/tm-mips.h
gdb/config/mips/tm-mips64.h
gdb/config/mips/tm-mipsm3.h
gdb/config/mips/tm-mipsv4.h
gdb/config/mips/tm-tx39.h
gdb/config/mips/tm-tx39l.h
gdb/config/mips/tm-vr4100.h
gdb/config/mips/tm-vr4300.h
gdb/config/mips/tm-vr4300el.h
gdb/config/mips/tm-vr4xxx.h
gdb/config/mips/tm-vr4xxxel.h
gdb/config/mips/tm-vr5000.h
gdb/config/mips/tm-vr5000el.h
gdb/config/mips/tm-vxmips.h
gdb/config/mips/tm-wince.h
gdb/config/mips/tx39.mt
gdb/config/mips/tx39l.mt
gdb/config/mips/vr4100.mt
gdb/config/mips/vr4300.mt
gdb/config/mips/vr4300el.mt
gdb/config/mips/vr4xxx.mt
gdb/config/mips/vr4xxxel.mt
gdb/config/mips/vr5000.mt
gdb/config/mips/vr5000el.mt
gdb/config/mips/vxmips.mt
gdb/config/mips/wince.mt
gdb/config/mips/xm-irix3.h
gdb/config/mips/xm-irix4.h
gdb/config/mips/xm-irix5.h
gdb/config/mips/xm-irix6.h
gdb/config/mips/xm-linux.h
gdb/config/mips/xm-mips.h
gdb/config/mips/xm-mipsm3.h
gdb/config/mips/xm-mipsv4.h
gdb/config/mips/xm-riscos.h
gdb/config/mn10200/mn10200.mt
gdb/config/mn10200/tm-mn10200.h
gdb/config/mn10300/mn10300.mt
gdb/config/nm-gnu.h
gdb/config/nm-linux.h
gdb/config/nm-lynx.h
gdb/config/nm-m3.h
gdb/config/nm-nbsd.h
gdb/config/nm-sysv4.h
gdb/config/none/nm-none.h
gdb/config/none/none.mh
gdb/config/none/none.mt
gdb/config/none/tm-none.h
gdb/config/none/xm-none.h
gdb/config/ns32k/nbsd.mh
gdb/config/ns32k/nbsd.mt
gdb/config/ns32k/nm-nbsd.h
gdb/config/ns32k/tm-nbsd.h
gdb/config/ns32k/tm-umax.h
gdb/config/ns32k/xm-nbsd.h
gdb/config/pa/hppa64.mt
gdb/config/pa/hppabsd.mh
gdb/config/pa/hppabsd.mt
gdb/config/pa/hppahpux.mh
gdb/config/pa/hppahpux.mt
gdb/config/pa/hppaosf.mh
gdb/config/pa/hppaosf.mt
gdb/config/pa/hppapro.mt
gdb/config/pa/hpux1020.mh
gdb/config/pa/hpux1020.mt
gdb/config/pa/hpux11.mh
gdb/config/pa/hpux11.mt
gdb/config/pa/hpux11w.mh
gdb/config/pa/hpux11w.mt
gdb/config/pa/nm-hppab.h
gdb/config/pa/nm-hppah.h
gdb/config/pa/nm-hppah11.h
gdb/config/pa/nm-hppao.h
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppa64.h
gdb/config/pa/tm-hppab.h
gdb/config/pa/tm-hppah.h
gdb/config/pa/tm-hppao.h
gdb/config/pa/tm-pro.h
gdb/config/pa/xm-hppab.h
gdb/config/pa/xm-hppah.h
gdb/config/pa/xm-pa.h
gdb/config/powerpc/aix.mh
gdb/config/powerpc/aix.mt
gdb/config/powerpc/gdbserve.mt
gdb/config/powerpc/linux.mh
gdb/config/powerpc/linux.mt
gdb/config/powerpc/nbsd.mh
gdb/config/powerpc/nbsd.mt
gdb/config/powerpc/nm-aix.h
gdb/config/powerpc/nm-linux.h
gdb/config/powerpc/nm-nbsd.h
gdb/config/powerpc/ppc-eabi.mt
gdb/config/powerpc/ppc-sim.mt
gdb/config/powerpc/ppcle-eabi.mt
gdb/config/powerpc/ppcle-sim.mt
gdb/config/powerpc/tm-linux.h
gdb/config/powerpc/tm-nbsd.h
gdb/config/powerpc/tm-ppc-aix.h
gdb/config/powerpc/tm-ppc-eabi.h
gdb/config/powerpc/tm-ppc-sim.h
gdb/config/powerpc/tm-ppcle-eabi.h
gdb/config/powerpc/tm-ppcle-sim.h
gdb/config/powerpc/tm-vxworks.h
gdb/config/powerpc/vxworks.mt
gdb/config/powerpc/xm-aix.h
gdb/config/powerpc/xm-linux.h
gdb/config/romp/rtbsd.mh
gdb/config/romp/xm-rtbsd.h
gdb/config/rs6000/aix4.mh
gdb/config/rs6000/aix4.mt
gdb/config/rs6000/nm-rs6000.h
gdb/config/rs6000/nm-rs6000ly.h
gdb/config/rs6000/rs6000.mh
gdb/config/rs6000/rs6000.mt
gdb/config/rs6000/rs6000lynx.mh
gdb/config/rs6000/rs6000lynx.mt
gdb/config/rs6000/tm-rs6000-aix4.h
gdb/config/rs6000/tm-rs6000.h
gdb/config/rs6000/tm-rs6000ly.h
gdb/config/rs6000/xm-aix4.h
gdb/config/rs6000/xm-rs6000.h
gdb/config/s390/nm-linux.h
gdb/config/s390/s390.mh
gdb/config/s390/s390.mt
gdb/config/s390/s390x.mt
gdb/config/s390/tm-linux.h
gdb/config/s390/tm-s390.h
gdb/config/s390/xm-linux.h
gdb/config/sh/embed.mt
gdb/config/sh/linux.mt
gdb/config/sh/nbsd.mh
gdb/config/sh/nbsd.mt
gdb/config/sh/nm-nbsd.h
gdb/config/sh/tm-linux.h
gdb/config/sh/tm-nbsd.h
gdb/config/sh/tm-sh.h
gdb/config/sh/tm-wince.h
gdb/config/sh/wince.mt
gdb/config/sparc/fbsd.mh
gdb/config/sparc/fbsd.mt
gdb/config/sparc/linux.mh
gdb/config/sparc/linux.mt
gdb/config/sparc/nbsd.mh
gdb/config/sparc/nbsd.mt
gdb/config/sparc/nbsdelf.mh
gdb/config/sparc/nm-fbsd.h
gdb/config/sparc/nm-linux.h
gdb/config/sparc/nm-nbsd.h
gdb/config/sparc/nm-nbsdelf.h
gdb/config/sparc/nm-sparclynx.h
gdb/config/sparc/nm-sun4os4.h
gdb/config/sparc/nm-sun4sol2.h
gdb/config/sparc/sp64.mt
gdb/config/sparc/sp64linux.mt
gdb/config/sparc/sp64sim.mt
gdb/config/sparc/sp64sol2.mt
gdb/config/sparc/sparc-em.mt
gdb/config/sparc/sparclet.mt
gdb/config/sparc/sparclite.mt
gdb/config/sparc/sparclynx.mh
gdb/config/sparc/sparclynx.mt
gdb/config/sparc/sun4os4.mh
gdb/config/sparc/sun4os4.mt
gdb/config/sparc/sun4sol2.mh
gdb/config/sparc/sun4sol2.mt
gdb/config/sparc/tm-fbsd.h
gdb/config/sparc/tm-linux.h
gdb/config/sparc/tm-nbsd.h
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sp64linux.h
gdb/config/sparc/tm-sp64sim.h
gdb/config/sparc/tm-sparc.h
gdb/config/sparc/tm-sparclet.h
gdb/config/sparc/tm-sparclite.h
gdb/config/sparc/tm-sparclynx.h
gdb/config/sparc/tm-spc-em.h
gdb/config/sparc/tm-sun4os4.h
gdb/config/sparc/tm-sun4sol2.h
gdb/config/sparc/tm-vxsparc.h
gdb/config/sparc/vxsparc.mt
gdb/config/sparc/xm-linux.h
gdb/config/sparc/xm-nbsd.h
gdb/config/sparc/xm-sun4sol2.h
gdb/config/tm-linux.h
gdb/config/tm-lynx.h
gdb/config/tm-nbsd.h
gdb/config/tm-sunos.h
gdb/config/tm-sysv4.h
gdb/config/tm-vxworks.h
gdb/config/v850/tm-v850.h
gdb/config/v850/v850.mt
gdb/config/vax/nm-vax.h
gdb/config/vax/tm-vax.h
gdb/config/vax/vax.mt
gdb/config/vax/vaxbsd.mh
gdb/config/vax/vaxult.mh
gdb/config/vax/vaxult2.mh
gdb/config/vax/xm-vax.h
gdb/config/vax/xm-vaxbsd.h
gdb/config/vax/xm-vaxult.h
gdb/config/vax/xm-vaxult2.h
gdb/config/xm-aix4.h
gdb/config/xm-nbsd.h
gdb/config/xm-sysv4.h
gdb/config/xstormy16/xstormy16.mt
gdb/config/z8k/tm-z8k.h
gdb/config/z8k/z8k.mt
gdb/configure
gdb/configure.host
gdb/configure.in
gdb/configure.tgt
gdb/copying.awk
gdb/copying.c
gdb/core-aout.c
gdb/core-regset.c
gdb/core-sol2.c
gdb/corefile.c
gdb/corelow.c
gdb/cp-abi.c
gdb/cp-abi.h
gdb/cp-valprint.c
gdb/cpu32bug-rom.c
gdb/cris-tdep.c
gdb/cxux-nat.c
gdb/d10v-tdep.c
gdb/d30v-tdep.c
gdb/dbug-rom.c
gdb/dbxread.c
gdb/dcache.c
gdb/dcache.h
gdb/delta68-nat.c
gdb/demangle.c
gdb/dink32-rom.c
gdb/doc/ChangeLog
gdb/doc/LRS
gdb/doc/Makefile.in
gdb/doc/a4rc.sed
gdb/doc/agentexpr.texi
gdb/doc/all-cfg.texi
gdb/doc/annotate.texi
gdb/doc/configure
gdb/doc/configure.in
gdb/doc/fdl.texi
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doc/gpl.texi
gdb/doc/lpsrc.sed
gdb/doc/psrc.sed
gdb/doc/refcard.tex
gdb/doc/stabs.texinfo
gdb/doublest.c
gdb/doublest.h
gdb/dpx2-nat.c
gdb/dsrec.c
gdb/dst.h
gdb/dstread.c
gdb/dve3900-rom.c
gdb/dwarf2cfi.c
gdb/dwarf2cfi.h
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/elfread.c
gdb/environ.c
gdb/environ.h
gdb/eval.c
gdb/event-loop.h
gdb/exc_request.defs
gdb/exec.c
gdb/expprint.c
gdb/expression.h
gdb/f-exp.y
gdb/f-lang.c
gdb/f-lang.h
gdb/f-typeprint.c
gdb/f-valprint.c
gdb/fbsd-proc.c
gdb/findvar.c
gdb/fork-child.c
gdb/fr30-tdep.c
gdb/frame.c
gdb/frame.h
gdb/gcore.c
gdb/gdb-events.c
gdb/gdb-events.h
gdb/gdb-events.sh
gdb/gdb-stabs.h
gdb/gdb.1
gdb/gdb.gdb
gdb/gdb.h
gdb/gdb_assert.h
gdb/gdb_dirent.h
gdb/gdb_indent.sh
gdb/gdb_proc_service.h
gdb/gdb_regex.h
gdb/gdb_stat.h
gdb/gdb_string.h
gdb/gdb_thread_db.h
gdb/gdb_vfork.h
gdb/gdb_wait.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbcmd.h
gdb/gdbcore.h
gdb/gdbinit.in
gdb/gdbserver/Makefile.in
gdb/gdbserver/README
gdb/gdbserver/acconfig.h
gdb/gdbserver/aclocal.m4
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.in
gdb/gdbserver/configure.srv
gdb/gdbserver/gdbreplay.c
gdb/gdbserver/gdbserver.1
gdb/gdbserver/i387-fp.c
gdb/gdbserver/i387-fp.h
gdb/gdbserver/inferiors.c
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-i386-low.c
gdb/gdbserver/linux-ia64-low.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/linux-m68k-low.c
gdb/gdbserver/linux-mips-low.c
gdb/gdbserver/linux-ppc-low.c
gdb/gdbserver/linux-s390-low.c
gdb/gdbserver/linux-sh-low.c
gdb/gdbserver/linux-x86-64-low.c
gdb/gdbserver/low-hppabsd.c
gdb/gdbserver/low-lynx.c
gdb/gdbserver/low-nbsd.c
gdb/gdbserver/low-sim.c
gdb/gdbserver/low-sparc.c
gdb/gdbserver/low-sun3.c
gdb/gdbserver/mem-break.c
gdb/gdbserver/mem-break.h
gdb/gdbserver/regcache.c
gdb/gdbserver/regcache.h
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.c
gdb/gdbserver/server.h
gdb/gdbserver/target.c
gdb/gdbserver/target.h
gdb/gdbserver/terminal.h
gdb/gdbserver/utils.c
gdb/gdbthread.h
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-nat.c
gdb/gnu-nat.h
gdb/gnu-v2-abi.c
gdb/gnu-v3-abi.c
gdb/go32-nat.c
gdb/gregset.h
gdb/h8300-tdep.c
gdb/h8500-tdep.c
gdb/hp300ux-nat.c
gdb/hpacc-abi.c
gdb/hppa-tdep.c
gdb/hppab-nat.c
gdb/hppah-nat.c
gdb/hppam3-nat.c
gdb/hpread.c
gdb/hpux-thread.c
gdb/i386-linux-nat.c
gdb/i386-linux-tdep.c
gdb/i386-nat.c
gdb/i386-stub.c
gdb/i386-tdep.c
gdb/i386-tdep.h
gdb/i386aix-nat.c
gdb/i386b-nat.c
gdb/i386bsd-nat.c
gdb/i386bsd-tdep.c
gdb/i386fbsd-nat.c
gdb/i386gnu-nat.c
gdb/i386ly-tdep.c
gdb/i386m3-nat.c
gdb/i386mach-nat.c
gdb/i386nbsd-tdep.c
gdb/i386v-nat.c
gdb/i386v4-nat.c
gdb/i387-tdep.c
gdb/i387-tdep.h
gdb/i960-tdep.c
gdb/ia64-aix-nat.c
gdb/ia64-aix-tdep.c
gdb/ia64-linux-nat.c
gdb/ia64-linux-tdep.c
gdb/ia64-tdep.c
gdb/inf-loop.c
gdb/inf-loop.h
gdb/infcmd.c
gdb/inferior.h
gdb/inflow.c
gdb/infptrace.c
gdb/infrun.c
gdb/inftarg.c
gdb/infttrace.c
gdb/irix4-nat.c
gdb/irix5-nat.c
gdb/jv-exp.y
gdb/jv-lang.c
gdb/jv-lang.h
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/kod-cisco.c
gdb/kod.c
gdb/kod.h
gdb/language.c
gdb/language.h
gdb/lin-lwp.c
gdb/linespec.c
gdb/linespec.h
gdb/linux-proc.c
gdb/lynx-nat.c
gdb/m2-exp.y
gdb/m2-lang.c
gdb/m2-lang.h
gdb/m2-typeprint.c
gdb/m2-valprint.c
gdb/m3-nat.c
gdb/m32r-rom.c
gdb/m32r-stub.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-stub.c
gdb/m68k-tdep.c
gdb/m68klinux-nat.c
gdb/m68knbsd-nat.c
gdb/m68knbsd-tdep.c
gdb/m88k-nat.c
gdb/m88k-tdep.c
gdb/macroexp.c
gdb/macroexp.h
gdb/macrotab.c
gdb/macrotab.h
gdb/maint.c
gdb/mcore-rom.c
gdb/mcore-tdep.c
gdb/mdebugread.c
gdb/mem-break.c
gdb/memattr.c
gdb/memattr.h
gdb/mi/ChangeLog
gdb/mi/gdbmi.texinfo
gdb/mi/mi-cmd-break.c
gdb/mi/mi-cmd-disas.c
gdb/mi/mi-cmd-stack.c
gdb/mi/mi-cmd-var.c
gdb/mi/mi-console.c
gdb/mi/mi-console.h
gdb/mi/mi-getopt.c
gdb/mi/mi-getopt.h
gdb/mi/mi-out.c
gdb/mi/mi-out.h
gdb/mi/mi-parse.c
gdb/mi/mi-parse.h
gdb/minimon.h
gdb/minsyms.c
gdb/mips-linux-nat.c
gdb/mips-linux-tdep.c
gdb/mips-nat.c
gdb/mips-tdep.c
gdb/mipsm3-nat.c
gdb/mipsread.c
gdb/mipsv4-nat.c
gdb/mn10200-tdep.c
gdb/mn10300-tdep.c
gdb/mon960-rom.c
gdb/monitor.c
gdb/monitor.h
gdb/msg.defs
gdb/msg_reply.defs
gdb/nbsd-tdep.c
gdb/nbsd-tdep.h
gdb/nindy-share/Makefile
gdb/nindy-share/Onindy.c
gdb/nindy-share/README
gdb/nindy-share/VERSION
gdb/nindy-share/b.out.h
gdb/nindy-share/block_io.h
gdb/nindy-share/coff.h
gdb/nindy-share/env.h
gdb/nindy-share/nindy.c
gdb/nindy-share/stop.h
gdb/nindy-share/ttyflush.c
gdb/nindy-tdep.c
gdb/nlm/Makefile.in
gdb/nlm/configure
gdb/nlm/configure.in
gdb/nlm/gdbserve.c
gdb/nlm/gdbserve.def
gdb/nlm/i386.c
gdb/nlm/i386.h
gdb/nlm/ppc.c
gdb/nlm/ppc.h
gdb/nlm/prelude.c
gdb/nlmread.c
gdb/notify.defs
gdb/ns32k-tdep.c
gdb/ns32knbsd-nat.c
gdb/objfiles.c
gdb/objfiles.h
gdb/ocd.c
gdb/ocd.h
gdb/op50-rom.c
gdb/os9kread.c
gdb/osf-share/AT386/cma_thread_io.h
gdb/osf-share/HP800/cma_thread_io.h
gdb/osf-share/README
gdb/osf-share/RIOS/cma_thread_io.h
gdb/osf-share/cma_attr.h
gdb/osf-share/cma_deb_core.h
gdb/osf-share/cma_debug_client.h
gdb/osf-share/cma_errors.h
gdb/osf-share/cma_handle.h
gdb/osf-share/cma_init.h
gdb/osf-share/cma_list.h
gdb/osf-share/cma_mutex.h
gdb/osf-share/cma_sched.h
gdb/osf-share/cma_semaphore_defs.h
gdb/osf-share/cma_sequence.h
gdb/osf-share/cma_stack.h
gdb/osf-share/cma_stack_int.h
gdb/osf-share/cma_tcb_defs.h
gdb/osf-share/cma_util.h
gdb/osfsolib.c
gdb/p-exp.y
gdb/p-lang.c
gdb/p-lang.h
gdb/p-typeprint.c
gdb/p-valprint.c
gdb/pa64solib.c
gdb/pa64solib.h
gdb/parse.c
gdb/parser-defs.h
gdb/ppc-bdm.c
gdb/ppc-linux-nat.c
gdb/ppc-linux-tdep.c
gdb/ppc-tdep.h
gdb/ppcbug-rom.c
gdb/ppcnbsd-nat.c
gdb/printcmd.c
gdb/proc-api.c
gdb/proc-events.c
gdb/proc-flags.c
gdb/proc-service.c
gdb/proc-utils.h
gdb/proc-why.c
gdb/process_reply.defs
gdb/procfs.c
gdb/ptx4-nat.c
gdb/rdi-share/Makefile.am
gdb/rdi-share/Makefile.in
gdb/rdi-share/README.CYGNUS
gdb/rdi-share/aclocal.m4
gdb/rdi-share/adp.h
gdb/rdi-share/adperr.h
gdb/rdi-share/angel.h
gdb/rdi-share/angel_bytesex.c
gdb/rdi-share/angel_bytesex.h
gdb/rdi-share/angel_endian.h
gdb/rdi-share/ardi.c
gdb/rdi-share/ardi.h
gdb/rdi-share/armdbg.h
gdb/rdi-share/buffers.h
gdb/rdi-share/chandefs.h
gdb/rdi-share/channels.h
gdb/rdi-share/chanpriv.h
gdb/rdi-share/configure
gdb/rdi-share/configure.in
gdb/rdi-share/crc.c
gdb/rdi-share/crc.h
gdb/rdi-share/dbg_conf.h
gdb/rdi-share/dbg_cp.h
gdb/rdi-share/dbg_hif.h
gdb/rdi-share/dbg_rdi.h
gdb/rdi-share/devclnt.h
gdb/rdi-share/devices.h
gdb/rdi-share/devsw.c
gdb/rdi-share/devsw.h
gdb/rdi-share/drivers.c
gdb/rdi-share/drivers.h
gdb/rdi-share/etherdrv.c
gdb/rdi-share/ethernet.h
gdb/rdi-share/host.h
gdb/rdi-share/hostchan.c
gdb/rdi-share/hostchan.h
gdb/rdi-share/hsys.c
gdb/rdi-share/hsys.h
gdb/rdi-share/logging.c
gdb/rdi-share/logging.h
gdb/rdi-share/msgbuild.c
gdb/rdi-share/msgbuild.h
gdb/rdi-share/params.c
gdb/rdi-share/params.h
gdb/rdi-share/rx.c
gdb/rdi-share/rxtx.h
gdb/rdi-share/serdrv.c
gdb/rdi-share/serpardr.c
gdb/rdi-share/sys.h
gdb/rdi-share/tx.c
gdb/rdi-share/unixcomm.c
gdb/rdi-share/unixcomm.h
gdb/regcache.c
gdb/regcache.h
gdb/regformats/reg-arm.dat
gdb/regformats/reg-i386-linux.dat
gdb/regformats/reg-i386.dat
gdb/regformats/reg-ia64.dat
gdb/regformats/reg-m68k.dat
gdb/regformats/reg-mips.dat
gdb/regformats/reg-ppc.dat
gdb/regformats/reg-s390.dat
gdb/regformats/reg-s390x.dat
gdb/regformats/reg-sh.dat
gdb/regformats/reg-x86-64.dat
gdb/regformats/regdat.sh
gdb/regformats/regdef.h
gdb/remote-array.c
gdb/remote-bug.c
gdb/remote-e7000.c
gdb/remote-es.c
gdb/remote-est.c
gdb/remote-hms.c
gdb/remote-mips.c
gdb/remote-nindy.c
gdb/remote-nrom.c
gdb/remote-os9k.c
gdb/remote-rdi.c
gdb/remote-rdp.c
gdb/remote-sds.c
gdb/remote-sim.c
gdb/remote-st.c
gdb/remote-utils.c
gdb/remote-utils.h
gdb/remote-vx.c
gdb/remote-vx29k.c
gdb/remote-vx68.c
gdb/remote-vx960.c
gdb/remote-vxmips.c
gdb/remote-vxsparc.c
gdb/remote.c
gdb/remote.h
gdb/reply_mig_hack.awk
gdb/rom68k-rom.c
gdb/rs6000-nat.c
gdb/rs6000-tdep.c
gdb/s390-nat.c
gdb/s390-tdep.c
gdb/saber.suppress
gdb/scm-exp.c
gdb/scm-lang.c
gdb/scm-lang.h
gdb/scm-tags.h
gdb/scm-valprint.c
gdb/ser-e7kpc.c
gdb/ser-go32.c
gdb/ser-pipe.c
gdb/ser-tcp.c
gdb/ser-unix.c
gdb/ser-unix.h
gdb/serial.c
gdb/serial.h
gdb/sh-stub.c
gdb/sh-tdep.c
gdb/sh3-rom.c
gdb/shnbsd-nat.c
gdb/shnbsd-tdep.c
gdb/shnbsd-tdep.h
gdb/signals/signals.c
gdb/sol-thread.c
gdb/solib-aix5.c
gdb/solib-legacy.c
gdb/solib-osf.c
gdb/solib-sunos.c
gdb/solib-svr4.c
gdb/solib-svr4.h
gdb/solib.c
gdb/solib.h
gdb/solist.h
gdb/somread.c
gdb/somsolib.c
gdb/somsolib.h
gdb/source.c
gdb/source.h
gdb/sparc-linux-nat.c
gdb/sparc-nat.c
gdb/sparc-stub.c
gdb/sparc-tdep.c
gdb/sparcl-stub.c
gdb/sparcl-tdep.c
gdb/sparclet-rom.c
gdb/sparclet-stub.c
gdb/srec.h
gdb/stabsread.c
gdb/stabsread.h
gdb/stack.c
gdb/standalone.c
gdb/std-regs.c
gdb/stop-gdb.c
gdb/sun3-nat.c
gdb/symfile.c
gdb/symfile.h
gdb/symm-nat.c
gdb/symm-tdep.c
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/target.c
gdb/target.h
gdb/terminal.h
gdb/testsuite/.gdbinit
gdb/testsuite/ChangeLog
gdb/testsuite/Makefile.in
gdb/testsuite/TODO
gdb/testsuite/aclocal.m4
gdb/testsuite/config/abug.exp
gdb/testsuite/config/arm-ice.exp
gdb/testsuite/config/cfdbug.exp
gdb/testsuite/config/cpu32bug.exp
gdb/testsuite/config/cygmon.exp
gdb/testsuite/config/d10v.exp
gdb/testsuite/config/dve.exp
gdb/testsuite/config/est.exp
gdb/testsuite/config/gdbserver.exp
gdb/testsuite/config/h8300.exp
gdb/testsuite/config/hmsirom.exp
gdb/testsuite/config/hppro.exp
gdb/testsuite/config/i386-bozo.exp
gdb/testsuite/config/i960.exp
gdb/testsuite/config/m32r-stub.exp
gdb/testsuite/config/m32r.exp
gdb/testsuite/config/m68k-emc.exp
gdb/testsuite/config/mips-idt.exp
gdb/testsuite/config/mips.exp
gdb/testsuite/config/mn10300-eval.exp
gdb/testsuite/config/monitor.exp
gdb/testsuite/config/netware.exp
gdb/testsuite/config/nind.exp
gdb/testsuite/config/proelf.exp
gdb/testsuite/config/rom68k.exp
gdb/testsuite/config/sh.exp
gdb/testsuite/config/sid.exp
gdb/testsuite/config/sim.exp
gdb/testsuite/config/slite.exp
gdb/testsuite/config/sparclet.exp
gdb/testsuite/config/udi.exp
gdb/testsuite/config/unix.exp
gdb/testsuite/config/unknown.exp
gdb/testsuite/config/vr4300.exp
gdb/testsuite/config/vr5000.exp
gdb/testsuite/config/vx.exp
gdb/testsuite/config/vxworks.exp
gdb/testsuite/config/vxworks29k.exp
gdb/testsuite/configure
gdb/testsuite/configure.in
gdb/testsuite/gdb.asm/Makefile.in
gdb/testsuite/gdb.asm/arm.inc
gdb/testsuite/gdb.asm/asm-source.exp
gdb/testsuite/gdb.asm/asmsrc1.s
gdb/testsuite/gdb.asm/asmsrc2.s
gdb/testsuite/gdb.asm/common.inc
gdb/testsuite/gdb.asm/configure
gdb/testsuite/gdb.asm/configure.in
gdb/testsuite/gdb.asm/d10v.inc
gdb/testsuite/gdb.asm/i386.inc
gdb/testsuite/gdb.asm/m32r.inc
gdb/testsuite/gdb.asm/powerpc.inc
gdb/testsuite/gdb.asm/s390.inc
gdb/testsuite/gdb.asm/sparc.inc
gdb/testsuite/gdb.asm/sparc64.inc
gdb/testsuite/gdb.asm/v850.inc
gdb/testsuite/gdb.asm/xstormy16.inc
gdb/testsuite/gdb.base/Makefile.in
gdb/testsuite/gdb.base/a2-run.exp
gdb/testsuite/gdb.base/all-bin.exp
gdb/testsuite/gdb.base/all-types.c
gdb/testsuite/gdb.base/annota1.c
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/arithmet.exp
gdb/testsuite/gdb.base/assign.exp
gdb/testsuite/gdb.base/async.c
gdb/testsuite/gdb.base/async.exp
gdb/testsuite/gdb.base/attach.c
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/attach2.c
gdb/testsuite/gdb.base/average.c
gdb/testsuite/gdb.base/bar.c
gdb/testsuite/gdb.base/baz.c
gdb/testsuite/gdb.base/bitfields.c
gdb/testsuite/gdb.base/bitfields.exp
gdb/testsuite/gdb.base/bitops.exp
gdb/testsuite/gdb.base/branches.c
gdb/testsuite/gdb.base/break.c
gdb/testsuite/gdb.base/break.exp
gdb/testsuite/gdb.base/call-ar-st.c
gdb/testsuite/gdb.base/call-ar-st.exp
gdb/testsuite/gdb.base/call-rt-st.c
gdb/testsuite/gdb.base/call-rt-st.exp
gdb/testsuite/gdb.base/call-strs.c
gdb/testsuite/gdb.base/call-strs.exp
gdb/testsuite/gdb.base/callfuncs.c
gdb/testsuite/gdb.base/callfuncs.exp
gdb/testsuite/gdb.base/code-expr.exp
gdb/testsuite/gdb.base/commands.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/cond-expr.exp
gdb/testsuite/gdb.base/condbreak.exp
gdb/testsuite/gdb.base/configure
gdb/testsuite/gdb.base/configure.in
gdb/testsuite/gdb.base/consecutive.c
gdb/testsuite/gdb.base/consecutive.exp
gdb/testsuite/gdb.base/constvars.c
gdb/testsuite/gdb.base/constvars.exp
gdb/testsuite/gdb.base/corefile.exp
gdb/testsuite/gdb.base/coremaker.c
gdb/testsuite/gdb.base/coremaker2.c
gdb/testsuite/gdb.base/cvexpr.c
gdb/testsuite/gdb.base/cvexpr.exp
gdb/testsuite/gdb.base/d10v.ld
gdb/testsuite/gdb.base/d10vovly.c
gdb/testsuite/gdb.base/dbx.exp
gdb/testsuite/gdb.base/default.exp
gdb/testsuite/gdb.base/define.exp
gdb/testsuite/gdb.base/display.c
gdb/testsuite/gdb.base/display.exp
gdb/testsuite/gdb.base/dump.c
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/echo.exp
gdb/testsuite/gdb.base/ena-dis-br.exp
gdb/testsuite/gdb.base/ending-run.c
gdb/testsuite/gdb.base/ending-run.exp
gdb/testsuite/gdb.base/environ.exp
gdb/testsuite/gdb.base/eval-skip.exp
gdb/testsuite/gdb.base/execd-prog.c
gdb/testsuite/gdb.base/exprs.c
gdb/testsuite/gdb.base/exprs.exp
gdb/testsuite/gdb.base/finish.exp
gdb/testsuite/gdb.base/foll-exec.c
gdb/testsuite/gdb.base/foll-exec.exp
gdb/testsuite/gdb.base/foll-fork.c
gdb/testsuite/gdb.base/foll-fork.exp
gdb/testsuite/gdb.base/foll-vfork.c
gdb/testsuite/gdb.base/foll-vfork.exp
gdb/testsuite/gdb.base/foo.c
gdb/testsuite/gdb.base/funcargs.c
gdb/testsuite/gdb.base/funcargs.exp
gdb/testsuite/gdb.base/gcore.c
gdb/testsuite/gdb.base/gcore.exp
gdb/testsuite/gdb.base/gdbvars.exp
gdb/testsuite/gdb.base/grbx.c
gdb/testsuite/gdb.base/help.exp
gdb/testsuite/gdb.base/huge.c
gdb/testsuite/gdb.base/huge.exp
gdb/testsuite/gdb.base/info-proc.exp
gdb/testsuite/gdb.base/int-type.c
gdb/testsuite/gdb.base/interrupt.c
gdb/testsuite/gdb.base/interrupt.exp
gdb/testsuite/gdb.base/jump.c
gdb/testsuite/gdb.base/jump.exp
gdb/testsuite/gdb.base/langs.exp
gdb/testsuite/gdb.base/langs0.c
gdb/testsuite/gdb.base/langs1.c
gdb/testsuite/gdb.base/langs1.f
gdb/testsuite/gdb.base/langs2.c
gdb/testsuite/gdb.base/langs2.cxx
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/list0.c
gdb/testsuite/gdb.base/list0.h
gdb/testsuite/gdb.base/list1.c
gdb/testsuite/gdb.base/logical.exp
gdb/testsuite/gdb.base/long_long.c
gdb/testsuite/gdb.base/long_long.exp
gdb/testsuite/gdb.base/m32r.ld
gdb/testsuite/gdb.base/m32rovly.c
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/mips_pro.c
gdb/testsuite/gdb.base/mips_pro.exp
gdb/testsuite/gdb.base/miscexprs.c
gdb/testsuite/gdb.base/miscexprs.exp
gdb/testsuite/gdb.base/nodebug.c
gdb/testsuite/gdb.base/nodebug.exp
gdb/testsuite/gdb.base/opaque.exp
gdb/testsuite/gdb.base/opaque0.c
gdb/testsuite/gdb.base/opaque1.c
gdb/testsuite/gdb.base/overlays.c
gdb/testsuite/gdb.base/overlays.exp
gdb/testsuite/gdb.base/ovlymgr.c
gdb/testsuite/gdb.base/ovlymgr.h
gdb/testsuite/gdb.base/page.exp
gdb/testsuite/gdb.base/pointers.c
gdb/testsuite/gdb.base/pointers.exp
gdb/testsuite/gdb.base/printcmds.c
gdb/testsuite/gdb.base/printcmds.exp
gdb/testsuite/gdb.base/ptype.c
gdb/testsuite/gdb.base/ptype.exp
gdb/testsuite/gdb.base/radix.exp
gdb/testsuite/gdb.base/recurse.c
gdb/testsuite/gdb.base/recurse.exp
gdb/testsuite/gdb.base/regs.exp
gdb/testsuite/gdb.base/relational.exp
gdb/testsuite/gdb.base/relocate.c
gdb/testsuite/gdb.base/relocate.exp
gdb/testsuite/gdb.base/remote.c
gdb/testsuite/gdb.base/remote.exp
gdb/testsuite/gdb.base/reread.exp
gdb/testsuite/gdb.base/reread1.c
gdb/testsuite/gdb.base/reread2.c
gdb/testsuite/gdb.base/restore.c
gdb/testsuite/gdb.base/restore.exp
gdb/testsuite/gdb.base/return.c
gdb/testsuite/gdb.base/return.exp
gdb/testsuite/gdb.base/return2.c
gdb/testsuite/gdb.base/return2.exp
gdb/testsuite/gdb.base/run.c
gdb/testsuite/gdb.base/scope.exp
gdb/testsuite/gdb.base/scope0.c
gdb/testsuite/gdb.base/scope1.c
gdb/testsuite/gdb.base/sect-cmd.exp
gdb/testsuite/gdb.base/selftest.exp
gdb/testsuite/gdb.base/setshow.c
gdb/testsuite/gdb.base/setshow.exp
gdb/testsuite/gdb.base/setvar.c
gdb/testsuite/gdb.base/setvar.exp
gdb/testsuite/gdb.base/shlib-call.exp
gdb/testsuite/gdb.base/shmain.c
gdb/testsuite/gdb.base/shr1.c
gdb/testsuite/gdb.base/shr2.c
gdb/testsuite/gdb.base/sigall.c
gdb/testsuite/gdb.base/sigall.exp
gdb/testsuite/gdb.base/signals.c
gdb/testsuite/gdb.base/signals.exp
gdb/testsuite/gdb.base/sizeof.c
gdb/testsuite/gdb.base/sizeof.exp
gdb/testsuite/gdb.base/so-impl-ld.c
gdb/testsuite/gdb.base/so-impl-ld.exp
gdb/testsuite/gdb.base/so-indr-cl.c
gdb/testsuite/gdb.base/so-indr-cl.exp
gdb/testsuite/gdb.base/solib.c
gdb/testsuite/gdb.base/solib.exp
gdb/testsuite/gdb.base/solib1.c
gdb/testsuite/gdb.base/solib2.c
gdb/testsuite/gdb.base/ss.h
gdb/testsuite/gdb.base/step-line.c
gdb/testsuite/gdb.base/step-line.exp
gdb/testsuite/gdb.base/step-line.inp
gdb/testsuite/gdb.base/step-test.c
gdb/testsuite/gdb.base/step-test.exp
gdb/testsuite/gdb.base/structs.c
gdb/testsuite/gdb.base/structs.exp
gdb/testsuite/gdb.base/structs2.c
gdb/testsuite/gdb.base/structs2.exp
gdb/testsuite/gdb.base/sum.c
gdb/testsuite/gdb.base/term.exp
gdb/testsuite/gdb.base/twice.c
gdb/testsuite/gdb.base/twice.exp
gdb/testsuite/gdb.base/varargs.c
gdb/testsuite/gdb.base/varargs.exp
gdb/testsuite/gdb.base/vforked-prog.c
gdb/testsuite/gdb.base/volatile.exp
gdb/testsuite/gdb.base/watchpoint.c
gdb/testsuite/gdb.base/watchpoint.exp
gdb/testsuite/gdb.base/whatis-exp.exp
gdb/testsuite/gdb.base/whatis.c
gdb/testsuite/gdb.base/whatis.exp
gdb/testsuite/gdb.c++/Makefile.in
gdb/testsuite/gdb.c++/ambiguous.cc
gdb/testsuite/gdb.c++/ambiguous.exp
gdb/testsuite/gdb.c++/annota2.cc
gdb/testsuite/gdb.c++/annota2.exp
gdb/testsuite/gdb.c++/anon-union.cc
gdb/testsuite/gdb.c++/anon-union.exp
gdb/testsuite/gdb.c++/classes.exp
gdb/testsuite/gdb.c++/configure
gdb/testsuite/gdb.c++/configure.in
gdb/testsuite/gdb.c++/cplusfuncs.cc
gdb/testsuite/gdb.c++/cplusfuncs.exp
gdb/testsuite/gdb.c++/ctti.exp
gdb/testsuite/gdb.c++/cttiadd.cc
gdb/testsuite/gdb.c++/cttiadd1.cc
gdb/testsuite/gdb.c++/cttiadd2.cc
gdb/testsuite/gdb.c++/cttiadd3.cc
gdb/testsuite/gdb.c++/demangle.exp
gdb/testsuite/gdb.c++/derivation.cc
gdb/testsuite/gdb.c++/derivation.exp
gdb/testsuite/gdb.c++/hang.H
gdb/testsuite/gdb.c++/hang.exp
gdb/testsuite/gdb.c++/hang1.C
gdb/testsuite/gdb.c++/hang2.C
gdb/testsuite/gdb.c++/hang3.C
gdb/testsuite/gdb.c++/inherit.exp
gdb/testsuite/gdb.c++/local.cc
gdb/testsuite/gdb.c++/local.exp
gdb/testsuite/gdb.c++/member-ptr.cc
gdb/testsuite/gdb.c++/member-ptr.exp
gdb/testsuite/gdb.c++/method.cc
gdb/testsuite/gdb.c++/method.exp
gdb/testsuite/gdb.c++/misc.cc
gdb/testsuite/gdb.c++/misc.exp
gdb/testsuite/gdb.c++/namespace.cc
gdb/testsuite/gdb.c++/namespace.exp
gdb/testsuite/gdb.c++/overload.cc
gdb/testsuite/gdb.c++/overload.exp
gdb/testsuite/gdb.c++/ovldbreak.cc
gdb/testsuite/gdb.c++/ovldbreak.exp
gdb/testsuite/gdb.c++/ref-types.cc
gdb/testsuite/gdb.c++/ref-types.exp
gdb/testsuite/gdb.c++/templates.cc
gdb/testsuite/gdb.c++/templates.exp
gdb/testsuite/gdb.c++/userdef.cc
gdb/testsuite/gdb.c++/userdef.exp
gdb/testsuite/gdb.c++/virtfunc.cc
gdb/testsuite/gdb.c++/virtfunc.exp
gdb/testsuite/gdb.chill/ChangeLog
gdb/testsuite/gdb.chill/Makefile.in
gdb/testsuite/gdb.chill/builtins.ch
gdb/testsuite/gdb.chill/builtins.exp
gdb/testsuite/gdb.chill/callch.ch
gdb/testsuite/gdb.chill/callch.exp
gdb/testsuite/gdb.chill/chexp.exp
gdb/testsuite/gdb.chill/chillvars.ch
gdb/testsuite/gdb.chill/chillvars.exp
gdb/testsuite/gdb.chill/configure
gdb/testsuite/gdb.chill/configure.in
gdb/testsuite/gdb.chill/enum.ch
gdb/testsuite/gdb.chill/enum.exp
gdb/testsuite/gdb.chill/func1.ch
gdb/testsuite/gdb.chill/gch1041.ch
gdb/testsuite/gdb.chill/gch1041.exp
gdb/testsuite/gdb.chill/gch1272.ch
gdb/testsuite/gdb.chill/gch1272.exp
gdb/testsuite/gdb.chill/gch1280.ch
gdb/testsuite/gdb.chill/gch1280.exp
gdb/testsuite/gdb.chill/gch922.ch
gdb/testsuite/gdb.chill/gch922.exp
gdb/testsuite/gdb.chill/gch981.ch
gdb/testsuite/gdb.chill/gch981.exp
gdb/testsuite/gdb.chill/misc.ch
gdb/testsuite/gdb.chill/misc.exp
gdb/testsuite/gdb.chill/powerset.ch
gdb/testsuite/gdb.chill/powerset.exp
gdb/testsuite/gdb.chill/pr-4975-grt.ch
gdb/testsuite/gdb.chill/pr-4975.ch
gdb/testsuite/gdb.chill/pr-4975.exp
gdb/testsuite/gdb.chill/pr-5016.ch
gdb/testsuite/gdb.chill/pr-5016.exp
gdb/testsuite/gdb.chill/pr-5020.ch
gdb/testsuite/gdb.chill/pr-5020.exp
gdb/testsuite/gdb.chill/pr-5022.ch
gdb/testsuite/gdb.chill/pr-5022.exp
gdb/testsuite/gdb.chill/pr-5646-grt.ch
gdb/testsuite/gdb.chill/pr-5646.ch
gdb/testsuite/gdb.chill/pr-5646.exp
gdb/testsuite/gdb.chill/pr-5984.ch
gdb/testsuite/gdb.chill/pr-5984.exp
gdb/testsuite/gdb.chill/pr-6292.ch
gdb/testsuite/gdb.chill/pr-6292.exp
gdb/testsuite/gdb.chill/pr-6632-grt.ch
gdb/testsuite/gdb.chill/pr-6632.ch
gdb/testsuite/gdb.chill/pr-6632.exp
gdb/testsuite/gdb.chill/pr-8134.exp
gdb/testsuite/gdb.chill/pr-8136.ch
gdb/testsuite/gdb.chill/pr-8136.exp
gdb/testsuite/gdb.chill/pr-8405.ch
gdb/testsuite/gdb.chill/pr-8405.exp
gdb/testsuite/gdb.chill/pr-8742.ch
gdb/testsuite/gdb.chill/pr-8742.exp
gdb/testsuite/gdb.chill/pr-8894-grt.ch
gdb/testsuite/gdb.chill/pr-8894.ch
gdb/testsuite/gdb.chill/pr-8894.exp
gdb/testsuite/gdb.chill/pr-9095.ch
gdb/testsuite/gdb.chill/pr-9095.exp
gdb/testsuite/gdb.chill/pr-9946.ch
gdb/testsuite/gdb.chill/pr-9946.exp
gdb/testsuite/gdb.chill/result.ch
gdb/testsuite/gdb.chill/result.exp
gdb/testsuite/gdb.chill/string.ch
gdb/testsuite/gdb.chill/string.exp
gdb/testsuite/gdb.chill/tests1.ch
gdb/testsuite/gdb.chill/tests1.exp
gdb/testsuite/gdb.chill/tests2.ch
gdb/testsuite/gdb.chill/tests2.exp
gdb/testsuite/gdb.chill/tuples.ch
gdb/testsuite/gdb.chill/tuples.exp
gdb/testsuite/gdb.chill/xstruct-grt.ch
gdb/testsuite/gdb.chill/xstruct.ch
gdb/testsuite/gdb.chill/xstruct.exp
gdb/testsuite/gdb.disasm/Makefile.in
gdb/testsuite/gdb.disasm/am33.exp
gdb/testsuite/gdb.disasm/am33.s
gdb/testsuite/gdb.disasm/configure
gdb/testsuite/gdb.disasm/configure.in
gdb/testsuite/gdb.disasm/h8300s.exp
gdb/testsuite/gdb.disasm/h8300s.s
gdb/testsuite/gdb.disasm/hppa.exp
gdb/testsuite/gdb.disasm/hppa.s
gdb/testsuite/gdb.disasm/mn10200.exp
gdb/testsuite/gdb.disasm/mn10200.s
gdb/testsuite/gdb.disasm/mn10300.exp
gdb/testsuite/gdb.disasm/mn10300.s
gdb/testsuite/gdb.disasm/sh3.exp
gdb/testsuite/gdb.disasm/sh3.s
gdb/testsuite/gdb.fortran/exprs.exp
gdb/testsuite/gdb.fortran/types.exp
gdb/testsuite/gdb.gdb/xfullpath.exp
gdb/testsuite/gdb.hp/Makefile.in
gdb/testsuite/gdb.hp/configure
gdb/testsuite/gdb.hp/configure.in
gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in
gdb/testsuite/gdb.hp/gdb.aCC/configure
gdb/testsuite/gdb.hp/gdb.aCC/configure.in
gdb/testsuite/gdb.hp/gdb.aCC/exception.cc
gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
gdb/testsuite/gdb.hp/gdb.aCC/optimize.c
gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp
gdb/testsuite/gdb.hp/gdb.aCC/run.c
gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp
gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in
gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.c
gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp
gdb/testsuite/gdb.hp/gdb.base-hp/configure
gdb/testsuite/gdb.hp/gdb.base-hp/configure.in
gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c
gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp
gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c
gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c
gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp
gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c
gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp
gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp
gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s
gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
gdb/testsuite/gdb.hp/gdb.base-hp/reg.s
gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c
gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp
gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh
gdb/testsuite/gdb.hp/gdb.compat/Makefile.in
gdb/testsuite/gdb.hp/gdb.compat/average.c
gdb/testsuite/gdb.hp/gdb.compat/configure
gdb/testsuite/gdb.hp/gdb.compat/configure.in
gdb/testsuite/gdb.hp/gdb.compat/sum.c
gdb/testsuite/gdb.hp/gdb.compat/xdb.c
gdb/testsuite/gdb.hp/gdb.compat/xdb0.c
gdb/testsuite/gdb.hp/gdb.compat/xdb0.h
gdb/testsuite/gdb.hp/gdb.compat/xdb1.c
gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp
gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp
gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp
gdb/testsuite/gdb.hp/gdb.defects/Makefile.in
gdb/testsuite/gdb.hp/gdb.defects/bs14602.c
gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp
gdb/testsuite/gdb.hp/gdb.defects/bs15503.cc
gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
gdb/testsuite/gdb.hp/gdb.defects/configure
gdb/testsuite/gdb.hp/gdb.defects/configure.in
gdb/testsuite/gdb.hp/gdb.defects/solib-d.c
gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c
gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c
gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in
gdb/testsuite/gdb.hp/gdb.objdbg/configure
gdb/testsuite/gdb.hp/gdb.objdbg/configure.in
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr
gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64
gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc
gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in
gdb/testsuite/gdb.hp/gdb.threads-hp/configure
gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in
gdb/testsuite/gdb.hp/tools/odump
gdb/testsuite/gdb.java/Makefile.in
gdb/testsuite/gdb.java/configure
gdb/testsuite/gdb.java/configure.in
gdb/testsuite/gdb.java/jmisc.exp
gdb/testsuite/gdb.java/jmisc.java
gdb/testsuite/gdb.java/jmisc1.exp
gdb/testsuite/gdb.java/jmisc2.exp
gdb/testsuite/gdb.java/jv-exp.exp
gdb/testsuite/gdb.java/jv-print.exp
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/Makefile.in
gdb/testsuite/gdb.mi/basics.c
gdb/testsuite/gdb.mi/configure
gdb/testsuite/gdb.mi/configure.in
gdb/testsuite/gdb.mi/mi-basics.exp
gdb/testsuite/gdb.mi/mi-break.exp
gdb/testsuite/gdb.mi/mi-console.c
gdb/testsuite/gdb.mi/mi-console.exp
gdb/testsuite/gdb.mi/mi-disassemble.exp
gdb/testsuite/gdb.mi/mi-eval.exp
gdb/testsuite/gdb.mi/mi-hack-cli.exp
gdb/testsuite/gdb.mi/mi-read-memory.c
gdb/testsuite/gdb.mi/mi-read-memory.exp
gdb/testsuite/gdb.mi/mi-regs.exp
gdb/testsuite/gdb.mi/mi-return.exp
gdb/testsuite/gdb.mi/mi-simplerun.exp
gdb/testsuite/gdb.mi/mi-stack.exp
gdb/testsuite/gdb.mi/mi-stepi.exp
gdb/testsuite/gdb.mi/mi-until.exp
gdb/testsuite/gdb.mi/mi-var-block.exp
gdb/testsuite/gdb.mi/mi-var-child.exp
gdb/testsuite/gdb.mi/mi-var-cmd.exp
gdb/testsuite/gdb.mi/mi-var-display.exp
gdb/testsuite/gdb.mi/mi-watch.exp
gdb/testsuite/gdb.mi/mi0-basics.exp
gdb/testsuite/gdb.mi/mi0-break.exp
gdb/testsuite/gdb.mi/mi0-console.exp
gdb/testsuite/gdb.mi/mi0-disassemble.exp
gdb/testsuite/gdb.mi/mi0-eval.exp
gdb/testsuite/gdb.mi/mi0-hack-cli.exp
gdb/testsuite/gdb.mi/mi0-read-memory.exp
gdb/testsuite/gdb.mi/mi0-regs.exp
gdb/testsuite/gdb.mi/mi0-return.exp
gdb/testsuite/gdb.mi/mi0-simplerun.exp
gdb/testsuite/gdb.mi/mi0-stack.exp
gdb/testsuite/gdb.mi/mi0-stepi.exp
gdb/testsuite/gdb.mi/mi0-until.exp
gdb/testsuite/gdb.mi/mi0-var-block.exp
gdb/testsuite/gdb.mi/mi0-var-child.exp
gdb/testsuite/gdb.mi/mi0-var-cmd.exp
gdb/testsuite/gdb.mi/mi0-var-display.exp
gdb/testsuite/gdb.mi/mi0-watch.exp
gdb/testsuite/gdb.mi/testcmds
gdb/testsuite/gdb.mi/until.c
gdb/testsuite/gdb.mi/var-cmd.c
gdb/testsuite/gdb.stabs/Makefile.in
gdb/testsuite/gdb.stabs/aout.sed
gdb/testsuite/gdb.stabs/configure
gdb/testsuite/gdb.stabs/configure.in
gdb/testsuite/gdb.stabs/ecoff.sed
gdb/testsuite/gdb.stabs/hppa.sed
gdb/testsuite/gdb.stabs/weird.def
gdb/testsuite/gdb.stabs/weird.exp
gdb/testsuite/gdb.stabs/xcoff.sed
gdb/testsuite/gdb.threads/Makefile.in
gdb/testsuite/gdb.threads/config.in
gdb/testsuite/gdb.threads/configure
gdb/testsuite/gdb.threads/configure.in
gdb/testsuite/gdb.threads/gcore-thread.exp
gdb/testsuite/gdb.threads/linux-dp.c
gdb/testsuite/gdb.threads/linux-dp.exp
gdb/testsuite/gdb.threads/pthreads.c
gdb/testsuite/gdb.threads/pthreads.exp
gdb/testsuite/gdb.threads/step.c
gdb/testsuite/gdb.threads/step.exp
gdb/testsuite/gdb.threads/step2.exp
gdb/testsuite/gdb.trace/Makefile.in
gdb/testsuite/gdb.trace/actions.c
gdb/testsuite/gdb.trace/actions.exp
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/circ.c
gdb/testsuite/gdb.trace/circ.exp
gdb/testsuite/gdb.trace/collection.c
gdb/testsuite/gdb.trace/collection.exp
gdb/testsuite/gdb.trace/configure
gdb/testsuite/gdb.trace/configure.in
gdb/testsuite/gdb.trace/deltrace.exp
gdb/testsuite/gdb.trace/gdb_c_test.c
gdb/testsuite/gdb.trace/infotrace.exp
gdb/testsuite/gdb.trace/limits.c
gdb/testsuite/gdb.trace/limits.exp
gdb/testsuite/gdb.trace/packetlen.exp
gdb/testsuite/gdb.trace/passc-dyn.exp
gdb/testsuite/gdb.trace/passcount.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/save-trace.exp
gdb/testsuite/gdb.trace/tfind.exp
gdb/testsuite/gdb.trace/tracecmd.exp
gdb/testsuite/gdb.trace/while-dyn.exp
gdb/testsuite/gdb.trace/while-stepping.exp
gdb/testsuite/lib/compiler.c
gdb/testsuite/lib/compiler.cc
gdb/testsuite/lib/emc-support.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/insight-support.exp
gdb/testsuite/lib/java.exp
gdb/testsuite/lib/mi-support.exp
gdb/testsuite/lib/trace-support.exp
gdb/thread-db.c
gdb/thread.c
gdb/top.h
gdb/tracepoint.c
gdb/tracepoint.h
gdb/tui/ChangeLog
gdb/tui/tui-file.c
gdb/tui/tui-file.h
gdb/tui/tui-hooks.c
gdb/tui/tui-out.c
gdb/tui/tui.c
gdb/tui/tui.h
gdb/tui/tuiCommand.c
gdb/tui/tuiCommand.h
gdb/tui/tuiData.c
gdb/tui/tuiData.h
gdb/tui/tuiDataWin.c
gdb/tui/tuiDataWin.h
gdb/tui/tuiDisassem.c
gdb/tui/tuiDisassem.h
gdb/tui/tuiGeneralWin.c
gdb/tui/tuiGeneralWin.h
gdb/tui/tuiIO.c
gdb/tui/tuiIO.h
gdb/tui/tuiLayout.c
gdb/tui/tuiLayout.h
gdb/tui/tuiRegs.c
gdb/tui/tuiRegs.h
gdb/tui/tuiSource.c
gdb/tui/tuiSource.h
gdb/tui/tuiSourceWin.c
gdb/tui/tuiSourceWin.h
gdb/tui/tuiStack.c
gdb/tui/tuiStack.h
gdb/tui/tuiWin.c
gdb/tui/tuiWin.h
gdb/typeprint.c
gdb/typeprint.h
gdb/ui-file.c
gdb/ui-file.h
gdb/ui-out.c
gdb/ui-out.h
gdb/utils.c
gdb/uw-thread.c
gdb/v850-tdep.c
gdb/v850ice.c
gdb/valarith.c
gdb/valops.c
gdb/valprint.c
gdb/valprint.h
gdb/value.h
gdb/values.c
gdb/varobj.c
gdb/varobj.h
gdb/vax-tdep.c
gdb/vax-tdep.h
gdb/version.h
gdb/version.in
gdb/vx-share/README
gdb/vx-share/dbgRpcLib.h
gdb/vx-share/ptrace.h
gdb/vx-share/regPacket.h
gdb/vx-share/vxTypes.h
gdb/vx-share/vxWorks.h
gdb/vx-share/wait.h
gdb/vx-share/xdr_ld.c
gdb/vx-share/xdr_ld.h
gdb/vx-share/xdr_ptrace.c
gdb/vx-share/xdr_ptrace.h
gdb/vx-share/xdr_rdb.c
gdb/vx-share/xdr_rdb.h
gdb/w89k-rom.c
gdb/win32-nat.c
gdb/wince-stub.c
gdb/wince-stub.h
gdb/wince.c
gdb/x86-64-linux-nat.c
gdb/x86-64-linux-tdep.c
gdb/x86-64-tdep.c
gdb/x86-64-tdep.h
gdb/xcoffread.c
gdb/xcoffsolib.c
gdb/xcoffsolib.h
gdb/xmodem.c
gdb/xmodem.h
gdb/xstormy16-tdep.c
gdb/z8k-tdep.c
gettext.m4
include/COPYING
include/ChangeLog
include/MAINTAINERS
include/alloca-conf.h
include/ansidecl.h
include/aout/ChangeLog
include/aout/adobe.h
include/aout/aout64.h
include/aout/ar.h
include/aout/dynix3.h
include/aout/encap.h
include/aout/host.h
include/aout/hp.h
include/aout/hp300hpux.h
include/aout/hppa.h
include/aout/ranlib.h
include/aout/reloc.h
include/aout/stab.def
include/aout/stab_gnu.h
include/aout/sun4.h
include/bfdlink.h
include/bin-bugs.h
include/bout.h
include/callback.h
include/coff/ChangeLog
include/coff/a29k.h
include/coff/alpha.h
include/coff/apollo.h
include/coff/arm.h
include/coff/aux-coff.h
include/coff/ecoff.h
include/coff/external.h
include/coff/go32exe.h
include/coff/h8300.h
include/coff/h8500.h
include/coff/i386.h
include/coff/i860.h
include/coff/i960.h
include/coff/ia64.h
include/coff/internal.h
include/coff/m68k.h
include/coff/m88k.h
include/coff/mcore.h
include/coff/mips.h
include/coff/mipspe.h
include/coff/or32.h
include/coff/pe.h
include/coff/powerpc.h
include/coff/rs6000.h
include/coff/rs6k64.h
include/coff/sh.h
include/coff/sparc.h
include/coff/sym.h
include/coff/symconst.h
include/coff/ti.h
include/coff/tic30.h
include/coff/tic54x.h
include/coff/tic80.h
include/coff/w65.h
include/coff/we32k.h
include/coff/xcoff.h
include/coff/z8k.h
include/demangle.h
include/dis-asm.h
include/dyn-string.h
include/elf/ChangeLog
include/elf/alpha.h
include/elf/arc.h
include/elf/arm.h
include/elf/avr.h
include/elf/common.h
include/elf/cris.h
include/elf/d10v.h
include/elf/d30v.h
include/elf/dwarf.h
include/elf/dwarf2.h
include/elf/external.h
include/elf/fr30.h
include/elf/h8.h
include/elf/hppa.h
include/elf/i370.h
include/elf/i386.h
include/elf/i860.h
include/elf/i960.h
include/elf/ia64.h
include/elf/internal.h
include/elf/m32r.h
include/elf/m68hc11.h
include/elf/m68k.h
include/elf/mcore.h
include/elf/mips.h
include/elf/mmix.h
include/elf/mn10200.h
include/elf/mn10300.h
include/elf/openrisc.h
include/elf/or32.h
include/elf/pj.h
include/elf/ppc.h
include/elf/reloc-macros.h
include/elf/s390.h
include/elf/sh.h
include/elf/sparc.h
include/elf/v850.h
include/elf/x86-64.h
include/elf/xstormy16.h
include/fibheap.h
include/filenames.h
include/floatformat.h
include/fnmatch.h
include/fopen-bin.h
include/fopen-same.h
include/fopen-vms.h
include/gdb/ChangeLog
include/gdb/signals.h
include/gdb/sim-sh.h
include/gdbm.h
include/getopt.h
include/hashtab.h
include/hp-symtab.h
include/ieee.h
include/libiberty.h
include/md5.h
include/mpw/ChangeLog
include/mpw/README
include/mpw/dir.h
include/mpw/dirent.h
include/mpw/fcntl.h
include/mpw/grp.h
include/mpw/mpw.h
include/mpw/pwd.h
include/mpw/spin.h
include/mpw/stat.h
include/mpw/sys/file.h
include/mpw/sys/param.h
include/mpw/sys/resource.h
include/mpw/sys/stat.h
include/mpw/sys/time.h
include/mpw/sys/types.h
include/mpw/utime.h
include/mpw/varargs.h
include/nlm/ChangeLog
include/nlm/alpha-ext.h
include/nlm/common.h
include/nlm/external.h
include/nlm/i386-ext.h
include/nlm/internal.h
include/nlm/ppc-ext.h
include/nlm/sparc32-ext.h
include/oasys.h
include/objalloc.h
include/obstack.h
include/opcode/ChangeLog
include/opcode/a29k.h
include/opcode/alpha.h
include/opcode/arc.h
include/opcode/arm.h
include/opcode/avr.h
include/opcode/cgen.h
include/opcode/convex.h
include/opcode/cris.h
include/opcode/d10v.h
include/opcode/d30v.h
include/opcode/h8300.h
include/opcode/hppa.h
include/opcode/i370.h
include/opcode/i386.h
include/opcode/i860.h
include/opcode/i960.h
include/opcode/ia64.h
include/opcode/m68hc11.h
include/opcode/m68k.h
include/opcode/m88k.h
include/opcode/mips.h
include/opcode/mmix.h
include/opcode/mn10200.h
include/opcode/mn10300.h
include/opcode/np1.h
include/opcode/ns32k.h
include/opcode/or32.h
include/opcode/pdp11.h
include/opcode/pj.h
include/opcode/pn.h
include/opcode/ppc.h
include/opcode/pyr.h
include/opcode/s390.h
include/opcode/sparc.h
include/opcode/tahoe.h
include/opcode/tic30.h
include/opcode/tic54x.h
include/opcode/tic80.h
include/opcode/v850.h
include/opcode/vax.h
include/os9k.h
include/partition.h
include/progress.h
include/regs/ChangeLog
include/remote-sim.h
include/safe-ctype.h
include/sim-d10v.h
include/sort.h
include/splay-tree.h
include/symcat.h
include/ternary.h
include/xregex.h
include/xregex2.h
install-sh
intl/ChangeLog
intl/Makefile.in
intl/acconfig.h
intl/aclocal.m4
intl/bindtextdom.c
intl/cat-compat.c
intl/config.in
intl/configure
intl/configure.in
intl/dcgettext.c
intl/dgettext.c
intl/explodename.c
intl/finddomain.c
intl/gettext.c
intl/gettext.h
intl/gettextP.h
intl/hash-string.h
intl/intl-compat.c
intl/intlh.inst.in
intl/l10nflist.c
intl/libgettext.h
intl/libintl.glibc
intl/linux-msg.sed
intl/loadinfo.h
intl/loadmsgcat.c
intl/localealias.c
intl/po2tbl.sed.in
intl/textdomain.c
intl/xopen-msg.sed
libiberty/COPYING.LIB
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/README
libiberty/_doprnt.c
libiberty/aclocal.m4
libiberty/alloca.c
libiberty/argv.c
libiberty/asprintf.c
libiberty/atexit.c
libiberty/basename.c
libiberty/bcmp.c
libiberty/bcopy.c
libiberty/bsearch.c
libiberty/bzero.c
libiberty/calloc.c
libiberty/choose-temp.c
libiberty/clock.c
libiberty/concat.c
libiberty/config.h-vms
libiberty/config.in
libiberty/config.table
libiberty/config/mh-aix
libiberty/config/mh-cxux7
libiberty/config/mh-fbsd21
libiberty/config/mh-openedition
libiberty/config/mh-windows
libiberty/configure
libiberty/configure.in
libiberty/copying-lib.texi
libiberty/copysign.c
libiberty/cp-demangle.c
libiberty/cplus-dem.c
libiberty/dyn-string.c
libiberty/fdmatch.c
libiberty/ffs.c
libiberty/fibheap.c
libiberty/floatformat.c
libiberty/fnmatch.c
libiberty/fnmatch.txh
libiberty/functions.texi
libiberty/gather-docs
libiberty/getcwd.c
libiberty/getopt.c
libiberty/getopt1.c
libiberty/getpagesize.c
libiberty/getpwd.c
libiberty/getruntime.c
libiberty/hashtab.c
libiberty/hex.c
libiberty/index.c
libiberty/insque.c
libiberty/lbasename.c
libiberty/libiberty.texi
libiberty/maint-tool
libiberty/make-temp-file.c
libiberty/makefile.vms
libiberty/md5.c
libiberty/memchr.c
libiberty/memcmp.c
libiberty/memcpy.c
libiberty/memmove.c
libiberty/memset.c
libiberty/mkstemps.c
libiberty/mpw-config.in
libiberty/mpw-make.sed
libiberty/mpw.c
libiberty/msdos.c
libiberty/objalloc.c
libiberty/obstack.c
libiberty/obstacks.texi
libiberty/partition.c
libiberty/pexecute.c
libiberty/putenv.c
libiberty/random.c
libiberty/regex.c
libiberty/rename.c
libiberty/rindex.c
libiberty/safe-ctype.c
libiberty/setenv.c
libiberty/sigsetmask.c
libiberty/sort.c
libiberty/spaces.c
libiberty/splay-tree.c
libiberty/strcasecmp.c
libiberty/strchr.c
libiberty/strdup.c
libiberty/strerror.c
libiberty/strncasecmp.c
libiberty/strncmp.c
libiberty/strrchr.c
libiberty/strsignal.c
libiberty/strstr.c
libiberty/strtod.c
libiberty/strtol.c
libiberty/strtoul.c
libiberty/ternary.c
libiberty/testsuite/Makefile.in
libiberty/testsuite/demangle-expected
libiberty/testsuite/regress-demangle
libiberty/tmpnam.c
libiberty/vasprintf.c
libiberty/vfork.c
libiberty/vfprintf.c
libiberty/vmsbuild.com
libiberty/vprintf.c
libiberty/vsprintf.c
libiberty/waitpid.c
libiberty/xatexit.c
libiberty/xexit.c
libiberty/xmalloc.c
libiberty/xmemdup.c
libiberty/xstrdup.c
libiberty/xstrerror.c
libtool.m4
ltcf-c.sh
ltcf-cxx.sh
ltcf-gcj.sh
ltconfig
ltmain.sh
makefile.vms
missing
mkdep
mkinstalldirs
mmalloc/COPYING.LIB
mmalloc/ChangeLog
mmalloc/MAINTAINERS
mmalloc/Makefile.in
mmalloc/TODO
mmalloc/acinclude.m4
mmalloc/aclocal.m4
mmalloc/attach.c
mmalloc/configure
mmalloc/configure.in
mmalloc/detach.c
mmalloc/keys.c
mmalloc/mcalloc.c
mmalloc/mfree.c
mmalloc/mm.c
mmalloc/mmalloc.c
mmalloc/mmalloc.h
mmalloc/mmalloc.texi
mmalloc/mmap-sup.c
mmalloc/mmcheck.c
mmalloc/mmemalign.c
mmalloc/mmprivate.h
mmalloc/mmstats.c
mmalloc/mmtrace.awk
mmalloc/mmtrace.c
mmalloc/mrealloc.c
mmalloc/mvalloc.c
mmalloc/sbrk-sup.c
move-if-change
mpw-README
mpw-build.in
mpw-config.in
mpw-configure
mpw-install
opcodes/ChangeLog
opcodes/ChangeLog-9297
opcodes/ChangeLog-9899
opcodes/MAINTAINERS
opcodes/Makefile.am
opcodes/Makefile.in
opcodes/a29k-dis.c
opcodes/acinclude.m4
opcodes/aclocal.m4
opcodes/alpha-dis.c
opcodes/alpha-opc.c
opcodes/arc-dis.c
opcodes/arc-dis.h
opcodes/arc-ext.c
opcodes/arc-ext.h
opcodes/arc-opc.c
opcodes/arm-dis.c
opcodes/arm-opc.h
opcodes/avr-dis.c
opcodes/cgen-asm.c
opcodes/cgen-asm.in
opcodes/cgen-dis.c
opcodes/cgen-dis.in
opcodes/cgen-ibld.in
opcodes/cgen-opc.c
opcodes/cgen.sh
opcodes/config.in
opcodes/configure
opcodes/configure.in
opcodes/cris-dis.c
opcodes/cris-opc.c
opcodes/d10v-dis.c
opcodes/d10v-opc.c
opcodes/d30v-dis.c
opcodes/d30v-opc.c
opcodes/dep-in.sed
opcodes/dis-buf.c
opcodes/disassemble.c
opcodes/fr30-asm.c
opcodes/fr30-desc.c
opcodes/fr30-desc.h
opcodes/fr30-dis.c
opcodes/fr30-ibld.c
opcodes/fr30-opc.c
opcodes/fr30-opc.h
opcodes/h8300-dis.c
opcodes/h8500-dis.c
opcodes/h8500-opc.h
opcodes/hppa-dis.c
opcodes/i370-dis.c
opcodes/i370-opc.c
opcodes/i386-dis.c
opcodes/i860-dis.c
opcodes/i960-dis.c
opcodes/ia64-asmtab.c
opcodes/ia64-asmtab.h
opcodes/ia64-dis.c
opcodes/ia64-gen.c
opcodes/ia64-ic.tbl
opcodes/ia64-opc-a.c
opcodes/ia64-opc-b.c
opcodes/ia64-opc-d.c
opcodes/ia64-opc-f.c
opcodes/ia64-opc-i.c
opcodes/ia64-opc-m.c
opcodes/ia64-opc-x.c
opcodes/ia64-opc.c
opcodes/ia64-opc.h
opcodes/ia64-raw.tbl
opcodes/ia64-war.tbl
opcodes/ia64-waw.tbl
opcodes/m10200-dis.c
opcodes/m10200-opc.c
opcodes/m10300-dis.c
opcodes/m10300-opc.c
opcodes/m32r-asm.c
opcodes/m32r-desc.c
opcodes/m32r-desc.h
opcodes/m32r-dis.c
opcodes/m32r-ibld.c
opcodes/m32r-opc.c
opcodes/m32r-opc.h
opcodes/m32r-opinst.c
opcodes/m68hc11-dis.c
opcodes/m68hc11-opc.c
opcodes/m68k-dis.c
opcodes/m68k-opc.c
opcodes/m88k-dis.c
opcodes/makefile.vms
opcodes/mcore-dis.c
opcodes/mcore-opc.h
opcodes/mips-dis.c
opcodes/mips-opc.c
opcodes/mips16-opc.c
opcodes/mmix-dis.c
opcodes/mmix-opc.c
opcodes/mpw-config.in
opcodes/mpw-make.sed
opcodes/ns32k-dis.c
opcodes/openrisc-asm.c
opcodes/openrisc-desc.c
opcodes/openrisc-desc.h
opcodes/openrisc-dis.c
opcodes/openrisc-ibld.c
opcodes/openrisc-opc.c
opcodes/openrisc-opc.h
opcodes/opintl.h
opcodes/or32-dis.c
opcodes/or32-opc.c
opcodes/pdp11-dis.c
opcodes/pdp11-opc.c
opcodes/pj-dis.c
opcodes/pj-opc.c
opcodes/po/.cvsignore
opcodes/po/Make-in
opcodes/po/POTFILES.in
opcodes/po/da.po
opcodes/po/de.po
opcodes/po/es.po
opcodes/po/fr.po
opcodes/po/id.po
opcodes/po/opcodes.pot
opcodes/po/sv.po
opcodes/po/tr.po
opcodes/ppc-dis.c
opcodes/ppc-opc.c
opcodes/s390-dis.c
opcodes/s390-mkopc.c
opcodes/s390-opc.c
opcodes/s390-opc.txt
opcodes/sh-dis.c
opcodes/sh-opc.h
opcodes/sh64-dis.c
opcodes/sh64-opc.c
opcodes/sh64-opc.h
opcodes/sparc-dis.c
opcodes/sparc-opc.c
opcodes/stamp-h.in
opcodes/sysdep.h
opcodes/tic30-dis.c
opcodes/tic54x-dis.c
opcodes/tic54x-opc.c
opcodes/tic80-dis.c
opcodes/tic80-opc.c
opcodes/v850-dis.c
opcodes/v850-opc.c
opcodes/vax-dis.c
opcodes/w65-dis.c
opcodes/w65-opc.h
opcodes/xstormy16-asm.c
opcodes/xstormy16-desc.c
opcodes/xstormy16-desc.h
opcodes/xstormy16-dis.c
opcodes/xstormy16-ibld.c
opcodes/xstormy16-opc.c
opcodes/xstormy16-opc.h
opcodes/z8k-dis.c
opcodes/z8k-opc.h
opcodes/z8kgen.c
readline/CHANGELOG
readline/CHANGES
readline/COPYING
readline/ChangeLog.gdb
readline/INSTALL
readline/MANIFEST
readline/Makefile.in
readline/README
readline/USAGE
readline/acconfig.h
readline/aclocal.m4
readline/ansi_stdlib.h
readline/bind.c
readline/callback.c
readline/chardefs.h
readline/complete.c
readline/config.h.bot
readline/config.h.in
readline/configure
readline/configure.in
readline/cross-build/cygwin.cache
readline/display.c
readline/doc/ChangeLog.gdb
readline/doc/Makefile.in
readline/doc/hist.texinfo
readline/doc/hstech.texinfo
readline/doc/hsuser.texinfo
readline/doc/inc-hist.texinfo
readline/doc/manvers.texinfo
readline/doc/readline.3
readline/doc/rlman.texinfo
readline/doc/rltech.texinfo
readline/doc/rluser.texinfo
readline/doc/rluserman.texinfo
readline/doc/texi2dvi
readline/doc/texi2html
readline/emacs_keymap.c
readline/examples/ChangeLog.gdb
readline/examples/Inputrc
readline/examples/Makefile.in
readline/examples/excallback.c
readline/examples/fileman.c
readline/examples/histexamp.c
readline/examples/manexamp.c
readline/examples/rl.c
readline/examples/rlfe.c
readline/examples/rltest.c
readline/examples/rlversion.c
readline/funmap.c
readline/histexpand.c
readline/histfile.c
readline/histlib.h
readline/history.c
readline/history.h
readline/histsearch.c
readline/input.c
readline/isearch.c
readline/keymaps.c
readline/keymaps.h
readline/kill.c
readline/macro.c
readline/nls.c
readline/parens.c
readline/posixdir.h
readline/posixjmp.h
readline/posixstat.h
readline/readline.c
readline/readline.h
readline/rlconf.h
readline/rldefs.h
readline/rlprivate.h
readline/rlshell.h
readline/rlstdc.h
readline/rltty.c
readline/rltty.h
readline/rlwinsize.h
readline/savestring.c
readline/search.c
readline/shell.c
readline/shlib/Makefile.in
readline/signals.c
readline/support/config.guess
readline/support/config.sub
readline/support/install.sh
readline/support/mkdirs
readline/support/mkdist
readline/support/shlib-install
readline/support/shobj-conf
readline/tcap.h
readline/terminal.c
readline/tilde.c
readline/tilde.h
readline/undo.c
readline/util.c
readline/vi_keymap.c
readline/vi_mode.c
readline/xmalloc.c
readline/xmalloc.h
setup.com
sim/ChangeLog
sim/MAINTAINERS
sim/Makefile.in
sim/README-HACKING
sim/arm/COPYING
sim/arm/ChangeLog
sim/arm/Makefile.in
sim/arm/README.Cygnus
sim/arm/acconfig.h
sim/arm/armcopro.c
sim/arm/armdefs.h
sim/arm/armemu.c
sim/arm/armemu.h
sim/arm/armfpe.h
sim/arm/arminit.c
sim/arm/armopts.h
sim/arm/armos.c
sim/arm/armos.h
sim/arm/armrdi.c
sim/arm/armsupp.c
sim/arm/armvirt.c
sim/arm/bag.c
sim/arm/bag.h
sim/arm/communicate.c
sim/arm/communicate.h
sim/arm/config.in
sim/arm/configure
sim/arm/configure.in
sim/arm/dbg_conf.h
sim/arm/dbg_cp.h
sim/arm/dbg_hif.h
sim/arm/dbg_rdi.h
sim/arm/gdbhost.c
sim/arm/gdbhost.h
sim/arm/kid.c
sim/arm/main.c
sim/arm/parent.c
sim/arm/tconfig.in
sim/arm/thumbemu.c
sim/arm/wrapper.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/Makefile.in
sim/common/acconfig.h
sim/common/aclocal.m4
sim/common/callback.c
sim/common/cgen-accfp.c
sim/common/cgen-cpu.h
sim/common/cgen-defs.h
sim/common/cgen-engine.h
sim/common/cgen-fpu.c
sim/common/cgen-fpu.h
sim/common/cgen-mem.h
sim/common/cgen-ops.h
sim/common/cgen-par.c
sim/common/cgen-par.h
sim/common/cgen-run.c
sim/common/cgen-scache.c
sim/common/cgen-scache.h
sim/common/cgen-sim.h
sim/common/cgen-trace.c
sim/common/cgen-trace.h
sim/common/cgen-types.h
sim/common/cgen-utils.c
sim/common/cgen.sh
sim/common/config.in
sim/common/configure
sim/common/configure.in
sim/common/dv-core.c
sim/common/dv-glue.c
sim/common/dv-pal.c
sim/common/dv-sockser.c
sim/common/dv-sockser.h
sim/common/gdbinit.in
sim/common/genmloop.sh
sim/common/gennltvals.sh
sim/common/gentmap.c
sim/common/gentvals.sh
sim/common/hw-alloc.c
sim/common/hw-alloc.h
sim/common/hw-base.c
sim/common/hw-base.h
sim/common/hw-device.c
sim/common/hw-device.h
sim/common/hw-events.c
sim/common/hw-events.h
sim/common/hw-handles.c
sim/common/hw-handles.h
sim/common/hw-instances.c
sim/common/hw-instances.h
sim/common/hw-main.h
sim/common/hw-ports.c
sim/common/hw-ports.h
sim/common/hw-properties.c
sim/common/hw-properties.h
sim/common/hw-tree.c
sim/common/hw-tree.h
sim/common/nltvals.def
sim/common/nrun.c
sim/common/run.1
sim/common/run.c
sim/common/sim-abort.c
sim/common/sim-alu.h
sim/common/sim-arange.c
sim/common/sim-arange.h
sim/common/sim-assert.h
sim/common/sim-base.h
sim/common/sim-basics.h
sim/common/sim-bits.c
sim/common/sim-bits.h
sim/common/sim-break.c
sim/common/sim-break.h
sim/common/sim-config.c
sim/common/sim-config.h
sim/common/sim-core.c
sim/common/sim-core.h
sim/common/sim-cpu.c
sim/common/sim-cpu.h
sim/common/sim-endian.c
sim/common/sim-endian.h
sim/common/sim-engine.c
sim/common/sim-engine.h
sim/common/sim-events.c
sim/common/sim-events.h
sim/common/sim-fpu.c
sim/common/sim-fpu.h
sim/common/sim-hload.c
sim/common/sim-hrw.c
sim/common/sim-hw.c
sim/common/sim-hw.h
sim/common/sim-info.c
sim/common/sim-inline.c
sim/common/sim-inline.h
sim/common/sim-io.c
sim/common/sim-io.h
sim/common/sim-load.c
sim/common/sim-memopt.c
sim/common/sim-memopt.h
sim/common/sim-model.c
sim/common/sim-model.h
sim/common/sim-module.c
sim/common/sim-module.h
sim/common/sim-n-bits.h
sim/common/sim-n-core.h
sim/common/sim-n-endian.h
sim/common/sim-options.c
sim/common/sim-options.h
sim/common/sim-profile.c
sim/common/sim-profile.h
sim/common/sim-reason.c
sim/common/sim-reg.c
sim/common/sim-resume.c
sim/common/sim-run.c
sim/common/sim-signal.c
sim/common/sim-signal.h
sim/common/sim-stop.c
sim/common/sim-trace.c
sim/common/sim-trace.h
sim/common/sim-types.h
sim/common/sim-utils.c
sim/common/sim-utils.h
sim/common/sim-watch.c
sim/common/sim-watch.h
sim/common/syscall.c
sim/common/tconfig.in
sim/configure
sim/configure.in
sim/d10v/ChangeLog
sim/d10v/Makefile.in
sim/d10v/acconfig.h
sim/d10v/config.in
sim/d10v/configure
sim/d10v/configure.in
sim/d10v/d10v_sim.h
sim/d10v/endian.c
sim/d10v/gencode.c
sim/d10v/interp.c
sim/d10v/simops.c
sim/d30v/ChangeLog
sim/d30v/Makefile.in
sim/d30v/acconfig.h
sim/d30v/alu.h
sim/d30v/config.in
sim/d30v/configure
sim/d30v/configure.in
sim/d30v/cpu.c
sim/d30v/cpu.h
sim/d30v/d30v-insns
sim/d30v/dc-short
sim/d30v/engine.c
sim/d30v/ic-d30v
sim/d30v/sim-calls.c
sim/d30v/sim-main.h
sim/d30v/tconfig.in
sim/erc32/ChangeLog
sim/erc32/Makefile.in
sim/erc32/NEWS
sim/erc32/README.erc32
sim/erc32/README.gdb
sim/erc32/README.sis
sim/erc32/acconfig.h
sim/erc32/config.in
sim/erc32/configure
sim/erc32/configure.in
sim/erc32/end.c
sim/erc32/erc32.c
sim/erc32/exec.c
sim/erc32/float.c
sim/erc32/func.c
sim/erc32/help.c
sim/erc32/interf.c
sim/erc32/sis.c
sim/erc32/sis.h
sim/erc32/startsim
sim/fr30/ChangeLog
sim/fr30/Makefile.in
sim/fr30/README
sim/fr30/TODO
sim/fr30/arch.c
sim/fr30/arch.h
sim/fr30/config.in
sim/fr30/configure
sim/fr30/configure.in
sim/fr30/cpu.c
sim/fr30/cpu.h
sim/fr30/cpuall.h
sim/fr30/decode.c
sim/fr30/decode.h
sim/fr30/devices.c
sim/fr30/fr30-sim.h
sim/fr30/fr30.c
sim/fr30/mloop.in
sim/fr30/model.c
sim/fr30/sem-switch.c
sim/fr30/sem.c
sim/fr30/sim-if.c
sim/fr30/sim-main.h
sim/fr30/tconfig.in
sim/fr30/traps.c
sim/h8300/ChangeLog
sim/h8300/Makefile.in
sim/h8300/acconfig.h
sim/h8300/compile.c
sim/h8300/config.in
sim/h8300/configure
sim/h8300/configure.in
sim/h8300/inst.h
sim/h8300/tconfig.in
sim/h8300/writecode.c
sim/h8500/ChangeLog
sim/h8500/Makefile.in
sim/h8500/acconfig.h
sim/h8500/compile.c
sim/h8500/config.in
sim/h8500/configure
sim/h8500/configure.in
sim/h8500/inst.h
sim/h8500/tconfig.in
sim/i960/ChangeLog
sim/i960/Makefile.in
sim/i960/README
sim/i960/TODO
sim/i960/acconfig.h
sim/i960/arch.c
sim/i960/arch.h
sim/i960/config.in
sim/i960/configure
sim/i960/configure.in
sim/i960/cpu.c
sim/i960/cpu.h
sim/i960/cpuall.h
sim/i960/decode.c
sim/i960/decode.h
sim/i960/devices.c
sim/i960/i960-desc.c
sim/i960/i960-desc.h
sim/i960/i960-opc.h
sim/i960/i960-sim.h
sim/i960/i960.c
sim/i960/mloop.in
sim/i960/model.c
sim/i960/sem-switch.c
sim/i960/sem.c
sim/i960/sim-if.c
sim/i960/sim-main.h
sim/i960/tconfig.in
sim/i960/traps.c
sim/igen/ChangeLog
sim/igen/Makefile.in
sim/igen/acconfig.h
sim/igen/config.in
sim/igen/configure
sim/igen/configure.in
sim/igen/filter.c
sim/igen/filter.h
sim/igen/filter_host.c
sim/igen/filter_host.h
sim/igen/gen-engine.c
sim/igen/gen-engine.h
sim/igen/gen-icache.c
sim/igen/gen-icache.h
sim/igen/gen-idecode.c
sim/igen/gen-idecode.h
sim/igen/gen-itable.c
sim/igen/gen-itable.h
sim/igen/gen-model.c
sim/igen/gen-model.h
sim/igen/gen-semantics.c
sim/igen/gen-semantics.h
sim/igen/gen-support.c
sim/igen/gen-support.h
sim/igen/gen.c
sim/igen/gen.h
sim/igen/igen.c
sim/igen/igen.h
sim/igen/ld-cache.c
sim/igen/ld-cache.h
sim/igen/ld-decode.c
sim/igen/ld-decode.h
sim/igen/ld-insn.c
sim/igen/ld-insn.h
sim/igen/lf.c
sim/igen/lf.h
sim/igen/misc.c
sim/igen/misc.h
sim/igen/table.c
sim/igen/table.h
sim/m32r/ChangeLog
sim/m32r/Makefile.in
sim/m32r/README
sim/m32r/TODO
sim/m32r/acconfig.h
sim/m32r/arch.c
sim/m32r/arch.h
sim/m32r/config.in
sim/m32r/configure
sim/m32r/configure.in
sim/m32r/cpu.c
sim/m32r/cpu.h
sim/m32r/cpuall.h
sim/m32r/cpux.c
sim/m32r/cpux.h
sim/m32r/decode.c
sim/m32r/decode.h
sim/m32r/decodex.c
sim/m32r/decodex.h
sim/m32r/devices.c
sim/m32r/m32r-sim.h
sim/m32r/m32r.c
sim/m32r/m32rx.c
sim/m32r/mloop.in
sim/m32r/mloopx.in
sim/m32r/model.c
sim/m32r/modelx.c
sim/m32r/sem-switch.c
sim/m32r/sem.c
sim/m32r/semx-switch.c
sim/m32r/sim-if.c
sim/m32r/sim-main.h
sim/m32r/tconfig.in
sim/m32r/traps.c
sim/m68hc11/ChangeLog
sim/m68hc11/Makefile.in
sim/m68hc11/config.in
sim/m68hc11/configure
sim/m68hc11/configure.in
sim/m68hc11/dv-m68hc11.c
sim/m68hc11/dv-m68hc11eepr.c
sim/m68hc11/dv-m68hc11sio.c
sim/m68hc11/dv-m68hc11spi.c
sim/m68hc11/dv-m68hc11tim.c
sim/m68hc11/dv-nvram.c
sim/m68hc11/emulos.c
sim/m68hc11/gencode.c
sim/m68hc11/interp.c
sim/m68hc11/interrupts.c
sim/m68hc11/interrupts.h
sim/m68hc11/m68hc11_sim.c
sim/m68hc11/sim-main.h
sim/mcore/ChangeLog
sim/mcore/Makefile.in
sim/mcore/config.in
sim/mcore/configure
sim/mcore/configure.in
sim/mcore/interp.c
sim/mcore/sysdep.h
sim/mips/ChangeLog
sim/mips/Makefile.in
sim/mips/acconfig.h
sim/mips/config.in
sim/mips/configure
sim/mips/configure.in
sim/mips/cp1.c
sim/mips/dv-tx3904cpu.c
sim/mips/dv-tx3904irc.c
sim/mips/dv-tx3904sio.c
sim/mips/dv-tx3904tmr.c
sim/mips/interp.c
sim/mips/m16.dc
sim/mips/m16.igen
sim/mips/m16run.c
sim/mips/mips.dc
sim/mips/mips.igen
sim/mips/sim-main.c
sim/mips/sim-main.h
sim/mips/tconfig.in
sim/mips/tx.igen
sim/mips/vr.igen
sim/mn10200/ChangeLog
sim/mn10200/Makefile.in
sim/mn10200/acconfig.h
sim/mn10200/config.in
sim/mn10200/configure
sim/mn10200/configure.in
sim/mn10200/gencode.c
sim/mn10200/interp.c
sim/mn10200/mn10200_sim.h
sim/mn10200/simops.c
sim/mn10300/ChangeLog
sim/mn10300/Makefile.in
sim/mn10300/acconfig.h
sim/mn10300/am33.igen
sim/mn10300/config.in
sim/mn10300/configure
sim/mn10300/configure.in
sim/mn10300/dv-mn103cpu.c
sim/mn10300/dv-mn103int.c
sim/mn10300/dv-mn103iop.c
sim/mn10300/dv-mn103ser.c
sim/mn10300/dv-mn103tim.c
sim/mn10300/gencode.c
sim/mn10300/interp.c
sim/mn10300/mn10300.dc
sim/mn10300/mn10300.igen
sim/mn10300/mn10300_sim.h
sim/mn10300/op_utils.c
sim/mn10300/sim-main.c
sim/mn10300/sim-main.h
sim/mn10300/simops.c
sim/mn10300/tconfig.in
sim/ppc/.gdbinit
sim/ppc/BUGS
sim/ppc/COPYING
sim/ppc/COPYING.LIB
sim/ppc/ChangeLog
sim/ppc/ChangeLog.00
sim/ppc/INSTALL
sim/ppc/Makefile.in
sim/ppc/README
sim/ppc/RUN
sim/ppc/acconfig.h
sim/ppc/aclocal.m4
sim/ppc/basics.h
sim/ppc/bits.c
sim/ppc/bits.h
sim/ppc/cap.c
sim/ppc/cap.h
sim/ppc/config.in
sim/ppc/configure
sim/ppc/configure.in
sim/ppc/corefile-n.h
sim/ppc/corefile.c
sim/ppc/corefile.h
sim/ppc/cpu.c
sim/ppc/cpu.h
sim/ppc/dc-complex
sim/ppc/dc-simple
sim/ppc/dc-stupid
sim/ppc/dc-test.01
sim/ppc/dc-test.02
sim/ppc/debug.c
sim/ppc/debug.h
sim/ppc/device.c
sim/ppc/device.h
sim/ppc/device_table.c
sim/ppc/device_table.h
sim/ppc/dgen.c
sim/ppc/double.c
sim/ppc/dp-bit.c
sim/ppc/emul_bugapi.c
sim/ppc/emul_bugapi.h
sim/ppc/emul_chirp.c
sim/ppc/emul_chirp.h
sim/ppc/emul_generic.c
sim/ppc/emul_generic.h
sim/ppc/emul_netbsd.c
sim/ppc/emul_netbsd.h
sim/ppc/emul_unix.c
sim/ppc/emul_unix.h
sim/ppc/events.c
sim/ppc/events.h
sim/ppc/filter.c
sim/ppc/filter.h
sim/ppc/filter_filename.c
sim/ppc/filter_filename.h
sim/ppc/gen-icache.c
sim/ppc/gen-icache.h
sim/ppc/gen-idecode.c
sim/ppc/gen-idecode.h
sim/ppc/gen-itable.c
sim/ppc/gen-itable.h
sim/ppc/gen-model.c
sim/ppc/gen-model.h
sim/ppc/gen-semantics.c
sim/ppc/gen-semantics.h
sim/ppc/gen-support.c
sim/ppc/gen-support.h
sim/ppc/hw_com.c
sim/ppc/hw_core.c
sim/ppc/hw_cpu.c
sim/ppc/hw_cpu.h
sim/ppc/hw_disk.c
sim/ppc/hw_eeprom.c
sim/ppc/hw_glue.c
sim/ppc/hw_htab.c
sim/ppc/hw_ide.c
sim/ppc/hw_init.c
sim/ppc/hw_iobus.c
sim/ppc/hw_memory.c
sim/ppc/hw_nvram.c
sim/ppc/hw_opic.c
sim/ppc/hw_pal.c
sim/ppc/hw_phb.c
sim/ppc/hw_phb.h
sim/ppc/hw_register.c
sim/ppc/hw_trace.c
sim/ppc/hw_vm.c
sim/ppc/idecode_branch.h
sim/ppc/idecode_expression.h
sim/ppc/idecode_fields.h
sim/ppc/igen.c
sim/ppc/igen.h
sim/ppc/inline.c
sim/ppc/inline.h
sim/ppc/interrupts.c
sim/ppc/interrupts.h
sim/ppc/ld-cache.c
sim/ppc/ld-cache.h
sim/ppc/ld-decode.c
sim/ppc/ld-decode.h
sim/ppc/ld-insn.c
sim/ppc/ld-insn.h
sim/ppc/lf.c
sim/ppc/lf.h
sim/ppc/main.c
sim/ppc/misc.c
sim/ppc/misc.h
sim/ppc/mon.c
sim/ppc/mon.h
sim/ppc/options.c
sim/ppc/options.h
sim/ppc/os_emul.c
sim/ppc/os_emul.h
sim/ppc/pk_disklabel.c
sim/ppc/ppc-cache-rules
sim/ppc/ppc-instructions
sim/ppc/ppc-spr-table
sim/ppc/ppc.mt
sim/ppc/psim.c
sim/ppc/psim.h
sim/ppc/psim.texinfo
sim/ppc/registers.c
sim/ppc/registers.h
sim/ppc/sim-endian-n.h
sim/ppc/sim-endian.c
sim/ppc/sim-endian.h
sim/ppc/sim-main.h
sim/ppc/sim_callbacks.h
sim/ppc/sim_calls.c
sim/ppc/std-config.h
sim/ppc/table.c
sim/ppc/table.h
sim/ppc/tree.c
sim/ppc/tree.h
sim/ppc/vm.c
sim/ppc/vm.h
sim/ppc/vm_n.h
sim/ppc/words.h
sim/sh/ChangeLog
sim/sh/Makefile.in
sim/sh/acconfig.h
sim/sh/config.in
sim/sh/configure
sim/sh/configure.in
sim/sh/gencode.c
sim/sh/interp.c
sim/sh/syscall.h
sim/sh/tconfig.in
sim/testsuite/ChangeLog
sim/testsuite/Makefile.in
sim/testsuite/common/Make-common.in
sim/testsuite/common/Makefile.in
sim/testsuite/common/alu-n-tst.h
sim/testsuite/common/alu-tst.c
sim/testsuite/common/bits-gen.c
sim/testsuite/common/bits-tst.c
sim/testsuite/common/fpu-tst.c
sim/testsuite/config/default.exp
sim/testsuite/configure
sim/testsuite/configure.in
sim/testsuite/d10v-elf/ChangeLog
sim/testsuite/d10v-elf/Makefile.in
sim/testsuite/d10v-elf/configure
sim/testsuite/d10v-elf/configure.in
sim/testsuite/d10v-elf/exit47.s
sim/testsuite/d10v-elf/hello.s
sim/testsuite/d10v-elf/loop.s
sim/testsuite/d10v-elf/t-ae-ld-d.s
sim/testsuite/d10v-elf/t-ae-ld-i.s
sim/testsuite/d10v-elf/t-ae-ld-id.s
sim/testsuite/d10v-elf/t-ae-ld-im.s
sim/testsuite/d10v-elf/t-ae-ld-ip.s
sim/testsuite/d10v-elf/t-ae-ld2w-d.s
sim/testsuite/d10v-elf/t-ae-ld2w-i.s
sim/testsuite/d10v-elf/t-ae-ld2w-id.s
sim/testsuite/d10v-elf/t-ae-ld2w-im.s
sim/testsuite/d10v-elf/t-ae-ld2w-ip.s
sim/testsuite/d10v-elf/t-ae-st-d.s
sim/testsuite/d10v-elf/t-ae-st-i.s
sim/testsuite/d10v-elf/t-ae-st-id.s
sim/testsuite/d10v-elf/t-ae-st-im.s
sim/testsuite/d10v-elf/t-ae-st-ip.s
sim/testsuite/d10v-elf/t-ae-st-is.s
sim/testsuite/d10v-elf/t-ae-st2w-d.s
sim/testsuite/d10v-elf/t-ae-st2w-i.s
sim/testsuite/d10v-elf/t-ae-st2w-id.s
sim/testsuite/d10v-elf/t-ae-st2w-im.s
sim/testsuite/d10v-elf/t-ae-st2w-ip.s
sim/testsuite/d10v-elf/t-ae-st2w-is.s
sim/testsuite/d10v-elf/t-dbt.s
sim/testsuite/d10v-elf/t-ld-st.s
sim/testsuite/d10v-elf/t-mac.s
sim/testsuite/d10v-elf/t-macros.i
sim/testsuite/d10v-elf/t-mod-ld-pre.s
sim/testsuite/d10v-elf/t-msbu.s
sim/testsuite/d10v-elf/t-mulxu.s
sim/testsuite/d10v-elf/t-mvtac.s
sim/testsuite/d10v-elf/t-mvtc.s
sim/testsuite/d10v-elf/t-rac.s
sim/testsuite/d10v-elf/t-rachi.s
sim/testsuite/d10v-elf/t-rdt.s
sim/testsuite/d10v-elf/t-rep.s
sim/testsuite/d10v-elf/t-rie-xx.s
sim/testsuite/d10v-elf/t-rte.s
sim/testsuite/d10v-elf/t-sac.s
sim/testsuite/d10v-elf/t-sachi.s
sim/testsuite/d10v-elf/t-sadd.s
sim/testsuite/d10v-elf/t-slae.s
sim/testsuite/d10v-elf/t-sp.s
sim/testsuite/d10v-elf/t-sub.s
sim/testsuite/d10v-elf/t-sub2w.s
sim/testsuite/d10v-elf/t-subi.s
sim/testsuite/d10v-elf/t-trap.s
sim/testsuite/d30v-elf/ChangeLog
sim/testsuite/d30v-elf/Makefile.in
sim/testsuite/d30v-elf/br-bra.S
sim/testsuite/d30v-elf/br-bratnz.S
sim/testsuite/d30v-elf/br-bratzr.S
sim/testsuite/d30v-elf/br-bsr.S
sim/testsuite/d30v-elf/br-dbra.S
sim/testsuite/d30v-elf/br-djmp.S
sim/testsuite/d30v-elf/br-djsr.S
sim/testsuite/d30v-elf/configure
sim/testsuite/d30v-elf/configure.in
sim/testsuite/d30v-elf/do-2wordops.S
sim/testsuite/d30v-elf/do-flags.S
sim/testsuite/d30v-elf/do-shifts.S
sim/testsuite/d30v-elf/em-e0.S
sim/testsuite/d30v-elf/em-e47.S
sim/testsuite/d30v-elf/em-pchr.S
sim/testsuite/d30v-elf/em-pstr.S
sim/testsuite/d30v-elf/exit47.s
sim/testsuite/d30v-elf/hello.s
sim/testsuite/d30v-elf/loop.s
sim/testsuite/d30v-elf/ls-ld2h.S
sim/testsuite/d30v-elf/ls-ld2w.S
sim/testsuite/d30v-elf/ls-ld4bh.S
sim/testsuite/d30v-elf/ls-ld4bhu.S
sim/testsuite/d30v-elf/ls-ldb.S
sim/testsuite/d30v-elf/ls-ldbu.S
sim/testsuite/d30v-elf/ls-ldh.S
sim/testsuite/d30v-elf/ls-ldhh.S
sim/testsuite/d30v-elf/ls-ldhu.S
sim/testsuite/d30v-elf/ls-ldw.S
sim/testsuite/d30v-elf/ls-modaddr.S
sim/testsuite/d30v-elf/ls-moddec.S
sim/testsuite/d30v-elf/ls-modinc.S
sim/testsuite/d30v-elf/ls-st2h.S
sim/testsuite/d30v-elf/ls-st2w.S
sim/testsuite/d30v-elf/ls-st4hb.S
sim/testsuite/d30v-elf/ls-stb.S
sim/testsuite/d30v-elf/ls-sth.S
sim/testsuite/d30v-elf/ls-sthh.S
sim/testsuite/d30v-elf/ls-stw.S
sim/testsuite/d30v-elf/os-dbt.S
sim/testsuite/d30v-elf/tick.s
sim/testsuite/d30v-elf/trap.S
sim/testsuite/fr30-elf/ChangeLog
sim/testsuite/fr30-elf/Makefile.in
sim/testsuite/fr30-elf/configure
sim/testsuite/fr30-elf/configure.in
sim/testsuite/fr30-elf/exit47.s
sim/testsuite/fr30-elf/hello.s
sim/testsuite/fr30-elf/loop.s
sim/testsuite/lib/sim-defs.exp
sim/testsuite/m32r-elf/ChangeLog
sim/testsuite/m32r-elf/Makefile.in
sim/testsuite/m32r-elf/configure
sim/testsuite/m32r-elf/configure.in
sim/testsuite/m32r-elf/exit47.s
sim/testsuite/m32r-elf/hello.s
sim/testsuite/m32r-elf/loop.s
sim/testsuite/mips64el-elf/ChangeLog
sim/testsuite/mips64el-elf/Makefile.in
sim/testsuite/mips64el-elf/configure
sim/testsuite/mips64el-elf/configure.in
sim/testsuite/sim/fr30/add.cgs
sim/testsuite/sim/fr30/add.ms
sim/testsuite/sim/fr30/add2.cgs
sim/testsuite/sim/fr30/addc.cgs
sim/testsuite/sim/fr30/addn.cgs
sim/testsuite/sim/fr30/addn2.cgs
sim/testsuite/sim/fr30/addsp.cgs
sim/testsuite/sim/fr30/allinsn.exp
sim/testsuite/sim/fr30/and.cgs
sim/testsuite/sim/fr30/andb.cgs
sim/testsuite/sim/fr30/andccr.cgs
sim/testsuite/sim/fr30/andh.cgs
sim/testsuite/sim/fr30/asr.cgs
sim/testsuite/sim/fr30/asr2.cgs
sim/testsuite/sim/fr30/bandh.cgs
sim/testsuite/sim/fr30/bandl.cgs
sim/testsuite/sim/fr30/bc.cgs
sim/testsuite/sim/fr30/beorh.cgs
sim/testsuite/sim/fr30/beorl.cgs
sim/testsuite/sim/fr30/beq.cgs
sim/testsuite/sim/fr30/bge.cgs
sim/testsuite/sim/fr30/bgt.cgs
sim/testsuite/sim/fr30/bhi.cgs
sim/testsuite/sim/fr30/ble.cgs
sim/testsuite/sim/fr30/bls.cgs
sim/testsuite/sim/fr30/blt.cgs
sim/testsuite/sim/fr30/bn.cgs
sim/testsuite/sim/fr30/bnc.cgs
sim/testsuite/sim/fr30/bne.cgs
sim/testsuite/sim/fr30/bno.cgs
sim/testsuite/sim/fr30/bnv.cgs
sim/testsuite/sim/fr30/borh.cgs
sim/testsuite/sim/fr30/borl.cgs
sim/testsuite/sim/fr30/bp.cgs
sim/testsuite/sim/fr30/bra.cgs
sim/testsuite/sim/fr30/btsth.cgs
sim/testsuite/sim/fr30/btstl.cgs
sim/testsuite/sim/fr30/bv.cgs
sim/testsuite/sim/fr30/call.cgs
sim/testsuite/sim/fr30/cmp.cgs
sim/testsuite/sim/fr30/cmp2.cgs
sim/testsuite/sim/fr30/copld.cgs
sim/testsuite/sim/fr30/copop.cgs
sim/testsuite/sim/fr30/copst.cgs
sim/testsuite/sim/fr30/copsv.cgs
sim/testsuite/sim/fr30/div.ms
sim/testsuite/sim/fr30/div0s.cgs
sim/testsuite/sim/fr30/div0u.cgs
sim/testsuite/sim/fr30/div1.cgs
sim/testsuite/sim/fr30/div2.cgs
sim/testsuite/sim/fr30/div3.cgs
sim/testsuite/sim/fr30/div4s.cgs
sim/testsuite/sim/fr30/dmov.cgs
sim/testsuite/sim/fr30/dmovb.cgs
sim/testsuite/sim/fr30/dmovh.cgs
sim/testsuite/sim/fr30/enter.cgs
sim/testsuite/sim/fr30/eor.cgs
sim/testsuite/sim/fr30/eorb.cgs
sim/testsuite/sim/fr30/eorh.cgs
sim/testsuite/sim/fr30/extsb.cgs
sim/testsuite/sim/fr30/extsh.cgs
sim/testsuite/sim/fr30/extub.cgs
sim/testsuite/sim/fr30/extuh.cgs
sim/testsuite/sim/fr30/hello.ms
sim/testsuite/sim/fr30/int.cgs
sim/testsuite/sim/fr30/inte.cgs
sim/testsuite/sim/fr30/jmp.cgs
sim/testsuite/sim/fr30/ld.cgs
sim/testsuite/sim/fr30/ldi20.cgs
sim/testsuite/sim/fr30/ldi32.cgs
sim/testsuite/sim/fr30/ldi8.cgs
sim/testsuite/sim/fr30/ldm0.cgs
sim/testsuite/sim/fr30/ldm1.cgs
sim/testsuite/sim/fr30/ldres.cgs
sim/testsuite/sim/fr30/ldub.cgs
sim/testsuite/sim/fr30/lduh.cgs
sim/testsuite/sim/fr30/leave.cgs
sim/testsuite/sim/fr30/lsl.cgs
sim/testsuite/sim/fr30/lsl2.cgs
sim/testsuite/sim/fr30/lsr.cgs
sim/testsuite/sim/fr30/lsr2.cgs
sim/testsuite/sim/fr30/misc.exp
sim/testsuite/sim/fr30/mov.cgs
sim/testsuite/sim/fr30/mul.cgs
sim/testsuite/sim/fr30/mulh.cgs
sim/testsuite/sim/fr30/mulu.cgs
sim/testsuite/sim/fr30/muluh.cgs
sim/testsuite/sim/fr30/nop.cgs
sim/testsuite/sim/fr30/or.cgs
sim/testsuite/sim/fr30/orb.cgs
sim/testsuite/sim/fr30/orccr.cgs
sim/testsuite/sim/fr30/orh.cgs
sim/testsuite/sim/fr30/ret.cgs
sim/testsuite/sim/fr30/reti.cgs
sim/testsuite/sim/fr30/st.cgs
sim/testsuite/sim/fr30/stb.cgs
sim/testsuite/sim/fr30/sth.cgs
sim/testsuite/sim/fr30/stilm.cgs
sim/testsuite/sim/fr30/stm0.cgs
sim/testsuite/sim/fr30/stm1.cgs
sim/testsuite/sim/fr30/stres.cgs
sim/testsuite/sim/fr30/sub.cgs
sim/testsuite/sim/fr30/subc.cgs
sim/testsuite/sim/fr30/subn.cgs
sim/testsuite/sim/fr30/testutils.inc
sim/testsuite/sim/fr30/xchb.cgs
sim/testsuite/sim/m32r/add.cgs
sim/testsuite/sim/m32r/add3.cgs
sim/testsuite/sim/m32r/addi.cgs
sim/testsuite/sim/m32r/addv.cgs
sim/testsuite/sim/m32r/addv3.cgs
sim/testsuite/sim/m32r/addx.cgs
sim/testsuite/sim/m32r/allinsn.exp
sim/testsuite/sim/m32r/and.cgs
sim/testsuite/sim/m32r/and3.cgs
sim/testsuite/sim/m32r/bc24.cgs
sim/testsuite/sim/m32r/bc8.cgs
sim/testsuite/sim/m32r/beq.cgs
sim/testsuite/sim/m32r/beqz.cgs
sim/testsuite/sim/m32r/bgez.cgs
sim/testsuite/sim/m32r/bgtz.cgs
sim/testsuite/sim/m32r/bl24.cgs
sim/testsuite/sim/m32r/bl8.cgs
sim/testsuite/sim/m32r/blez.cgs
sim/testsuite/sim/m32r/bltz.cgs
sim/testsuite/sim/m32r/bnc24.cgs
sim/testsuite/sim/m32r/bnc8.cgs
sim/testsuite/sim/m32r/bne.cgs
sim/testsuite/sim/m32r/bnez.cgs
sim/testsuite/sim/m32r/bra24.cgs
sim/testsuite/sim/m32r/bra8.cgs
sim/testsuite/sim/m32r/cmp.cgs
sim/testsuite/sim/m32r/cmpi.cgs
sim/testsuite/sim/m32r/cmpu.cgs
sim/testsuite/sim/m32r/cmpui.cgs
sim/testsuite/sim/m32r/div.cgs
sim/testsuite/sim/m32r/divu.cgs
sim/testsuite/sim/m32r/hello.ms
sim/testsuite/sim/m32r/hw-trap.ms
sim/testsuite/sim/m32r/jl.cgs
sim/testsuite/sim/m32r/jmp.cgs
sim/testsuite/sim/m32r/ld-d.cgs
sim/testsuite/sim/m32r/ld-plus.cgs
sim/testsuite/sim/m32r/ld.cgs
sim/testsuite/sim/m32r/ld24.cgs
sim/testsuite/sim/m32r/ldb-d.cgs
sim/testsuite/sim/m32r/ldb.cgs
sim/testsuite/sim/m32r/ldh-d.cgs
sim/testsuite/sim/m32r/ldh.cgs
sim/testsuite/sim/m32r/ldi16.cgs
sim/testsuite/sim/m32r/ldi8.cgs
sim/testsuite/sim/m32r/ldub-d.cgs
sim/testsuite/sim/m32r/ldub.cgs
sim/testsuite/sim/m32r/lduh-d.cgs
sim/testsuite/sim/m32r/lduh.cgs
sim/testsuite/sim/m32r/lock.cgs
sim/testsuite/sim/m32r/machi.cgs
sim/testsuite/sim/m32r/maclo.cgs
sim/testsuite/sim/m32r/macwhi.cgs
sim/testsuite/sim/m32r/macwlo.cgs
sim/testsuite/sim/m32r/misc.exp
sim/testsuite/sim/m32r/mul.cgs
sim/testsuite/sim/m32r/mulhi.cgs
sim/testsuite/sim/m32r/mullo.cgs
sim/testsuite/sim/m32r/mulwhi.cgs
sim/testsuite/sim/m32r/mulwlo.cgs
sim/testsuite/sim/m32r/mv.cgs
sim/testsuite/sim/m32r/mvfachi.cgs
sim/testsuite/sim/m32r/mvfaclo.cgs
sim/testsuite/sim/m32r/mvfacmi.cgs
sim/testsuite/sim/m32r/mvfc.cgs
sim/testsuite/sim/m32r/mvtachi.cgs
sim/testsuite/sim/m32r/mvtaclo.cgs
sim/testsuite/sim/m32r/mvtc.cgs
sim/testsuite/sim/m32r/neg.cgs
sim/testsuite/sim/m32r/nop.cgs
sim/testsuite/sim/m32r/not.cgs
sim/testsuite/sim/m32r/or.cgs
sim/testsuite/sim/m32r/or3.cgs
sim/testsuite/sim/m32r/rac.cgs
sim/testsuite/sim/m32r/rach.cgs
sim/testsuite/sim/m32r/rem.cgs
sim/testsuite/sim/m32r/remu.cgs
sim/testsuite/sim/m32r/rte.cgs
sim/testsuite/sim/m32r/seth.cgs
sim/testsuite/sim/m32r/sll.cgs
sim/testsuite/sim/m32r/sll3.cgs
sim/testsuite/sim/m32r/slli.cgs
sim/testsuite/sim/m32r/sra.cgs
sim/testsuite/sim/m32r/sra3.cgs
sim/testsuite/sim/m32r/srai.cgs
sim/testsuite/sim/m32r/srl.cgs
sim/testsuite/sim/m32r/srl3.cgs
sim/testsuite/sim/m32r/srli.cgs
sim/testsuite/sim/m32r/st-d.cgs
sim/testsuite/sim/m32r/st-minus.cgs
sim/testsuite/sim/m32r/st-plus.cgs
sim/testsuite/sim/m32r/st.cgs
sim/testsuite/sim/m32r/stb-d.cgs
sim/testsuite/sim/m32r/stb.cgs
sim/testsuite/sim/m32r/sth-d.cgs
sim/testsuite/sim/m32r/sth.cgs
sim/testsuite/sim/m32r/sub.cgs
sim/testsuite/sim/m32r/subv.cgs
sim/testsuite/sim/m32r/subx.cgs
sim/testsuite/sim/m32r/testutils.inc
sim/testsuite/sim/m32r/trap.cgs
sim/testsuite/sim/m32r/unlock.cgs
sim/testsuite/sim/m32r/uread16.ms
sim/testsuite/sim/m32r/uread32.ms
sim/testsuite/sim/m32r/uwrite16.ms
sim/testsuite/sim/m32r/uwrite32.ms
sim/testsuite/sim/m32r/xor.cgs
sim/testsuite/sim/m32r/xor3.cgs
sim/tic80/ChangeLog
sim/tic80/Makefile.in
sim/tic80/acconfig.h
sim/tic80/alu.h
sim/tic80/config.in
sim/tic80/configure
sim/tic80/configure.in
sim/tic80/cpu.h
sim/tic80/interp.c
sim/tic80/misc.c
sim/tic80/sim-calls.c
sim/tic80/sim-main.h
sim/tic80/tic80.dc
sim/tic80/tic80.ic
sim/tic80/tic80.igen
sim/v850/ChangeLog
sim/v850/Makefile.in
sim/v850/acconfig.h
sim/v850/config.in
sim/v850/configure
sim/v850/configure.in
sim/v850/interp.c
sim/v850/sim-main.h
sim/v850/simops.c
sim/v850/simops.h
sim/v850/v850-dc
sim/v850/v850.igen
sim/v850/v850_sim.h
sim/w65/ChangeLog
sim/w65/Makefile.in
sim/w65/acconfig.h
sim/w65/config.in
sim/w65/configure
sim/w65/configure.in
sim/w65/gencode.c
sim/w65/interp.c
sim/w65/interp.h
sim/w65/run.c
sim/z8k/ChangeLog
sim/z8k/Makefile.in
sim/z8k/acconfig.h
sim/z8k/comped1.c
sim/z8k/comped2.c
sim/z8k/comped3.c
sim/z8k/compedb3.c
sim/z8k/config.in
sim/z8k/configure
sim/z8k/configure.in
sim/z8k/iface.c
sim/z8k/inlines.h
sim/z8k/list.c
sim/z8k/mem.c
sim/z8k/mem.h
sim/z8k/quick.c
sim/z8k/sim.h
sim/z8k/support.c
sim/z8k/syscall.h
sim/z8k/tconfig.in
sim/z8k/tm.h
sim/z8k/writecode.c
symlink-tree
texinfo/texinfo.tex
ylwrap
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 5857 |
1 files changed, 0 insertions, 5857 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c deleted file mode 100644 index 55e0496bc78..00000000000 --- a/gdb/procfs.c +++ /dev/null @@ -1,5857 +0,0 @@ -/* Machine independent support for SVR4 /proc (process file system) for GDB. - Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - Written by Michael Snyder at Cygnus Solutions. - Based on work by Fred Fish, Stu Grossman, Geoff Noer, and others. - -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. */ - -#include "defs.h" -#include "inferior.h" -#include "target.h" -#include "gdbcore.h" -#include "elf-bfd.h" /* for elfcore_write_* */ -#include "gdbcmd.h" -#include "gdbthread.h" - -#if defined (NEW_PROC_API) -#define _STRUCTURED_PROC 1 /* Should be done by configure script. */ -#endif - -#include <sys/procfs.h> -#ifdef HAVE_SYS_FAULT_H -#include <sys/fault.h> -#endif -#ifdef HAVE_SYS_SYSCALL_H -#include <sys/syscall.h> -#endif -#include <sys/errno.h> -#include <sys/wait.h> -#include <signal.h> -#include <ctype.h> - -/* - * PROCFS.C - * - * This module provides the interface between GDB and the - * /proc file system, which is used on many versions of Unix - * as a means for debuggers to control other processes. - * Examples of the systems that use this interface are: - * Irix - * Solaris - * OSF - * Unixware - * AIX5 - * - * /proc works by imitating a file system: you open a simulated file - * that represents the process you wish to interact with, and - * perform operations on that "file" in order to examine or change - * the state of the other process. - * - * The most important thing to know about /proc and this module - * is that there are two very different interfaces to /proc: - * One that uses the ioctl system call, and - * another that uses read and write system calls. - * This module has to support both /proc interfaces. This means - * that there are two different ways of doing every basic operation. - * - * In order to keep most of the code simple and clean, I have - * defined an interface "layer" which hides all these system calls. - * An ifdef (NEW_PROC_API) determines which interface we are using, - * and most or all occurrances of this ifdef should be confined to - * this interface layer. - */ - - -/* Determine which /proc API we are using: - The ioctl API defines PIOCSTATUS, while - the read/write (multiple fd) API never does. */ - -#ifdef NEW_PROC_API -#include <sys/types.h> -#include "gdb_dirent.h" /* opendir/readdir, for listing the LWP's */ -#endif - -#include <fcntl.h> /* for O_RDONLY */ -#include <unistd.h> /* for "X_OK" */ -#include "gdb_stat.h" /* for struct stat */ - -/* Note: procfs-utils.h must be included after the above system header - files, because it redefines various system calls using macros. - This may be incompatible with the prototype declarations. */ - -#include "proc-utils.h" - -/* Prototypes for supply_gregset etc. */ -#include "gregset.h" - -/* =================== TARGET_OPS "MODULE" =================== */ - -/* - * This module defines the GDB target vector and its methods. - */ - -static void procfs_open (char *, int); -static void procfs_attach (char *, int); -static void procfs_detach (char *, int); -static void procfs_resume (ptid_t, int, enum target_signal); -static int procfs_can_run (void); -static void procfs_stop (void); -static void procfs_files_info (struct target_ops *); -static void procfs_fetch_registers (int); -static void procfs_store_registers (int); -static void procfs_notice_signals (ptid_t); -static void procfs_prepare_to_store (void); -static void procfs_kill_inferior (void); -static void procfs_mourn_inferior (void); -static void procfs_create_inferior (char *, char *, char **); -static ptid_t procfs_wait (ptid_t, struct target_waitstatus *); -static int procfs_xfer_memory (CORE_ADDR, char *, int, int, - struct mem_attrib *attrib, - struct target_ops *); - -static int procfs_thread_alive (ptid_t); - -void procfs_find_new_threads (void); -char *procfs_pid_to_str (ptid_t); - -static int proc_find_memory_regions (int (*) (CORE_ADDR, - unsigned long, - int, int, int, - void *), - void *); - -static char * procfs_make_note_section (bfd *, int *); - -struct target_ops procfs_ops; /* the target vector */ - -static void -init_procfs_ops (void) -{ - procfs_ops.to_shortname = "procfs"; - procfs_ops.to_longname = "Unix /proc child process"; - procfs_ops.to_doc = - "Unix /proc child process (started by the \"run\" command)."; - procfs_ops.to_open = procfs_open; - procfs_ops.to_can_run = procfs_can_run; - procfs_ops.to_create_inferior = procfs_create_inferior; - procfs_ops.to_kill = procfs_kill_inferior; - procfs_ops.to_mourn_inferior = procfs_mourn_inferior; - procfs_ops.to_attach = procfs_attach; - procfs_ops.to_detach = procfs_detach; - procfs_ops.to_wait = procfs_wait; - procfs_ops.to_resume = procfs_resume; - procfs_ops.to_prepare_to_store = procfs_prepare_to_store; - procfs_ops.to_fetch_registers = procfs_fetch_registers; - procfs_ops.to_store_registers = procfs_store_registers; - procfs_ops.to_xfer_memory = procfs_xfer_memory; - procfs_ops.to_insert_breakpoint = memory_insert_breakpoint; - procfs_ops.to_remove_breakpoint = memory_remove_breakpoint; - procfs_ops.to_notice_signals = procfs_notice_signals; - procfs_ops.to_files_info = procfs_files_info; - procfs_ops.to_stop = procfs_stop; - - procfs_ops.to_terminal_init = terminal_init_inferior; - procfs_ops.to_terminal_inferior = terminal_inferior; - procfs_ops.to_terminal_ours_for_output = terminal_ours_for_output; - procfs_ops.to_terminal_ours = terminal_ours; - procfs_ops.to_terminal_info = child_terminal_info; - - procfs_ops.to_find_new_threads = procfs_find_new_threads; - procfs_ops.to_thread_alive = procfs_thread_alive; - procfs_ops.to_pid_to_str = procfs_pid_to_str; - - procfs_ops.to_has_all_memory = 1; - procfs_ops.to_has_memory = 1; - procfs_ops.to_has_execution = 1; - procfs_ops.to_has_stack = 1; - procfs_ops.to_has_registers = 1; - procfs_ops.to_stratum = process_stratum; - procfs_ops.to_has_thread_control = tc_schedlock; - procfs_ops.to_find_memory_regions = proc_find_memory_regions; - procfs_ops.to_make_corefile_notes = procfs_make_note_section; - procfs_ops.to_magic = OPS_MAGIC; -} - -/* =================== END, TARGET_OPS "MODULE" =================== */ - -/* - * World Unification: - * - * Put any typedefs, defines etc. here that are required for - * the unification of code that handles different versions of /proc. - */ - -#ifdef NEW_PROC_API /* Solaris 7 && 8 method for watchpoints */ -#ifdef WA_READ - enum { READ_WATCHFLAG = WA_READ, - WRITE_WATCHFLAG = WA_WRITE, - EXEC_WATCHFLAG = WA_EXEC, - AFTER_WATCHFLAG = WA_TRAPAFTER - }; -#endif -#else /* Irix method for watchpoints */ - enum { READ_WATCHFLAG = MA_READ, - WRITE_WATCHFLAG = MA_WRITE, - EXEC_WATCHFLAG = MA_EXEC, - AFTER_WATCHFLAG = 0 /* trapafter not implemented */ - }; -#endif - -/* gdb_sigset_t */ -#ifdef HAVE_PR_SIGSET_T -typedef pr_sigset_t gdb_sigset_t; -#else -typedef sigset_t gdb_sigset_t; -#endif - -/* sigaction */ -#ifdef HAVE_PR_SIGACTION64_T -typedef pr_sigaction64_t gdb_sigaction_t; -#else -typedef struct sigaction gdb_sigaction_t; -#endif - -/* siginfo */ -#ifdef HAVE_PR_SIGINFO64_T -typedef pr_siginfo64_t gdb_siginfo_t; -#else -typedef struct siginfo gdb_siginfo_t; -#endif - -/* gdb_premptysysset */ -#ifdef premptysysset -#define gdb_premptysysset premptysysset -#else -#define gdb_premptysysset premptyset -#endif - -/* praddsysset */ -#ifdef praddsysset -#define gdb_praddsysset praddsysset -#else -#define gdb_praddsysset praddset -#endif - -/* prdelsysset */ -#ifdef prdelsysset -#define gdb_prdelsysset prdelsysset -#else -#define gdb_prdelsysset prdelset -#endif - -/* prissyssetmember */ -#ifdef prissyssetmember -#define gdb_pr_issyssetmember prissyssetmember -#else -#define gdb_pr_issyssetmember prismember -#endif - -/* As a feature test, saying ``#if HAVE_PRSYSENT_T'' everywhere isn't - as intuitively descriptive as it could be, so we'll define - DYNAMIC_SYSCALLS to mean the same thing. Anyway, at the time of - this writing, this feature is only found on AIX5 systems and - basically means that the set of syscalls is not fixed. I.e, - there's no nice table that one can #include to get all of the - syscall numbers. Instead, they're stored in /proc/PID/sysent - for each process. We are at least guaranteed that they won't - change over the lifetime of the process. But each process could - (in theory) have different syscall numbers. -*/ -#ifdef HAVE_PRSYSENT_T -#define DYNAMIC_SYSCALLS -#endif - - - -/* =================== STRUCT PROCINFO "MODULE" =================== */ - - /* FIXME: this comment will soon be out of date W.R.T. threads. */ - -/* The procinfo struct is a wrapper to hold all the state information - concerning a /proc process. There should be exactly one procinfo - for each process, and since GDB currently can debug only one - process at a time, that means there should be only one procinfo. - All of the LWP's of a process can be accessed indirectly thru the - single process procinfo. - - However, against the day when GDB may debug more than one process, - this data structure is kept in a list (which for now will hold no - more than one member), and many functions will have a pointer to a - procinfo as an argument. - - There will be a separate procinfo structure for use by the (not yet - implemented) "info proc" command, so that we can print useful - information about any random process without interfering with the - inferior's procinfo information. */ - -#ifdef NEW_PROC_API -/* format strings for /proc paths */ -# ifndef CTL_PROC_NAME_FMT -# define MAIN_PROC_NAME_FMT "/proc/%d" -# define CTL_PROC_NAME_FMT "/proc/%d/ctl" -# define AS_PROC_NAME_FMT "/proc/%d/as" -# define MAP_PROC_NAME_FMT "/proc/%d/map" -# define STATUS_PROC_NAME_FMT "/proc/%d/status" -# define MAX_PROC_NAME_SIZE sizeof("/proc/99999/lwp/8096/lstatus") -# endif -/* the name of the proc status struct depends on the implementation */ -typedef pstatus_t gdb_prstatus_t; -typedef lwpstatus_t gdb_lwpstatus_t; -#else /* ! NEW_PROC_API */ -/* format strings for /proc paths */ -# ifndef CTL_PROC_NAME_FMT -# define MAIN_PROC_NAME_FMT "/proc/%05d" -# define CTL_PROC_NAME_FMT "/proc/%05d" -# define AS_PROC_NAME_FMT "/proc/%05d" -# define MAP_PROC_NAME_FMT "/proc/%05d" -# define STATUS_PROC_NAME_FMT "/proc/%05d" -# define MAX_PROC_NAME_SIZE sizeof("/proc/ttttppppp") -# endif -/* the name of the proc status struct depends on the implementation */ -typedef prstatus_t gdb_prstatus_t; -typedef prstatus_t gdb_lwpstatus_t; -#endif /* NEW_PROC_API */ - -typedef struct procinfo { - struct procinfo *next; - int pid; /* Process ID */ - int tid; /* Thread/LWP id */ - - /* process state */ - int was_stopped; - int ignore_next_sigstop; - - /* The following four fd fields may be identical, or may contain - several different fd's, depending on the version of /proc - (old ioctl or new read/write). */ - - int ctl_fd; /* File descriptor for /proc control file */ - /* - * The next three file descriptors are actually only needed in the - * read/write, multiple-file-descriptor implemenation (NEW_PROC_API). - * However, to avoid a bunch of #ifdefs in the code, we will use - * them uniformly by (in the case of the ioctl single-file-descriptor - * implementation) filling them with copies of the control fd. - */ - int status_fd; /* File descriptor for /proc status file */ - int as_fd; /* File descriptor for /proc as file */ - - char pathname[MAX_PROC_NAME_SIZE]; /* Pathname to /proc entry */ - - fltset_t saved_fltset; /* Saved traced hardware fault set */ - gdb_sigset_t saved_sigset; /* Saved traced signal set */ - gdb_sigset_t saved_sighold; /* Saved held signal set */ - sysset_t *saved_exitset; /* Saved traced system call exit set */ - sysset_t *saved_entryset; /* Saved traced system call entry set */ - - gdb_prstatus_t prstatus; /* Current process status info */ - -#ifndef NEW_PROC_API - gdb_fpregset_t fpregset; /* Current floating point registers */ -#endif - -#ifdef DYNAMIC_SYSCALLS - int num_syscalls; /* Total number of syscalls */ - char **syscall_names; /* Syscall number to name map */ -#endif - - struct procinfo *thread_list; - - int status_valid : 1; - int gregs_valid : 1; - int fpregs_valid : 1; - int threads_valid: 1; -} procinfo; - -static char errmsg[128]; /* shared error msg buffer */ - -/* Function prototypes for procinfo module: */ - -static procinfo *find_procinfo_or_die (int pid, int tid); -static procinfo *find_procinfo (int pid, int tid); -static procinfo *create_procinfo (int pid, int tid); -static void destroy_procinfo (procinfo * p); -static void do_destroy_procinfo_cleanup (void *); -static void dead_procinfo (procinfo * p, char *msg, int killp); -static int open_procinfo_files (procinfo * p, int which); -static void close_procinfo_files (procinfo * p); -static int sysset_t_size (procinfo *p); -static sysset_t *sysset_t_alloc (procinfo * pi); -#ifdef DYNAMIC_SYSCALLS -static void load_syscalls (procinfo *pi); -static void free_syscalls (procinfo *pi); -static int find_syscall (procinfo *pi, char *name); -#endif /* DYNAMIC_SYSCALLS */ - -/* The head of the procinfo list: */ -static procinfo * procinfo_list; - -/* - * Function: find_procinfo - * - * Search the procinfo list. - * - * Returns: pointer to procinfo, or NULL if not found. - */ - -static procinfo * -find_procinfo (int pid, int tid) -{ - procinfo *pi; - - for (pi = procinfo_list; pi; pi = pi->next) - if (pi->pid == pid) - break; - - if (pi) - if (tid) - { - /* Don't check threads_valid. If we're updating the - thread_list, we want to find whatever threads are already - here. This means that in general it is the caller's - responsibility to check threads_valid and update before - calling find_procinfo, if the caller wants to find a new - thread. */ - - for (pi = pi->thread_list; pi; pi = pi->next) - if (pi->tid == tid) - break; - } - - return pi; -} - -/* - * Function: find_procinfo_or_die - * - * Calls find_procinfo, but errors on failure. - */ - -static procinfo * -find_procinfo_or_die (int pid, int tid) -{ - procinfo *pi = find_procinfo (pid, tid); - - if (pi == NULL) - { - if (tid) - error ("procfs: couldn't find pid %d (kernel thread %d) in procinfo list.", - pid, tid); - else - error ("procfs: couldn't find pid %d in procinfo list.", pid); - } - return pi; -} - -/* open_with_retry() is a wrapper for open(). The appropriate - open() call is attempted; if unsuccessful, it will be retried as - many times as needed for the EAGAIN and EINTR conditions. - - For other conditions, open_with_retry() will retry the open() a - limited number of times. In addition, a short sleep is imposed - prior to retrying the open(). The reason for this sleep is to give - the kernel a chance to catch up and create the file in question in - the event that GDB "wins" the race to open a file before the kernel - has created it. */ - -static int -open_with_retry (const char *pathname, int flags) -{ - int retries_remaining, status; - - retries_remaining = 2; - - while (1) - { - status = open (pathname, flags); - - if (status >= 0 || retries_remaining == 0) - break; - else if (errno != EINTR && errno != EAGAIN) - { - retries_remaining--; - sleep (1); - } - } - - return status; -} - -/* - * Function: open_procinfo_files - * - * Open the file descriptor for the process or LWP. - * ifdef NEW_PROC_API, we only open the control file descriptor; - * the others are opened lazily as needed. - * else (if not NEW_PROC_API), there is only one real - * file descriptor, but we keep multiple copies of it so that - * the code that uses them does not have to be #ifdef'd. - * - * Return: file descriptor, or zero for failure. - */ - -enum { FD_CTL, FD_STATUS, FD_AS }; - -static int -open_procinfo_files (procinfo *pi, int which) -{ -#ifdef NEW_PROC_API - char tmp[MAX_PROC_NAME_SIZE]; -#endif - int fd; - - /* - * This function is getting ALMOST long enough to break up into several. - * Here is some rationale: - * - * NEW_PROC_API (Solaris 2.6, Solaris 2.7, Unixware): - * There are several file descriptors that may need to be open - * for any given process or LWP. The ones we're intereted in are: - * - control (ctl) write-only change the state - * - status (status) read-only query the state - * - address space (as) read/write access memory - * - map (map) read-only virtual addr map - * Most of these are opened lazily as they are needed. - * The pathnames for the 'files' for an LWP look slightly - * different from those of a first-class process: - * Pathnames for a process (<proc-id>): - * /proc/<proc-id>/ctl - * /proc/<proc-id>/status - * /proc/<proc-id>/as - * /proc/<proc-id>/map - * Pathnames for an LWP (lwp-id): - * /proc/<proc-id>/lwp/<lwp-id>/lwpctl - * /proc/<proc-id>/lwp/<lwp-id>/lwpstatus - * An LWP has no map or address space file descriptor, since - * the memory map and address space are shared by all LWPs. - * - * Everyone else (Solaris 2.5, Irix, OSF) - * There is only one file descriptor for each process or LWP. - * For convenience, we copy the same file descriptor into all - * three fields of the procinfo struct (ctl_fd, status_fd, and - * as_fd, see NEW_PROC_API above) so that code that uses them - * doesn't need any #ifdef's. - * Pathname for all: - * /proc/<proc-id> - * - * Solaris 2.5 LWP's: - * Each LWP has an independent file descriptor, but these - * are not obtained via the 'open' system call like the rest: - * instead, they're obtained thru an ioctl call (PIOCOPENLWP) - * to the file descriptor of the parent process. - * - * OSF threads: - * These do not even have their own independent file descriptor. - * All operations are carried out on the file descriptor of the - * parent process. Therefore we just call open again for each - * thread, getting a new handle for the same 'file'. - */ - -#ifdef NEW_PROC_API - /* - * In this case, there are several different file descriptors that - * we might be asked to open. The control file descriptor will be - * opened early, but the others will be opened lazily as they are - * needed. - */ - - strcpy (tmp, pi->pathname); - switch (which) { /* which file descriptor to open? */ - case FD_CTL: - if (pi->tid) - strcat (tmp, "/lwpctl"); - else - strcat (tmp, "/ctl"); - fd = open_with_retry (tmp, O_WRONLY); - if (fd <= 0) - return 0; /* fail */ - pi->ctl_fd = fd; - break; - case FD_AS: - if (pi->tid) - return 0; /* there is no 'as' file descriptor for an lwp */ - strcat (tmp, "/as"); - fd = open_with_retry (tmp, O_RDWR); - if (fd <= 0) - return 0; /* fail */ - pi->as_fd = fd; - break; - case FD_STATUS: - if (pi->tid) - strcat (tmp, "/lwpstatus"); - else - strcat (tmp, "/status"); - fd = open_with_retry (tmp, O_RDONLY); - if (fd <= 0) - return 0; /* fail */ - pi->status_fd = fd; - break; - default: - return 0; /* unknown file descriptor */ - } -#else /* not NEW_PROC_API */ - /* - * In this case, there is only one file descriptor for each procinfo - * (ie. each process or LWP). In fact, only the file descriptor for - * the process can actually be opened by an 'open' system call. - * The ones for the LWPs have to be obtained thru an IOCTL call - * on the process's file descriptor. - * - * For convenience, we copy each procinfo's single file descriptor - * into all of the fields occupied by the several file descriptors - * of the NEW_PROC_API implementation. That way, the code that uses - * them can be written without ifdefs. - */ - - -#ifdef PIOCTSTATUS /* OSF */ - /* Only one FD; just open it. */ - if ((fd = open_with_retry (pi->pathname, O_RDWR)) == 0) - return 0; -#else /* Sol 2.5, Irix, other? */ - if (pi->tid == 0) /* Master procinfo for the process */ - { - fd = open_with_retry (pi->pathname, O_RDWR); - if (fd <= 0) - return 0; /* fail */ - } - else /* LWP thread procinfo */ - { -#ifdef PIOCOPENLWP /* Sol 2.5, thread/LWP */ - procinfo *process; - int lwpid = pi->tid; - - /* Find the procinfo for the entire process. */ - if ((process = find_procinfo (pi->pid, 0)) == NULL) - return 0; /* fail */ - - /* Now obtain the file descriptor for the LWP. */ - if ((fd = ioctl (process->ctl_fd, PIOCOPENLWP, &lwpid)) <= 0) - return 0; /* fail */ -#else /* Irix, other? */ - return 0; /* Don't know how to open threads */ -#endif /* Sol 2.5 PIOCOPENLWP */ - } -#endif /* OSF PIOCTSTATUS */ - pi->ctl_fd = pi->as_fd = pi->status_fd = fd; -#endif /* NEW_PROC_API */ - - return 1; /* success */ -} - -/* - * Function: create_procinfo - * - * Allocate a data structure and link it into the procinfo list. - * (First tries to find a pre-existing one (FIXME: why?) - * - * Return: pointer to new procinfo struct. - */ - -static procinfo * -create_procinfo (int pid, int tid) -{ - procinfo *pi, *parent; - - if ((pi = find_procinfo (pid, tid))) - return pi; /* Already exists, nothing to do. */ - - /* find parent before doing malloc, to save having to cleanup */ - if (tid != 0) - parent = find_procinfo_or_die (pid, 0); /* FIXME: should I - create it if it - doesn't exist yet? */ - - pi = (procinfo *) xmalloc (sizeof (procinfo)); - memset (pi, 0, sizeof (procinfo)); - pi->pid = pid; - pi->tid = tid; - -#ifdef DYNAMIC_SYSCALLS - load_syscalls (pi); -#endif - - pi->saved_entryset = sysset_t_alloc (pi); - pi->saved_exitset = sysset_t_alloc (pi); - - /* Chain into list. */ - if (tid == 0) - { - sprintf (pi->pathname, MAIN_PROC_NAME_FMT, pid); - pi->next = procinfo_list; - procinfo_list = pi; - } - else - { -#ifdef NEW_PROC_API - sprintf (pi->pathname, "/proc/%05d/lwp/%d", pid, tid); -#else - sprintf (pi->pathname, MAIN_PROC_NAME_FMT, pid); -#endif - pi->next = parent->thread_list; - parent->thread_list = pi; - } - return pi; -} - -/* - * Function: close_procinfo_files - * - * Close all file descriptors associated with the procinfo - */ - -static void -close_procinfo_files (procinfo *pi) -{ - if (pi->ctl_fd > 0) - close (pi->ctl_fd); -#ifdef NEW_PROC_API - if (pi->as_fd > 0) - close (pi->as_fd); - if (pi->status_fd > 0) - close (pi->status_fd); -#endif - pi->ctl_fd = pi->as_fd = pi->status_fd = 0; -} - -/* - * Function: destroy_procinfo - * - * Destructor function. Close, unlink and deallocate the object. - */ - -static void -destroy_one_procinfo (procinfo **list, procinfo *pi) -{ - procinfo *ptr; - - /* Step one: unlink the procinfo from its list */ - if (pi == *list) - *list = pi->next; - else - for (ptr = *list; ptr; ptr = ptr->next) - if (ptr->next == pi) - { - ptr->next = pi->next; - break; - } - - /* Step two: close any open file descriptors */ - close_procinfo_files (pi); - - /* Step three: free the memory. */ -#ifdef DYNAMIC_SYSCALLS - free_syscalls (pi); -#endif - xfree (pi->saved_entryset); - xfree (pi->saved_exitset); - xfree (pi); -} - -static void -destroy_procinfo (procinfo *pi) -{ - procinfo *tmp; - - if (pi->tid != 0) /* destroy a thread procinfo */ - { - tmp = find_procinfo (pi->pid, 0); /* find the parent process */ - destroy_one_procinfo (&tmp->thread_list, pi); - } - else /* destroy a process procinfo and all its threads */ - { - /* First destroy the children, if any; */ - while (pi->thread_list != NULL) - destroy_one_procinfo (&pi->thread_list, pi->thread_list); - /* Then destroy the parent. Genocide!!! */ - destroy_one_procinfo (&procinfo_list, pi); - } -} - -static void -do_destroy_procinfo_cleanup (void *pi) -{ - destroy_procinfo (pi); -} - -enum { NOKILL, KILL }; - -/* - * Function: dead_procinfo - * - * To be called on a non_recoverable error for a procinfo. - * Prints error messages, optionally sends a SIGKILL to the process, - * then destroys the data structure. - */ - -static void -dead_procinfo (procinfo *pi, char *msg, int kill_p) -{ - char procfile[80]; - - if (pi->pathname) - { - print_sys_errmsg (pi->pathname, errno); - } - else - { - sprintf (procfile, "process %d", pi->pid); - print_sys_errmsg (procfile, errno); - } - if (kill_p == KILL) - kill (pi->pid, SIGKILL); - - destroy_procinfo (pi); - error (msg); -} - -/* - * Function: sysset_t_size - * - * Returns the (complete) size of a sysset_t struct. Normally, this - * is just sizeof (syset_t), but in the case of Monterey/64, the actual - * size of sysset_t isn't known until runtime. - */ - -static int -sysset_t_size (procinfo * pi) -{ -#ifndef DYNAMIC_SYSCALLS - return sizeof (sysset_t); -#else - return sizeof (sysset_t) - sizeof (uint64_t) - + sizeof (uint64_t) * ((pi->num_syscalls + (8 * sizeof (uint64_t) - 1)) - / (8 * sizeof (uint64_t))); -#endif -} - -/* Function: sysset_t_alloc - - Allocate and (partially) initialize a sysset_t struct. */ - -static sysset_t * -sysset_t_alloc (procinfo * pi) -{ - sysset_t *ret; - int size = sysset_t_size (pi); - ret = xmalloc (size); -#ifdef DYNAMIC_SYSCALLS - ret->pr_size = (pi->num_syscalls + (8 * sizeof (uint64_t) - 1)) - / (8 * sizeof (uint64_t)); -#endif - return ret; -} - -#ifdef DYNAMIC_SYSCALLS - -/* Function: load_syscalls - - Extract syscall numbers and names from /proc/<pid>/sysent. Initialize - pi->num_syscalls with the number of syscalls and pi->syscall_names - with the names. (Certain numbers may be skipped in which case the - names for these numbers will be left as NULL.) */ - -#define MAX_SYSCALL_NAME_LENGTH 256 -#define MAX_SYSCALLS 65536 - -static void -load_syscalls (procinfo *pi) -{ - char pathname[MAX_PROC_NAME_SIZE]; - int sysent_fd; - prsysent_t header; - prsyscall_t *syscalls; - int i, size, maxcall; - - pi->num_syscalls = 0; - pi->syscall_names = 0; - - /* Open the file descriptor for the sysent file */ - sprintf (pathname, "/proc/%d/sysent", pi->pid); - sysent_fd = open_with_retry (pathname, O_RDONLY); - if (sysent_fd < 0) - { - error ("load_syscalls: Can't open /proc/%d/sysent", pi->pid); - } - - size = sizeof header - sizeof (prsyscall_t); - if (read (sysent_fd, &header, size) != size) - { - error ("load_syscalls: Error reading /proc/%d/sysent", pi->pid); - } - - if (header.pr_nsyscalls == 0) - { - error ("load_syscalls: /proc/%d/sysent contains no syscalls!", pi->pid); - } - - size = header.pr_nsyscalls * sizeof (prsyscall_t); - syscalls = xmalloc (size); - - if (read (sysent_fd, syscalls, size) != size) - { - xfree (syscalls); - error ("load_syscalls: Error reading /proc/%d/sysent", pi->pid); - } - - /* Find maximum syscall number. This may not be the same as - pr_nsyscalls since that value refers to the number of entries - in the table. (Also, the docs indicate that some system - call numbers may be skipped.) */ - - maxcall = syscalls[0].pr_number; - - for (i = 1; i < header.pr_nsyscalls; i++) - if (syscalls[i].pr_number > maxcall - && syscalls[i].pr_nameoff > 0 - && syscalls[i].pr_number < MAX_SYSCALLS) - maxcall = syscalls[i].pr_number; - - pi->num_syscalls = maxcall+1; - pi->syscall_names = xmalloc (pi->num_syscalls * sizeof (char *)); - - for (i = 0; i < pi->num_syscalls; i++) - pi->syscall_names[i] = NULL; - - /* Read the syscall names in */ - for (i = 0; i < header.pr_nsyscalls; i++) - { - char namebuf[MAX_SYSCALL_NAME_LENGTH]; - int nread; - int callnum; - - if (syscalls[i].pr_number >= MAX_SYSCALLS - || syscalls[i].pr_number < 0 - || syscalls[i].pr_nameoff <= 0 - || (lseek (sysent_fd, (off_t) syscalls[i].pr_nameoff, SEEK_SET) - != (off_t) syscalls[i].pr_nameoff)) - continue; - - nread = read (sysent_fd, namebuf, sizeof namebuf); - if (nread <= 0) - continue; - - callnum = syscalls[i].pr_number; - - if (pi->syscall_names[callnum] != NULL) - { - /* FIXME: Generate warning */ - continue; - } - - namebuf[nread-1] = '\0'; - size = strlen (namebuf) + 1; - pi->syscall_names[callnum] = xmalloc (size); - strncpy (pi->syscall_names[callnum], namebuf, size-1); - pi->syscall_names[callnum][size-1] = '\0'; - } - - close (sysent_fd); - xfree (syscalls); -} - -/* Function: free_syscalls - - Free the space allocated for the syscall names from the procinfo - structure. */ - -static void -free_syscalls (procinfo *pi) -{ - if (pi->syscall_names) - { - int i; - - for (i = 0; i < pi->num_syscalls; i++) - if (pi->syscall_names[i] != NULL) - xfree (pi->syscall_names[i]); - - xfree (pi->syscall_names); - pi->syscall_names = 0; - } -} - -/* Function: find_syscall - - Given a name, look up (and return) the corresponding syscall number. - If no match is found, return -1. */ - -static int -find_syscall (procinfo *pi, char *name) -{ - int i; - for (i = 0; i < pi->num_syscalls; i++) - { - if (pi->syscall_names[i] && strcmp (name, pi->syscall_names[i]) == 0) - return i; - } - return -1; -} -#endif - -/* =================== END, STRUCT PROCINFO "MODULE" =================== */ - -/* =================== /proc "MODULE" =================== */ - -/* - * This "module" is the interface layer between the /proc system API - * and the gdb target vector functions. This layer consists of - * access functions that encapsulate each of the basic operations - * that we need to use from the /proc API. - * - * The main motivation for this layer is to hide the fact that - * there are two very different implementations of the /proc API. - * Rather than have a bunch of #ifdefs all thru the gdb target vector - * functions, we do our best to hide them all in here. - */ - -int proc_get_status (procinfo * pi); -long proc_flags (procinfo * pi); -int proc_why (procinfo * pi); -int proc_what (procinfo * pi); -int proc_set_run_on_last_close (procinfo * pi); -int proc_unset_run_on_last_close (procinfo * pi); -int proc_set_inherit_on_fork (procinfo * pi); -int proc_unset_inherit_on_fork (procinfo * pi); -int proc_set_async (procinfo * pi); -int proc_unset_async (procinfo * pi); -int proc_stop_process (procinfo * pi); -int proc_trace_signal (procinfo * pi, int signo); -int proc_ignore_signal (procinfo * pi, int signo); -int proc_clear_current_fault (procinfo * pi); -int proc_set_current_signal (procinfo * pi, int signo); -int proc_clear_current_signal (procinfo * pi); -int proc_set_gregs (procinfo * pi); -int proc_set_fpregs (procinfo * pi); -int proc_wait_for_stop (procinfo * pi); -int proc_run_process (procinfo * pi, int step, int signo); -int proc_kill (procinfo * pi, int signo); -int proc_parent_pid (procinfo * pi); -int proc_get_nthreads (procinfo * pi); -int proc_get_current_thread (procinfo * pi); -int proc_set_held_signals (procinfo * pi, gdb_sigset_t * sighold); -int proc_set_traced_sysexit (procinfo * pi, sysset_t * sysset); -int proc_set_traced_sysentry (procinfo * pi, sysset_t * sysset); -int proc_set_traced_faults (procinfo * pi, fltset_t * fltset); -int proc_set_traced_signals (procinfo * pi, gdb_sigset_t * sigset); - -int proc_update_threads (procinfo * pi); -int proc_iterate_over_threads (procinfo * pi, - int (*func) (procinfo *, procinfo *, void *), - void *ptr); - -gdb_gregset_t *proc_get_gregs (procinfo * pi); -gdb_fpregset_t *proc_get_fpregs (procinfo * pi); -sysset_t *proc_get_traced_sysexit (procinfo * pi, sysset_t * save); -sysset_t *proc_get_traced_sysentry (procinfo * pi, sysset_t * save); -fltset_t *proc_get_traced_faults (procinfo * pi, fltset_t * save); -gdb_sigset_t *proc_get_traced_signals (procinfo * pi, gdb_sigset_t * save); -gdb_sigset_t *proc_get_held_signals (procinfo * pi, gdb_sigset_t * save); -gdb_sigset_t *proc_get_pending_signals (procinfo * pi, gdb_sigset_t * save); -gdb_sigaction_t *proc_get_signal_actions (procinfo * pi, gdb_sigaction_t *save); - -void proc_warn (procinfo * pi, char *func, int line); -void proc_error (procinfo * pi, char *func, int line); - -void -proc_warn (procinfo *pi, char *func, int line) -{ - sprintf (errmsg, "procfs: %s line %d, %s", func, line, pi->pathname); - print_sys_errmsg (errmsg, errno); -} - -void -proc_error (procinfo *pi, char *func, int line) -{ - sprintf (errmsg, "procfs: %s line %d, %s", func, line, pi->pathname); - perror_with_name (errmsg); -} - -/* - * Function: proc_get_status - * - * Updates the status struct in the procinfo. - * There is a 'valid' flag, to let other functions know when - * this function needs to be called (so the status is only - * read when it is needed). The status file descriptor is - * also only opened when it is needed. - * - * Return: non-zero for success, zero for failure. - */ - -int -proc_get_status (procinfo *pi) -{ - /* Status file descriptor is opened "lazily" */ - if (pi->status_fd == 0 && - open_procinfo_files (pi, FD_STATUS) == 0) - { - pi->status_valid = 0; - return 0; - } - -#ifdef NEW_PROC_API - if (lseek (pi->status_fd, 0, SEEK_SET) < 0) - pi->status_valid = 0; /* fail */ - else - { - /* Sigh... I have to read a different data structure, - depending on whether this is a main process or an LWP. */ - if (pi->tid) - pi->status_valid = (read (pi->status_fd, - (char *) &pi->prstatus.pr_lwp, - sizeof (lwpstatus_t)) - == sizeof (lwpstatus_t)); - else - { - pi->status_valid = (read (pi->status_fd, - (char *) &pi->prstatus, - sizeof (gdb_prstatus_t)) - == sizeof (gdb_prstatus_t)); -#if 0 /*def UNIXWARE*/ - if (pi->status_valid && - (pi->prstatus.pr_lwp.pr_flags & PR_ISTOP) && - pi->prstatus.pr_lwp.pr_why == PR_REQUESTED) - /* Unixware peculiarity -- read the damn thing again! */ - pi->status_valid = (read (pi->status_fd, - (char *) &pi->prstatus, - sizeof (gdb_prstatus_t)) - == sizeof (gdb_prstatus_t)); -#endif /* UNIXWARE */ - } - } -#else /* ioctl method */ -#ifdef PIOCTSTATUS /* osf */ - if (pi->tid == 0) /* main process */ - { - /* Just read the danged status. Now isn't that simple? */ - pi->status_valid = - (ioctl (pi->status_fd, PIOCSTATUS, &pi->prstatus) >= 0); - } - else - { - int win; - struct { - long pr_count; - tid_t pr_error_thread; - struct prstatus status; - } thread_status; - - thread_status.pr_count = 1; - thread_status.status.pr_tid = pi->tid; - win = (ioctl (pi->status_fd, PIOCTSTATUS, &thread_status) >= 0); - if (win) - { - memcpy (&pi->prstatus, &thread_status.status, - sizeof (pi->prstatus)); - pi->status_valid = 1; - } - } -#else - /* Just read the danged status. Now isn't that simple? */ - pi->status_valid = (ioctl (pi->status_fd, PIOCSTATUS, &pi->prstatus) >= 0); -#endif -#endif - - if (pi->status_valid) - { - PROC_PRETTYFPRINT_STATUS (proc_flags (pi), - proc_why (pi), - proc_what (pi), - proc_get_current_thread (pi)); - } - - /* The status struct includes general regs, so mark them valid too */ - pi->gregs_valid = pi->status_valid; -#ifdef NEW_PROC_API - /* In the read/write multiple-fd model, - the status struct includes the fp regs too, so mark them valid too */ - pi->fpregs_valid = pi->status_valid; -#endif - return pi->status_valid; /* True if success, false if failure. */ -} - -/* - * Function: proc_flags - * - * returns the process flags (pr_flags field). - */ - -long -proc_flags (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; /* FIXME: not a good failure value (but what is?) */ - -#ifdef NEW_PROC_API -# ifdef UNIXWARE - /* UnixWare 7.1 puts process status flags, e.g. PR_ASYNC, in - pstatus_t and LWP status flags, e.g. PR_STOPPED, in lwpstatus_t. - The two sets of flags don't overlap. */ - return pi->prstatus.pr_flags | pi->prstatus.pr_lwp.pr_flags; -# else - return pi->prstatus.pr_lwp.pr_flags; -# endif -#else - return pi->prstatus.pr_flags; -#endif -} - -/* - * Function: proc_why - * - * returns the pr_why field (why the process stopped). - */ - -int -proc_why (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; /* FIXME: not a good failure value (but what is?) */ - -#ifdef NEW_PROC_API - return pi->prstatus.pr_lwp.pr_why; -#else - return pi->prstatus.pr_why; -#endif -} - -/* - * Function: proc_what - * - * returns the pr_what field (details of why the process stopped). - */ - -int -proc_what (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; /* FIXME: not a good failure value (but what is?) */ - -#ifdef NEW_PROC_API - return pi->prstatus.pr_lwp.pr_what; -#else - return pi->prstatus.pr_what; -#endif -} - -#ifndef PIOCSSPCACT /* The following is not supported on OSF. */ -/* - * Function: proc_nsysarg - * - * returns the pr_nsysarg field (number of args to the current syscall). - */ - -int -proc_nsysarg (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; - -#ifdef NEW_PROC_API - return pi->prstatus.pr_lwp.pr_nsysarg; -#else - return pi->prstatus.pr_nsysarg; -#endif -} - -/* - * Function: proc_sysargs - * - * returns the pr_sysarg field (pointer to the arguments of current syscall). - */ - -long * -proc_sysargs (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifdef NEW_PROC_API - return (long *) &pi->prstatus.pr_lwp.pr_sysarg; -#else - return (long *) &pi->prstatus.pr_sysarg; -#endif -} - -/* - * Function: proc_syscall - * - * returns the pr_syscall field (id of current syscall if we are in one). - */ - -int -proc_syscall (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; - -#ifdef NEW_PROC_API - return pi->prstatus.pr_lwp.pr_syscall; -#else - return pi->prstatus.pr_syscall; -#endif -} -#endif /* PIOCSSPCACT */ - -/* - * Function: proc_cursig: - * - * returns the pr_cursig field (current signal). - */ - -long -proc_cursig (struct procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; /* FIXME: not a good failure value (but what is?) */ - -#ifdef NEW_PROC_API - return pi->prstatus.pr_lwp.pr_cursig; -#else - return pi->prstatus.pr_cursig; -#endif -} - -/* - * Function: proc_modify_flag - * - * === I appologize for the messiness of this function. - * === This is an area where the different versions of - * === /proc are more inconsistent than usual. MVS - * - * Set or reset any of the following process flags: - * PR_FORK -- forked child will inherit trace flags - * PR_RLC -- traced process runs when last /proc file closed. - * PR_KLC -- traced process is killed when last /proc file closed. - * PR_ASYNC -- LWP's get to run/stop independently. - * - * There are three methods for doing this function: - * 1) Newest: read/write [PCSET/PCRESET/PCUNSET] - * [Sol6, Sol7, UW] - * 2) Middle: PIOCSET/PIOCRESET - * [Irix, Sol5] - * 3) Oldest: PIOCSFORK/PIOCRFORK/PIOCSRLC/PIOCRRLC - * [OSF, Sol5] - * - * Note: Irix does not define PR_ASYNC. - * Note: OSF does not define PR_KLC. - * Note: OSF is the only one that can ONLY use the oldest method. - * - * Arguments: - * pi -- the procinfo - * flag -- one of PR_FORK, PR_RLC, or PR_ASYNC - * mode -- 1 for set, 0 for reset. - * - * Returns non-zero for success, zero for failure. - */ - -enum { FLAG_RESET, FLAG_SET }; - -static int -proc_modify_flag (procinfo *pi, long flag, long mode) -{ - long win = 0; /* default to fail */ - - /* - * These operations affect the process as a whole, and applying - * them to an individual LWP has the same meaning as applying them - * to the main process. Therefore, if we're ever called with a - * pointer to an LWP's procinfo, let's substitute the process's - * procinfo and avoid opening the LWP's file descriptor - * unnecessarily. - */ - - if (pi->pid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API /* Newest method: UnixWare and newer Solarii */ - /* First normalize the PCUNSET/PCRESET command opcode - (which for no obvious reason has a different definition - from one operating system to the next...) */ -#ifdef PCUNSET -#define GDBRESET PCUNSET -#else -#ifdef PCRESET -#define GDBRESET PCRESET -#endif -#endif - { - procfs_ctl_t arg[2]; - - if (mode == FLAG_SET) /* Set the flag (RLC, FORK, or ASYNC) */ - arg[0] = PCSET; - else /* Reset the flag */ - arg[0] = GDBRESET; - - arg[1] = flag; - win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg)); - } -#else -#ifdef PIOCSET /* Irix/Sol5 method */ - if (mode == FLAG_SET) /* Set the flag (hopefully RLC, FORK, or ASYNC) */ - { - win = (ioctl (pi->ctl_fd, PIOCSET, &flag) >= 0); - } - else /* Reset the flag */ - { - win = (ioctl (pi->ctl_fd, PIOCRESET, &flag) >= 0); - } - -#else -#ifdef PIOCSRLC /* Oldest method: OSF */ - switch (flag) { - case PR_RLC: - if (mode == FLAG_SET) /* Set run-on-last-close */ - { - win = (ioctl (pi->ctl_fd, PIOCSRLC, NULL) >= 0); - } - else /* Clear run-on-last-close */ - { - win = (ioctl (pi->ctl_fd, PIOCRRLC, NULL) >= 0); - } - break; - case PR_FORK: - if (mode == FLAG_SET) /* Set inherit-on-fork */ - { - win = (ioctl (pi->ctl_fd, PIOCSFORK, NULL) >= 0); - } - else /* Clear inherit-on-fork */ - { - win = (ioctl (pi->ctl_fd, PIOCRFORK, NULL) >= 0); - } - break; - default: - win = 0; /* fail -- unknown flag (can't do PR_ASYNC) */ - break; - } -#endif -#endif -#endif -#undef GDBRESET - /* The above operation renders the procinfo's cached pstatus obsolete. */ - pi->status_valid = 0; - - if (!win) - warning ("procfs: modify_flag failed to turn %s %s", - flag == PR_FORK ? "PR_FORK" : - flag == PR_RLC ? "PR_RLC" : -#ifdef PR_ASYNC - flag == PR_ASYNC ? "PR_ASYNC" : -#endif -#ifdef PR_KLC - flag == PR_KLC ? "PR_KLC" : -#endif - "<unknown flag>", - mode == FLAG_RESET ? "off" : "on"); - - return win; -} - -/* - * Function: proc_set_run_on_last_close - * - * Set the run_on_last_close flag. - * Process with all threads will become runnable - * when debugger closes all /proc fds. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_run_on_last_close (procinfo *pi) -{ - return proc_modify_flag (pi, PR_RLC, FLAG_SET); -} - -/* - * Function: proc_unset_run_on_last_close - * - * Reset the run_on_last_close flag. - * Process will NOT become runnable - * when debugger closes its file handles. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_unset_run_on_last_close (procinfo *pi) -{ - return proc_modify_flag (pi, PR_RLC, FLAG_RESET); -} - -#ifdef PR_KLC -/* - * Function: proc_set_kill_on_last_close - * - * Set the kill_on_last_close flag. - * Process with all threads will be killed when debugger - * closes all /proc fds (or debugger exits or dies). - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_kill_on_last_close (procinfo *pi) -{ - return proc_modify_flag (pi, PR_KLC, FLAG_SET); -} - -/* - * Function: proc_unset_kill_on_last_close - * - * Reset the kill_on_last_close flag. - * Process will NOT be killed when debugger - * closes its file handles (or exits or dies). - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_unset_kill_on_last_close (procinfo *pi) -{ - return proc_modify_flag (pi, PR_KLC, FLAG_RESET); -} -#endif /* PR_KLC */ - -/* - * Function: proc_set_inherit_on_fork - * - * Set inherit_on_fork flag. - * If the process forks a child while we are registered for events - * in the parent, then we will also recieve events from the child. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_inherit_on_fork (procinfo *pi) -{ - return proc_modify_flag (pi, PR_FORK, FLAG_SET); -} - -/* - * Function: proc_unset_inherit_on_fork - * - * Reset inherit_on_fork flag. - * If the process forks a child while we are registered for events - * in the parent, then we will NOT recieve events from the child. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_unset_inherit_on_fork (procinfo *pi) -{ - return proc_modify_flag (pi, PR_FORK, FLAG_RESET); -} - -#ifdef PR_ASYNC -/* - * Function: proc_set_async - * - * Set PR_ASYNC flag. - * If one LWP stops because of a debug event (signal etc.), - * the remaining LWPs will continue to run. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_async (procinfo *pi) -{ - return proc_modify_flag (pi, PR_ASYNC, FLAG_SET); -} - -/* - * Function: proc_unset_async - * - * Reset PR_ASYNC flag. - * If one LWP stops because of a debug event (signal etc.), - * then all other LWPs will stop as well. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_unset_async (procinfo *pi) -{ - return proc_modify_flag (pi, PR_ASYNC, FLAG_RESET); -} -#endif /* PR_ASYNC */ - -/* - * Function: proc_stop_process - * - * Request the process/LWP to stop. Does not wait. - * Returns non-zero for success, zero for failure. - */ - -int -proc_stop_process (procinfo *pi) -{ - int win; - - /* - * We might conceivably apply this operation to an LWP, and - * the LWP's ctl file descriptor might not be open. - */ - - if (pi->ctl_fd == 0 && - open_procinfo_files (pi, FD_CTL) == 0) - return 0; - else - { -#ifdef NEW_PROC_API - procfs_ctl_t cmd = PCSTOP; - win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd)); -#else /* ioctl method */ - win = (ioctl (pi->ctl_fd, PIOCSTOP, &pi->prstatus) >= 0); - /* Note: the call also reads the prstatus. */ - if (win) - { - pi->status_valid = 1; - PROC_PRETTYFPRINT_STATUS (proc_flags (pi), - proc_why (pi), - proc_what (pi), - proc_get_current_thread (pi)); - } -#endif - } - - return win; -} - -/* - * Function: proc_wait_for_stop - * - * Wait for the process or LWP to stop (block until it does). - * Returns non-zero for success, zero for failure. - */ - -int -proc_wait_for_stop (procinfo *pi) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - procfs_ctl_t cmd = PCWSTOP; - win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd)); - /* We been runnin' and we stopped -- need to update status. */ - pi->status_valid = 0; - } -#else /* ioctl method */ - win = (ioctl (pi->ctl_fd, PIOCWSTOP, &pi->prstatus) >= 0); - /* Above call also refreshes the prstatus. */ - if (win) - { - pi->status_valid = 1; - PROC_PRETTYFPRINT_STATUS (proc_flags (pi), - proc_why (pi), - proc_what (pi), - proc_get_current_thread (pi)); - } -#endif - - return win; -} - -/* - * Function: proc_run_process - * - * Make the process or LWP runnable. - * Options (not all are implemented): - * - single-step - * - clear current fault - * - clear current signal - * - abort the current system call - * - stop as soon as finished with system call - * - (ioctl): set traced signal set - * - (ioctl): set held signal set - * - (ioctl): set traced fault set - * - (ioctl): set start pc (vaddr) - * Always clear the current fault. - * Clear the current signal if 'signo' is zero. - * - * Arguments: - * pi the process or LWP to operate on. - * step if true, set the process or LWP to trap after one instr. - * signo if zero, clear the current signal if any. - * if non-zero, set the current signal to this one. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_run_process (procinfo *pi, int step, int signo) -{ - int win; - int runflags; - - /* - * We will probably have to apply this operation to individual threads, - * so make sure the control file descriptor is open. - */ - - if (pi->ctl_fd == 0 && - open_procinfo_files (pi, FD_CTL) == 0) - { - return 0; - } - - runflags = PRCFAULT; /* always clear current fault */ - if (step) - runflags |= PRSTEP; - if (signo == 0) - runflags |= PRCSIG; - else if (signo != -1) /* -1 means do nothing W.R.T. signals */ - proc_set_current_signal (pi, signo); - -#ifdef NEW_PROC_API - { - procfs_ctl_t cmd[2]; - - cmd[0] = PCRUN; - cmd[1] = runflags; - win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd)); - } -#else /* ioctl method */ - { - prrun_t prrun; - - memset (&prrun, 0, sizeof (prrun)); - prrun.pr_flags = runflags; - win = (ioctl (pi->ctl_fd, PIOCRUN, &prrun) >= 0); - } -#endif - - return win; -} - -/* - * Function: proc_set_traced_signals - * - * Register to trace signals in the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_traced_signals (procinfo *pi, gdb_sigset_t *sigset) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char sigset[sizeof (gdb_sigset_t)]; - } arg; - - arg.cmd = PCSTRACE; - memcpy (&arg.sigset, sigset, sizeof (gdb_sigset_t)); - - win = (write (pi->ctl_fd, (char *) &arg, sizeof (arg)) == sizeof (arg)); - } -#else /* ioctl method */ - win = (ioctl (pi->ctl_fd, PIOCSTRACE, sigset) >= 0); -#endif - /* The above operation renders the procinfo's cached pstatus obsolete. */ - pi->status_valid = 0; - - if (!win) - warning ("procfs: set_traced_signals failed"); - return win; -} - -/* - * Function: proc_set_traced_faults - * - * Register to trace hardware faults in the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_traced_faults (procinfo *pi, fltset_t *fltset) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char fltset[sizeof (fltset_t)]; - } arg; - - arg.cmd = PCSFAULT; - memcpy (&arg.fltset, fltset, sizeof (fltset_t)); - - win = (write (pi->ctl_fd, (char *) &arg, sizeof (arg)) == sizeof (arg)); - } -#else /* ioctl method */ - win = (ioctl (pi->ctl_fd, PIOCSFAULT, fltset) >= 0); -#endif - /* The above operation renders the procinfo's cached pstatus obsolete. */ - pi->status_valid = 0; - - return win; -} - -/* - * Function: proc_set_traced_sysentry - * - * Register to trace entry to system calls in the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_traced_sysentry (procinfo *pi, sysset_t *sysset) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - struct gdb_proc_ctl_pcsentry { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char sysset[sizeof (sysset_t)]; - } *argp; - int argp_size = sizeof (struct gdb_proc_ctl_pcsentry) - - sizeof (sysset_t) - + sysset_t_size (pi); - - argp = xmalloc (argp_size); - - argp->cmd = PCSENTRY; - memcpy (&argp->sysset, sysset, sysset_t_size (pi)); - - win = (write (pi->ctl_fd, (char *) argp, argp_size) == argp_size); - xfree (argp); - } -#else /* ioctl method */ - win = (ioctl (pi->ctl_fd, PIOCSENTRY, sysset) >= 0); -#endif - /* The above operation renders the procinfo's cached pstatus obsolete. */ - pi->status_valid = 0; - - return win; -} - -/* - * Function: proc_set_traced_sysexit - * - * Register to trace exit from system calls in the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_traced_sysexit (procinfo *pi, sysset_t *sysset) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - struct gdb_proc_ctl_pcsexit { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char sysset[sizeof (sysset_t)]; - } *argp; - int argp_size = sizeof (struct gdb_proc_ctl_pcsexit) - - sizeof (sysset_t) - + sysset_t_size (pi); - - argp = xmalloc (argp_size); - - argp->cmd = PCSEXIT; - memcpy (&argp->sysset, sysset, sysset_t_size (pi)); - - win = (write (pi->ctl_fd, (char *) argp, argp_size) == argp_size); - xfree (argp); - } -#else /* ioctl method */ - win = (ioctl (pi->ctl_fd, PIOCSEXIT, sysset) >= 0); -#endif - /* The above operation renders the procinfo's cached pstatus obsolete. */ - pi->status_valid = 0; - - return win; -} - -/* - * Function: proc_set_held_signals - * - * Specify the set of blocked / held signals in the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_held_signals (procinfo *pi, gdb_sigset_t *sighold) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char hold[sizeof (gdb_sigset_t)]; - } arg; - - arg.cmd = PCSHOLD; - memcpy (&arg.hold, sighold, sizeof (gdb_sigset_t)); - win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg)); - } -#else - win = (ioctl (pi->ctl_fd, PIOCSHOLD, sighold) >= 0); -#endif - /* The above operation renders the procinfo's cached pstatus obsolete. */ - pi->status_valid = 0; - - return win; -} - -/* - * Function: proc_get_pending_signals - * - * returns the set of signals that are pending in the process or LWP. - * Will also copy the sigset if 'save' is non-zero. - */ - -gdb_sigset_t * -proc_get_pending_signals (procinfo *pi, gdb_sigset_t *save) -{ - gdb_sigset_t *ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifdef NEW_PROC_API - ret = &pi->prstatus.pr_lwp.pr_lwppend; -#else - ret = &pi->prstatus.pr_sigpend; -#endif - if (save && ret) - memcpy (save, ret, sizeof (gdb_sigset_t)); - - return ret; -} - -/* - * Function: proc_get_signal_actions - * - * returns the set of signal actions. - * Will also copy the sigactionset if 'save' is non-zero. - */ - -gdb_sigaction_t * -proc_get_signal_actions (procinfo *pi, gdb_sigaction_t *save) -{ - gdb_sigaction_t *ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifdef NEW_PROC_API - ret = &pi->prstatus.pr_lwp.pr_action; -#else - ret = &pi->prstatus.pr_action; -#endif - if (save && ret) - memcpy (save, ret, sizeof (gdb_sigaction_t)); - - return ret; -} - -/* - * Function: proc_get_held_signals - * - * returns the set of signals that are held / blocked. - * Will also copy the sigset if 'save' is non-zero. - */ - -gdb_sigset_t * -proc_get_held_signals (procinfo *pi, gdb_sigset_t *save) -{ - gdb_sigset_t *ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifdef UNIXWARE - ret = &pi->prstatus.pr_lwp.pr_context.uc_sigmask; -#else - ret = &pi->prstatus.pr_lwp.pr_lwphold; -#endif /* UNIXWARE */ -#else /* not NEW_PROC_API */ - { - static gdb_sigset_t sigheld; - - if (ioctl (pi->ctl_fd, PIOCGHOLD, &sigheld) >= 0) - ret = &sigheld; - } -#endif /* NEW_PROC_API */ - if (save && ret) - memcpy (save, ret, sizeof (gdb_sigset_t)); - - return ret; -} - -/* - * Function: proc_get_traced_signals - * - * returns the set of signals that are traced / debugged. - * Will also copy the sigset if 'save' is non-zero. - */ - -gdb_sigset_t * -proc_get_traced_signals (procinfo *pi, gdb_sigset_t *save) -{ - gdb_sigset_t *ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - - ret = &pi->prstatus.pr_sigtrace; -#else - { - static gdb_sigset_t sigtrace; - - if (ioctl (pi->ctl_fd, PIOCGTRACE, &sigtrace) >= 0) - ret = &sigtrace; - } -#endif - if (save && ret) - memcpy (save, ret, sizeof (gdb_sigset_t)); - - return ret; -} - -/* - * Function: proc_trace_signal - * - * Add 'signo' to the set of signals that are traced. - * Returns non-zero for success, zero for failure. - */ - -int -proc_trace_signal (procinfo *pi, int signo) -{ - gdb_sigset_t temp; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - if (pi) - { - if (proc_get_traced_signals (pi, &temp)) - { - praddset (&temp, signo); - return proc_set_traced_signals (pi, &temp); - } - } - - return 0; /* failure */ -} - -/* - * Function: proc_ignore_signal - * - * Remove 'signo' from the set of signals that are traced. - * Returns non-zero for success, zero for failure. - */ - -int -proc_ignore_signal (procinfo *pi, int signo) -{ - gdb_sigset_t temp; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - if (pi) - { - if (proc_get_traced_signals (pi, &temp)) - { - prdelset (&temp, signo); - return proc_set_traced_signals (pi, &temp); - } - } - - return 0; /* failure */ -} - -/* - * Function: proc_get_traced_faults - * - * returns the set of hardware faults that are traced /debugged. - * Will also copy the faultset if 'save' is non-zero. - */ - -fltset_t * -proc_get_traced_faults (procinfo *pi, fltset_t *save) -{ - fltset_t *ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - - ret = &pi->prstatus.pr_flttrace; -#else - { - static fltset_t flttrace; - - if (ioctl (pi->ctl_fd, PIOCGFAULT, &flttrace) >= 0) - ret = &flttrace; - } -#endif - if (save && ret) - memcpy (save, ret, sizeof (fltset_t)); - - return ret; -} - -/* - * Function: proc_get_traced_sysentry - * - * returns the set of syscalls that are traced /debugged on entry. - * Will also copy the syscall set if 'save' is non-zero. - */ - -sysset_t * -proc_get_traced_sysentry (procinfo *pi, sysset_t *save) -{ - sysset_t *ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifndef DYNAMIC_SYSCALLS - ret = &pi->prstatus.pr_sysentry; -#else /* DYNAMIC_SYSCALLS */ - { - static sysset_t *sysentry; - size_t size; - - if (!sysentry) - sysentry = sysset_t_alloc (pi); - ret = sysentry; - if (pi->status_fd == 0 && open_procinfo_files (pi, FD_STATUS) == 0) - return NULL; - if (pi->prstatus.pr_sysentry_offset == 0) - { - gdb_premptysysset (sysentry); - } - else - { - int rsize; - - if (lseek (pi->status_fd, (off_t) pi->prstatus.pr_sysentry_offset, - SEEK_SET) - != (off_t) pi->prstatus.pr_sysentry_offset) - return NULL; - size = sysset_t_size (pi); - gdb_premptysysset (sysentry); - rsize = read (pi->status_fd, sysentry, size); - if (rsize < 0) - return NULL; - } - } -#endif /* DYNAMIC_SYSCALLS */ -#else /* !NEW_PROC_API */ - { - static sysset_t sysentry; - - if (ioctl (pi->ctl_fd, PIOCGENTRY, &sysentry) >= 0) - ret = &sysentry; - } -#endif /* NEW_PROC_API */ - if (save && ret) - memcpy (save, ret, sysset_t_size (pi)); - - return ret; -} - -/* - * Function: proc_get_traced_sysexit - * - * returns the set of syscalls that are traced /debugged on exit. - * Will also copy the syscall set if 'save' is non-zero. - */ - -sysset_t * -proc_get_traced_sysexit (procinfo *pi, sysset_t *save) -{ - sysset_t * ret = NULL; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - if (!pi->status_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifndef DYNAMIC_SYSCALLS - ret = &pi->prstatus.pr_sysexit; -#else /* DYNAMIC_SYSCALLS */ - { - static sysset_t *sysexit; - size_t size; - - if (!sysexit) - sysexit = sysset_t_alloc (pi); - ret = sysexit; - if (pi->status_fd == 0 && open_procinfo_files (pi, FD_STATUS) == 0) - return NULL; - if (pi->prstatus.pr_sysexit_offset == 0) - { - gdb_premptysysset (sysexit); - } - else - { - int rsize; - - if (lseek (pi->status_fd, (off_t) pi->prstatus.pr_sysexit_offset, SEEK_SET) - != (off_t) pi->prstatus.pr_sysexit_offset) - return NULL; - size = sysset_t_size (pi); - gdb_premptysysset (sysexit); - rsize = read (pi->status_fd, sysexit, size); - if (rsize < 0) - return NULL; - } - } -#endif /* DYNAMIC_SYSCALLS */ -#else - { - static sysset_t sysexit; - - if (ioctl (pi->ctl_fd, PIOCGEXIT, &sysexit) >= 0) - ret = &sysexit; - } -#endif - if (save && ret) - memcpy (save, ret, sysset_t_size (pi)); - - return ret; -} - -/* - * Function: proc_clear_current_fault - * - * The current fault (if any) is cleared; the associated signal - * will not be sent to the process or LWP when it resumes. - * Returns non-zero for success, zero for failure. - */ - -int -proc_clear_current_fault (procinfo *pi) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - procfs_ctl_t cmd = PCCFAULT; - win = (write (pi->ctl_fd, (void *) &cmd, sizeof (cmd)) == sizeof (cmd)); - } -#else - win = (ioctl (pi->ctl_fd, PIOCCFAULT, 0) >= 0); -#endif - - return win; -} - -/* - * Function: proc_set_current_signal - * - * Set the "current signal" that will be delivered next to the process. - * NOTE: semantics are different from those of KILL. - * This signal will be delivered to the process or LWP - * immediately when it is resumed (even if the signal is held/blocked); - * it will NOT immediately cause another event of interest, and will NOT - * first trap back to the debugger. - * - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_current_signal (procinfo *pi, int signo) -{ - int win; - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char sinfo[sizeof (gdb_siginfo_t)]; - } arg; - gdb_siginfo_t *mysinfo; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef PROCFS_DONT_PIOCSSIG_CURSIG - /* With Alpha OSF/1 procfs, the kernel gets really confused if it - * receives a PIOCSSIG with a signal identical to the current signal, - * it messes up the current signal. Work around the kernel bug. - */ - if (signo > 0 && - signo == proc_cursig (pi)) - return 1; /* I assume this is a success? */ -#endif - - /* The pointer is just a type alias. */ - mysinfo = (gdb_siginfo_t *) &arg.sinfo; - mysinfo->si_signo = signo; - mysinfo->si_code = 0; - mysinfo->si_pid = getpid (); /* ?why? */ - mysinfo->si_uid = getuid (); /* ?why? */ - -#ifdef NEW_PROC_API - arg.cmd = PCSSIG; - win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg)); -#else - win = (ioctl (pi->ctl_fd, PIOCSSIG, (void *) &arg.sinfo) >= 0); -#endif - - return win; -} - -/* - * Function: proc_clear_current_signal - * - * The current signal (if any) is cleared, and - * is not sent to the process or LWP when it resumes. - * Returns non-zero for success, zero for failure. - */ - -int -proc_clear_current_signal (procinfo *pi) -{ - int win; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - -#ifdef NEW_PROC_API - { - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char sinfo[sizeof (gdb_siginfo_t)]; - } arg; - gdb_siginfo_t *mysinfo; - - arg.cmd = PCSSIG; - /* The pointer is just a type alias. */ - mysinfo = (gdb_siginfo_t *) &arg.sinfo; - mysinfo->si_signo = 0; - mysinfo->si_code = 0; - mysinfo->si_errno = 0; - mysinfo->si_pid = getpid (); /* ?why? */ - mysinfo->si_uid = getuid (); /* ?why? */ - - win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg)); - } -#else - win = (ioctl (pi->ctl_fd, PIOCSSIG, 0) >= 0); -#endif - - return win; -} - -/* - * Function: proc_get_gregs - * - * Get the general registers for the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -gdb_gregset_t * -proc_get_gregs (procinfo *pi) -{ - if (!pi->status_valid || !pi->gregs_valid) - if (!proc_get_status (pi)) - return NULL; - - /* - * OK, sorry about the ifdef's. - * There's three cases instead of two, because - * in this instance Unixware and Solaris/RW differ. - */ - -#ifdef NEW_PROC_API -#ifdef UNIXWARE /* ugh, a true architecture dependency */ - return &pi->prstatus.pr_lwp.pr_context.uc_mcontext.gregs; -#else /* not Unixware */ - return &pi->prstatus.pr_lwp.pr_reg; -#endif /* Unixware */ -#else /* not NEW_PROC_API */ - return &pi->prstatus.pr_reg; -#endif /* NEW_PROC_API */ -} - -/* - * Function: proc_get_fpregs - * - * Get the floating point registers for the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -gdb_fpregset_t * -proc_get_fpregs (procinfo *pi) -{ -#ifdef NEW_PROC_API - if (!pi->status_valid || !pi->fpregs_valid) - if (!proc_get_status (pi)) - return NULL; - -#ifdef UNIXWARE /* a true architecture dependency */ - return &pi->prstatus.pr_lwp.pr_context.uc_mcontext.fpregs; -#else - return &pi->prstatus.pr_lwp.pr_fpreg; -#endif /* Unixware */ - -#else /* not NEW_PROC_API */ - if (pi->fpregs_valid) - return &pi->fpregset; /* already got 'em */ - else - { - if (pi->ctl_fd == 0 && - open_procinfo_files (pi, FD_CTL) == 0) - { - return NULL; - } - else - { -#ifdef PIOCTGFPREG - struct { - long pr_count; - tid_t pr_error_thread; - tfpregset_t thread_1; - } thread_fpregs; - - thread_fpregs.pr_count = 1; - thread_fpregs.thread_1.tid = pi->tid; - - if (pi->tid == 0 && - ioctl (pi->ctl_fd, PIOCGFPREG, &pi->fpregset) >= 0) - { - pi->fpregs_valid = 1; - return &pi->fpregset; /* got 'em now! */ - } - else if (pi->tid != 0 && - ioctl (pi->ctl_fd, PIOCTGFPREG, &thread_fpregs) >= 0) - { - memcpy (&pi->fpregset, &thread_fpregs.thread_1.pr_fpregs, - sizeof (pi->fpregset)); - pi->fpregs_valid = 1; - return &pi->fpregset; /* got 'em now! */ - } - else - { - return NULL; - } -#else - if (ioctl (pi->ctl_fd, PIOCGFPREG, &pi->fpregset) >= 0) - { - pi->fpregs_valid = 1; - return &pi->fpregset; /* got 'em now! */ - } - else - { - return NULL; - } -#endif - } - } -#endif -} - -/* - * Function: proc_set_gregs - * - * Write the general registers back to the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_gregs (procinfo *pi) -{ - gdb_gregset_t *gregs; - int win; - - if ((gregs = proc_get_gregs (pi)) == NULL) - return 0; /* get_regs has already warned */ - - if (pi->ctl_fd == 0 && - open_procinfo_files (pi, FD_CTL) == 0) - { - return 0; - } - else - { -#ifdef NEW_PROC_API - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char gregs[sizeof (gdb_gregset_t)]; - } arg; - - arg.cmd = PCSREG; - memcpy (&arg.gregs, gregs, sizeof (arg.gregs)); - win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg)); -#else - win = (ioctl (pi->ctl_fd, PIOCSREG, gregs) >= 0); -#endif - } - - /* Policy: writing the regs invalidates our cache. */ - pi->gregs_valid = 0; - return win; -} - -/* - * Function: proc_set_fpregs - * - * Modify the floating point register set of the process or LWP. - * Returns non-zero for success, zero for failure. - */ - -int -proc_set_fpregs (procinfo *pi) -{ - gdb_fpregset_t *fpregs; - int win; - - if ((fpregs = proc_get_fpregs (pi)) == NULL) - return 0; /* get_fpregs has already warned */ - - if (pi->ctl_fd == 0 && - open_procinfo_files (pi, FD_CTL) == 0) - { - return 0; - } - else - { -#ifdef NEW_PROC_API - struct { - procfs_ctl_t cmd; - /* Use char array to avoid alignment issues. */ - char fpregs[sizeof (gdb_fpregset_t)]; - } arg; - - arg.cmd = PCSFPREG; - memcpy (&arg.fpregs, fpregs, sizeof (arg.fpregs)); - win = (write (pi->ctl_fd, (void *) &arg, sizeof (arg)) == sizeof (arg)); -#else -#ifdef PIOCTSFPREG - if (pi->tid == 0) - win = (ioctl (pi->ctl_fd, PIOCSFPREG, fpregs) >= 0); - else - { - struct { - long pr_count; - tid_t pr_error_thread; - tfpregset_t thread_1; - } thread_fpregs; - - thread_fpregs.pr_count = 1; - thread_fpregs.thread_1.tid = pi->tid; - memcpy (&thread_fpregs.thread_1.pr_fpregs, fpregs, - sizeof (*fpregs)); - win = (ioctl (pi->ctl_fd, PIOCTSFPREG, &thread_fpregs) >= 0); - } -#else - win = (ioctl (pi->ctl_fd, PIOCSFPREG, fpregs) >= 0); -#endif /* osf PIOCTSFPREG */ -#endif /* NEW_PROC_API */ - } - - /* Policy: writing the regs invalidates our cache. */ - pi->fpregs_valid = 0; - return win; -} - -/* - * Function: proc_kill - * - * Send a signal to the proc or lwp with the semantics of "kill()". - * Returns non-zero for success, zero for failure. - */ - -int -proc_kill (procinfo *pi, int signo) -{ - int win; - - /* - * We might conceivably apply this operation to an LWP, and - * the LWP's ctl file descriptor might not be open. - */ - - if (pi->ctl_fd == 0 && - open_procinfo_files (pi, FD_CTL) == 0) - { - return 0; - } - else - { -#ifdef NEW_PROC_API - procfs_ctl_t cmd[2]; - - cmd[0] = PCKILL; - cmd[1] = signo; - win = (write (pi->ctl_fd, (char *) &cmd, sizeof (cmd)) == sizeof (cmd)); -#else /* ioctl method */ - /* FIXME: do I need the Alpha OSF fixups present in - procfs.c/unconditionally_kill_inferior? Perhaps only for SIGKILL? */ - win = (ioctl (pi->ctl_fd, PIOCKILL, &signo) >= 0); -#endif - } - - return win; -} - -/* - * Function: proc_parent_pid - * - * Find the pid of the process that started this one. - * Returns the parent process pid, or zero. - */ - -int -proc_parent_pid (procinfo *pi) -{ - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; - - return pi->prstatus.pr_ppid; -} - - -/* - * Function: proc_set_watchpoint - * - */ - -int -proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags) -{ -#if !defined (TARGET_HAS_HARDWARE_WATCHPOINTS) - return 0; -#else -/* Horrible hack! Detect Solaris 2.5, because this doesn't work on 2.5 */ -#if defined (PIOCOPENLWP) || defined (UNIXWARE) /* Solaris 2.5: bail out */ - return 0; -#else - struct { - procfs_ctl_t cmd; - char watch[sizeof (prwatch_t)]; - } arg; - prwatch_t *pwatch; - - pwatch = (prwatch_t *) &arg.watch; -#ifdef PCAGENT /* Horrible hack: only defined on Solaris 2.6+ */ - pwatch->pr_vaddr = (uintptr_t) address_to_host_pointer (addr); -#else - pwatch->pr_vaddr = (caddr_t) address_to_host_pointer (addr); -#endif - pwatch->pr_size = len; - pwatch->pr_wflags = wflags; -#if defined(NEW_PROC_API) && defined (PCWATCH) - arg.cmd = PCWATCH; - return (write (pi->ctl_fd, &arg, sizeof (arg)) == sizeof (arg)); -#else -#if defined (PIOCSWATCH) - return (ioctl (pi->ctl_fd, PIOCSWATCH, pwatch) >= 0); -#else - return 0; /* Fail */ -#endif -#endif -#endif -#endif -} - -#ifdef TM_I386SOL2_H /* Is it hokey to use this? */ - -#include <sys/sysi86.h> - -/* - * Function: proc_get_LDT_entry - * - * Inputs: - * procinfo *pi; - * int key; - * - * The 'key' is actually the value of the lower 16 bits of - * the GS register for the LWP that we're interested in. - * - * Return: matching ssh struct (LDT entry). - */ - -struct ssd * -proc_get_LDT_entry (procinfo *pi, int key) -{ - static struct ssd *ldt_entry = NULL; -#ifdef NEW_PROC_API - char pathname[MAX_PROC_NAME_SIZE]; - struct cleanup *old_chain = NULL; - int fd; - - /* Allocate space for one LDT entry. - This alloc must persist, because we return a pointer to it. */ - if (ldt_entry == NULL) - ldt_entry = (struct ssd *) xmalloc (sizeof (struct ssd)); - - /* Open the file descriptor for the LDT table. */ - sprintf (pathname, "/proc/%d/ldt", pi->pid); - if ((fd = open_with_retry (pathname, O_RDONLY)) < 0) - { - proc_warn (pi, "proc_get_LDT_entry (open)", __LINE__); - return NULL; - } - /* Make sure it gets closed again! */ - old_chain = make_cleanup_close (fd); - - /* Now 'read' thru the table, find a match and return it. */ - while (read (fd, ldt_entry, sizeof (struct ssd)) == sizeof (struct ssd)) - { - if (ldt_entry->sel == 0 && - ldt_entry->bo == 0 && - ldt_entry->acc1 == 0 && - ldt_entry->acc2 == 0) - break; /* end of table */ - /* If key matches, return this entry. */ - if (ldt_entry->sel == key) - return ldt_entry; - } - /* Loop ended, match not found. */ - return NULL; -#else - int nldt, i; - static int nalloc = 0; - - /* Get the number of LDT entries. */ - if (ioctl (pi->ctl_fd, PIOCNLDT, &nldt) < 0) - { - proc_warn (pi, "proc_get_LDT_entry (PIOCNLDT)", __LINE__); - return NULL; - } - - /* Allocate space for the number of LDT entries. */ - /* This alloc has to persist, 'cause we return a pointer to it. */ - if (nldt > nalloc) - { - ldt_entry = (struct ssd *) - xrealloc (ldt_entry, (nldt + 1) * sizeof (struct ssd)); - nalloc = nldt; - } - - /* Read the whole table in one gulp. */ - if (ioctl (pi->ctl_fd, PIOCLDT, ldt_entry) < 0) - { - proc_warn (pi, "proc_get_LDT_entry (PIOCLDT)", __LINE__); - return NULL; - } - - /* Search the table and return the (first) entry matching 'key'. */ - for (i = 0; i < nldt; i++) - if (ldt_entry[i].sel == key) - return &ldt_entry[i]; - - /* Loop ended, match not found. */ - return NULL; -#endif -} - -#endif /* TM_I386SOL2_H */ - -/* =============== END, non-thread part of /proc "MODULE" =============== */ - -/* =================== Thread "MODULE" =================== */ - -/* NOTE: you'll see more ifdefs and duplication of functions here, - since there is a different way to do threads on every OS. */ - -/* - * Function: proc_get_nthreads - * - * Return the number of threads for the process - */ - -#if defined (PIOCNTHR) && defined (PIOCTLIST) -/* - * OSF version - */ -int -proc_get_nthreads (procinfo *pi) -{ - int nthreads = 0; - - if (ioctl (pi->ctl_fd, PIOCNTHR, &nthreads) < 0) - proc_warn (pi, "procfs: PIOCNTHR failed", __LINE__); - - return nthreads; -} - -#else -#if defined (SYS_lwpcreate) || defined (SYS_lwp_create) /* FIXME: multiple */ -/* - * Solaris and Unixware version - */ -int -proc_get_nthreads (procinfo *pi) -{ - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; - - /* - * NEW_PROC_API: only works for the process procinfo, - * because the LWP procinfos do not get prstatus filled in. - */ -#ifdef NEW_PROC_API - if (pi->tid != 0) /* find the parent process procinfo */ - pi = find_procinfo_or_die (pi->pid, 0); -#endif - return pi->prstatus.pr_nlwp; -} - -#else -/* - * Default version - */ -int -proc_get_nthreads (procinfo *pi) -{ - return 0; -} -#endif -#endif - -/* - * Function: proc_get_current_thread (LWP version) - * - * Return the ID of the thread that had an event of interest. - * (ie. the one that hit a breakpoint or other traced event). - * All other things being equal, this should be the ID of a - * thread that is currently executing. - */ - -#if defined (SYS_lwpcreate) || defined (SYS_lwp_create) /* FIXME: multiple */ -/* - * Solaris and Unixware version - */ -int -proc_get_current_thread (procinfo *pi) -{ - /* - * Note: this should be applied to the root procinfo for the process, - * not to the procinfo for an LWP. If applied to the procinfo for - * an LWP, it will simply return that LWP's ID. In that case, - * find the parent process procinfo. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - if (!pi->status_valid) - if (!proc_get_status (pi)) - return 0; - -#ifdef NEW_PROC_API - return pi->prstatus.pr_lwp.pr_lwpid; -#else - return pi->prstatus.pr_who; -#endif -} - -#else -#if defined (PIOCNTHR) && defined (PIOCTLIST) -/* - * OSF version - */ -int -proc_get_current_thread (procinfo *pi) -{ -#if 0 /* FIXME: not ready for prime time? */ - return pi->prstatus.pr_tid; -#else - return 0; -#endif -} - -#else -/* - * Default version - */ -int -proc_get_current_thread (procinfo *pi) -{ - return 0; -} - -#endif -#endif - -/* - * Function: proc_update_threads - * - * Discover the IDs of all the threads within the process, and - * create a procinfo for each of them (chained to the parent). - * - * This unfortunately requires a different method on every OS. - * - * Return: non-zero for success, zero for failure. - */ - -int -proc_delete_dead_threads (procinfo *parent, procinfo *thread, void *ignore) -{ - if (thread && parent) /* sanity */ - { - thread->status_valid = 0; - if (!proc_get_status (thread)) - destroy_one_procinfo (&parent->thread_list, thread); - } - return 0; /* keep iterating */ -} - -#if defined (PIOCLSTATUS) -/* - * Solaris 2.5 (ioctl) version - */ -int -proc_update_threads (procinfo *pi) -{ - gdb_prstatus_t *prstatus; - struct cleanup *old_chain = NULL; - procinfo *thread; - int nlwp, i; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - proc_iterate_over_threads (pi, proc_delete_dead_threads, NULL); - - if ((nlwp = proc_get_nthreads (pi)) <= 1) - return 1; /* Process is not multi-threaded; nothing to do. */ - - prstatus = xmalloc (sizeof (gdb_prstatus_t) * (nlwp + 1)); - - old_chain = make_cleanup (xfree, prstatus); - if (ioctl (pi->ctl_fd, PIOCLSTATUS, prstatus) < 0) - proc_error (pi, "update_threads (PIOCLSTATUS)", __LINE__); - - /* Skip element zero, which represents the process as a whole. */ - for (i = 1; i < nlwp + 1; i++) - { - if ((thread = create_procinfo (pi->pid, prstatus[i].pr_who)) == NULL) - proc_error (pi, "update_threads, create_procinfo", __LINE__); - - memcpy (&thread->prstatus, &prstatus[i], sizeof (*prstatus)); - thread->status_valid = 1; - } - pi->threads_valid = 1; - do_cleanups (old_chain); - return 1; -} -#else -#ifdef NEW_PROC_API -/* - * Unixware and Solaris 6 (and later) version - */ -static void -do_closedir_cleanup (void *dir) -{ - closedir (dir); -} - -int -proc_update_threads (procinfo *pi) -{ - char pathname[MAX_PROC_NAME_SIZE + 16]; - struct dirent *direntry; - struct cleanup *old_chain = NULL; - procinfo *thread; - DIR *dirp; - int lwpid; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - proc_iterate_over_threads (pi, proc_delete_dead_threads, NULL); - - /* - * Unixware - * - * Note: this brute-force method is the only way I know of - * to accomplish this task on Unixware. This method will - * also work on Solaris 2.6 and 2.7. There is a much simpler - * and more elegant way to do this on Solaris, but the margins - * of this manuscript are too small to write it here... ;-) - */ - - strcpy (pathname, pi->pathname); - strcat (pathname, "/lwp"); - if ((dirp = opendir (pathname)) == NULL) - proc_error (pi, "update_threads, opendir", __LINE__); - - old_chain = make_cleanup (do_closedir_cleanup, dirp); - while ((direntry = readdir (dirp)) != NULL) - if (direntry->d_name[0] != '.') /* skip '.' and '..' */ - { - lwpid = atoi (&direntry->d_name[0]); - if ((thread = create_procinfo (pi->pid, lwpid)) == NULL) - proc_error (pi, "update_threads, create_procinfo", __LINE__); - } - pi->threads_valid = 1; - do_cleanups (old_chain); - return 1; -} -#else -#ifdef PIOCTLIST -/* - * OSF version - */ -int -proc_update_threads (procinfo *pi) -{ - int nthreads, i; - tid_t *threads; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - proc_iterate_over_threads (pi, proc_delete_dead_threads, NULL); - - nthreads = proc_get_nthreads (pi); - if (nthreads < 2) - return 0; /* nothing to do for 1 or fewer threads */ - - threads = xmalloc (nthreads * sizeof (tid_t)); - - if (ioctl (pi->ctl_fd, PIOCTLIST, threads) < 0) - proc_error (pi, "procfs: update_threads (PIOCTLIST)", __LINE__); - - for (i = 0; i < nthreads; i++) - { - if (!find_procinfo (pi->pid, threads[i])) - if (!create_procinfo (pi->pid, threads[i])) - proc_error (pi, "update_threads, create_procinfo", __LINE__); - } - pi->threads_valid = 1; - return 1; -} -#else -/* - * Default version - */ -int -proc_update_threads (procinfo *pi) -{ - return 0; -} -#endif /* OSF PIOCTLIST */ -#endif /* NEW_PROC_API */ -#endif /* SOL 2.5 PIOCLSTATUS */ - -/* - * Function: proc_iterate_over_threads - * - * Description: - * Given a pointer to a function, call that function once - * for each lwp in the procinfo list, until the function - * returns non-zero, in which event return the value - * returned by the function. - * - * Note: this function does NOT call update_threads. - * If you want to discover new threads first, you must - * call that function explicitly. This function just makes - * a quick pass over the currently-known procinfos. - * - * Arguments: - * pi - parent process procinfo - * func - per-thread function - * ptr - opaque parameter for function. - * - * Return: - * First non-zero return value from the callee, or zero. - */ - -int -proc_iterate_over_threads (procinfo *pi, - int (*func) (procinfo *, procinfo *, void *), - void *ptr) -{ - procinfo *thread, *next; - int retval = 0; - - /* - * We should never have to apply this operation to any procinfo - * except the one for the main process. If that ever changes - * for any reason, then take out the following clause and - * replace it with one that makes sure the ctl_fd is open. - */ - - if (pi->tid != 0) - pi = find_procinfo_or_die (pi->pid, 0); - - for (thread = pi->thread_list; thread != NULL; thread = next) - { - next = thread->next; /* in case thread is destroyed */ - if ((retval = (*func) (pi, thread, ptr)) != 0) - break; - } - - return retval; -} - -/* =================== END, Thread "MODULE" =================== */ - -/* =================== END, /proc "MODULE" =================== */ - -/* =================== GDB "MODULE" =================== */ - -/* - * Here are all of the gdb target vector functions and their friends. - */ - -static ptid_t do_attach (ptid_t ptid); -static void do_detach (int signo); -static int register_gdb_signals (procinfo *, gdb_sigset_t *); - -/* - * Function: procfs_debug_inferior - * - * Sets up the inferior to be debugged. - * Registers to trace signals, hardware faults, and syscalls. - * Note: does not set RLC flag: caller may want to customize that. - * - * Returns: zero for success (note! unlike most functions in this module) - * On failure, returns the LINE NUMBER where it failed! - */ - -static int -procfs_debug_inferior (procinfo *pi) -{ - fltset_t traced_faults; - gdb_sigset_t traced_signals; - sysset_t *traced_syscall_entries; - sysset_t *traced_syscall_exits; - int status; - -#ifdef PROCFS_DONT_TRACE_FAULTS - /* On some systems (OSF), we don't trace hardware faults. - Apparently it's enough that we catch them as signals. - Wonder why we don't just do that in general? */ - premptyset (&traced_faults); /* don't trace faults. */ -#else - /* Register to trace hardware faults in the child. */ - prfillset (&traced_faults); /* trace all faults... */ - prdelset (&traced_faults, FLTPAGE); /* except page fault. */ -#endif - if (!proc_set_traced_faults (pi, &traced_faults)) - return __LINE__; - - /* Register to trace selected signals in the child. */ - premptyset (&traced_signals); - if (!register_gdb_signals (pi, &traced_signals)) - return __LINE__; - - - /* Register to trace the 'exit' system call (on entry). */ - traced_syscall_entries = sysset_t_alloc (pi); - gdb_premptysysset (traced_syscall_entries); -#ifdef SYS_exit - gdb_praddsysset (traced_syscall_entries, SYS_exit); -#endif -#ifdef SYS_lwpexit - gdb_praddsysset (traced_syscall_entries, SYS_lwpexit); /* And _lwp_exit... */ -#endif -#ifdef SYS_lwp_exit - gdb_praddsysset (traced_syscall_entries, SYS_lwp_exit); -#endif -#ifdef DYNAMIC_SYSCALLS - { - int callnum = find_syscall (pi, "_exit"); - if (callnum >= 0) - gdb_praddsysset (traced_syscall_entries, callnum); - } -#endif - - status = proc_set_traced_sysentry (pi, traced_syscall_entries); - xfree (traced_syscall_entries); - if (!status) - return __LINE__; - -#ifdef PRFS_STOPEXEC /* defined on OSF */ - /* OSF method for tracing exec syscalls. Quoting: - Under Alpha OSF/1 we have to use a PIOCSSPCACT ioctl to trace - exits from exec system calls because of the user level loader. */ - /* FIXME: make nice and maybe move into an access function. */ - { - int prfs_flags; - - if (ioctl (pi->ctl_fd, PIOCGSPCACT, &prfs_flags) < 0) - return __LINE__; - - prfs_flags |= PRFS_STOPEXEC; - - if (ioctl (pi->ctl_fd, PIOCSSPCACT, &prfs_flags) < 0) - return __LINE__; - } -#else /* not PRFS_STOPEXEC */ - /* Everyone else's (except OSF) method for tracing exec syscalls */ - /* GW: Rationale... - Not all systems with /proc have all the exec* syscalls with the same - names. On the SGI, for example, there is no SYS_exec, but there - *is* a SYS_execv. So, we try to account for that. */ - - traced_syscall_exits = sysset_t_alloc (pi); - gdb_premptysysset (traced_syscall_exits); -#ifdef SYS_exec - gdb_praddsysset (traced_syscall_exits, SYS_exec); -#endif -#ifdef SYS_execve - gdb_praddsysset (traced_syscall_exits, SYS_execve); -#endif -#ifdef SYS_execv - gdb_praddsysset (traced_syscall_exits, SYS_execv); -#endif - -#ifdef SYS_lwpcreate - gdb_praddsysset (traced_syscall_exits, SYS_lwpcreate); - gdb_praddsysset (traced_syscall_exits, SYS_lwpexit); -#endif - -#ifdef SYS_lwp_create /* FIXME: once only, please */ - gdb_praddsysset (traced_syscall_exits, SYS_lwp_create); - gdb_praddsysset (traced_syscall_exits, SYS_lwp_exit); -#endif - -#ifdef DYNAMIC_SYSCALLS - { - int callnum = find_syscall (pi, "execve"); - if (callnum >= 0) - gdb_praddsysset (traced_syscall_exits, callnum); - callnum = find_syscall (pi, "ra_execve"); - if (callnum >= 0) - gdb_praddsysset (traced_syscall_exits, callnum); - } -#endif - - status = proc_set_traced_sysexit (pi, traced_syscall_exits); - xfree (traced_syscall_exits); - if (!status) - return __LINE__; - -#endif /* PRFS_STOPEXEC */ - return 0; -} - -static void -procfs_attach (char *args, int from_tty) -{ - char *exec_file; - int pid; - - if (!args) - error_no_arg ("process-id to attach"); - - pid = atoi (args); - if (pid == getpid ()) - error ("Attaching GDB to itself is not a good idea..."); - - if (from_tty) - { - exec_file = get_exec_file (0); - - if (exec_file) - printf_filtered ("Attaching to program `%s', %s\n", - exec_file, target_pid_to_str (pid_to_ptid (pid))); - else - printf_filtered ("Attaching to %s\n", - target_pid_to_str (pid_to_ptid (pid))); - - fflush (stdout); - } - inferior_ptid = do_attach (pid_to_ptid (pid)); - push_target (&procfs_ops); -} - -static void -procfs_detach (char *args, int from_tty) -{ - char *exec_file; - int signo = 0; - - if (from_tty) - { - exec_file = get_exec_file (0); - if (exec_file == 0) - exec_file = ""; - printf_filtered ("Detaching from program: %s %s\n", - exec_file, target_pid_to_str (inferior_ptid)); - fflush (stdout); - } - if (args) - signo = atoi (args); - - do_detach (signo); - inferior_ptid = null_ptid; - unpush_target (&procfs_ops); /* Pop out of handling an inferior */ -} - -static ptid_t -do_attach (ptid_t ptid) -{ - procinfo *pi; - int fail; - - if ((pi = create_procinfo (PIDGET (ptid), 0)) == NULL) - perror ("procfs: out of memory in 'attach'"); - - if (!open_procinfo_files (pi, FD_CTL)) - { - fprintf_filtered (gdb_stderr, "procfs:%d -- ", __LINE__); - sprintf (errmsg, "do_attach: couldn't open /proc file for process %d", - PIDGET (ptid)); - dead_procinfo (pi, errmsg, NOKILL); - } - - /* Stop the process (if it isn't already stopped). */ - if (proc_flags (pi) & (PR_STOPPED | PR_ISTOP)) - { - pi->was_stopped = 1; - proc_prettyprint_why (proc_why (pi), proc_what (pi), 1); - } - else - { - pi->was_stopped = 0; - /* Set the process to run again when we close it. */ - if (!proc_set_run_on_last_close (pi)) - dead_procinfo (pi, "do_attach: couldn't set RLC.", NOKILL); - - /* Now stop the process. */ - if (!proc_stop_process (pi)) - dead_procinfo (pi, "do_attach: couldn't stop the process.", NOKILL); - pi->ignore_next_sigstop = 1; - } - /* Save some of the /proc state to be restored if we detach. */ - if (!proc_get_traced_faults (pi, &pi->saved_fltset)) - dead_procinfo (pi, "do_attach: couldn't save traced faults.", NOKILL); - if (!proc_get_traced_signals (pi, &pi->saved_sigset)) - dead_procinfo (pi, "do_attach: couldn't save traced signals.", NOKILL); - if (!proc_get_traced_sysentry (pi, pi->saved_entryset)) - dead_procinfo (pi, "do_attach: couldn't save traced syscall entries.", - NOKILL); - if (!proc_get_traced_sysexit (pi, pi->saved_exitset)) - dead_procinfo (pi, "do_attach: couldn't save traced syscall exits.", - NOKILL); - if (!proc_get_held_signals (pi, &pi->saved_sighold)) - dead_procinfo (pi, "do_attach: couldn't save held signals.", NOKILL); - - if ((fail = procfs_debug_inferior (pi)) != 0) - dead_procinfo (pi, "do_attach: failed in procfs_debug_inferior", NOKILL); - - /* Let GDB know that the inferior was attached. */ - attach_flag = 1; - return MERGEPID (pi->pid, proc_get_current_thread (pi)); -} - -static void -do_detach (int signo) -{ - procinfo *pi; - - /* Find procinfo for the main process */ - pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); /* FIXME: threads */ - if (signo) - if (!proc_set_current_signal (pi, signo)) - proc_warn (pi, "do_detach, set_current_signal", __LINE__); - - if (!proc_set_traced_signals (pi, &pi->saved_sigset)) - proc_warn (pi, "do_detach, set_traced_signal", __LINE__); - - if (!proc_set_traced_faults (pi, &pi->saved_fltset)) - proc_warn (pi, "do_detach, set_traced_faults", __LINE__); - - if (!proc_set_traced_sysentry (pi, pi->saved_entryset)) - proc_warn (pi, "do_detach, set_traced_sysentry", __LINE__); - - if (!proc_set_traced_sysexit (pi, pi->saved_exitset)) - proc_warn (pi, "do_detach, set_traced_sysexit", __LINE__); - - if (!proc_set_held_signals (pi, &pi->saved_sighold)) - proc_warn (pi, "do_detach, set_held_signals", __LINE__); - - if (signo || (proc_flags (pi) & (PR_STOPPED | PR_ISTOP))) - if (signo || !(pi->was_stopped) || - query ("Was stopped when attached, make it runnable again? ")) - { - /* Clear any pending signal. */ - if (!proc_clear_current_fault (pi)) - proc_warn (pi, "do_detach, clear_current_fault", __LINE__); - - if (!proc_set_run_on_last_close (pi)) - proc_warn (pi, "do_detach, set_rlc", __LINE__); - } - - attach_flag = 0; - destroy_procinfo (pi); -} - -/* - * fetch_registers - * - * Since the /proc interface cannot give us individual registers, - * we pay no attention to the (regno) argument, and just fetch them all. - * This results in the possibility that we will do unnecessarily many - * fetches, since we may be called repeatedly for individual registers. - * So we cache the results, and mark the cache invalid when the process - * is resumed. - */ - -static void -procfs_fetch_registers (int regno) -{ - gdb_fpregset_t *fpregs; - gdb_gregset_t *gregs; - procinfo *pi; - int pid; - int tid; - - pid = PIDGET (inferior_ptid); - tid = TIDGET (inferior_ptid); - - /* First look up procinfo for the main process. */ - pi = find_procinfo_or_die (pid, 0); - - /* If the event thread is not the same as GDB's requested thread - (ie. inferior_ptid), then look up procinfo for the requested - thread. */ - if ((tid != 0) && - (tid != proc_get_current_thread (pi))) - pi = find_procinfo_or_die (pid, tid); - - if (pi == NULL) - error ("procfs: fetch_registers failed to find procinfo for %s", - target_pid_to_str (inferior_ptid)); - - if ((gregs = proc_get_gregs (pi)) == NULL) - proc_error (pi, "fetch_registers, get_gregs", __LINE__); - - supply_gregset (gregs); - - if (FP0_REGNUM >= 0) /* need floating point? */ - { - if ((regno >= 0 && regno < FP0_REGNUM) || - regno == PC_REGNUM || - (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || - regno == FP_REGNUM || - regno == SP_REGNUM) - return; /* not a floating point register */ - - if ((fpregs = proc_get_fpregs (pi)) == NULL) - proc_error (pi, "fetch_registers, get_fpregs", __LINE__); - - supply_fpregset (fpregs); - } -} - -/* Get ready to modify the registers array. On machines which store - individual registers, this doesn't need to do anything. On - machines which store all the registers in one fell swoop, such as - /proc, this makes sure that registers contains all the registers - from the program being debugged. */ - -static void -procfs_prepare_to_store (void) -{ -#ifdef CHILD_PREPARE_TO_STORE - CHILD_PREPARE_TO_STORE (); -#endif -} - -/* - * store_registers - * - * Since the /proc interface will not read individual registers, - * we will cache these requests until the process is resumed, and - * only then write them back to the inferior process. - * - * FIXME: is that a really bad idea? Have to think about cases - * where writing one register might affect the value of others, etc. - */ - -static void -procfs_store_registers (int regno) -{ - gdb_fpregset_t *fpregs; - gdb_gregset_t *gregs; - procinfo *pi; - int pid; - int tid; - - pid = PIDGET (inferior_ptid); - tid = TIDGET (inferior_ptid); - - /* First find procinfo for main process */ - pi = find_procinfo_or_die (pid, 0); - - /* If current lwp for process is not the same as requested thread - (ie. inferior_ptid), then find procinfo for the requested thread. */ - - if ((tid != 0) && - (tid != proc_get_current_thread (pi))) - pi = find_procinfo_or_die (pid, tid); - - if (pi == NULL) - error ("procfs: store_registers: failed to find procinfo for %s", - target_pid_to_str (inferior_ptid)); - - if ((gregs = proc_get_gregs (pi)) == NULL) - proc_error (pi, "store_registers, get_gregs", __LINE__); - - fill_gregset (gregs, regno); - if (!proc_set_gregs (pi)) - proc_error (pi, "store_registers, set_gregs", __LINE__); - - if (FP0_REGNUM >= 0) /* need floating point? */ - { - if ((regno >= 0 && regno < FP0_REGNUM) || - regno == PC_REGNUM || - (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || - regno == FP_REGNUM || - regno == SP_REGNUM) - return; /* not a floating point register */ - - if ((fpregs = proc_get_fpregs (pi)) == NULL) - proc_error (pi, "store_registers, get_fpregs", __LINE__); - - fill_fpregset (fpregs, regno); - if (!proc_set_fpregs (pi)) - proc_error (pi, "store_registers, set_fpregs", __LINE__); - } -} - -static int -syscall_is_lwp_exit (procinfo *pi, int scall) -{ - -#ifdef SYS_lwp_exit - if (scall == SYS_lwp_exit) - return 1; -#endif -#ifdef SYS_lwpexit - if (scall == SYS_lwpexit) - return 1; -#endif - return 0; -} - -static int -syscall_is_exit (procinfo *pi, int scall) -{ -#ifdef SYS_exit - if (scall == SYS_exit) - return 1; -#endif -#ifdef DYNAMIC_SYSCALLS - if (find_syscall (pi, "_exit") == scall) - return 1; -#endif - return 0; -} - -static int -syscall_is_exec (procinfo *pi, int scall) -{ -#ifdef SYS_exec - if (scall == SYS_exec) - return 1; -#endif -#ifdef SYS_execv - if (scall == SYS_execv) - return 1; -#endif -#ifdef SYS_execve - if (scall == SYS_execve) - return 1; -#endif -#ifdef DYNAMIC_SYSCALLS - if (find_syscall (pi, "_execve")) - return 1; - if (find_syscall (pi, "ra_execve")) - return 1; -#endif - return 0; -} - -static int -syscall_is_lwp_create (procinfo *pi, int scall) -{ -#ifdef SYS_lwp_create - if (scall == SYS_lwp_create) - return 1; -#endif -#ifdef SYS_lwpcreate - if (scall == SYS_lwpcreate) - return 1; -#endif - return 0; -} - -/* - * Function: target_wait - * - * Retrieve the next stop event from the child process. - * If child has not stopped yet, wait for it to stop. - * Translate /proc eventcodes (or possibly wait eventcodes) - * into gdb internal event codes. - * - * Return: id of process (and possibly thread) that incurred the event. - * event codes are returned thru a pointer parameter. - */ - -static ptid_t -procfs_wait (ptid_t ptid, struct target_waitstatus *status) -{ - /* First cut: loosely based on original version 2.1 */ - procinfo *pi; - int wstat; - int temp_tid; - ptid_t retval, temp_ptid; - int why, what, flags; - int retry = 0; - -wait_again: - - retry++; - wstat = 0; - retval = pid_to_ptid (-1); - - /* Find procinfo for main process */ - pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - if (pi) - { - /* We must assume that the status is stale now... */ - pi->status_valid = 0; - pi->gregs_valid = 0; - pi->fpregs_valid = 0; - -#if 0 /* just try this out... */ - flags = proc_flags (pi); - why = proc_why (pi); - if ((flags & PR_STOPPED) && (why == PR_REQUESTED)) - pi->status_valid = 0; /* re-read again, IMMEDIATELY... */ -#endif - /* If child is not stopped, wait for it to stop. */ - if (!(proc_flags (pi) & (PR_STOPPED | PR_ISTOP)) && - !proc_wait_for_stop (pi)) - { - /* wait_for_stop failed: has the child terminated? */ - if (errno == ENOENT) - { - int wait_retval; - - /* /proc file not found; presumably child has terminated. */ - wait_retval = wait (&wstat); /* "wait" for the child's exit */ - - if (wait_retval != PIDGET (inferior_ptid)) /* wrong child? */ - error ("procfs: couldn't stop process %d: wait returned %d\n", - PIDGET (inferior_ptid), wait_retval); - /* FIXME: might I not just use waitpid? - Or try find_procinfo to see if I know about this child? */ - retval = pid_to_ptid (wait_retval); - } - else if (errno == EINTR) - goto wait_again; - else - { - /* Unknown error from wait_for_stop. */ - proc_error (pi, "target_wait (wait_for_stop)", __LINE__); - } - } - else - { - /* This long block is reached if either: - a) the child was already stopped, or - b) we successfully waited for the child with wait_for_stop. - This block will analyze the /proc status, and translate it - into a waitstatus for GDB. - - If we actually had to call wait because the /proc file - is gone (child terminated), then we skip this block, - because we already have a waitstatus. */ - - flags = proc_flags (pi); - why = proc_why (pi); - what = proc_what (pi); - - if (flags & (PR_STOPPED | PR_ISTOP)) - { -#ifdef PR_ASYNC - /* If it's running async (for single_thread control), - set it back to normal again. */ - if (flags & PR_ASYNC) - if (!proc_unset_async (pi)) - proc_error (pi, "target_wait, unset_async", __LINE__); -#endif - - if (info_verbose) - proc_prettyprint_why (why, what, 1); - - /* The 'pid' we will return to GDB is composed of - the process ID plus the lwp ID. */ - retval = MERGEPID (pi->pid, proc_get_current_thread (pi)); - - switch (why) { - case PR_SIGNALLED: - wstat = (what << 8) | 0177; - break; - case PR_SYSENTRY: - if (syscall_is_lwp_exit (pi, what)) - { - printf_filtered ("[%s exited]\n", - target_pid_to_str (retval)); - delete_thread (retval); - status->kind = TARGET_WAITKIND_SPURIOUS; - return retval; - } - else if (syscall_is_exit (pi, what)) - { - /* Handle SYS_exit call only */ - /* Stopped at entry to SYS_exit. - Make it runnable, resume it, then use - the wait system call to get its exit code. - Proc_run_process always clears the current - fault and signal. - Then return its exit status. */ - pi->status_valid = 0; - wstat = 0; - /* FIXME: what we should do is return - TARGET_WAITKIND_SPURIOUS. */ - if (!proc_run_process (pi, 0, 0)) - proc_error (pi, "target_wait, run_process", __LINE__); - if (attach_flag) - { - /* Don't call wait: simulate waiting for exit, - return a "success" exit code. Bogus: what if - it returns something else? */ - wstat = 0; - retval = inferior_ptid; /* ? ? ? */ - } - else - { - int temp = wait (&wstat); - - /* FIXME: shouldn't I make sure I get the right - event from the right process? If (for - instance) I have killed an earlier inferior - process but failed to clean up after it - somehow, I could get its termination event - here. */ - - /* If wait returns -1, that's what we return to GDB. */ - if (temp < 0) - retval = pid_to_ptid (temp); - } - } - else - { - printf_filtered ("procfs: trapped on entry to "); - proc_prettyprint_syscall (proc_what (pi), 0); - printf_filtered ("\n"); -#ifndef PIOCSSPCACT - { - long i, nsysargs, *sysargs; - - if ((nsysargs = proc_nsysarg (pi)) > 0 && - (sysargs = proc_sysargs (pi)) != NULL) - { - printf_filtered ("%ld syscall arguments:\n", nsysargs); - for (i = 0; i < nsysargs; i++) - printf_filtered ("#%ld: 0x%08lx\n", - i, sysargs[i]); - } - - } -#endif - if (status) - { - /* How to exit gracefully, returning "unknown event" */ - status->kind = TARGET_WAITKIND_SPURIOUS; - return inferior_ptid; - } - else - { - /* How to keep going without returning to wfi: */ - target_resume (ptid, 0, TARGET_SIGNAL_0); - goto wait_again; - } - } - break; - case PR_SYSEXIT: - if (syscall_is_exec (pi, what)) - { - /* Hopefully this is our own "fork-child" execing - the real child. Hoax this event into a trap, and - GDB will see the child about to execute its start - address. */ - wstat = (SIGTRAP << 8) | 0177; - } - else if (syscall_is_lwp_create (pi, what)) - { - /* - * This syscall is somewhat like fork/exec. - * We will get the event twice: once for the parent LWP, - * and once for the child. We should already know about - * the parent LWP, but the child will be new to us. So, - * whenever we get this event, if it represents a new - * thread, simply add the thread to the list. - */ - - /* If not in procinfo list, add it. */ - temp_tid = proc_get_current_thread (pi); - if (!find_procinfo (pi->pid, temp_tid)) - create_procinfo (pi->pid, temp_tid); - - temp_ptid = MERGEPID (pi->pid, temp_tid); - /* If not in GDB's thread list, add it. */ - if (!in_thread_list (temp_ptid)) - { - printf_filtered ("[New %s]\n", - target_pid_to_str (temp_ptid)); - add_thread (temp_ptid); - } - /* Return to WFI, but tell it to immediately resume. */ - status->kind = TARGET_WAITKIND_SPURIOUS; - return inferior_ptid; - } - else if (syscall_is_lwp_exit (pi, what)) - { - printf_filtered ("[%s exited]\n", - target_pid_to_str (retval)); - delete_thread (retval); - status->kind = TARGET_WAITKIND_SPURIOUS; - return retval; - } - else if (0) - { - /* FIXME: Do we need to handle SYS_sproc, - SYS_fork, or SYS_vfork here? The old procfs - seemed to use this event to handle threads on - older (non-LWP) systems, where I'm assuming - that threads were actually separate processes. - Irix, maybe? Anyway, low priority for now. */ - } - else - { - printf_filtered ("procfs: trapped on exit from "); - proc_prettyprint_syscall (proc_what (pi), 0); - printf_filtered ("\n"); -#ifndef PIOCSSPCACT - { - long i, nsysargs, *sysargs; - - if ((nsysargs = proc_nsysarg (pi)) > 0 && - (sysargs = proc_sysargs (pi)) != NULL) - { - printf_filtered ("%ld syscall arguments:\n", nsysargs); - for (i = 0; i < nsysargs; i++) - printf_filtered ("#%ld: 0x%08lx\n", - i, sysargs[i]); - } - } -#endif - status->kind = TARGET_WAITKIND_SPURIOUS; - return inferior_ptid; - } - break; - case PR_REQUESTED: -#if 0 /* FIXME */ - wstat = (SIGSTOP << 8) | 0177; - break; -#else - if (retry < 5) - { - printf_filtered ("Retry #%d:\n", retry); - pi->status_valid = 0; - goto wait_again; - } - else - { - /* If not in procinfo list, add it. */ - temp_tid = proc_get_current_thread (pi); - if (!find_procinfo (pi->pid, temp_tid)) - create_procinfo (pi->pid, temp_tid); - - /* If not in GDB's thread list, add it. */ - temp_ptid = MERGEPID (pi->pid, temp_tid); - if (!in_thread_list (temp_ptid)) - { - printf_filtered ("[New %s]\n", - target_pid_to_str (temp_ptid)); - add_thread (temp_ptid); - } - - status->kind = TARGET_WAITKIND_STOPPED; - status->value.sig = 0; - return retval; - } -#endif - case PR_JOBCONTROL: - wstat = (what << 8) | 0177; - break; - case PR_FAULTED: - switch (what) { /* FIXME: FAULTED_USE_SIGINFO */ -#ifdef FLTWATCH - case FLTWATCH: - wstat = (SIGTRAP << 8) | 0177; - break; -#endif -#ifdef FLTKWATCH - case FLTKWATCH: - wstat = (SIGTRAP << 8) | 0177; - break; -#endif - /* FIXME: use si_signo where possible. */ - case FLTPRIV: -#if (FLTILL != FLTPRIV) /* avoid "duplicate case" error */ - case FLTILL: -#endif - wstat = (SIGILL << 8) | 0177; - break; - case FLTBPT: -#if (FLTTRACE != FLTBPT) /* avoid "duplicate case" error */ - case FLTTRACE: -#endif - wstat = (SIGTRAP << 8) | 0177; - break; - case FLTSTACK: - case FLTACCESS: -#if (FLTBOUNDS != FLTSTACK) /* avoid "duplicate case" error */ - case FLTBOUNDS: -#endif - wstat = (SIGSEGV << 8) | 0177; - break; - case FLTIOVF: - case FLTIZDIV: -#if (FLTFPE != FLTIOVF) /* avoid "duplicate case" error */ - case FLTFPE: -#endif - wstat = (SIGFPE << 8) | 0177; - break; - case FLTPAGE: /* Recoverable page fault */ - default: /* FIXME: use si_signo if possible for fault */ - retval = pid_to_ptid (-1); - printf_filtered ("procfs:%d -- ", __LINE__); - printf_filtered ("child stopped for unknown reason:\n"); - proc_prettyprint_why (why, what, 1); - error ("... giving up..."); - break; - } - break; /* case PR_FAULTED: */ - default: /* switch (why) unmatched */ - printf_filtered ("procfs:%d -- ", __LINE__); - printf_filtered ("child stopped for unknown reason:\n"); - proc_prettyprint_why (why, what, 1); - error ("... giving up..."); - break; - } - /* - * Got this far without error: - * If retval isn't in the threads database, add it. - */ - if (PIDGET (retval) > 0 && - !ptid_equal (retval, inferior_ptid) && - !in_thread_list (retval)) - { - /* - * We have a new thread. - * We need to add it both to GDB's list and to our own. - * If we don't create a procinfo, resume may be unhappy - * later. - */ - printf_filtered ("[New %s]\n", target_pid_to_str (retval)); - add_thread (retval); - if (find_procinfo (PIDGET (retval), TIDGET (retval)) == NULL) - create_procinfo (PIDGET (retval), TIDGET (retval)); - - /* In addition, it's possible that this is the first - * new thread we've seen, in which case we may not - * have created entries for inferior_ptid yet. - */ - if (TIDGET (inferior_ptid) != 0) - { - if (!in_thread_list (inferior_ptid)) - add_thread (inferior_ptid); - if (find_procinfo (PIDGET (inferior_ptid), - TIDGET (inferior_ptid)) == NULL) - create_procinfo (PIDGET (inferior_ptid), - TIDGET (inferior_ptid)); - } - } - } - else /* flags do not indicate STOPPED */ - { - /* surely this can't happen... */ - printf_filtered ("procfs:%d -- process not stopped.\n", - __LINE__); - proc_prettyprint_flags (flags, 1); - error ("procfs: ...giving up..."); - } - } - - if (status) - store_waitstatus (status, wstat); - } - - return retval; -} - -/* Transfer LEN bytes between GDB address MYADDR and target address - MEMADDR. If DOWRITE is non-zero, transfer them to the target, - otherwise transfer them from the target. TARGET is unused. - - The return value is 0 if an error occurred or no bytes were - transferred. Otherwise, it will be a positive value which - indicates the number of bytes transferred between gdb and the - target. (Note that the interface also makes provisions for - negative values, but this capability isn't implemented here.) */ - -static int -procfs_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int dowrite, - struct mem_attrib *attrib, struct target_ops *target) -{ - procinfo *pi; - int nbytes = 0; - - /* Find procinfo for main process */ - pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - if (pi->as_fd == 0 && - open_procinfo_files (pi, FD_AS) == 0) - { - proc_warn (pi, "xfer_memory, open_proc_files", __LINE__); - return 0; - } - - if (lseek (pi->as_fd, (off_t) memaddr, SEEK_SET) == (off_t) memaddr) - { - if (dowrite) - { -#ifdef NEW_PROC_API - PROCFS_NOTE ("write memory: "); -#else - PROCFS_NOTE ("write memory: \n"); -#endif - nbytes = write (pi->as_fd, myaddr, len); - } - else - { - PROCFS_NOTE ("read memory: \n"); - nbytes = read (pi->as_fd, myaddr, len); - } - if (nbytes < 0) - { - nbytes = 0; - } - } - return nbytes; -} - -/* - * Function: invalidate_cache - * - * Called by target_resume before making child runnable. - * Mark cached registers and status's invalid. - * If there are "dirty" caches that need to be written back - * to the child process, do that. - * - * File descriptors are also cached. - * As they are a limited resource, we cannot hold onto them indefinitely. - * However, as they are expensive to open, we don't want to throw them - * away indescriminately either. As a compromise, we will keep the - * file descriptors for the parent process, but discard any file - * descriptors we may have accumulated for the threads. - * - * Return value: - * As this function is called by iterate_over_threads, it always - * returns zero (so that iterate_over_threads will keep iterating). - */ - - -static int -invalidate_cache (procinfo *parent, procinfo *pi, void *ptr) -{ - /* - * About to run the child; invalidate caches and do any other cleanup. - */ - -#if 0 - if (pi->gregs_dirty) - if (parent == NULL || - proc_get_current_thread (parent) != pi->tid) - if (!proc_set_gregs (pi)) /* flush gregs cache */ - proc_warn (pi, "target_resume, set_gregs", - __LINE__); - if (FP0_REGNUM >= 0) - if (pi->fpregs_dirty) - if (parent == NULL || - proc_get_current_thread (parent) != pi->tid) - if (!proc_set_fpregs (pi)) /* flush fpregs cache */ - proc_warn (pi, "target_resume, set_fpregs", - __LINE__); -#endif - - if (parent != NULL) - { - /* The presence of a parent indicates that this is an LWP. - Close any file descriptors that it might have open. - We don't do this to the master (parent) procinfo. */ - - close_procinfo_files (pi); - } - pi->gregs_valid = 0; - pi->fpregs_valid = 0; -#if 0 - pi->gregs_dirty = 0; - pi->fpregs_dirty = 0; -#endif - pi->status_valid = 0; - pi->threads_valid = 0; - - return 0; -} - -#if 0 -/* - * Function: make_signal_thread_runnable - * - * A callback function for iterate_over_threads. - * Find the asynchronous signal thread, and make it runnable. - * See if that helps matters any. - */ - -static int -make_signal_thread_runnable (procinfo *process, procinfo *pi, void *ptr) -{ -#ifdef PR_ASLWP - if (proc_flags (pi) & PR_ASLWP) - { - if (!proc_run_process (pi, 0, -1)) - proc_error (pi, "make_signal_thread_runnable", __LINE__); - return 1; - } -#endif - return 0; -} -#endif - -/* - * Function: target_resume - * - * Make the child process runnable. Normally we will then call - * procfs_wait and wait for it to stop again (unles gdb is async). - * - * Arguments: - * step: if true, then arrange for the child to stop again - * after executing a single instruction. - * signo: if zero, then cancel any pending signal. - * If non-zero, then arrange for the indicated signal - * to be delivered to the child when it runs. - * pid: if -1, then allow any child thread to run. - * if non-zero, then allow only the indicated thread to run. - ******* (not implemented yet) - */ - -static void -procfs_resume (ptid_t ptid, int step, enum target_signal signo) -{ - procinfo *pi, *thread; - int native_signo; - - /* 2.1: - prrun.prflags |= PRSVADDR; - prrun.pr_vaddr = $PC; set resume address - prrun.prflags |= PRSTRACE; trace signals in pr_trace (all) - prrun.prflags |= PRSFAULT; trace faults in pr_fault (all but PAGE) - prrun.prflags |= PRCFAULT; clear current fault. - - PRSTRACE and PRSFAULT can be done by other means - (proc_trace_signals, proc_trace_faults) - PRSVADDR is unnecessary. - PRCFAULT may be replaced by a PIOCCFAULT call (proc_clear_current_fault) - This basically leaves PRSTEP and PRCSIG. - PRCSIG is like PIOCSSIG (proc_clear_current_signal). - So basically PR_STEP is the sole argument that must be passed - to proc_run_process (for use in the prrun struct by ioctl). */ - - /* Find procinfo for main process */ - pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - - /* First cut: ignore pid argument */ - errno = 0; - - /* Convert signal to host numbering. */ - if (signo == 0 || - (signo == TARGET_SIGNAL_STOP && pi->ignore_next_sigstop)) - native_signo = 0; - else - native_signo = target_signal_to_host (signo); - - pi->ignore_next_sigstop = 0; - - /* Running the process voids all cached registers and status. */ - /* Void the threads' caches first */ - proc_iterate_over_threads (pi, invalidate_cache, NULL); - /* Void the process procinfo's caches. */ - invalidate_cache (NULL, pi, NULL); - - if (PIDGET (ptid) != -1) - { - /* Resume a specific thread, presumably suppressing the others. */ - thread = find_procinfo (PIDGET (ptid), TIDGET (ptid)); - if (thread != NULL) - { - if (thread->tid != 0) - { - /* We're to resume a specific thread, and not the others. - * Set the child process's PR_ASYNC flag. - */ -#ifdef PR_ASYNC - if (!proc_set_async (pi)) - proc_error (pi, "target_resume, set_async", __LINE__); -#endif -#if 0 - proc_iterate_over_threads (pi, - make_signal_thread_runnable, - NULL); -#endif - pi = thread; /* substitute the thread's procinfo for run */ - } - } - } - - if (!proc_run_process (pi, step, native_signo)) - { - if (errno == EBUSY) - warning ("resume: target already running. Pretend to resume, and hope for the best!\n"); - else - proc_error (pi, "target_resume", __LINE__); - } -} - -/* - * Function: register_gdb_signals - * - * Traverse the list of signals that GDB knows about - * (see "handle" command), and arrange for the target - * to be stopped or not, according to these settings. - * - * Returns non-zero for success, zero for failure. - */ - -static int -register_gdb_signals (procinfo *pi, gdb_sigset_t *signals) -{ - int signo; - - for (signo = 0; signo < NSIG; signo ++) - if (signal_stop_state (target_signal_from_host (signo)) == 0 && - signal_print_state (target_signal_from_host (signo)) == 0 && - signal_pass_state (target_signal_from_host (signo)) == 1) - prdelset (signals, signo); - else - praddset (signals, signo); - - return proc_set_traced_signals (pi, signals); -} - -/* - * Function: target_notice_signals - * - * Set up to trace signals in the child process. - */ - -static void -procfs_notice_signals (ptid_t ptid) -{ - gdb_sigset_t signals; - procinfo *pi = find_procinfo_or_die (PIDGET (ptid), 0); - - if (proc_get_traced_signals (pi, &signals) && - register_gdb_signals (pi, &signals)) - return; - else - proc_error (pi, "notice_signals", __LINE__); -} - -/* - * Function: target_files_info - * - * Print status information about the child process. - */ - -static void -procfs_files_info (struct target_ops *ignore) -{ - printf_filtered ("\tUsing the running image of %s %s via /proc.\n", - attach_flag? "attached": "child", - target_pid_to_str (inferior_ptid)); -} - -/* - * Function: target_open - * - * A dummy: you don't open procfs. - */ - -static void -procfs_open (char *args, int from_tty) -{ - error ("Use the \"run\" command to start a Unix child process."); -} - -/* - * Function: target_can_run - * - * This tells GDB that this target vector can be invoked - * for "run" or "attach". - */ - -int procfs_suppress_run = 0; /* Non-zero if procfs should pretend not to - be a runnable target. Used by targets - that can sit atop procfs, such as solaris - thread support. */ - - -static int -procfs_can_run (void) -{ - /* This variable is controlled by modules that sit atop procfs that - may layer their own process structure atop that provided here. - sol-thread.c does this because of the Solaris two-level thread - model. */ - - /* NOTE: possibly obsolete -- use the thread_stratum approach instead. */ - - return !procfs_suppress_run; -} - -/* - * Function: target_stop - * - * Stop the child process asynchronously, as when the - * gdb user types control-c or presses a "stop" button. - * - * Works by sending kill(SIGINT) to the child's process group. - */ - -static void -procfs_stop (void) -{ - extern pid_t inferior_process_group; - - kill (-inferior_process_group, SIGINT); -} - -/* - * Function: unconditionally_kill_inferior - * - * Make it die. Wait for it to die. Clean up after it. - * Note: this should only be applied to the real process, - * not to an LWP, because of the check for parent-process. - * If we need this to work for an LWP, it needs some more logic. - */ - -static void -unconditionally_kill_inferior (procinfo *pi) -{ - int parent_pid; - - parent_pid = proc_parent_pid (pi); -#ifdef PROCFS_NEED_CLEAR_CURSIG_FOR_KILL - /* FIXME: use access functions */ - /* Alpha OSF/1-3.x procfs needs a clear of the current signal - before the PIOCKILL, otherwise it might generate a corrupted core - file for the inferior. */ - if (ioctl (pi->ctl_fd, PIOCSSIG, NULL) < 0) - { - printf_filtered ("unconditionally_kill: SSIG failed!\n"); - } -#endif -#ifdef PROCFS_NEED_PIOCSSIG_FOR_KILL - /* Alpha OSF/1-2.x procfs needs a PIOCSSIG call with a SIGKILL signal - to kill the inferior, otherwise it might remain stopped with a - pending SIGKILL. - We do not check the result of the PIOCSSIG, the inferior might have - died already. */ - { - gdb_siginfo_t newsiginfo; - - memset ((char *) &newsiginfo, 0, sizeof (newsiginfo)); - newsiginfo.si_signo = SIGKILL; - newsiginfo.si_code = 0; - newsiginfo.si_errno = 0; - newsiginfo.si_pid = getpid (); - newsiginfo.si_uid = getuid (); - /* FIXME: use proc_set_current_signal */ - ioctl (pi->ctl_fd, PIOCSSIG, &newsiginfo); - } -#else /* PROCFS_NEED_PIOCSSIG_FOR_KILL */ - if (!proc_kill (pi, SIGKILL)) - proc_error (pi, "unconditionally_kill, proc_kill", __LINE__); -#endif /* PROCFS_NEED_PIOCSSIG_FOR_KILL */ - destroy_procinfo (pi); - - /* If pi is GDB's child, wait for it to die. */ - if (parent_pid == getpid ()) - /* FIXME: should we use waitpid to make sure we get the right event? - Should we check the returned event? */ - { -#if 0 - int status, ret; - - ret = waitpid (pi->pid, &status, 0); -#else - wait (NULL); -#endif - } -} - -/* - * Function: target_kill_inferior - * - * We're done debugging it, and we want it to go away. - * Then we want GDB to forget all about it. - */ - -static void -procfs_kill_inferior (void) -{ - if (!ptid_equal (inferior_ptid, null_ptid)) /* ? */ - { - /* Find procinfo for main process */ - procinfo *pi = find_procinfo (PIDGET (inferior_ptid), 0); - - if (pi) - unconditionally_kill_inferior (pi); - target_mourn_inferior (); - } -} - -/* - * Function: target_mourn_inferior - * - * Forget we ever debugged this thing! - */ - -static void -procfs_mourn_inferior (void) -{ - procinfo *pi; - - if (!ptid_equal (inferior_ptid, null_ptid)) - { - /* Find procinfo for main process */ - pi = find_procinfo (PIDGET (inferior_ptid), 0); - if (pi) - destroy_procinfo (pi); - } - unpush_target (&procfs_ops); - generic_mourn_inferior (); -} - -/* - * Function: init_inferior - * - * When GDB forks to create a runnable inferior process, - * this function is called on the parent side of the fork. - * It's job is to do whatever is necessary to make the child - * ready to be debugged, and then wait for the child to synchronize. - */ - -static void -procfs_init_inferior (int pid) -{ - procinfo *pi; - gdb_sigset_t signals; - int fail; - - /* This routine called on the parent side (GDB side) - after GDB forks the inferior. */ - - push_target (&procfs_ops); - - if ((pi = create_procinfo (pid, 0)) == NULL) - perror ("procfs: out of memory in 'init_inferior'"); - - if (!open_procinfo_files (pi, FD_CTL)) - proc_error (pi, "init_inferior, open_proc_files", __LINE__); - - /* - xmalloc // done - open_procinfo_files // done - link list // done - prfillset (trace) - procfs_notice_signals - prfillset (fault) - prdelset (FLTPAGE) - PIOCWSTOP - PIOCSFAULT - */ - - /* If not stopped yet, wait for it to stop. */ - if (!(proc_flags (pi) & PR_STOPPED) && - !(proc_wait_for_stop (pi))) - dead_procinfo (pi, "init_inferior: wait_for_stop failed", KILL); - - /* Save some of the /proc state to be restored if we detach. */ - /* FIXME: Why? In case another debugger was debugging it? - We're it's parent, for Ghu's sake! */ - if (!proc_get_traced_signals (pi, &pi->saved_sigset)) - proc_error (pi, "init_inferior, get_traced_signals", __LINE__); - if (!proc_get_held_signals (pi, &pi->saved_sighold)) - proc_error (pi, "init_inferior, get_held_signals", __LINE__); - if (!proc_get_traced_faults (pi, &pi->saved_fltset)) - proc_error (pi, "init_inferior, get_traced_faults", __LINE__); - if (!proc_get_traced_sysentry (pi, pi->saved_entryset)) - proc_error (pi, "init_inferior, get_traced_sysentry", __LINE__); - if (!proc_get_traced_sysexit (pi, pi->saved_exitset)) - proc_error (pi, "init_inferior, get_traced_sysexit", __LINE__); - - /* Register to trace selected signals in the child. */ - prfillset (&signals); - if (!register_gdb_signals (pi, &signals)) - proc_error (pi, "init_inferior, register_signals", __LINE__); - - if ((fail = procfs_debug_inferior (pi)) != 0) - proc_error (pi, "init_inferior (procfs_debug_inferior)", fail); - - /* FIXME: logically, we should really be turning OFF run-on-last-close, - and possibly even turning ON kill-on-last-close at this point. But - I can't make that change without careful testing which I don't have - time to do right now... */ - /* Turn on run-on-last-close flag so that the child - will die if GDB goes away for some reason. */ - if (!proc_set_run_on_last_close (pi)) - proc_error (pi, "init_inferior, set_RLC", __LINE__); - - /* The 'process ID' we return to GDB is composed of - the actual process ID plus the lwp ID. */ - inferior_ptid = MERGEPID (pi->pid, proc_get_current_thread (pi)); - -#ifdef START_INFERIOR_TRAPS_EXPECTED - startup_inferior (START_INFERIOR_TRAPS_EXPECTED); -#else - /* One trap to exec the shell, one to exec the program being debugged. */ - startup_inferior (2); -#endif /* START_INFERIOR_TRAPS_EXPECTED */ -} - -/* - * Function: set_exec_trap - * - * When GDB forks to create a new process, this function is called - * on the child side of the fork before GDB exec's the user program. - * Its job is to make the child minimally debuggable, so that the - * parent GDB process can connect to the child and take over. - * This function should do only the minimum to make that possible, - * and to synchronize with the parent process. The parent process - * should take care of the details. - */ - -static void -procfs_set_exec_trap (void) -{ - /* This routine called on the child side (inferior side) - after GDB forks the inferior. It must use only local variables, - because it may be sharing data space with its parent. */ - - procinfo *pi; - sysset_t *exitset; - - if ((pi = create_procinfo (getpid (), 0)) == NULL) - perror_with_name ("procfs: create_procinfo failed in child."); - - if (open_procinfo_files (pi, FD_CTL) == 0) - { - proc_warn (pi, "set_exec_trap, open_proc_files", __LINE__); - gdb_flush (gdb_stderr); - /* no need to call "dead_procinfo", because we're going to exit. */ - _exit (127); - } - -#ifdef PRFS_STOPEXEC /* defined on OSF */ - /* OSF method for tracing exec syscalls. Quoting: - Under Alpha OSF/1 we have to use a PIOCSSPCACT ioctl to trace - exits from exec system calls because of the user level loader. */ - /* FIXME: make nice and maybe move into an access function. */ - { - int prfs_flags; - - if (ioctl (pi->ctl_fd, PIOCGSPCACT, &prfs_flags) < 0) - { - proc_warn (pi, "set_exec_trap (PIOCGSPCACT)", __LINE__); - gdb_flush (gdb_stderr); - _exit (127); - } - prfs_flags |= PRFS_STOPEXEC; - - if (ioctl (pi->ctl_fd, PIOCSSPCACT, &prfs_flags) < 0) - { - proc_warn (pi, "set_exec_trap (PIOCSSPCACT)", __LINE__); - gdb_flush (gdb_stderr); - _exit (127); - } - } -#else /* not PRFS_STOPEXEC */ - /* Everyone else's (except OSF) method for tracing exec syscalls */ - /* GW: Rationale... - Not all systems with /proc have all the exec* syscalls with the same - names. On the SGI, for example, there is no SYS_exec, but there - *is* a SYS_execv. So, we try to account for that. */ - - exitset = sysset_t_alloc (pi); - gdb_premptysysset (exitset); -#ifdef SYS_exec - gdb_praddsysset (exitset, SYS_exec); -#endif -#ifdef SYS_execve - gdb_praddsysset (exitset, SYS_execve); -#endif -#ifdef SYS_execv - gdb_praddsysset (exitset, SYS_execv); -#endif -#ifdef DYNAMIC_SYSCALLS - { - int callnum = find_syscall (pi, "execve"); - - if (callnum >= 0) - gdb_praddsysset (exitset, callnum); - - callnum = find_syscall (pi, "ra_execve"); - if (callnum >= 0) - gdb_praddsysset (exitset, callnum); - } -#endif /* DYNAMIC_SYSCALLS */ - - if (!proc_set_traced_sysexit (pi, exitset)) - { - proc_warn (pi, "set_exec_trap, set_traced_sysexit", __LINE__); - gdb_flush (gdb_stderr); - _exit (127); - } -#endif /* PRFS_STOPEXEC */ - - /* FIXME: should this be done in the parent instead? */ - /* Turn off inherit on fork flag so that all grand-children - of gdb start with tracing flags cleared. */ - if (!proc_unset_inherit_on_fork (pi)) - proc_warn (pi, "set_exec_trap, unset_inherit", __LINE__); - - /* Turn off run on last close flag, so that the child process - cannot run away just because we close our handle on it. - We want it to wait for the parent to attach. */ - if (!proc_unset_run_on_last_close (pi)) - proc_warn (pi, "set_exec_trap, unset_RLC", __LINE__); - - /* FIXME: No need to destroy the procinfo -- - we have our own address space, and we're about to do an exec! */ - /*destroy_procinfo (pi);*/ -} - -/* - * Function: create_inferior - * - * This function is called BEFORE gdb forks the inferior process. - * Its only real responsibility is to set things up for the fork, - * and tell GDB which two functions to call after the fork (one - * for the parent, and one for the child). - * - * This function does a complicated search for a unix shell program, - * which it then uses to parse arguments and environment variables - * to be sent to the child. I wonder whether this code could not - * be abstracted out and shared with other unix targets such as - * infptrace? - */ - -static void -procfs_create_inferior (char *exec_file, char *allargs, char **env) -{ - char *shell_file = getenv ("SHELL"); - char *tryname; - if (shell_file != NULL && strchr (shell_file, '/') == NULL) - { - - /* We will be looking down the PATH to find shell_file. If we - just do this the normal way (via execlp, which operates by - attempting an exec for each element of the PATH until it - finds one which succeeds), then there will be an exec for - each failed attempt, each of which will cause a PR_SYSEXIT - stop, and we won't know how to distinguish the PR_SYSEXIT's - for these failed execs with the ones for successful execs - (whether the exec has succeeded is stored at that time in the - carry bit or some such architecture-specific and - non-ABI-specified place). - - So I can't think of anything better than to search the PATH - now. This has several disadvantages: (1) There is a race - condition; if we find a file now and it is deleted before we - exec it, we lose, even if the deletion leaves a valid file - further down in the PATH, (2) there is no way to know exactly - what an executable (in the sense of "capable of being - exec'd") file is. Using access() loses because it may lose - if the caller is the superuser; failing to use it loses if - there are ACLs or some such. */ - - char *p; - char *p1; - /* FIXME-maybe: might want "set path" command so user can change what - path is used from within GDB. */ - char *path = getenv ("PATH"); - int len; - struct stat statbuf; - - if (path == NULL) - path = "/bin:/usr/bin"; - - tryname = alloca (strlen (path) + strlen (shell_file) + 2); - for (p = path; p != NULL; p = p1 ? p1 + 1: NULL) - { - p1 = strchr (p, ':'); - if (p1 != NULL) - len = p1 - p; - else - len = strlen (p); - strncpy (tryname, p, len); - tryname[len] = '\0'; - strcat (tryname, "/"); - strcat (tryname, shell_file); - if (access (tryname, X_OK) < 0) - continue; - if (stat (tryname, &statbuf) < 0) - continue; - if (!S_ISREG (statbuf.st_mode)) - /* We certainly need to reject directories. I'm not quite - as sure about FIFOs, sockets, etc., but I kind of doubt - that people want to exec() these things. */ - continue; - break; - } - if (p == NULL) - /* Not found. This must be an error rather than merely passing - the file to execlp(), because execlp() would try all the - exec()s, causing GDB to get confused. */ - error ("procfs:%d -- Can't find shell %s in PATH", - __LINE__, shell_file); - - shell_file = tryname; - } - - fork_inferior (exec_file, allargs, env, procfs_set_exec_trap, - procfs_init_inferior, NULL, shell_file); - - /* We are at the first instruction we care about. */ - /* Pedal to the metal... */ - - proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0); -} - -/* - * Function: notice_thread - * - * Callback for find_new_threads. - * Calls "add_thread". - */ - -static int -procfs_notice_thread (procinfo *pi, procinfo *thread, void *ptr) -{ - ptid_t gdb_threadid = MERGEPID (pi->pid, thread->tid); - - if (!in_thread_list (gdb_threadid)) - add_thread (gdb_threadid); - - return 0; -} - -/* - * Function: target_find_new_threads - * - * Query all the threads that the target knows about, - * and give them back to GDB to add to its list. - */ - -void -procfs_find_new_threads (void) -{ - procinfo *pi; - - /* Find procinfo for main process */ - pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - proc_update_threads (pi); - proc_iterate_over_threads (pi, procfs_notice_thread, NULL); -} - -/* - * Function: target_thread_alive - * - * Return true if the thread is still 'alive'. - * - * This guy doesn't really seem to be doing his job. - * Got to investigate how to tell when a thread is really gone. - */ - -static int -procfs_thread_alive (ptid_t ptid) -{ - int proc, thread; - procinfo *pi; - - proc = PIDGET (ptid); - thread = TIDGET (ptid); - /* If I don't know it, it ain't alive! */ - if ((pi = find_procinfo (proc, thread)) == NULL) - return 0; - - /* If I can't get its status, it ain't alive! - What's more, I need to forget about it! */ - if (!proc_get_status (pi)) - { - destroy_procinfo (pi); - return 0; - } - /* I couldn't have got its status if it weren't alive, so it's alive. */ - return 1; -} - -/* - * Function: target_pid_to_str - * - * Return a string to be used to identify the thread in - * the "info threads" display. - */ - -char * -procfs_pid_to_str (ptid_t ptid) -{ - static char buf[80]; - int proc, thread; - procinfo *pi; - - proc = PIDGET (ptid); - thread = TIDGET (ptid); - pi = find_procinfo (proc, thread); - - if (thread == 0) - sprintf (buf, "Process %d", proc); - else - sprintf (buf, "LWP %d", thread); - return &buf[0]; -} - -/* - * Function: procfs_set_watchpoint - * Insert a watchpoint - */ - -int -procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag, - int after) -{ -#ifndef UNIXWARE -#ifndef AIX5 - int pflags = 0; - procinfo *pi; - - pi = find_procinfo_or_die (PIDGET (ptid) == -1 ? - PIDGET (inferior_ptid) : PIDGET (ptid), 0); - - /* Translate from GDB's flags to /proc's */ - if (len > 0) /* len == 0 means delete watchpoint */ - { - switch (rwflag) { /* FIXME: need an enum! */ - case hw_write: /* default watchpoint (write) */ - pflags = WRITE_WATCHFLAG; - break; - case hw_read: /* read watchpoint */ - pflags = READ_WATCHFLAG; - break; - case hw_access: /* access watchpoint */ - pflags = READ_WATCHFLAG | WRITE_WATCHFLAG; - break; - case hw_execute: /* execution HW breakpoint */ - pflags = EXEC_WATCHFLAG; - break; - default: /* Something weird. Return error. */ - return -1; - } - if (after) /* Stop after r/w access is completed. */ - pflags |= AFTER_WATCHFLAG; - } - - if (!proc_set_watchpoint (pi, addr, len, pflags)) - { - if (errno == E2BIG) /* Typical error for no resources */ - return -1; /* fail */ - /* GDB may try to remove the same watchpoint twice. - If a remove request returns no match, don't error. */ - if (errno == ESRCH && len == 0) - return 0; /* ignore */ - proc_error (pi, "set_watchpoint", __LINE__); - } -#endif /* AIX5 */ -#endif /* UNIXWARE */ - return 0; -} - -/* - * Function: stopped_by_watchpoint - * - * Returns non-zero if process is stopped on a hardware watchpoint fault, - * else returns zero. - */ - -int -procfs_stopped_by_watchpoint (ptid_t ptid) -{ - procinfo *pi; - - pi = find_procinfo_or_die (PIDGET (ptid) == -1 ? - PIDGET (inferior_ptid) : PIDGET (ptid), 0); - - if (!pi) /* If no process, then not stopped by watchpoint! */ - return 0; - - if (proc_flags (pi) & (PR_STOPPED | PR_ISTOP)) - { - if (proc_why (pi) == PR_FAULTED) - { -#ifdef FLTWATCH - if (proc_what (pi) == FLTWATCH) - return 1; -#endif -#ifdef FLTKWATCH - if (proc_what (pi) == FLTKWATCH) - return 1; -#endif - } - } - return 0; -} - -#ifdef TM_I386SOL2_H -/* - * Function: procfs_find_LDT_entry - * - * Input: - * ptid_t ptid; // The GDB-style pid-plus-LWP. - * - * Return: - * pointer to the corresponding LDT entry. - */ - -struct ssd * -procfs_find_LDT_entry (ptid_t ptid) -{ - gdb_gregset_t *gregs; - int key; - procinfo *pi; - - /* Find procinfo for the lwp. */ - if ((pi = find_procinfo (PIDGET (ptid), TIDGET (ptid))) == NULL) - { - warning ("procfs_find_LDT_entry: could not find procinfo for %d:%d.", - PIDGET (ptid), TIDGET (ptid)); - return NULL; - } - /* get its general registers. */ - if ((gregs = proc_get_gregs (pi)) == NULL) - { - warning ("procfs_find_LDT_entry: could not read gregs for %d:%d.", - PIDGET (ptid), TIDGET (ptid)); - return NULL; - } - /* Now extract the GS register's lower 16 bits. */ - key = (*gregs)[GS] & 0xffff; - - /* Find the matching entry and return it. */ - return proc_get_LDT_entry (pi, key); -} -#endif /* TM_I386SOL2_H */ - -/* - * Memory Mappings Functions: - */ - -/* - * Function: iterate_over_mappings - * - * Call a callback function once for each mapping, passing it the mapping, - * an optional secondary callback function, and some optional opaque data. - * Quit and return the first non-zero value returned from the callback. - * - * Arguments: - * pi -- procinfo struct for the process to be mapped. - * func -- callback function to be called by this iterator. - * data -- optional opaque data to be passed to the callback function. - * child_func -- optional secondary function pointer to be passed - * to the child function. - * - * Return: First non-zero return value from the callback function, - * or zero. - */ - -static int -iterate_over_mappings (procinfo *pi, int (*child_func) (), void *data, - int (*func) (struct prmap *map, - int (*child_func) (), - void *data)) -{ - char pathname[MAX_PROC_NAME_SIZE]; - struct prmap *prmaps; - struct prmap *prmap; - int funcstat; - int map_fd; - int nmap; -#ifdef NEW_PROC_API - struct stat sbuf; -#endif - - /* Get the number of mappings, allocate space, - and read the mappings into prmaps. */ -#ifdef NEW_PROC_API - /* Open map fd. */ - sprintf (pathname, "/proc/%d/map", pi->pid); - if ((map_fd = open (pathname, O_RDONLY)) < 0) - proc_error (pi, "iterate_over_mappings (open)", __LINE__); - - /* Make sure it gets closed again. */ - make_cleanup_close (map_fd); - - /* Use stat to determine the file size, and compute - the number of prmap_t objects it contains. */ - if (fstat (map_fd, &sbuf) != 0) - proc_error (pi, "iterate_over_mappings (fstat)", __LINE__); - - nmap = sbuf.st_size / sizeof (prmap_t); - prmaps = (struct prmap *) alloca ((nmap + 1) * sizeof (*prmaps)); - if (read (map_fd, (char *) prmaps, nmap * sizeof (*prmaps)) - != (nmap * sizeof (*prmaps))) - proc_error (pi, "iterate_over_mappings (read)", __LINE__); -#else - /* Use ioctl command PIOCNMAP to get number of mappings. */ - if (ioctl (pi->ctl_fd, PIOCNMAP, &nmap) != 0) - proc_error (pi, "iterate_over_mappings (PIOCNMAP)", __LINE__); - - prmaps = (struct prmap *) alloca ((nmap + 1) * sizeof (*prmaps)); - if (ioctl (pi->ctl_fd, PIOCMAP, prmaps) != 0) - proc_error (pi, "iterate_over_mappings (PIOCMAP)", __LINE__); -#endif - - for (prmap = prmaps; nmap > 0; prmap++, nmap--) - if ((funcstat = (*func) (prmap, child_func, data)) != 0) - return funcstat; - - return 0; -} - -/* - * Function: solib_mappings_callback - * - * Calls the supplied callback function once for each mapped address - * space in the process. The callback function receives an open - * file descriptor for the file corresponding to that mapped - * address space (if there is one), and the base address of the - * mapped space. Quit when the callback function returns a - * nonzero value, or at teh end of the mappings. - * - * Returns: the first non-zero return value of the callback function, - * or zero. - */ - -int solib_mappings_callback (struct prmap *map, - int (*func) (int, CORE_ADDR), - void *data) -{ - procinfo *pi = data; - int fd; - -#ifdef NEW_PROC_API - char name[MAX_PROC_NAME_SIZE + sizeof (map->pr_mapname)]; - - if (map->pr_vaddr == 0 && map->pr_size == 0) - return -1; /* sanity */ - - if (map->pr_mapname[0] == 0) - { - fd = -1; /* no map file */ - } - else - { - sprintf (name, "/proc/%d/object/%s", pi->pid, map->pr_mapname); - /* Note: caller's responsibility to close this fd! */ - fd = open_with_retry (name, O_RDONLY); - /* Note: we don't test the above call for failure; - we just pass the FD on as given. Sometimes there is - no file, so the open may return failure, but that's - not a problem. */ - } -#else - fd = ioctl (pi->ctl_fd, PIOCOPENM, &map->pr_vaddr); - /* Note: we don't test the above call for failure; - we just pass the FD on as given. Sometimes there is - no file, so the ioctl may return failure, but that's - not a problem. */ -#endif - return (*func) (fd, (CORE_ADDR) map->pr_vaddr); -} - -/* - * Function: proc_iterate_over_mappings - * - * Uses the unified "iterate_over_mappings" function - * to implement the exported interface to solib-svr4.c. - * - * Given a pointer to a function, call that function once for every - * mapped address space in the process. The callback function - * receives an open file descriptor for the file corresponding to - * that mapped address space (if there is one), and the base address - * of the mapped space. Quit when the callback function returns a - * nonzero value, or at teh end of the mappings. - * - * Returns: the first non-zero return value of the callback function, - * or zero. - */ - -int -proc_iterate_over_mappings (int (*func) (int, CORE_ADDR)) -{ - procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - - return iterate_over_mappings (pi, func, pi, solib_mappings_callback); -} - -/* - * Function: find_memory_regions_callback - * - * Implements the to_find_memory_regions method. - * Calls an external function for each memory region. - * External function will have the signiture: - * - * int callback (CORE_ADDR vaddr, - * unsigned long size, - * int read, int write, int execute, - * void *data); - * - * Returns the integer value returned by the callback. - */ - -static int -find_memory_regions_callback (struct prmap *map, - int (*func) (CORE_ADDR, - unsigned long, - int, int, int, - void *), - void *data) -{ - return (*func) ((CORE_ADDR) map->pr_vaddr, - map->pr_size, - (map->pr_mflags & MA_READ) != 0, - (map->pr_mflags & MA_WRITE) != 0, - (map->pr_mflags & MA_EXEC) != 0, - data); -} - -/* - * Function: proc_find_memory_regions - * - * External interface. Calls a callback function once for each - * mapped memory region in the child process, passing as arguments - * CORE_ADDR virtual_address, - * unsigned long size, - * int read, TRUE if region is readable by the child - * int write, TRUE if region is writable by the child - * int execute TRUE if region is executable by the child. - * - * Stops iterating and returns the first non-zero value - * returned by the callback. - */ - -static int -proc_find_memory_regions (int (*func) (CORE_ADDR, - unsigned long, - int, int, int, - void *), - void *data) -{ - procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - - return iterate_over_mappings (pi, func, data, - find_memory_regions_callback); -} - -/* - * Function: mappingflags - * - * Returns an ascii representation of a memory mapping's flags. - */ - -static char * -mappingflags (flags) - long flags; -{ - static char asciiflags[8]; - - strcpy (asciiflags, "-------"); -#if defined (MA_PHYS) - if (flags & MA_PHYS) - asciiflags[0] = 'd'; -#endif - if (flags & MA_STACK) - asciiflags[1] = 's'; - if (flags & MA_BREAK) - asciiflags[2] = 'b'; - if (flags & MA_SHARED) - asciiflags[3] = 's'; - if (flags & MA_READ) - asciiflags[4] = 'r'; - if (flags & MA_WRITE) - asciiflags[5] = 'w'; - if (flags & MA_EXEC) - asciiflags[6] = 'x'; - return (asciiflags); -} - -/* - * Function: info_mappings_callback - * - * Callback function, does the actual work for 'info proc mappings'. - */ - -/* ARGSUSED */ -static int -info_mappings_callback (struct prmap *map, int (*ignore) (), void *unused) -{ - char *data_fmt_string; - - if (TARGET_ADDR_BIT == 32) - data_fmt_string = "\t%#10lx %#10lx %#10x %#10x %7s\n"; - else - data_fmt_string = " %#18lx %#18lx %#10x %#10x %7s\n"; - - printf_filtered (data_fmt_string, - (unsigned long) map->pr_vaddr, - (unsigned long) map->pr_vaddr + map->pr_size - 1, - map->pr_size, -#ifdef PCAGENT /* Horrible hack: only defined on Solaris 2.6+ */ - (unsigned int) map->pr_offset, -#else - map->pr_off, -#endif - mappingflags (map->pr_mflags)); - - return 0; -} - -/* - * Function: info_proc_mappings - * - * Implement the "info proc mappings" subcommand. - */ - -static void -info_proc_mappings (procinfo *pi, int summary) -{ - char *header_fmt_string; - - if (TARGET_PTR_BIT == 32) - header_fmt_string = "\t%10s %10s %10s %10s %7s\n"; - else - header_fmt_string = " %18s %18s %10s %10s %7s\n"; - - if (summary) - return; /* No output for summary mode. */ - - printf_filtered ("Mapped address spaces:\n\n"); - printf_filtered (header_fmt_string, - "Start Addr", - " End Addr", - " Size", - " Offset", - "Flags"); - - iterate_over_mappings (pi, NULL, NULL, info_mappings_callback); - printf_filtered ("\n"); -} - -/* - * Function: info_proc_cmd - * - * Implement the "info proc" command. - */ - -static void -info_proc_cmd (char *args, int from_tty) -{ - struct cleanup *old_chain; - procinfo *process = NULL; - procinfo *thread = NULL; - char **argv = NULL; - char *tmp = NULL; - int pid = 0; - int tid = 0; - int mappings = 0; - - old_chain = make_cleanup (null_cleanup, 0); - if (args) - { - if ((argv = buildargv (args)) == NULL) - nomem (0); - else - make_cleanup_freeargv (argv); - } - while (argv != NULL && *argv != NULL) - { - if (isdigit (argv[0][0])) - { - pid = strtoul (argv[0], &tmp, 10); - if (*tmp == '/') - tid = strtoul (++tmp, NULL, 10); - } - else if (argv[0][0] == '/') - { - tid = strtoul (argv[0] + 1, NULL, 10); - } - else if (strncmp (argv[0], "mappings", strlen (argv[0])) == 0) - { - mappings = 1; - } - else - { - /* [...] */ - } - argv++; - } - if (pid == 0) - pid = PIDGET (inferior_ptid); - if (pid == 0) - error ("No current process: you must name one."); - else - { - /* Have pid, will travel. - First see if it's a process we're already debugging. */ - process = find_procinfo (pid, 0); - if (process == NULL) - { - /* No. So open a procinfo for it, but - remember to close it again when finished. */ - process = create_procinfo (pid, 0); - make_cleanup (do_destroy_procinfo_cleanup, process); - if (!open_procinfo_files (process, FD_CTL)) - proc_error (process, "info proc, open_procinfo_files", __LINE__); - } - } - if (tid != 0) - thread = create_procinfo (pid, tid); - - if (process) - { - printf_filtered ("process %d flags:\n", process->pid); - proc_prettyprint_flags (proc_flags (process), 1); - if (proc_flags (process) & (PR_STOPPED | PR_ISTOP)) - proc_prettyprint_why (proc_why (process), proc_what (process), 1); - if (proc_get_nthreads (process) > 1) - printf_filtered ("Process has %d threads.\n", - proc_get_nthreads (process)); - } - if (thread) - { - printf_filtered ("thread %d flags:\n", thread->tid); - proc_prettyprint_flags (proc_flags (thread), 1); - if (proc_flags (thread) & (PR_STOPPED | PR_ISTOP)) - proc_prettyprint_why (proc_why (thread), proc_what (thread), 1); - } - - if (mappings) - { - info_proc_mappings (process, 0); - } - - do_cleanups (old_chain); -} - -static void -proc_trace_syscalls (char *args, int from_tty, int entry_or_exit, int mode) -{ - procinfo *pi; - sysset_t *sysset; - int syscallnum = 0; - - if (PIDGET (inferior_ptid) <= 0) - error ("you must be debugging a process to use this command."); - - if (args == NULL || args[0] == 0) - error_no_arg ("system call to trace"); - - pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - if (isdigit (args[0])) - { - syscallnum = atoi (args); - if (entry_or_exit == PR_SYSENTRY) - sysset = proc_get_traced_sysentry (pi, NULL); - else - sysset = proc_get_traced_sysexit (pi, NULL); - - if (sysset == NULL) - proc_error (pi, "proc-trace, get_traced_sysset", __LINE__); - - if (mode == FLAG_SET) - gdb_praddsysset (sysset, syscallnum); - else - gdb_prdelsysset (sysset, syscallnum); - - if (entry_or_exit == PR_SYSENTRY) - { - if (!proc_set_traced_sysentry (pi, sysset)) - proc_error (pi, "proc-trace, set_traced_sysentry", __LINE__); - } - else - { - if (!proc_set_traced_sysexit (pi, sysset)) - proc_error (pi, "proc-trace, set_traced_sysexit", __LINE__); - } - } -} - -static void -proc_trace_sysentry_cmd (char *args, int from_tty) -{ - proc_trace_syscalls (args, from_tty, PR_SYSENTRY, FLAG_SET); -} - -static void -proc_trace_sysexit_cmd (char *args, int from_tty) -{ - proc_trace_syscalls (args, from_tty, PR_SYSEXIT, FLAG_SET); -} - -static void -proc_untrace_sysentry_cmd (char *args, int from_tty) -{ - proc_trace_syscalls (args, from_tty, PR_SYSENTRY, FLAG_RESET); -} - -static void -proc_untrace_sysexit_cmd (char *args, int from_tty) -{ - proc_trace_syscalls (args, from_tty, PR_SYSEXIT, FLAG_RESET); -} - - -void -_initialize_procfs (void) -{ - init_procfs_ops (); - add_target (&procfs_ops); - add_info ("proc", info_proc_cmd, - "Show /proc process information about any running process.\n\ -Specify process id, or use the program being debugged by default.\n\ -Specify keyword 'mappings' for detailed info on memory mappings."); - add_com ("proc-trace-entry", no_class, proc_trace_sysentry_cmd, - "Give a trace of entries into the syscall."); - add_com ("proc-trace-exit", no_class, proc_trace_sysexit_cmd, - "Give a trace of exits from the syscall."); - add_com ("proc-untrace-entry", no_class, proc_untrace_sysentry_cmd, - "Cancel a trace of entries into the syscall."); - add_com ("proc-untrace-exit", no_class, proc_untrace_sysexit_cmd, - "Cancel a trace of exits from the syscall."); -} - -/* =================== END, GDB "MODULE" =================== */ - - - -/* miscellaneous stubs: */ -/* The following satisfy a few random symbols mostly created by */ -/* the solaris threads implementation, which I will chase down */ -/* later. */ - -/* - * Return a pid for which we guarantee - * we will be able to find a 'live' procinfo. - */ - -ptid_t -procfs_first_available (void) -{ - return pid_to_ptid (procinfo_list ? procinfo_list->pid : -1); -} - -/* =================== GCORE .NOTE "MODULE" =================== */ -#if defined (UNIXWARE) || defined (PIOCOPENLWP) || defined (PCAGENT) -/* gcore only implemented on solaris and unixware (so far) */ - -static char * -procfs_do_thread_registers (bfd *obfd, ptid_t ptid, - char *note_data, int *note_size) -{ - gdb_gregset_t gregs; - gdb_fpregset_t fpregs; - unsigned long merged_pid; - - merged_pid = TIDGET (ptid) << 16 | PIDGET (ptid); - - fill_gregset (&gregs, -1); -#if defined (UNIXWARE) - note_data = (char *) elfcore_write_lwpstatus (obfd, - note_data, - note_size, - merged_pid, - stop_signal, - &gregs); -#else - note_data = (char *) elfcore_write_prstatus (obfd, - note_data, - note_size, - merged_pid, - stop_signal, - &gregs); -#endif - fill_fpregset (&fpregs, -1); - note_data = (char *) elfcore_write_prfpreg (obfd, - note_data, - note_size, - &fpregs, - sizeof (fpregs)); - return note_data; -} - -struct procfs_corefile_thread_data { - bfd *obfd; - char *note_data; - int *note_size; -}; - -static int -procfs_corefile_thread_callback (procinfo *pi, procinfo *thread, void *data) -{ - struct procfs_corefile_thread_data *args = data; - - if (pi != NULL && thread->tid != 0) - { - ptid_t saved_ptid = inferior_ptid; - inferior_ptid = MERGEPID (pi->pid, thread->tid); - args->note_data = procfs_do_thread_registers (args->obfd, inferior_ptid, - args->note_data, - args->note_size); - inferior_ptid = saved_ptid; - } - return 0; -} - -static char * -procfs_make_note_section (bfd *obfd, int *note_size) -{ - struct cleanup *old_chain; - gdb_gregset_t gregs; - gdb_fpregset_t fpregs; - char fname[16] = {'\0'}; - char psargs[80] = {'\0'}; - procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0); - char *note_data = NULL; - char *inf_args; - struct procfs_corefile_thread_data thread_args; - - if (get_exec_file (0)) - { - strncpy (fname, strrchr (get_exec_file (0), '/') + 1, sizeof (fname)); - strncpy (psargs, get_exec_file (0), - sizeof (psargs)); - - inf_args = get_inferior_args (); - if (inf_args && *inf_args && - strlen (inf_args) < ((int) sizeof (psargs) - (int) strlen (psargs))) - { - strncat (psargs, " ", - sizeof (psargs) - strlen (psargs)); - strncat (psargs, inf_args, - sizeof (psargs) - strlen (psargs)); - } - } - - note_data = (char *) elfcore_write_prpsinfo (obfd, - note_data, - note_size, - fname, - psargs); - -#ifdef UNIXWARE - fill_gregset (&gregs, -1); - note_data = elfcore_write_pstatus (obfd, note_data, note_size, - PIDGET (inferior_ptid), - stop_signal, &gregs); -#endif - - thread_args.obfd = obfd; - thread_args.note_data = note_data; - thread_args.note_size = note_size; - proc_iterate_over_threads (pi, procfs_corefile_thread_callback, &thread_args); - - if (thread_args.note_data == note_data) - { - /* iterate_over_threads didn't come up with any threads; - just use inferior_ptid. */ - note_data = procfs_do_thread_registers (obfd, inferior_ptid, - note_data, note_size); - } - else - { - note_data = thread_args.note_data; - } - - make_cleanup (xfree, note_data); - return note_data; -} -#else /* !(Solaris or Unixware) */ -static char * -procfs_make_note_section (bfd *obfd, int *note_size) -{ - error ("gcore not implemented for this host."); - return NULL; /* lint */ -} -#endif /* Solaris or Unixware */ -/* =================== END GCORE .NOTE "MODULE" =================== */ |