Compare commits

...

943 Commits

Author SHA1 Message Date
nobody
73527ac849 This commit was manufactured by cvs2svn to create tag 'gdb-1999-09-13'.
Sprout from master 1999-09-13 21:40:00 UTC Jason Molenda <jmolenda@apple.com> 'import gdb-1999-09-13 snapshot'
Cherrypick from FSF 1999-08-16 19:57:18 UTC Jason Molenda <jmolenda@apple.com> 'import gdb-1999-08-16 snapshot':
    readline/CHANGELOG
    readline/CHANGES
    readline/COPYING
    readline/INSTALL
    readline/MANIFEST
    readline/Makefile.in
    readline/README
    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.in
    readline/configure
    readline/configure.in
    readline/display.c
    readline/doc/Makefile.in
    readline/doc/hist.texinfo
    readline/doc/hstech.texinfo
    readline/doc/hsuser.texinfo
    readline/doc/manvers.texinfo
    readline/doc/readline.0
    readline/doc/readline.3
    readline/doc/rlman.texinfo
    readline/doc/rltech.texinfo
    readline/doc/rluser.texinfo
    readline/doc/texi2dvi
    readline/doc/texi2html
    readline/emacs_keymap.c
    readline/examples/Inputrc
    readline/examples/Makefile.in
    readline/examples/fileman.c
    readline/examples/histexamp.c
    readline/examples/manexamp.c
    readline/examples/rl.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/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
Delete:
    .cvsignore
    COPYING
    COPYING.LIB
    ChangeLog
    Makefile.in
    README
    bfd/COPYING
    bfd/ChangeLog
    bfd/ChangeLog-9193
    bfd/ChangeLog-9495
    bfd/ChangeLog-9697
    bfd/Makefile.am
    bfd/Makefile.in
    bfd/PORTING
    bfd/README
    bfd/TODO
    bfd/acinclude.m4
    bfd/aclocal.m4
    bfd/aix386-core.c
    bfd/aout-adobe.c
    bfd/aout-arm.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/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-m68k.c
    bfd/coff-m88k.c
    bfd/coff-mcore.c
    bfd/coff-mips.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-tic80.c
    bfd/coff-u68k.c
    bfd/coff-w65.c
    bfd/coff-we32k.c
    bfd/coff-z8k.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-d10v.c
    bfd/cpu-d30v.c
    bfd/cpu-fr30.c
    bfd/cpu-h8300.c
    bfd/cpu-h8500.c
    bfd/cpu-hppa.c
    bfd/cpu-i386.c
    bfd/cpu-i860.c
    bfd/cpu-i960.c
    bfd/cpu-m10200.c
    bfd/cpu-m10300.c
    bfd/cpu-m32r.c
    bfd/cpu-m68k.c
    bfd/cpu-m88k.c
    bfd/cpu-mcore.c
    bfd/cpu-mips.c
    bfd/cpu-ns32k.c
    bfd/cpu-pj.c
    bfd/cpu-powerpc.c
    bfd/cpu-rs6000.c
    bfd/cpu-sh.c
    bfd/cpu-sparc.c
    bfd/cpu-tic30.c
    bfd/cpu-tic80.c
    bfd/cpu-v850.c
    bfd/cpu-vax.c
    bfd/cpu-w65.c
    bfd/cpu-we32k.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/makefile.vms
    bfd/doc/proto.str
    bfd/dwarf1.c
    bfd/dwarf2.c
    bfd/ecoff.c
    bfd/ecofflink.c
    bfd/ecoffswap.h
    bfd/elf-bfd.h
    bfd/elf-hppa.h
    bfd/elf-m10200.c
    bfd/elf-m10300.c
    bfd/elf.c
    bfd/elf32-arc.c
    bfd/elf32-arm.h
    bfd/elf32-d10v.c
    bfd/elf32-d30v.c
    bfd/elf32-fr30.c
    bfd/elf32-gen.c
    bfd/elf32-hppa.c
    bfd/elf32-hppa.h
    bfd/elf32-i386.c
    bfd/elf32-i860.c
    bfd/elf32-i960.c
    bfd/elf32-m32r.c
    bfd/elf32-m68k.c
    bfd/elf32-m88k.c
    bfd/elf32-mcore.c
    bfd/elf32-mips.c
    bfd/elf32-pj.c
    bfd/elf32-ppc.c
    bfd/elf32-sh.c
    bfd/elf32-sparc.c
    bfd/elf32-v850.c
    bfd/elf32.c
    bfd/elf64-alpha.c
    bfd/elf64-gen.c
    bfd/elf64-mips.c
    bfd/elf64-sparc.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-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/hppa_stubs.h
    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/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/mipsbsd.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/pe-arm.c
    bfd/pe-i386.c
    bfd/pe-mcore.c
    bfd/pe-ppc.c
    bfd/pei-arm.c
    bfd/pei-i386.c
    bfd/pei-mcore.c
    bfd/pei-ppc.c
    bfd/peicode.h
    bfd/peigen.c
    bfd/po/Make-in
    bfd/po/POTFILES.in
    bfd/po/bfd.pot
    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/vms-gsd.c
    bfd/vms-hdr.c
    bfd/vms-misc.c
    bfd/vms-tir.c
    bfd/vms.c
    bfd/vms.h
    bfd/xcofflink.c
    binutils/ChangeLog
    binutils/Makefile.am
    binutils/Makefile.in
    binutils/NEWS
    binutils/README
    binutils/acinclude.m4
    binutils/aclocal.m4
    binutils/addr2line.1
    binutils/addr2line.c
    binutils/ar.1
    binutils/ar.c
    binutils/arlex.l
    binutils/arparse.y
    binutils/arsup.c
    binutils/arsup.h
    binutils/binutils.texi
    binutils/bucomm.c
    binutils/bucomm.h
    binutils/budbg.h
    binutils/coffdump.c
    binutils/coffgrok.c
    binutils/coffgrok.h
    binutils/config.in
    binutils/configure
    binutils/configure.com
    binutils/configure.in
    binutils/cxxfilt.man
    binutils/debug.c
    binutils/debug.h
    binutils/deflex.l
    binutils/defparse.y
    binutils/dep-in.sed
    binutils/dlltool.c
    binutils/dlltool.h
    binutils/dllwrap.c
    binutils/dyn-string.c
    binutils/dyn-string.h
    binutils/filemode.c
    binutils/ieee.c
    binutils/is-ranlib.c
    binutils/is-strip.c
    binutils/mac-binutils.r
    binutils/makefile.vms-in
    binutils/maybe-ranlib.c
    binutils/maybe-strip.c
    binutils/mpw-config.in
    binutils/mpw-make.sed
    binutils/nlmconv.1
    binutils/nlmconv.c
    binutils/nlmconv.h
    binutils/nlmheader.y
    binutils/nm.1
    binutils/nm.c
    binutils/not-ranlib.c
    binutils/not-strip.c
    binutils/objcopy.1
    binutils/objcopy.c
    binutils/objdump.1
    binutils/objdump.c
    binutils/po/Make-in
    binutils/po/POTFILES.in
    binutils/po/binutils.pot
    binutils/prdbg.c
    binutils/ranlib.1
    binutils/ranlib.sh
    binutils/rclex.l
    binutils/rcparse.y
    binutils/rdcoff.c
    binutils/rddbg.c
    binutils/readelf.c
    binutils/rename.c
    binutils/resbin.c
    binutils/rescoff.c
    binutils/resrc.c
    binutils/resres.c
    binutils/sanity.sh
    binutils/size.1
    binutils/size.c
    binutils/srconv.c
    binutils/stabs.c
    binutils/stamp-h.in
    binutils/strings.1
    binutils/strings.c
    binutils/strip.1
    binutils/sysdump.c
    binutils/sysinfo.y
    binutils/syslex.l
    binutils/sysroff.info
    binutils/testsuite/ChangeLog
    binutils/testsuite/binutils-all/ar.exp
    binutils/testsuite/binutils-all/bintest.s
    binutils/testsuite/binutils-all/hppa/addendbug.s
    binutils/testsuite/binutils-all/hppa/freg.s
    binutils/testsuite/binutils-all/hppa/objdump.exp
    binutils/testsuite/binutils-all/nm.exp
    binutils/testsuite/binutils-all/objcopy.exp
    binutils/testsuite/binutils-all/objdump.exp
    binutils/testsuite/binutils-all/readelf.exp
    binutils/testsuite/binutils-all/readelf.h
    binutils/testsuite/binutils-all/readelf.r
    binutils/testsuite/binutils-all/readelf.s
    binutils/testsuite/binutils-all/readelf.ss
    binutils/testsuite/binutils-all/readelf.wi
    binutils/testsuite/binutils-all/size.exp
    binutils/testsuite/binutils-all/testprog.c
    binutils/testsuite/config/default.exp
    binutils/testsuite/config/hppa.sed
    binutils/testsuite/lib/utils-lib.exp
    binutils/version.c
    binutils/windres.c
    binutils/windres.h
    binutils/winduni.c
    binutils/winduni.h
    binutils/wrstabs.c
    config-ml.in
    config.guess
    config.if
    config.sub
    config/ChangeLog
    config/acinclude.m4
    config/mh-a68bsd
    config/mh-aix386
    config/mh-aix43
    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-interix
    config/mh-irix4
    config/mh-irix5
    config/mh-irix6
    config/mh-lynxos
    config/mh-lynxrs6k
    config/mh-m68kpic
    config/mh-mingw32
    config/mh-ncr3000
    config/mh-ncrsvr43
    config/mh-necv4
    config/mh-papic
    config/mh-ppcpic
    config/mh-riscos
    config/mh-sco
    config/mh-solaris
    config/mh-sparcpic
    config/mh-sun3
    config/mh-sysv
    config/mh-sysv4
    config/mh-sysv5
    config/mh-vaxult2
    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-armpic
    config/mt-d30v
    config/mt-elfalphapic
    config/mt-linux
    config/mt-m68kpic
    config/mt-netware
    config/mt-ospace
    config/mt-papic
    config/mt-ppcpic
    config/mt-sparcpic
    config/mt-v810
    config/mt-x86pic
    configure
    configure.in
    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/make-stds.texi
    etc/standards.texi
    gas/CONTRIBUTORS
    gas/COPYING
    gas/ChangeLog
    gas/ChangeLog-9295
    gas/ChangeLog-9697
    gas/Makefile.am
    gas/Makefile.in
    gas/NEWS
    gas/README
    gas/README-vms
    gas/acinclude.m4
    gas/aclocal.m4
    gas/app.c
    gas/as.c
    gas/as.h
    gas/asintl.h
    gas/atof-generic.c
    gas/bignum-copy.c
    gas/bignum.h
    gas/bit_fix.h
    gas/cgen.c
    gas/cgen.h
    gas/cond.c
    gas/config-gas.com
    gas/config.in
    gas/config/aout_gnu.h
    gas/config/atof-ieee.c
    gas/config/atof-tahoe.c
    gas/config/atof-vax.c
    gas/config/e-i386coff.c
    gas/config/e-i386elf.c
    gas/config/e-mipsecoff.c
    gas/config/e-mipself.c
    gas/config/itbl-mips.h
    gas/config/m68k-parse.h
    gas/config/m68k-parse.y
    gas/config/m88k-opcode.h
    gas/config/obj-aout.c
    gas/config/obj-aout.h
    gas/config/obj-bout.c
    gas/config/obj-bout.h
    gas/config/obj-coff.c
    gas/config/obj-coff.h
    gas/config/obj-ecoff.c
    gas/config/obj-ecoff.h
    gas/config/obj-elf.c
    gas/config/obj-elf.h
    gas/config/obj-evax.c
    gas/config/obj-evax.h
    gas/config/obj-generic.c
    gas/config/obj-generic.h
    gas/config/obj-hp300.c
    gas/config/obj-hp300.h
    gas/config/obj-ieee.c
    gas/config/obj-ieee.h
    gas/config/obj-multi.c
    gas/config/obj-multi.h
    gas/config/obj-som.c
    gas/config/obj-som.h
    gas/config/obj-vms.c
    gas/config/obj-vms.h
    gas/config/tc-a29k.c
    gas/config/tc-a29k.h
    gas/config/tc-alpha.c
    gas/config/tc-alpha.h
    gas/config/tc-arc.c
    gas/config/tc-arc.h
    gas/config/tc-arm.c
    gas/config/tc-arm.h
    gas/config/tc-d10v.c
    gas/config/tc-d10v.h
    gas/config/tc-d30v.c
    gas/config/tc-d30v.h
    gas/config/tc-fr30.c
    gas/config/tc-fr30.h
    gas/config/tc-generic.c
    gas/config/tc-generic.h
    gas/config/tc-h8300.c
    gas/config/tc-h8300.h
    gas/config/tc-h8500.c
    gas/config/tc-h8500.h
    gas/config/tc-hppa.c
    gas/config/tc-hppa.h
    gas/config/tc-i386.c
    gas/config/tc-i386.h
    gas/config/tc-i860.c
    gas/config/tc-i860.h
    gas/config/tc-i960.c
    gas/config/tc-i960.h
    gas/config/tc-m32r.c
    gas/config/tc-m32r.h
    gas/config/tc-m68851.h
    gas/config/tc-m68k.c
    gas/config/tc-m68k.h
    gas/config/tc-m88k.c
    gas/config/tc-m88k.h
    gas/config/tc-mcore.c
    gas/config/tc-mcore.h
    gas/config/tc-mips.c
    gas/config/tc-mips.h
    gas/config/tc-mn10200.c
    gas/config/tc-mn10200.h
    gas/config/tc-mn10300.c
    gas/config/tc-mn10300.h
    gas/config/tc-ns32k.c
    gas/config/tc-ns32k.h
    gas/config/tc-pj.c
    gas/config/tc-pj.h
    gas/config/tc-ppc.c
    gas/config/tc-ppc.h
    gas/config/tc-sh.c
    gas/config/tc-sh.h
    gas/config/tc-sparc.c
    gas/config/tc-sparc.h
    gas/config/tc-tahoe.c
    gas/config/tc-tahoe.h
    gas/config/tc-tic30.c
    gas/config/tc-tic30.h
    gas/config/tc-tic80.c
    gas/config/tc-tic80.h
    gas/config/tc-v850.c
    gas/config/tc-v850.h
    gas/config/tc-vax.c
    gas/config/tc-vax.h
    gas/config/tc-w65.c
    gas/config/tc-w65.h
    gas/config/tc-z8k.c
    gas/config/tc-z8k.h
    gas/config/te-386bsd.h
    gas/config/te-aux.h
    gas/config/te-delt88.h
    gas/config/te-delta.h
    gas/config/te-dpx2.h
    gas/config/te-dynix.h
    gas/config/te-epoc-pe.h
    gas/config/te-generic.h
    gas/config/te-go32.h
    gas/config/te-hp300.h
    gas/config/te-hppa.h
    gas/config/te-i386aix.h
    gas/config/te-ic960.h
    gas/config/te-interix.h
    gas/config/te-linux.h
    gas/config/te-lnews.h
    gas/config/te-lynx.h
    gas/config/te-mach.h
    gas/config/te-macos.h
    gas/config/te-multi.h
    gas/config/te-nbsd.h
    gas/config/te-nbsd532.h
    gas/config/te-pc532mach.h
    gas/config/te-pe.h
    gas/config/te-ppcnw.h
    gas/config/te-psos.h
    gas/config/te-riscix.h
    gas/config/te-sparcaout.h
    gas/config/te-sun3.h
    gas/config/te-svr4.h
    gas/config/te-sysv32.h
    gas/config/vax-inst.h
    gas/config/vms-a-conf.h
    gas/config/vms-conf.h
    gas/configure
    gas/configure.in
    gas/debug.c
    gas/dep-in.sed
    gas/depend.c
    gas/doc/Makefile.am
    gas/doc/Makefile.in
    gas/doc/all.texi
    gas/doc/as.1
    gas/doc/as.texinfo
    gas/doc/c-a29k.texi
    gas/doc/c-arm.texi
    gas/doc/c-d10v.texi
    gas/doc/c-d30v.texi
    gas/doc/c-h8300.texi
    gas/doc/c-h8500.texi
    gas/doc/c-hppa.texi
    gas/doc/c-i386.texi
    gas/doc/c-i960.texi
    gas/doc/c-m32r.texi
    gas/doc/c-m68k.texi
    gas/doc/c-mips.texi
    gas/doc/c-ns32k.texi
    gas/doc/c-pj.texi
    gas/doc/c-sh.texi
    gas/doc/c-sparc.texi
    gas/doc/c-v850.texi
    gas/doc/c-vax.texi
    gas/doc/c-z8k.texi
    gas/doc/gasp.texi
    gas/doc/h8.texi
    gas/doc/internals.texi
    gas/dwarf2dbg.c
    gas/dwarf2dbg.h
    gas/ecoff.c
    gas/ecoff.h
    gas/ehopt.c
    gas/emul-target.h
    gas/emul.h
    gas/expr.c
    gas/expr.h
    gas/flonum-copy.c
    gas/flonum-konst.c
    gas/flonum-mult.c
    gas/flonum.h
    gas/frags.c
    gas/frags.h
    gas/gasp.c
    gas/gdbinit.in
    gas/hash.c
    gas/hash.h
    gas/input-file.c
    gas/input-file.h
    gas/input-scrub.c
    gas/itbl-lex.l
    gas/itbl-ops.c
    gas/itbl-ops.h
    gas/itbl-parse.y
    gas/link.cmd
    gas/listing.c
    gas/listing.h
    gas/literal.c
    gas/mac-as.r
    gas/macro.c
    gas/macro.h
    gas/makefile.vms
    gas/messages.c
    gas/mpw-config.in
    gas/mpw-make.sed
    gas/obj.h
    gas/output-file.c
    gas/output-file.h
    gas/po/Make-in
    gas/po/POTFILES.in
    gas/po/gas.pot
    gas/read.c
    gas/read.h
    gas/sb.c
    gas/sb.h
    gas/stabs.c
    gas/stamp-h.in
    gas/struc-symbol.h
    gas/subsegs.c
    gas/subsegs.h
    gas/symbols.c
    gas/symbols.h
    gas/tc.h
    gas/testsuite/ChangeLog
    gas/testsuite/config/default.exp
    gas/testsuite/gas/all/align.d
    gas/testsuite/gas/all/align.s
    gas/testsuite/gas/all/cofftag.d
    gas/testsuite/gas/all/cofftag.s
    gas/testsuite/gas/all/comment.s
    gas/testsuite/gas/all/cond.d
    gas/testsuite/gas/all/cond.s
    gas/testsuite/gas/all/diff1.s
    gas/testsuite/gas/all/float.s
    gas/testsuite/gas/all/gas.exp
    gas/testsuite/gas/all/itbl
    gas/testsuite/gas/all/itbl-test.c
    gas/testsuite/gas/all/itbl.s
    gas/testsuite/gas/all/p1480.s
    gas/testsuite/gas/all/p2425.s
    gas/testsuite/gas/all/struct.d
    gas/testsuite/gas/all/struct.s
    gas/testsuite/gas/all/x930509.s
    gas/testsuite/gas/alpha/fp.d
    gas/testsuite/gas/alpha/fp.exp
    gas/testsuite/gas/alpha/fp.s
    gas/testsuite/gas/arc/alias.d
    gas/testsuite/gas/arc/alias.s
    gas/testsuite/gas/arc/arc.exp
    gas/testsuite/gas/arc/branch.d
    gas/testsuite/gas/arc/branch.s
    gas/testsuite/gas/arc/flag.d
    gas/testsuite/gas/arc/flag.s
    gas/testsuite/gas/arc/insn3.d
    gas/testsuite/gas/arc/insn3.s
    gas/testsuite/gas/arc/j.d
    gas/testsuite/gas/arc/j.s
    gas/testsuite/gas/arc/ld.d
    gas/testsuite/gas/arc/ld.s
    gas/testsuite/gas/arc/math.d
    gas/testsuite/gas/arc/math.s
    gas/testsuite/gas/arc/sshift.d
    gas/testsuite/gas/arc/sshift.s
    gas/testsuite/gas/arc/st.d
    gas/testsuite/gas/arc/st.s
    gas/testsuite/gas/arc/warn.exp
    gas/testsuite/gas/arc/warn.s
    gas/testsuite/gas/arm/arch4t.s
    gas/testsuite/gas/arm/arm.exp
    gas/testsuite/gas/arm/arm3.s
    gas/testsuite/gas/arm/arm6.s
    gas/testsuite/gas/arm/arm7dm.s
    gas/testsuite/gas/arm/arm7t.d
    gas/testsuite/gas/arm/arm7t.s
    gas/testsuite/gas/arm/copro.s
    gas/testsuite/gas/arm/float.s
    gas/testsuite/gas/arm/immed.s
    gas/testsuite/gas/arm/inst.d
    gas/testsuite/gas/arm/inst.s
    gas/testsuite/gas/arm/le-fpconst.d
    gas/testsuite/gas/arm/le-fpconst.s
    gas/testsuite/gas/arm/thumb.s
    gas/testsuite/gas/d30v/align.d
    gas/testsuite/gas/d30v/align.s
    gas/testsuite/gas/d30v/array.d
    gas/testsuite/gas/d30v/array.s
    gas/testsuite/gas/d30v/bittest.d
    gas/testsuite/gas/d30v/bittest.l
    gas/testsuite/gas/d30v/bittest.s
    gas/testsuite/gas/d30v/d30.exp
    gas/testsuite/gas/d30v/guard-debug.d
    gas/testsuite/gas/d30v/guard-debug.s
    gas/testsuite/gas/d30v/guard.d
    gas/testsuite/gas/d30v/guard.s
    gas/testsuite/gas/d30v/inst.d
    gas/testsuite/gas/d30v/inst.s
    gas/testsuite/gas/d30v/label-debug.d
    gas/testsuite/gas/d30v/label-debug.s
    gas/testsuite/gas/d30v/label.d
    gas/testsuite/gas/d30v/label.s
    gas/testsuite/gas/d30v/mul.d
    gas/testsuite/gas/d30v/mul.s
    gas/testsuite/gas/d30v/opt.d
    gas/testsuite/gas/d30v/opt.s
    gas/testsuite/gas/d30v/reloc.d
    gas/testsuite/gas/d30v/reloc.s
    gas/testsuite/gas/d30v/serial.l
    gas/testsuite/gas/d30v/serial.s
    gas/testsuite/gas/d30v/serial2.l
    gas/testsuite/gas/d30v/serial2.s
    gas/testsuite/gas/d30v/serial2O.l
    gas/testsuite/gas/d30v/serial2O.s
    gas/testsuite/gas/d30v/warn_oddreg.l
    gas/testsuite/gas/d30v/warn_oddreg.s
    gas/testsuite/gas/elf/elf.exp
    gas/testsuite/gas/elf/section0.d
    gas/testsuite/gas/elf/section0.s
    gas/testsuite/gas/elf/section1.d
    gas/testsuite/gas/elf/section1.s
    gas/testsuite/gas/fr30/allinsn.d
    gas/testsuite/gas/fr30/allinsn.exp
    gas/testsuite/gas/fr30/allinsn.s
    gas/testsuite/gas/fr30/fr30.exp
    gas/testsuite/gas/h8300/addsub.s
    gas/testsuite/gas/h8300/addsubh.s
    gas/testsuite/gas/h8300/addsubs.s
    gas/testsuite/gas/h8300/bitops1.s
    gas/testsuite/gas/h8300/bitops1h.s
    gas/testsuite/gas/h8300/bitops1s.s
    gas/testsuite/gas/h8300/bitops2.s
    gas/testsuite/gas/h8300/bitops2h.s
    gas/testsuite/gas/h8300/bitops2s.s
    gas/testsuite/gas/h8300/bitops3.s
    gas/testsuite/gas/h8300/bitops3h.s
    gas/testsuite/gas/h8300/bitops3s.s
    gas/testsuite/gas/h8300/bitops4.s
    gas/testsuite/gas/h8300/bitops4h.s
    gas/testsuite/gas/h8300/bitops4s.s
    gas/testsuite/gas/h8300/branch.s
    gas/testsuite/gas/h8300/branchh.s
    gas/testsuite/gas/h8300/branchs.s
    gas/testsuite/gas/h8300/cbranch.s
    gas/testsuite/gas/h8300/cbranchh.s
    gas/testsuite/gas/h8300/cbranchs.s
    gas/testsuite/gas/h8300/cmpsi2.s
    gas/testsuite/gas/h8300/compare.s
    gas/testsuite/gas/h8300/compareh.s
    gas/testsuite/gas/h8300/compares.s
    gas/testsuite/gas/h8300/decimal.s
    gas/testsuite/gas/h8300/decimalh.s
    gas/testsuite/gas/h8300/decimals.s
    gas/testsuite/gas/h8300/divmul.s
    gas/testsuite/gas/h8300/divmulh.s
    gas/testsuite/gas/h8300/divmuls.s
    gas/testsuite/gas/h8300/extendh.s
    gas/testsuite/gas/h8300/extends.s
    gas/testsuite/gas/h8300/ffxx1.d
    gas/testsuite/gas/h8300/ffxx1.s
    gas/testsuite/gas/h8300/h8300.exp
    gas/testsuite/gas/h8300/incdec.s
    gas/testsuite/gas/h8300/incdech.s
    gas/testsuite/gas/h8300/incdecs.s
    gas/testsuite/gas/h8300/logical.s
    gas/testsuite/gas/h8300/logicalh.s
    gas/testsuite/gas/h8300/logicals.s
    gas/testsuite/gas/h8300/macs.s
    gas/testsuite/gas/h8300/misc.s
    gas/testsuite/gas/h8300/misch.s
    gas/testsuite/gas/h8300/miscs.s
    gas/testsuite/gas/h8300/mov32bug.s
    gas/testsuite/gas/h8300/movb.s
    gas/testsuite/gas/h8300/movbh.s
    gas/testsuite/gas/h8300/movbs.s
    gas/testsuite/gas/h8300/movlh.s
    gas/testsuite/gas/h8300/movls.s
    gas/testsuite/gas/h8300/movw.s
    gas/testsuite/gas/h8300/movwh.s
    gas/testsuite/gas/h8300/movws.s
    gas/testsuite/gas/h8300/multiples.s
    gas/testsuite/gas/h8300/pushpop.s
    gas/testsuite/gas/h8300/pushpoph.s
    gas/testsuite/gas/h8300/pushpops.s
    gas/testsuite/gas/h8300/rotsh.s
    gas/testsuite/gas/h8300/rotshh.s
    gas/testsuite/gas/h8300/rotshs.s
    gas/testsuite/gas/hppa/README
    gas/testsuite/gas/hppa/basic/add.s
    gas/testsuite/gas/hppa/basic/add2.s
    gas/testsuite/gas/hppa/basic/addi.s
    gas/testsuite/gas/hppa/basic/basic.exp
    gas/testsuite/gas/hppa/basic/branch.s
    gas/testsuite/gas/hppa/basic/branch2.s
    gas/testsuite/gas/hppa/basic/comclr.s
    gas/testsuite/gas/hppa/basic/copr.s
    gas/testsuite/gas/hppa/basic/coprmem.s
    gas/testsuite/gas/hppa/basic/dcor.s
    gas/testsuite/gas/hppa/basic/dcor2.s
    gas/testsuite/gas/hppa/basic/deposit.s
    gas/testsuite/gas/hppa/basic/deposit2.s
    gas/testsuite/gas/hppa/basic/deposit3.s
    gas/testsuite/gas/hppa/basic/ds.s
    gas/testsuite/gas/hppa/basic/extract.s
    gas/testsuite/gas/hppa/basic/extract2.s
    gas/testsuite/gas/hppa/basic/extract3.s
    gas/testsuite/gas/hppa/basic/fmem.s
    gas/testsuite/gas/hppa/basic/fmemLRbug.s
    gas/testsuite/gas/hppa/basic/fp_comp.s
    gas/testsuite/gas/hppa/basic/fp_comp2.s
    gas/testsuite/gas/hppa/basic/fp_conv.s
    gas/testsuite/gas/hppa/basic/fp_fcmp.s
    gas/testsuite/gas/hppa/basic/fp_misc.s
    gas/testsuite/gas/hppa/basic/imem.s
    gas/testsuite/gas/hppa/basic/immed.s
    gas/testsuite/gas/hppa/basic/logical.s
    gas/testsuite/gas/hppa/basic/media.s
    gas/testsuite/gas/hppa/basic/perf.s
    gas/testsuite/gas/hppa/basic/purge.s
    gas/testsuite/gas/hppa/basic/purge2.s
    gas/testsuite/gas/hppa/basic/sh1add.s
    gas/testsuite/gas/hppa/basic/sh2add.s
    gas/testsuite/gas/hppa/basic/sh3add.s
    gas/testsuite/gas/hppa/basic/shift.s
    gas/testsuite/gas/hppa/basic/shift2.s
    gas/testsuite/gas/hppa/basic/shift3.s
    gas/testsuite/gas/hppa/basic/shladd.s
    gas/testsuite/gas/hppa/basic/shladd2.s
    gas/testsuite/gas/hppa/basic/special.s
    gas/testsuite/gas/hppa/basic/spop.s
    gas/testsuite/gas/hppa/basic/sub.s
    gas/testsuite/gas/hppa/basic/sub2.s
    gas/testsuite/gas/hppa/basic/subi.s
    gas/testsuite/gas/hppa/basic/system.s
    gas/testsuite/gas/hppa/basic/system2.s
    gas/testsuite/gas/hppa/basic/unit.s
    gas/testsuite/gas/hppa/basic/unit2.s
    gas/testsuite/gas/hppa/basic/weird.s
    gas/testsuite/gas/hppa/parse/align1.s
    gas/testsuite/gas/hppa/parse/align2.s
    gas/testsuite/gas/hppa/parse/appbug.s
    gas/testsuite/gas/hppa/parse/badfmpyadd.s
    gas/testsuite/gas/hppa/parse/block1.s
    gas/testsuite/gas/hppa/parse/block2.s
    gas/testsuite/gas/hppa/parse/calldatabug.s
    gas/testsuite/gas/hppa/parse/callinfobug.s
    gas/testsuite/gas/hppa/parse/defbug.s
    gas/testsuite/gas/hppa/parse/entrybug.s
    gas/testsuite/gas/hppa/parse/exportbug.s
    gas/testsuite/gas/hppa/parse/exprbug.s
    gas/testsuite/gas/hppa/parse/fixup7bug.s
    gas/testsuite/gas/hppa/parse/global.s
    gas/testsuite/gas/hppa/parse/labelbug.s
    gas/testsuite/gas/hppa/parse/linesepbug.s
    gas/testsuite/gas/hppa/parse/lselbug.s
    gas/testsuite/gas/hppa/parse/nosubspace.s
    gas/testsuite/gas/hppa/parse/parse.exp
    gas/testsuite/gas/hppa/parse/procbug.s
    gas/testsuite/gas/hppa/parse/regpopbug.s
    gas/testsuite/gas/hppa/parse/spacebug.s
    gas/testsuite/gas/hppa/parse/ssbug.s
    gas/testsuite/gas/hppa/parse/stdreg.s
    gas/testsuite/gas/hppa/parse/stringer.s
    gas/testsuite/gas/hppa/parse/undefbug.s
    gas/testsuite/gas/hppa/parse/versionbug.s
    gas/testsuite/gas/hppa/parse/xmpyubug.s
    gas/testsuite/gas/hppa/reloc/applybug.s
    gas/testsuite/gas/hppa/reloc/blebug.s
    gas/testsuite/gas/hppa/reloc/blebug2.s
    gas/testsuite/gas/hppa/reloc/blebug3.s
    gas/testsuite/gas/hppa/reloc/exitbug.s
    gas/testsuite/gas/hppa/reloc/fixupbug.s
    gas/testsuite/gas/hppa/reloc/funcrelocbug.s
    gas/testsuite/gas/hppa/reloc/labelopbug.s
    gas/testsuite/gas/hppa/reloc/longcall.s
    gas/testsuite/gas/hppa/reloc/picreloc.s
    gas/testsuite/gas/hppa/reloc/plabelbug.s
    gas/testsuite/gas/hppa/reloc/r_no_reloc.s
    gas/testsuite/gas/hppa/reloc/reduce.s
    gas/testsuite/gas/hppa/reloc/reduce2.s
    gas/testsuite/gas/hppa/reloc/reduce3.s
    gas/testsuite/gas/hppa/reloc/reloc.exp
    gas/testsuite/gas/hppa/reloc/roundmode.s
    gas/testsuite/gas/hppa/reloc/selectorbug.s
    gas/testsuite/gas/hppa/unsorted/align3.s
    gas/testsuite/gas/hppa/unsorted/align4.s
    gas/testsuite/gas/hppa/unsorted/brlenbug.s
    gas/testsuite/gas/hppa/unsorted/common.s
    gas/testsuite/gas/hppa/unsorted/fragbug.s
    gas/testsuite/gas/hppa/unsorted/globalbug.s
    gas/testsuite/gas/hppa/unsorted/importbug.s
    gas/testsuite/gas/hppa/unsorted/labeldiffs.s
    gas/testsuite/gas/hppa/unsorted/locallabel.s
    gas/testsuite/gas/hppa/unsorted/ss_align.s
    gas/testsuite/gas/hppa/unsorted/unsorted.exp
    gas/testsuite/gas/i386/amd.d
    gas/testsuite/gas/i386/amd.s
    gas/testsuite/gas/i386/float.l
    gas/testsuite/gas/i386/float.s
    gas/testsuite/gas/i386/general.l
    gas/testsuite/gas/i386/general.s
    gas/testsuite/gas/i386/i386.exp
    gas/testsuite/gas/i386/inval.l
    gas/testsuite/gas/i386/inval.s
    gas/testsuite/gas/i386/katmai.d
    gas/testsuite/gas/i386/katmai.s
    gas/testsuite/gas/i386/modrm.l
    gas/testsuite/gas/i386/modrm.s
    gas/testsuite/gas/i386/naked.d
    gas/testsuite/gas/i386/naked.s
    gas/testsuite/gas/i386/opcode.d
    gas/testsuite/gas/i386/opcode.s
    gas/testsuite/gas/i386/prefix.d
    gas/testsuite/gas/i386/prefix.s
    gas/testsuite/gas/i386/reloc.d
    gas/testsuite/gas/i386/reloc.s
    gas/testsuite/gas/i386/white.l
    gas/testsuite/gas/i386/white.s
    gas/testsuite/gas/ieee-fp/x930509a.exp
    gas/testsuite/gas/ieee-fp/x930509a.s
    gas/testsuite/gas/m32r/allinsn.d
    gas/testsuite/gas/m32r/allinsn.exp
    gas/testsuite/gas/m32r/allinsn.s
    gas/testsuite/gas/m32r/fslot.d
    gas/testsuite/gas/m32r/fslot.s
    gas/testsuite/gas/m32r/high-1.d
    gas/testsuite/gas/m32r/high-1.s
    gas/testsuite/gas/m32r/m32r.exp
    gas/testsuite/gas/m32r/outofrange.s
    gas/testsuite/gas/m32r/relax-1.d
    gas/testsuite/gas/m32r/relax-1.s
    gas/testsuite/gas/m32r/uppercase.d
    gas/testsuite/gas/m32r/uppercase.s
    gas/testsuite/gas/m68k-coff/gas.exp
    gas/testsuite/gas/m68k-coff/p2389.s
    gas/testsuite/gas/m68k-coff/p2389a.s
    gas/testsuite/gas/m68k-coff/p2430.s
    gas/testsuite/gas/m68k-coff/p2430a.s
    gas/testsuite/gas/m68k-coff/t1.s
    gas/testsuite/gas/m68k/all.exp
    gas/testsuite/gas/m68k/bitfield.d
    gas/testsuite/gas/m68k/bitfield.s
    gas/testsuite/gas/m68k/cas.d
    gas/testsuite/gas/m68k/cas.s
    gas/testsuite/gas/m68k/disperr.s
    gas/testsuite/gas/m68k/fmoveml.d
    gas/testsuite/gas/m68k/fmoveml.s
    gas/testsuite/gas/m68k/link.d
    gas/testsuite/gas/m68k/link.s
    gas/testsuite/gas/m68k/op68000.d
    gas/testsuite/gas/m68k/operands.d
    gas/testsuite/gas/m68k/operands.s
    gas/testsuite/gas/m68k/p2410.s
    gas/testsuite/gas/m68k/p2663.s
    gas/testsuite/gas/m68k/pcrel.d
    gas/testsuite/gas/m68k/pcrel.s
    gas/testsuite/gas/m68k/pic1.s
    gas/testsuite/gas/m68k/t2.d
    gas/testsuite/gas/m68k/t2.s
    gas/testsuite/gas/m88k/init.d
    gas/testsuite/gas/m88k/init.s
    gas/testsuite/gas/m88k/m88k.exp
    gas/testsuite/gas/macros/err.s
    gas/testsuite/gas/macros/irp.d
    gas/testsuite/gas/macros/irp.s
    gas/testsuite/gas/macros/macros.exp
    gas/testsuite/gas/macros/rept.d
    gas/testsuite/gas/macros/rept.s
    gas/testsuite/gas/macros/semi.d
    gas/testsuite/gas/macros/semi.s
    gas/testsuite/gas/macros/test1.d
    gas/testsuite/gas/macros/test1.s
    gas/testsuite/gas/macros/test2.d
    gas/testsuite/gas/macros/test2.s
    gas/testsuite/gas/macros/test3.d
    gas/testsuite/gas/macros/test3.s
    gas/testsuite/gas/mcore/allinsn.d
    gas/testsuite/gas/mcore/allinsn.exp
    gas/testsuite/gas/mcore/allinsn.s
    gas/testsuite/gas/mips/abs.d
    gas/testsuite/gas/mips/abs.s
    gas/testsuite/gas/mips/add.d
    gas/testsuite/gas/mips/add.s
    gas/testsuite/gas/mips/and.d
    gas/testsuite/gas/mips/and.s
    gas/testsuite/gas/mips/beq.d
    gas/testsuite/gas/mips/beq.s
    gas/testsuite/gas/mips/bge.d
    gas/testsuite/gas/mips/bge.s
    gas/testsuite/gas/mips/bgeu.d
    gas/testsuite/gas/mips/bgeu.s
    gas/testsuite/gas/mips/blt.d
    gas/testsuite/gas/mips/blt.s
    gas/testsuite/gas/mips/bltu.d
    gas/testsuite/gas/mips/bltu.s
    gas/testsuite/gas/mips/break20.d
    gas/testsuite/gas/mips/break20.s
    gas/testsuite/gas/mips/delay.d
    gas/testsuite/gas/mips/delay.s
    gas/testsuite/gas/mips/div-ilocks.d
    gas/testsuite/gas/mips/div.d
    gas/testsuite/gas/mips/div.s
    gas/testsuite/gas/mips/dli.d
    gas/testsuite/gas/mips/dli.s
    gas/testsuite/gas/mips/elf_e_flags.c
    gas/testsuite/gas/mips/elf_e_flags.s
    gas/testsuite/gas/mips/elf_e_flags1.d
    gas/testsuite/gas/mips/elf_e_flags2.d
    gas/testsuite/gas/mips/elf_e_flags3.d
    gas/testsuite/gas/mips/elf_e_flags4.d
    gas/testsuite/gas/mips/itbl
    gas/testsuite/gas/mips/itbl.s
    gas/testsuite/gas/mips/jal-empic.d
    gas/testsuite/gas/mips/jal-svr4pic.d
    gas/testsuite/gas/mips/jal-svr4pic.s
    gas/testsuite/gas/mips/jal-xgot.d
    gas/testsuite/gas/mips/jal.d
    gas/testsuite/gas/mips/jal.s
    gas/testsuite/gas/mips/la-empic.d
    gas/testsuite/gas/mips/la-empic.s
    gas/testsuite/gas/mips/la-svr4pic.d
    gas/testsuite/gas/mips/la-xgot.d
    gas/testsuite/gas/mips/la.d
    gas/testsuite/gas/mips/la.s
    gas/testsuite/gas/mips/lb-empic.d
    gas/testsuite/gas/mips/lb-pic.s
    gas/testsuite/gas/mips/lb-svr4pic.d
    gas/testsuite/gas/mips/lb-xgot-ilocks.d
    gas/testsuite/gas/mips/lb-xgot.d
    gas/testsuite/gas/mips/lb.d
    gas/testsuite/gas/mips/lb.s
    gas/testsuite/gas/mips/ld-empic.d
    gas/testsuite/gas/mips/ld-ilocks-addr32.d
    gas/testsuite/gas/mips/ld-ilocks.d
    gas/testsuite/gas/mips/ld-pic.s
    gas/testsuite/gas/mips/ld-svr4pic.d
    gas/testsuite/gas/mips/ld-xgot.d
    gas/testsuite/gas/mips/ld.d
    gas/testsuite/gas/mips/ld.s
    gas/testsuite/gas/mips/li.d
    gas/testsuite/gas/mips/li.s
    gas/testsuite/gas/mips/lif-empic.d
    gas/testsuite/gas/mips/lif-svr4pic.d
    gas/testsuite/gas/mips/lif-xgot.d
    gas/testsuite/gas/mips/lifloat.d
    gas/testsuite/gas/mips/lifloat.s
    gas/testsuite/gas/mips/lineno.d
    gas/testsuite/gas/mips/lineno.s
    gas/testsuite/gas/mips/mips.exp
    gas/testsuite/gas/mips/mips16.d
    gas/testsuite/gas/mips/mips16.s
    gas/testsuite/gas/mips/mips4.d
    gas/testsuite/gas/mips/mips4.s
    gas/testsuite/gas/mips/mips4010.d
    gas/testsuite/gas/mips/mips4010.s
    gas/testsuite/gas/mips/mips4100.d
    gas/testsuite/gas/mips/mips4100.s
    gas/testsuite/gas/mips/mips4650.d
    gas/testsuite/gas/mips/mips4650.s
    gas/testsuite/gas/mips/mul-ilocks.d
    gas/testsuite/gas/mips/mul.d
    gas/testsuite/gas/mips/mul.s
    gas/testsuite/gas/mips/nodelay.d
    gas/testsuite/gas/mips/rol.d
    gas/testsuite/gas/mips/rol.s
    gas/testsuite/gas/mips/sb.d
    gas/testsuite/gas/mips/sb.s
    gas/testsuite/gas/mips/sync.d
    gas/testsuite/gas/mips/sync.s
    gas/testsuite/gas/mips/trap20.d
    gas/testsuite/gas/mips/trap20.s
    gas/testsuite/gas/mips/trunc.d
    gas/testsuite/gas/mips/trunc.s
    gas/testsuite/gas/mips/uld.d
    gas/testsuite/gas/mips/uld.s
    gas/testsuite/gas/mips/ulh-empic.d
    gas/testsuite/gas/mips/ulh-pic.s
    gas/testsuite/gas/mips/ulh-svr4pic.d
    gas/testsuite/gas/mips/ulh-xgot.d
    gas/testsuite/gas/mips/ulh.d
    gas/testsuite/gas/mips/ulh.s
    gas/testsuite/gas/mips/ulw.d
    gas/testsuite/gas/mips/ulw.s
    gas/testsuite/gas/mips/usd.d
    gas/testsuite/gas/mips/usd.s
    gas/testsuite/gas/mips/ush.d
    gas/testsuite/gas/mips/ush.s
    gas/testsuite/gas/mips/usw.d
    gas/testsuite/gas/mips/usw.s
    gas/testsuite/gas/mn10200/add.s
    gas/testsuite/gas/mn10200/basic.exp
    gas/testsuite/gas/mn10200/bcc.s
    gas/testsuite/gas/mn10200/bccx.s
    gas/testsuite/gas/mn10200/bit.s
    gas/testsuite/gas/mn10200/cmp.s
    gas/testsuite/gas/mn10200/ext.s
    gas/testsuite/gas/mn10200/logical.s
    gas/testsuite/gas/mn10200/mov1.s
    gas/testsuite/gas/mn10200/mov2.s
    gas/testsuite/gas/mn10200/mov3.s
    gas/testsuite/gas/mn10200/mov4.s
    gas/testsuite/gas/mn10200/movb.s
    gas/testsuite/gas/mn10200/movbu.s
    gas/testsuite/gas/mn10200/movx.s
    gas/testsuite/gas/mn10200/muldiv.s
    gas/testsuite/gas/mn10200/other.s
    gas/testsuite/gas/mn10200/shift.s
    gas/testsuite/gas/mn10200/sub.s
    gas/testsuite/gas/mn10300/add.s
    gas/testsuite/gas/mn10300/basic.exp
    gas/testsuite/gas/mn10300/bcc.s
    gas/testsuite/gas/mn10300/bit.s
    gas/testsuite/gas/mn10300/cmp.s
    gas/testsuite/gas/mn10300/ext.s
    gas/testsuite/gas/mn10300/extend.s
    gas/testsuite/gas/mn10300/logical.s
    gas/testsuite/gas/mn10300/loop.s
    gas/testsuite/gas/mn10300/mov1.s
    gas/testsuite/gas/mn10300/mov2.s
    gas/testsuite/gas/mn10300/mov3.s
    gas/testsuite/gas/mn10300/mov4.s
    gas/testsuite/gas/mn10300/movbu.s
    gas/testsuite/gas/mn10300/movhu.s
    gas/testsuite/gas/mn10300/movm.s
    gas/testsuite/gas/mn10300/muldiv.s
    gas/testsuite/gas/mn10300/other.s
    gas/testsuite/gas/mn10300/shift.s
    gas/testsuite/gas/mn10300/sub.s
    gas/testsuite/gas/mn10300/udf.s
    gas/testsuite/gas/mri/char.d
    gas/testsuite/gas/mri/char.s
    gas/testsuite/gas/mri/comment.d
    gas/testsuite/gas/mri/comment.s
    gas/testsuite/gas/mri/common.d
    gas/testsuite/gas/mri/common.s
    gas/testsuite/gas/mri/constants.d
    gas/testsuite/gas/mri/constants.s
    gas/testsuite/gas/mri/empty.s
    gas/testsuite/gas/mri/equ.d
    gas/testsuite/gas/mri/equ.s
    gas/testsuite/gas/mri/expr.d
    gas/testsuite/gas/mri/expr.s
    gas/testsuite/gas/mri/float.d
    gas/testsuite/gas/mri/float.s
    gas/testsuite/gas/mri/for.d
    gas/testsuite/gas/mri/for.s
    gas/testsuite/gas/mri/if.d
    gas/testsuite/gas/mri/if.s
    gas/testsuite/gas/mri/immconst.d
    gas/testsuite/gas/mri/label.d
    gas/testsuite/gas/mri/label.s
    gas/testsuite/gas/mri/moveml.d
    gas/testsuite/gas/mri/moveml.s
    gas/testsuite/gas/mri/mri.exp
    gas/testsuite/gas/mri/repeat.d
    gas/testsuite/gas/mri/repeat.s
    gas/testsuite/gas/mri/semi.d
    gas/testsuite/gas/mri/semi.s
    gas/testsuite/gas/mri/while.d
    gas/testsuite/gas/mri/while.s
    gas/testsuite/gas/pj/ops.d
    gas/testsuite/gas/pj/ops.s
    gas/testsuite/gas/pj/pj.exp
    gas/testsuite/gas/ppc/astest.d
    gas/testsuite/gas/ppc/astest.s
    gas/testsuite/gas/ppc/astest2.d
    gas/testsuite/gas/ppc/astest2.s
    gas/testsuite/gas/ppc/ppc.exp
    gas/testsuite/gas/ppc/simpshft.d
    gas/testsuite/gas/ppc/simpshft.s
    gas/testsuite/gas/sh/basic.exp
    gas/testsuite/gas/sh/fp.s
    gas/testsuite/gas/sparc-solaris/addend.exp
    gas/testsuite/gas/sparc-solaris/addend.s
    gas/testsuite/gas/sparc-solaris/gas.exp
    gas/testsuite/gas/sparc-solaris/sol-cc.s
    gas/testsuite/gas/sparc-solaris/sol-gcc.s
    gas/testsuite/gas/sparc/asi.d
    gas/testsuite/gas/sparc/asi.s
    gas/testsuite/gas/sparc/membar.d
    gas/testsuite/gas/sparc/membar.s
    gas/testsuite/gas/sparc/mism-1.s
    gas/testsuite/gas/sparc/mismatch.exp
    gas/testsuite/gas/sparc/prefetch.d
    gas/testsuite/gas/sparc/prefetch.s
    gas/testsuite/gas/sparc/rdpr.d
    gas/testsuite/gas/sparc/rdpr.s
    gas/testsuite/gas/sparc/reloc64.d
    gas/testsuite/gas/sparc/reloc64.s
    gas/testsuite/gas/sparc/set64.d
    gas/testsuite/gas/sparc/set64.s
    gas/testsuite/gas/sparc/sparc.exp
    gas/testsuite/gas/sparc/splet-2.d
    gas/testsuite/gas/sparc/splet-2.s
    gas/testsuite/gas/sparc/splet.d
    gas/testsuite/gas/sparc/splet.s
    gas/testsuite/gas/sparc/synth.d
    gas/testsuite/gas/sparc/synth.s
    gas/testsuite/gas/sparc/synth64.d
    gas/testsuite/gas/sparc/synth64.s
    gas/testsuite/gas/sparc/wrpr.d
    gas/testsuite/gas/sparc/wrpr.s
    gas/testsuite/gas/sun4/addend.d
    gas/testsuite/gas/sun4/addend.exp
    gas/testsuite/gas/sun4/addend.s
    gas/testsuite/gas/template
    gas/testsuite/gas/tic80/add.d
    gas/testsuite/gas/tic80/add.lst
    gas/testsuite/gas/tic80/add.s
    gas/testsuite/gas/tic80/align.d
    gas/testsuite/gas/tic80/align.lst
    gas/testsuite/gas/tic80/align.s
    gas/testsuite/gas/tic80/bitnum.d
    gas/testsuite/gas/tic80/bitnum.lst
    gas/testsuite/gas/tic80/bitnum.s
    gas/testsuite/gas/tic80/ccode.d
    gas/testsuite/gas/tic80/ccode.lst
    gas/testsuite/gas/tic80/ccode.s
    gas/testsuite/gas/tic80/cregops.d
    gas/testsuite/gas/tic80/cregops.lst
    gas/testsuite/gas/tic80/cregops.s
    gas/testsuite/gas/tic80/endmask.d
    gas/testsuite/gas/tic80/endmask.lst
    gas/testsuite/gas/tic80/endmask.s
    gas/testsuite/gas/tic80/float.d
    gas/testsuite/gas/tic80/float.lst
    gas/testsuite/gas/tic80/float.s
    gas/testsuite/gas/tic80/regops.d
    gas/testsuite/gas/tic80/regops.lst
    gas/testsuite/gas/tic80/regops.s
    gas/testsuite/gas/tic80/regops2.d
    gas/testsuite/gas/tic80/regops2.lst
    gas/testsuite/gas/tic80/regops2.s
    gas/testsuite/gas/tic80/regops3.d
    gas/testsuite/gas/tic80/regops3.lst
    gas/testsuite/gas/tic80/regops3.s
    gas/testsuite/gas/tic80/regops4.d
    gas/testsuite/gas/tic80/regops4.lst
    gas/testsuite/gas/tic80/regops4.s
    gas/testsuite/gas/tic80/relocs1.c
    gas/testsuite/gas/tic80/relocs1.d
    gas/testsuite/gas/tic80/relocs1.lst
    gas/testsuite/gas/tic80/relocs1.s
    gas/testsuite/gas/tic80/relocs1b.d
    gas/testsuite/gas/tic80/relocs2.c
    gas/testsuite/gas/tic80/relocs2.d
    gas/testsuite/gas/tic80/relocs2.lst
    gas/testsuite/gas/tic80/relocs2.s
    gas/testsuite/gas/tic80/relocs2b.d
    gas/testsuite/gas/tic80/tic80.exp
    gas/testsuite/gas/v850/arith.s
    gas/testsuite/gas/v850/basic.exp
    gas/testsuite/gas/v850/bit.s
    gas/testsuite/gas/v850/branch.s
    gas/testsuite/gas/v850/compare.s
    gas/testsuite/gas/v850/fepsw.s
    gas/testsuite/gas/v850/hilo.s
    gas/testsuite/gas/v850/hilo2.s
    gas/testsuite/gas/v850/jumps.s
    gas/testsuite/gas/v850/logical.s
    gas/testsuite/gas/v850/mem.s
    gas/testsuite/gas/v850/misc.s
    gas/testsuite/gas/v850/move.s
    gas/testsuite/gas/v850/range.s
    gas/testsuite/gas/v850/reloc.s
    gas/testsuite/gas/vax/quad.exp
    gas/testsuite/gas/vax/quad.s
    gas/testsuite/gas/vtable/entry0.d
    gas/testsuite/gas/vtable/entry0.s
    gas/testsuite/gas/vtable/entry1.d
    gas/testsuite/gas/vtable/entry1.s
    gas/testsuite/gas/vtable/inherit0.d
    gas/testsuite/gas/vtable/inherit0.s
    gas/testsuite/gas/vtable/inherit1.l
    gas/testsuite/gas/vtable/inherit1.s
    gas/testsuite/gas/vtable/vtable.exp
    gas/testsuite/gasp/INC1.H
    gas/testsuite/gasp/INC2.H
    gas/testsuite/gasp/assign.asm
    gas/testsuite/gasp/assign.err
    gas/testsuite/gasp/assign.out
    gas/testsuite/gasp/condass.asm
    gas/testsuite/gasp/condass.err
    gas/testsuite/gasp/condass.out
    gas/testsuite/gasp/crash.asm
    gas/testsuite/gasp/crash.err
    gas/testsuite/gasp/crash.out
    gas/testsuite/gasp/crash1.asm
    gas/testsuite/gasp/crash1.err
    gas/testsuite/gasp/crash1.out
    gas/testsuite/gasp/crash2.asm
    gas/testsuite/gasp/crash2.err
    gas/testsuite/gasp/crash2.out
    gas/testsuite/gasp/data.asm
    gas/testsuite/gasp/data.err
    gas/testsuite/gasp/data.out
    gas/testsuite/gasp/exp.asm
    gas/testsuite/gasp/exp.err
    gas/testsuite/gasp/exp.out
    gas/testsuite/gasp/gasp.exp
    gas/testsuite/gasp/include.asm
    gas/testsuite/gasp/include.err
    gas/testsuite/gasp/include.out
    gas/testsuite/gasp/listing.asm
    gas/testsuite/gasp/listing.err
    gas/testsuite/gasp/listing.out
    gas/testsuite/gasp/macro.asm
    gas/testsuite/gasp/macro.err
    gas/testsuite/gasp/macro.out
    gas/testsuite/gasp/mdouble.asm
    gas/testsuite/gasp/mdouble.err
    gas/testsuite/gasp/mdouble.out
    gas/testsuite/gasp/mri/embed.asm
    gas/testsuite/gasp/mri/embed.out
    gas/testsuite/gasp/mri/exists.asm
    gas/testsuite/gasp/mri/exists.out
    gas/testsuite/gasp/mri/irp.asm
    gas/testsuite/gasp/mri/irp.out
    gas/testsuite/gasp/mri/irpc.asm
    gas/testsuite/gasp/mri/irpc.out
    gas/testsuite/gasp/mri/macro.asm
    gas/testsuite/gasp/mri/macro.out
    gas/testsuite/gasp/mri/narg.asm
    gas/testsuite/gasp/mri/narg.out
    gas/testsuite/gasp/mri/rept.asm
    gas/testsuite/gasp/mri/rept.out
    gas/testsuite/gasp/pl1.asm
    gas/testsuite/gasp/pl1.err
    gas/testsuite/gasp/pl1.out
    gas/testsuite/gasp/pl2.asm
    gas/testsuite/gasp/pl2.err
    gas/testsuite/gasp/pl2.out
    gas/testsuite/gasp/pl3.asm
    gas/testsuite/gasp/pl3.err
    gas/testsuite/gasp/pl3.out
    gas/testsuite/gasp/pl4.asm
    gas/testsuite/gasp/pl4.err
    gas/testsuite/gasp/pl4.out
    gas/testsuite/gasp/pl5.asm
    gas/testsuite/gasp/pl5.err
    gas/testsuite/gasp/pl5.out
    gas/testsuite/gasp/pl6.asm
    gas/testsuite/gasp/pl6.err
    gas/testsuite/gasp/pl6.out
    gas/testsuite/gasp/pl7.asm
    gas/testsuite/gasp/pl7.err
    gas/testsuite/gasp/pl7.out
    gas/testsuite/gasp/pl8.asm
    gas/testsuite/gasp/pl8.err
    gas/testsuite/gasp/pl8.out
    gas/testsuite/gasp/pr7583.asm
    gas/testsuite/gasp/pr7583.err
    gas/testsuite/gasp/pr7583.out
    gas/testsuite/gasp/reg.asm
    gas/testsuite/gasp/reg.err
    gas/testsuite/gasp/reg.out
    gas/testsuite/gasp/rep.asm
    gas/testsuite/gasp/rep.err
    gas/testsuite/gasp/rep.out
    gas/testsuite/gasp/repeat.asm
    gas/testsuite/gasp/repeat.err
    gas/testsuite/gasp/repeat.out
    gas/testsuite/gasp/reperr.asm
    gas/testsuite/gasp/reperr.err
    gas/testsuite/gasp/reperr.out
    gas/testsuite/gasp/reperr1.asm
    gas/testsuite/gasp/reperr1.err
    gas/testsuite/gasp/reperr1.out
    gas/testsuite/gasp/reperr2.asm
    gas/testsuite/gasp/reperr2.err
    gas/testsuite/gasp/reperr2.out
    gas/testsuite/gasp/reperr3.asm
    gas/testsuite/gasp/reperr3.err
    gas/testsuite/gasp/reperr3.out
    gas/testsuite/gasp/sdata.asm
    gas/testsuite/gasp/sdata.err
    gas/testsuite/gasp/sdata.out
    gas/testsuite/gasp/sfunc.asm
    gas/testsuite/gasp/sfunc.err
    gas/testsuite/gasp/sfunc.out
    gas/testsuite/gasp/t1.asm
    gas/testsuite/gasp/t1.err
    gas/testsuite/gasp/t1.out
    gas/testsuite/gasp/t2.asm
    gas/testsuite/gasp/t2.err
    gas/testsuite/gasp/t2.out
    gas/testsuite/gasp/t3.asm
    gas/testsuite/gasp/t3.err
    gas/testsuite/gasp/t3.out
    gas/testsuite/gasp/while.asm
    gas/testsuite/gasp/while.err
    gas/testsuite/gasp/while.out
    gas/testsuite/lib/doboth
    gas/testsuite/lib/doobjcmp
    gas/testsuite/lib/dostriptest
    gas/testsuite/lib/dotest
    gas/testsuite/lib/dounsreloc
    gas/testsuite/lib/dounssym
    gas/testsuite/lib/gas-defs.exp
    gas/testsuite/lib/gas-dg.exp
    gas/testsuite/lib/run
    gas/vmsconf.sh
    gas/write.c
    gas/write.h
    gdb/c-exp.tab.c
    gdb/config/i386/windows.mh
    gdb/doc/GDBvn.texi
    gdb/doc/remote.texi
    gdb/f-exp.tab.c
    gdb/jv-exp.tab.c
    gdb/m2-exp.tab.c
    gdb/testsuite/gdb.base/README
    gdb/testsuite/gdb.base/annota2.cc
    gdb/testsuite/gdb.base/annota2.exp
    gdb/testsuite/gdb.base/crossload.exp
    gdb/testsuite/gdb.base/i486-elf.u
    gdb/testsuite/gdb.base/i860-elf.u
    gdb/testsuite/gdb.base/m68k-aout.u
    gdb/testsuite/gdb.base/m68k-aout2.u
    gdb/testsuite/gdb.base/m68k-elf.u
    gdb/testsuite/gdb.base/mips-ecoff.u
    gdb/testsuite/gdb.base/sparc-aout.u
    gdb/testsuite/gdb.base/sparc-elf.u
    gdb/tui/Makefile
    gdb/windows-nat.c
    gprof/.gdbinit
    gprof/ChangeLog
    gprof/Makefile.am
    gprof/Makefile.in
    gprof/NOTES
    gprof/TEST
    gprof/TODO
    gprof/aclocal.m4
    gprof/alpha.c
    gprof/basic_blocks.c
    gprof/basic_blocks.h
    gprof/bb_exit_func.c
    gprof/bbconv.pl
    gprof/bsd_callg_bl.m
    gprof/call_graph.c
    gprof/call_graph.h
    gprof/cg_arcs.c
    gprof/cg_arcs.h
    gprof/cg_dfn.c
    gprof/cg_dfn.h
    gprof/cg_print.c
    gprof/cg_print.h
    gprof/configure
    gprof/configure.in
    gprof/corefile.c
    gprof/corefile.h
    gprof/flat_bl.m
    gprof/fsf_callg_bl.m
    gprof/gconfig.in
    gprof/gen-c-prog.awk
    gprof/gmon.h
    gprof/gmon_io.c
    gprof/gmon_io.h
    gprof/gmon_out.h
    gprof/gprof.1
    gprof/gprof.c
    gprof/gprof.h
    gprof/gprof.texi
    gprof/hertz.c
    gprof/hertz.h
    gprof/hist.c
    gprof/hist.h
    gprof/i386.c
    gprof/po/Make-in
    gprof/po/POTFILES.in
    gprof/po/gprof.pot
    gprof/search_list.c
    gprof/search_list.h
    gprof/source.c
    gprof/source.h
    gprof/sparc.c
    gprof/stamp-h.in
    gprof/sym_ids.c
    gprof/sym_ids.h
    gprof/symtab.c
    gprof/symtab.h
    gprof/tahoe.c
    gprof/utils.c
    gprof/utils.h
    gprof/vax.c
    include/COPYING
    include/ChangeLog
    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/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/go32exe.h
    include/coff/h8300.h
    include/coff/h8500.h
    include/coff/i386.h
    include/coff/i860.h
    include/coff/i960.h
    include/coff/internal.h
    include/coff/m68k.h
    include/coff/m88k.h
    include/coff/mcore.h
    include/coff/mips.h
    include/coff/pe.h
    include/coff/powerpc.h
    include/coff/rs6000.h
    include/coff/sh.h
    include/coff/sparc.h
    include/coff/sym.h
    include/coff/symconst.h
    include/coff/tic30.h
    include/coff/tic80.h
    include/coff/w65.h
    include/coff/we32k.h
    include/coff/z8k.h
    include/demangle.h
    include/dis-asm.h
    include/elf/ChangeLog
    include/elf/alpha.h
    include/elf/arc.h
    include/elf/arm-oabi.h
    include/elf/arm.h
    include/elf/common.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/hppa.h
    include/elf/i386.h
    include/elf/i960.h
    include/elf/internal.h
    include/elf/m32r.h
    include/elf/m68k.h
    include/elf/mcore.h
    include/elf/mips.h
    include/elf/mn10200.h
    include/elf/mn10300.h
    include/elf/pj.h
    include/elf/ppc.h
    include/elf/reloc-macros.h
    include/elf/sh.h
    include/elf/sparc.h
    include/elf/v850.h
    include/floatformat.h
    include/fnmatch.h
    include/fopen-bin.h
    include/fopen-same.h
    include/fopen-vms.h
    include/gdbm.h
    include/getopt.h
    include/hp-symtab.h
    include/ieee.h
    include/libiberty.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/cgen.h
    include/opcode/convex.h
    include/opcode/d10v.h
    include/opcode/d30v.h
    include/opcode/h8300.h
    include/opcode/hppa.h
    include/opcode/i386.h
    include/opcode/i860.h
    include/opcode/i960.h
    include/opcode/m68k.h
    include/opcode/m88k.h
    include/opcode/mips.h
    include/opcode/mn10200.h
    include/opcode/mn10300.h
    include/opcode/np1.h
    include/opcode/ns32k.h
    include/opcode/pj.h
    include/opcode/pn.h
    include/opcode/ppc.h
    include/opcode/pyr.h
    include/opcode/sparc.h
    include/opcode/tahoe.h
    include/opcode/tic30.h
    include/opcode/tic80.h
    include/opcode/v850.h
    include/opcode/vax.h
    include/os9k.h
    include/progress.h
    include/regs/ChangeLog
    include/remote-sim.h
    include/splay-tree.h
    include/symcat.h
    include/wait.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
    ld/ChangeLog
    ld/Makefile.am
    ld/Makefile.in
    ld/NEWS
    ld/README
    ld/TODO
    ld/acinclude.m4
    ld/aclocal.m4
    ld/config.in
    ld/configure
    ld/configure.host
    ld/configure.in
    ld/configure.tgt
    ld/deffile.h
    ld/deffilep.y
    ld/dep-in.sed
    ld/emulparams/README
    ld/emulparams/a29k.sh
    ld/emulparams/aixppc.sh
    ld/emulparams/aixrs6.sh
    ld/emulparams/alpha.sh
    ld/emulparams/arcelf.sh
    ld/emulparams/arm_epoc_pe.sh
    ld/emulparams/armaoutb.sh
    ld/emulparams/armaoutl.sh
    ld/emulparams/armcoff.sh
    ld/emulparams/armelf.sh
    ld/emulparams/armelf_linux.sh
    ld/emulparams/armelf_linux26.sh
    ld/emulparams/armelf_oabi.sh
    ld/emulparams/armnbsd.sh
    ld/emulparams/armpe.sh
    ld/emulparams/coff_sparc.sh
    ld/emulparams/d10velf.sh
    ld/emulparams/d30v_e.sh
    ld/emulparams/d30v_o.sh
    ld/emulparams/d30velf.sh
    ld/emulparams/delta68.sh
    ld/emulparams/ebmon29k.sh
    ld/emulparams/elf32_i960.sh
    ld/emulparams/elf32_sparc.sh
    ld/emulparams/elf32b4300.sh
    ld/emulparams/elf32bmip.sh
    ld/emulparams/elf32bmipn32.sh
    ld/emulparams/elf32bsmip.sh
    ld/emulparams/elf32ebmip.sh
    ld/emulparams/elf32elmip.sh
    ld/emulparams/elf32fr30.sh
    ld/emulparams/elf32l4300.sh
    ld/emulparams/elf32lmip.sh
    ld/emulparams/elf32lppc.sh
    ld/emulparams/elf32lsmip.sh
    ld/emulparams/elf32mcore.sh
    ld/emulparams/elf32ppc.sh
    ld/emulparams/elf32ppclinux.sh
    ld/emulparams/elf64_sparc.sh
    ld/emulparams/elf64alpha.sh
    ld/emulparams/elf64bmip.sh
    ld/emulparams/elf64hppa.sh
    ld/emulparams/elf_i386.sh
    ld/emulparams/elf_i386_be.sh
    ld/emulparams/gld960.sh
    ld/emulparams/gld960coff.sh
    ld/emulparams/h8300.sh
    ld/emulparams/h8300h.sh
    ld/emulparams/h8300s.sh
    ld/emulparams/h8500.sh
    ld/emulparams/h8500b.sh
    ld/emulparams/h8500c.sh
    ld/emulparams/h8500m.sh
    ld/emulparams/h8500s.sh
    ld/emulparams/hp300bsd.sh
    ld/emulparams/hp3hpux.sh
    ld/emulparams/hppaelf.sh
    ld/emulparams/i386aout.sh
    ld/emulparams/i386beos.sh
    ld/emulparams/i386bsd.sh
    ld/emulparams/i386coff.sh
    ld/emulparams/i386go32.sh
    ld/emulparams/i386linux.sh
    ld/emulparams/i386lynx.sh
    ld/emulparams/i386mach.sh
    ld/emulparams/i386moss.sh
    ld/emulparams/i386msdos.sh
    ld/emulparams/i386nbsd.sh
    ld/emulparams/i386nw.sh
    ld/emulparams/i386pe.sh
    ld/emulparams/i386pe_posix.sh
    ld/emulparams/lnk960.sh
    ld/emulparams/m32relf.sh
    ld/emulparams/m68k4knbsd.sh
    ld/emulparams/m68kaout.sh
    ld/emulparams/m68kaux.sh
    ld/emulparams/m68kcoff.sh
    ld/emulparams/m68kelf.sh
    ld/emulparams/m68klinux.sh
    ld/emulparams/m68klynx.sh
    ld/emulparams/m68knbsd.sh
    ld/emulparams/m68kpsos.sh
    ld/emulparams/m88kbcs.sh
    ld/emulparams/mcorepe.sh
    ld/emulparams/mipsbig.sh
    ld/emulparams/mipsbsd.sh
    ld/emulparams/mipsidt.sh
    ld/emulparams/mipsidtl.sh
    ld/emulparams/mipslit.sh
    ld/emulparams/mipslnews.sh
    ld/emulparams/mn10200.sh
    ld/emulparams/mn10300.sh
    ld/emulparams/news.sh
    ld/emulparams/ns32knbsd.sh
    ld/emulparams/pc532macha.sh
    ld/emulparams/pjelf.sh
    ld/emulparams/pjlelf.sh
    ld/emulparams/ppcmacos.sh
    ld/emulparams/ppcnw.sh
    ld/emulparams/ppcpe.sh
    ld/emulparams/riscix.sh
    ld/emulparams/sa29200.sh
    ld/emulparams/sh.sh
    ld/emulparams/shelf.sh
    ld/emulparams/shl.sh
    ld/emulparams/shlelf.sh
    ld/emulparams/sparcaout.sh
    ld/emulparams/sparclinux.sh
    ld/emulparams/sparclynx.sh
    ld/emulparams/sparcnbsd.sh
    ld/emulparams/st2000.sh
    ld/emulparams/sun3.sh
    ld/emulparams/sun4.sh
    ld/emulparams/tic30aout.sh
    ld/emulparams/tic30coff.sh
    ld/emulparams/tic80coff.sh
    ld/emulparams/v850.sh
    ld/emulparams/vanilla.sh
    ld/emulparams/vax.sh
    ld/emulparams/vsta.sh
    ld/emulparams/w65.sh
    ld/emulparams/z8001.sh
    ld/emulparams/z8002.sh
    ld/emultempl/README
    ld/emultempl/aix.em
    ld/emultempl/armcoff.em
    ld/emultempl/armelf.em
    ld/emultempl/armelf_oabi.em
    ld/emultempl/astring.sed
    ld/emultempl/beos.em
    ld/emultempl/elf32.em
    ld/emultempl/generic.em
    ld/emultempl/gld960.em
    ld/emultempl/gld960c.em
    ld/emultempl/hppaelf.em
    ld/emultempl/linux.em
    ld/emultempl/lnk960.em
    ld/emultempl/mipsecoff.em
    ld/emultempl/ostring.sed
    ld/emultempl/pe.em
    ld/emultempl/sunos.em
    ld/emultempl/vanilla.em
    ld/gen-doc.texi
    ld/genscripts.sh
    ld/h8-doc.texi
    ld/ld.1
    ld/ld.h
    ld/ld.texinfo
    ld/ldcref.c
    ld/ldctor.c
    ld/ldctor.h
    ld/ldemul.c
    ld/ldemul.h
    ld/ldexp.c
    ld/ldexp.h
    ld/ldfile.c
    ld/ldfile.h
    ld/ldgram.y
    ld/ldint.texinfo
    ld/ldlang.c
    ld/ldlang.h
    ld/ldlex.h
    ld/ldlex.l
    ld/ldmain.c
    ld/ldmain.h
    ld/ldmisc.c
    ld/ldmisc.h
    ld/ldver.c
    ld/ldver.h
    ld/ldwrite.c
    ld/ldwrite.h
    ld/lexsup.c
    ld/mac-ld.r
    ld/mpw-config.in
    ld/mpw-elfmips.c
    ld/mpw-eppcmac.c
    ld/mpw-esh.c
    ld/mpw-idtmips.c
    ld/mpw-make.sed
    ld/mri.c
    ld/mri.h
    ld/pe-dll.c
    ld/pe-dll.h
    ld/po/Make-in
    ld/po/POTFILES.in
    ld/po/ld.pot
    ld/scripttempl/README
    ld/scripttempl/a29k.sc
    ld/scripttempl/aix.sc
    ld/scripttempl/alpha.sc
    ld/scripttempl/aout.sc
    ld/scripttempl/armaout.sc
    ld/scripttempl/armcoff.sc
    ld/scripttempl/delta68.sc
    ld/scripttempl/ebmon29k.sc
    ld/scripttempl/elf.sc
    ld/scripttempl/elfd10v.sc
    ld/scripttempl/elfd30v.sc
    ld/scripttempl/elfppc.sc
    ld/scripttempl/h8300.sc
    ld/scripttempl/h8300h.sc
    ld/scripttempl/h8300s.sc
    ld/scripttempl/h8500.sc
    ld/scripttempl/h8500b.sc
    ld/scripttempl/h8500c.sc
    ld/scripttempl/h8500m.sc
    ld/scripttempl/h8500s.sc
    ld/scripttempl/hppaelf.sc
    ld/scripttempl/i386beos.sc
    ld/scripttempl/i386coff.sc
    ld/scripttempl/i386go32.sc
    ld/scripttempl/i386lynx.sc
    ld/scripttempl/i386msdos.sc
    ld/scripttempl/i960.sc
    ld/scripttempl/m68kaux.sc
    ld/scripttempl/m68kcoff.sc
    ld/scripttempl/m68klynx.sc
    ld/scripttempl/m88kbcs.sc
    ld/scripttempl/mcorepe.sc
    ld/scripttempl/mips.sc
    ld/scripttempl/mipsbsd.sc
    ld/scripttempl/nw.sc
    ld/scripttempl/pe.sc
    ld/scripttempl/pj.sc
    ld/scripttempl/ppcpe.sc
    ld/scripttempl/psos.sc
    ld/scripttempl/riscix.sc
    ld/scripttempl/sa29200.sc
    ld/scripttempl/sh.sc
    ld/scripttempl/sparccoff.sc
    ld/scripttempl/sparclynx.sc
    ld/scripttempl/st2000.sc
    ld/scripttempl/tic30aout.sc
    ld/scripttempl/tic30coff.sc
    ld/scripttempl/tic80coff.sc
    ld/scripttempl/v850.sc
    ld/scripttempl/vanilla.sc
    ld/scripttempl/w65.sc
    ld/scripttempl/z8000.sc
    ld/stamp-h.in
    ld/sysdep.h
    ld/testsuite/ChangeLog
    ld/testsuite/config/default.exp
    ld/testsuite/ld-bootstrap/bootstrap.exp
    ld/testsuite/ld-cdtest/cdtest-bar.cc
    ld/testsuite/ld-cdtest/cdtest-foo.cc
    ld/testsuite/ld-cdtest/cdtest-foo.h
    ld/testsuite/ld-cdtest/cdtest-main.cc
    ld/testsuite/ld-cdtest/cdtest.dat
    ld/testsuite/ld-cdtest/cdtest.exp
    ld/testsuite/ld-checks/asm.s
    ld/testsuite/ld-checks/checks.exp
    ld/testsuite/ld-checks/script
    ld/testsuite/ld-elfvers/vers.exp
    ld/testsuite/ld-elfvers/vers1.c
    ld/testsuite/ld-elfvers/vers1.dsym
    ld/testsuite/ld-elfvers/vers1.map
    ld/testsuite/ld-elfvers/vers1.sym
    ld/testsuite/ld-elfvers/vers1.ver
    ld/testsuite/ld-elfvers/vers13.asym
    ld/testsuite/ld-elfvers/vers15.c
    ld/testsuite/ld-elfvers/vers15.dsym
    ld/testsuite/ld-elfvers/vers15.sym
    ld/testsuite/ld-elfvers/vers15.ver
    ld/testsuite/ld-elfvers/vers16.c
    ld/testsuite/ld-elfvers/vers16.dsym
    ld/testsuite/ld-elfvers/vers16.map
    ld/testsuite/ld-elfvers/vers16a.c
    ld/testsuite/ld-elfvers/vers16a.dsym
    ld/testsuite/ld-elfvers/vers16a.ver
    ld/testsuite/ld-elfvers/vers17.c
    ld/testsuite/ld-elfvers/vers17.dsym
    ld/testsuite/ld-elfvers/vers17.map
    ld/testsuite/ld-elfvers/vers17.ver
    ld/testsuite/ld-elfvers/vers18.c
    ld/testsuite/ld-elfvers/vers18.dsym
    ld/testsuite/ld-elfvers/vers18.map
    ld/testsuite/ld-elfvers/vers18.sym
    ld/testsuite/ld-elfvers/vers18.ver
    ld/testsuite/ld-elfvers/vers19.c
    ld/testsuite/ld-elfvers/vers19.dsym
    ld/testsuite/ld-elfvers/vers19.ver
    ld/testsuite/ld-elfvers/vers2.c
    ld/testsuite/ld-elfvers/vers2.dsym
    ld/testsuite/ld-elfvers/vers2.map
    ld/testsuite/ld-elfvers/vers2.ver
    ld/testsuite/ld-elfvers/vers3.c
    ld/testsuite/ld-elfvers/vers3.dsym
    ld/testsuite/ld-elfvers/vers3.ver
    ld/testsuite/ld-elfvers/vers4.c
    ld/testsuite/ld-elfvers/vers4.sym
    ld/testsuite/ld-elfvers/vers4a.dsym
    ld/testsuite/ld-elfvers/vers4a.sym
    ld/testsuite/ld-elfvers/vers4a.ver
    ld/testsuite/ld-elfvers/vers5.c
    ld/testsuite/ld-elfvers/vers6.c
    ld/testsuite/ld-elfvers/vers6.dsym
    ld/testsuite/ld-elfvers/vers6.sym
    ld/testsuite/ld-elfvers/vers6.ver
    ld/testsuite/ld-elfvers/vers7.c
    ld/testsuite/ld-elfvers/vers7.map
    ld/testsuite/ld-elfvers/vers7a.c
    ld/testsuite/ld-elfvers/vers7a.dsym
    ld/testsuite/ld-elfvers/vers7a.sym
    ld/testsuite/ld-elfvers/vers7a.ver
    ld/testsuite/ld-elfvers/vers8.c
    ld/testsuite/ld-elfvers/vers8.map
    ld/testsuite/ld-elfvers/vers8.ver
    ld/testsuite/ld-elfvers/vers9.c
    ld/testsuite/ld-elfvers/vers9.dsym
    ld/testsuite/ld-elfvers/vers9.sym
    ld/testsuite/ld-elfvers/vers9.ver
    ld/testsuite/ld-empic/empic.exp
    ld/testsuite/ld-empic/relax.t
    ld/testsuite/ld-empic/relax1.c
    ld/testsuite/ld-empic/relax2.c
    ld/testsuite/ld-empic/relax3.c
    ld/testsuite/ld-empic/relax4.c
    ld/testsuite/ld-empic/run.c
    ld/testsuite/ld-empic/runtest1.c
    ld/testsuite/ld-empic/runtest2.c
    ld/testsuite/ld-empic/runtesti.s
    ld/testsuite/ld-scripts/cross1.c
    ld/testsuite/ld-scripts/cross1.t
    ld/testsuite/ld-scripts/cross2.c
    ld/testsuite/ld-scripts/cross2.t
    ld/testsuite/ld-scripts/cross3.c
    ld/testsuite/ld-scripts/crossref.exp
    ld/testsuite/ld-scripts/defined.exp
    ld/testsuite/ld-scripts/defined.s
    ld/testsuite/ld-scripts/defined.t
    ld/testsuite/ld-scripts/phdrs.exp
    ld/testsuite/ld-scripts/phdrs.s
    ld/testsuite/ld-scripts/phdrs.t
    ld/testsuite/ld-scripts/script.exp
    ld/testsuite/ld-scripts/script.s
    ld/testsuite/ld-scripts/script.t
    ld/testsuite/ld-scripts/scriptm.t
    ld/testsuite/ld-scripts/sizeof.exp
    ld/testsuite/ld-scripts/sizeof.s
    ld/testsuite/ld-scripts/sizeof.t
    ld/testsuite/ld-scripts/weak.exp
    ld/testsuite/ld-scripts/weak.t
    ld/testsuite/ld-scripts/weak1.s
    ld/testsuite/ld-scripts/weak2.s
    ld/testsuite/ld-selective/1.c
    ld/testsuite/ld-selective/2.c
    ld/testsuite/ld-selective/3.cc
    ld/testsuite/ld-selective/4.cc
    ld/testsuite/ld-selective/5.cc
    ld/testsuite/ld-selective/selective.exp
    ld/testsuite/ld-sh/sh.exp
    ld/testsuite/ld-sh/sh1.s
    ld/testsuite/ld-sh/sh2.c
    ld/testsuite/ld-sh/start.s
    ld/testsuite/ld-shared/elf-offset.ld
    ld/testsuite/ld-shared/main.c
    ld/testsuite/ld-shared/sh1.c
    ld/testsuite/ld-shared/sh2.c
    ld/testsuite/ld-shared/shared.dat
    ld/testsuite/ld-shared/shared.exp
    ld/testsuite/ld-shared/sun4.dat
    ld/testsuite/ld-shared/xcoff.dat
    ld/testsuite/ld-srec/sr1.c
    ld/testsuite/ld-srec/sr2.c
    ld/testsuite/ld-srec/sr3.cc
    ld/testsuite/ld-srec/srec.exp
    ld/testsuite/ld-undefined/undefined.c
    ld/testsuite/ld-undefined/undefined.exp
    ld/testsuite/ld-versados/t1-1.ro
    ld/testsuite/ld-versados/t1-2.ro
    ld/testsuite/ld-versados/t1.ld
    ld/testsuite/ld-versados/t1.ook
    ld/testsuite/ld-versados/t2-1.ro
    ld/testsuite/ld-versados/t2-2.ro
    ld/testsuite/ld-versados/t2-3.ro
    ld/testsuite/ld-versados/t2.ld
    ld/testsuite/ld-versados/t2.ook
    ld/testsuite/ld-versados/versados.exp
    ld/testsuite/lib/ld-lib.exp
    libiberty/COPYING.LIB
    libiberty/ChangeLog
    libiberty/Makefile.in
    libiberty/README
    libiberty/acconfig.h
    libiberty/alloca-conf.h
    libiberty/alloca.c
    libiberty/argv.c
    libiberty/asprintf.c
    libiberty/atexit.c
    libiberty/basename.c
    libiberty/bcmp.c
    libiberty/bcopy.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-beos
    libiberty/config/mh-cxux7
    libiberty/config/mh-fbsd21
    libiberty/config/mh-windows
    libiberty/configure
    libiberty/configure.in
    libiberty/copysign.c
    libiberty/cplus-dem.c
    libiberty/fdmatch.c
    libiberty/floatformat.c
    libiberty/fnmatch.c
    libiberty/getcwd.c
    libiberty/getopt.c
    libiberty/getopt1.c
    libiberty/getpagesize.c
    libiberty/getruntime.c
    libiberty/hex.c
    libiberty/index.c
    libiberty/insque.c
    libiberty/makefile.vms
    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/pexecute.c
    libiberty/random.c
    libiberty/rename.c
    libiberty/rindex.c
    libiberty/sigsetmask.c
    libiberty/spaces.c
    libiberty/splay-tree.c
    libiberty/strcasecmp.c
    libiberty/strchr.c
    libiberty/strdup.c
    libiberty/strerror.c
    libiberty/strncasecmp.c
    libiberty/strrchr.c
    libiberty/strsignal.c
    libiberty/strstr.c
    libiberty/strtod.c
    libiberty/strtol.c
    libiberty/strtoul.c
    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/xstrdup.c
    libiberty/xstrerror.c
    ltconfig
    ltmain.sh
    makefile.vms
    missing
    mkdep
    mkinstalldirs
    move-if-change
    mpw-README
    mpw-build.in
    mpw-config.in
    mpw-configure
    mpw-install
    opcodes/ChangeLog
    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-opc.c
    opcodes/arm-dis.c
    opcodes/arm-opc.h
    opcodes/cgen-asm.c
    opcodes/cgen-dis.c
    opcodes/cgen-opc.c
    opcodes/config.in
    opcodes/configure
    opcodes/configure.in
    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/i386-dis.c
    opcodes/i960-dis.c
    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/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/mpw-config.in
    opcodes/mpw-make.sed
    opcodes/ns32k-dis.c
    opcodes/opintl.h
    opcodes/pj-dis.c
    opcodes/pj-opc.c
    opcodes/po/Make-in
    opcodes/po/POTFILES.in
    opcodes/po/opcodes.pot
    opcodes/ppc-dis.c
    opcodes/ppc-opc.c
    opcodes/sh-dis.c
    opcodes/sh-opc.h
    opcodes/sparc-dis.c
    opcodes/sparc-opc.c
    opcodes/stamp-h.in
    opcodes/sysdep.h
    opcodes/tic30-dis.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/z8k-dis.c
    opcodes/z8k-opc.h
    opcodes/z8kgen.c
    readline/ChangeLog
    setup.com
    symlink-tree
    texinfo/texinfo.tex
    ylwrap
1999-09-13 21:40:01 +00:00
Jason Molenda
cff3e48be7 import gdb-1999-09-13 snapshot 1999-09-13 21:40:00 +00:00
Nick Clifton
59f2c4e703 Apply Philip Blundell's patch to prevent range checks on weak symbols. 1999-09-13 09:59:02 +00:00
Alan Modra
2f66722d55 Hackery to handle ix86 "jmp constant" as a pc-relative jump to the given
absolute address.
1999-09-13 06:45:15 +00:00
Jeff Law
9169713a19 * emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Put .plt
at the start of the .dlt output section.
1999-09-13 06:20:55 +00:00
Jeff Law
228d307f1b * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
Stub SEGREL32.  Return an error for any relocation not handled.
1999-09-13 05:51:32 +00:00
Alan Modra
795a77040c Changelog entry for tc-i386.c changes. 1999-09-13 03:53:59 +00:00
Alan Modra
a217f122fa Tidy jump handling code and comments. 1999-09-13 03:44:49 +00:00
Ian Lance Taylor
a20a10a650 * ar.c (main): Clear output_file if we don't change the archive.
(delete_members, replace_members): Likewise.
1999-09-12 19:00:11 +00:00
Ian Lance Taylor
8bea4d5c6c 1999-09-12 Donn Terry <donn@interix.com>
* objdump.c (dump_headers): If wide_output, print Flags header.
1999-09-12 18:49:47 +00:00
Ian Lance Taylor
deecf979f6 1999-09-12 Donn Terry <donn@interix.com>
* objdump.c (dump_section_header): Print any comdat information.
1999-09-12 18:39:32 +00:00
Ian Lance Taylor
3994e2c66d 1999-09-12 Donn Terry <donn@interix.com>
* objcopy.c (parse_flags): Handle "noload", "debug", and "share".
	* binutils.texi, objcopy.1: Document new flags.
1999-09-12 18:33:05 +00:00
Ian Lance Taylor
3de3906459 1999-09-12 Donn Terry <donn@interix.com>
* ar.c (counted_name_mode): New static variable.
	(counted_name_counter): New static variable.
	(map_over_members): Handle counted mode.
	(usage): Mention N modifier.
	(main): Handle N modifier.
	(delete_members): Handle counted mode.
	* binutils.texi, ar.1: Document N modifier.
1999-09-12 18:14:07 +00:00
Ian Lance Taylor
946d15cab8 1999-09-12 Donn Terry <donn@interix.com>
* ar.c (print_contents): Change printing of member name for
	POSIX.2 conformance.
1999-09-12 17:47:19 +00:00
Ian Lance Taylor
c8446de592 1999-09-12 Donn Terry <donn@interix.com>
* ar.c (output_filename): Make const.
	(open_inarch): If creating a new empty archive, set
	output_filename.
1999-09-12 17:43:21 +00:00
Ian Lance Taylor
fe84ea5db2 * ar.c (full_pathname): New static variable.
(map_over_members): Call normalize on command line parameter.
	(usage): Mention P modifier.
	(normalize): If full_pathname is true, don't do anything.
	(main): Accept P modifier.
	* binutils.texi, ar.1: Document P modifier.
1999-09-12 17:34:19 +00:00
Ian Lance Taylor
71add73133 * pe.em: Don't include "../bfd/libbfd.h".
(gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
	bfd_alloc.
1999-09-12 16:59:56 +00:00
Ian Lance Taylor
45455cddda 1999-09-12 Donn Terry <donn@interix.com>
* ld.h (ld_abort): Declare.
	(abort): Define.
	* ldmisc.c (ld_abort): Define.
1999-09-12 16:59:49 +00:00
Ian Lance Taylor
be4514d38d 1999-09-12 Donn Terry <donn@interix.com>
* scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup.
	Move .bss section after .rdata.  Move .reloc section after .rsrc.
1999-09-12 16:48:02 +00:00
Ian Lance Taylor
c3d002bb17 Define ENTRY in PE emulation files. Also:
* emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup.
1999-09-12 16:45:16 +00:00
Ian Lance Taylor
d98dd8ba26 1999-09-12 Donn Terry <donn@interix.com>
* lexsup.c (parse_args): Use strtoul for --split-by-reloc
	argument.
1999-09-12 16:40:09 +00:00
Ian Lance Taylor
03983865c3 1999-09-12 Donn Terry <donn@interix.com>
* lexsup.c (parse_args): If we get an unrecognized argument,
	mention --help.
1999-09-12 16:35:20 +00:00
Ian Lance Taylor
49147fca36 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
constant symbols, and avoid multiple definition errors on them.
1999-09-12 16:28:20 +00:00
Ian Lance Taylor
bb8fe706a0 1999-09-12 Donn Terry <donn@interix.com>
* ldlang.c (section_already_linked): Use comdat information if it
	is available.
1999-09-12 16:10:00 +00:00
Ian Lance Taylor
777690b647 * ld-scripts/script.exp: Add --image-base 0 for PE targets. 1999-09-12 15:59:48 +00:00
Ian Lance Taylor
1069dd8da7 * pe-dll.h: New file.
* pe-dll.c: Include "pe-dll.h".  Mark unused arguments as needed
	to avoid warnings.
	(edata_sz, reloc_sz): Change from int to size_t.
	(pe_details_type): Change type of imagebase_reloc from int to
	unsigned int.
	(pe_detail_list): Fully initialize last entry.
	(pe_dll_id_target): Change parameter to const.
	(pe_dll_generate_def_file): Likewise.
	(pe_dll_generate_implib): Likewise.
	(pe_implied_import_dll): Likewise.  Change dll_name to const.
	* emultempl/pe.em: Include "pe-dll.h".  Remove declarations now in
	pe-dll.h.
	(init): Fully initialize __dll__ entry.
	(gld_${EMULATION_NAME}_after_open): Remove unused variables
	sequence, elt, and i.
	* deffile.h: Add preprocessor guard.
	* deffilep.y (def_debug): Remove.
	* Makefile.am: Rebuild dependencies.
	(HFILES): Add pe-dll.h.
1999-09-12 15:27:48 +00:00
Ian Lance Taylor
2be9b2c7ee 1999-09-12 Donn Terry <donn@interix.com>
* emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If
	OVERRIDE_SECTION_ALIGNMENT is defined, change to that.
	(gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is
	defined, rather than a.exe.
	(init): Define __subsystem__ as ${SUBSYSTEM}.
	(set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol
	name.
1999-09-12 14:52:33 +00:00
Ian Lance Taylor
1b69a0bfca * ldlang.c (open_output): Change local variable desired_endian
from int to enum bfd_endian.
1999-09-12 14:50:15 +00:00
Ian Lance Taylor
ff65f4f015 * emulparams/arm_epoc_pe.sh: Define SUBSYSTEM and
INITIAL_SYMBOL_CHAR.
	* emulparams/armpe.sh: Likewise.
	* emulparams/morepe.sh: Likewise.
	* emulparams/ppcpe.sh: Likewise.
	* emulparams/i386pe.sh (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM.
1999-09-12 14:49:05 +00:00
Ian Lance Taylor
86b21447e7 1999-09-12 Donn Terry <donn@interix.com>
* libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
	significant bit is set.
1999-09-12 14:27:21 +00:00
Ian Lance Taylor
61feeec2ee 1999-09-12 Donn Terry <donn@interix.com>
* gas/all/gas.exp: Run cofftag test for i*86-*-interix*.
	* lib/gas-defs.exp: Add perror if can not read .d file.
1999-09-12 05:32:04 +00:00
Ian Lance Taylor
d33e1d248c 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
	BFD_RELOC_RVA relocations.
1999-09-12 05:09:50 +00:00
Ian Lance Taylor
c0c949c786 * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to
the value if TE_PE and a global defined symbol.
1999-09-12 05:06:09 +00:00
Ian Lance Taylor
18dc2407f4 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (md_undefined_symbol): Compare the name against
	the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it
	starts with "_G".
1999-09-12 03:50:42 +00:00
Ian Lance Taylor
945a1a6b98 * write.c (write_relocs): Call SET_SECTION_RELOCS if it is
defined.
	* config/obj-coff.h (SET_SECTION_RELOCS): Define.
	* doc/internals.texi (Object format backend): Document
	SET_SECTION_RELOCS.
1999-09-12 03:44:42 +00:00
Ian Lance Taylor
12951dca76 fix copyright 1999-09-12 03:34:29 +00:00
Ian Lance Taylor
79d292aaa2 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
	relocations against global symbols if TE_PE.
1999-09-12 03:18:54 +00:00
Ian Lance Taylor
7a6284c477 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version.
	(obj_pseudo_table): Always handle ".ident" with obj-coff_ident.
1999-09-12 03:07:49 +00:00
Ian Lance Taylor
8828d86202 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (coff_frob_symbol): Prohibit weak common
	symbols.
1999-09-12 02:59:54 +00:00
Ian Lance Taylor
9690c54dda 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_endef): Don't merge labels, or
	symbols which do not have a constant value, or tags with
	non-tags.  Remove the symbol from the list before adding it at the
	end.
1999-09-12 02:55:58 +00:00
Ian Lance Taylor
23dab925ad 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef
	C_FCN symbol differently if TE_PE.
	(obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which
	appears in the pseudo-op, rather coff_line_base which is only set
	for a .bf symbol.
1999-09-12 02:49:28 +00:00
Ian Lance Taylor
28428223eb 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_loc): New static function.
	(obj_pseudo_table): Add "loc".
1999-09-12 02:39:52 +00:00
Ian Lance Taylor
e8a3ab752d 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (add_lineno): Check that the line number is
	positive.
1999-09-12 02:34:00 +00:00
Ian Lance Taylor
0561a208f8 1999-09-11 Donn Terry <donn@interix.com>
* expr.c (expr): Change first parameter to int.
	* config/obj-coff.c: Add declarations for static functions.
	(coff_frob_symbol): Use SYM_AUXENT.
	* config/tc-i386.h (flag_16bit_code): Don't declare.
1999-09-12 02:27:58 +00:00
Ian Lance Taylor
0723899b7e comment change 1999-09-12 02:27:31 +00:00
Ian Lance Taylor
2ab9b79ef9 1999-09-11 Donn Terry <donn@interix.com>
* config/atof-ieee.c (atof_ieee): Change what_kind to int.
	* config/atof-vax.c (flonum_gen2vax): Change format_letter to
	int.
	(md_atof): Return NULL rather than 0.
	* config/tc-i386.c (md_atof): Change type to int.
1999-09-12 02:12:38 +00:00
Ian Lance Taylor
5881e4aab3 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_section): Default to setting
	SEC_LOAD.  Don't set SEC_DATA for 'w' modifier.
1999-09-12 02:08:55 +00:00
Ian Lance Taylor
2fbadf2cf5 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pei_final_link_postscript): Declare.
	(coff_final_link_postscript): Define.
	* peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
	directory entries here.
	(_bfd_pei_final_link_postscript): New function.
1999-09-12 00:45:26 +00:00
Ian Lance Taylor
8c42d01089 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
	section flags based on the section name.
1999-09-12 00:32:32 +00:00
Ian Lance Taylor
cb43721da5 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
	get the overflow of the s_nlnno field from the s_nreloc field.
	* peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
	the s_nlnno overflow of the .text section into the s_nreloc
	field.
1999-09-12 00:30:27 +00:00
Ian Lance Taylor
5933bdc9a1 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (add_data_entry): Declare.
	(pei_swap_aouthdr_out): Get image size right.  Set linker version
	more intuitively.
	(pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
	(pe_print_idata): Code cleanup, print more info, get rid of (now)
	extraneous ImageBase.
	(pe_print_edata): Likewise.
	(pe_print_pdata): Likewise.  Print exception entries.
	(pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
	(tbl): Make const, add "UNKNOWN".
	(_bfd_pe_print_private_bfd_data_common): Print timestamp.
	(_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
	section data directory.
	(_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
1999-09-12 00:22:01 +00:00
Ian Lance Taylor
7d2b58d612 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
	* peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
	* peicode.h (coff_get_symbol_info): Define.
1999-09-12 00:02:11 +00:00
Ian Lance Taylor
0717ebb780 1999-09-11 Donn Terry <donn@interix.com>
* config.bfd (i[3456]86-*-interix*): Set targ_cflags to
	-DSTRICT_PE_FORMAT.
	* coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
	than __INTERIX.
	(coff_classify_symbol): Re-revert 1999-08-08 patch if
	STRICT_PE_FORMAT.
1999-09-11 23:46:09 +00:00
Ian Lance Taylor
650f5dd8d8 add some comments about peigen.c 1999-09-11 23:38:11 +00:00
Ian Lance Taylor
277d1b5e45 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h: New file, broken out of peicode.h.
	* peigen.c: New file, broken out of peicode.h.
	* peicode.h: A bunch of code moved out to libpei.h and peigen.c.
	* configure.in: Add peigen.lo to list of files required for each
	PE target.
	* Makefile.am: Rebuild dependencies.
	(BFD32_BACKENDS): Add peigen.lo.
	(BFD32_BACKENDS_CFILES): Add peigen.c.
	(SOURCE_HFILES): Add libpei.h.
	* configure, Makefile.in: Rebuild.
1999-09-11 23:37:28 +00:00
Ian Lance Taylor
e166a60fd9 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): Don't check for a special
	section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
	instead.  Don't clear the s_paddr field for an uninitialized data
	section.
1999-09-11 22:52:20 +00:00
Ian Lance Taylor
1135238bd0 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): Set timestamp field in
	coff_data_type to f_timdat.
	* peicode.h (pe_mkobject_hook): Likewise.
1999-09-11 22:46:37 +00:00
Ian Lance Taylor
05bf877ad1 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_filehdr_in): Check the NT executable magic
	number if COFF_IMAGE_WITH_PE.
1999-09-11 22:41:54 +00:00
Ian Lance Taylor
4cfec37b92 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
	to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
	(coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
	there is no SEC_DEBUGGING section.
	* peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
	IMAGE_FILE_DEBUG_STRIPPED.
1999-09-11 22:33:45 +00:00
Ian Lance Taylor
33d7d19757 1999-09-11 Donn Terry <donn@interix.com>
* pe-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* pei-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11 22:17:33 +00:00
Ian Lance Taylor
402ef9d421 1999-09-11 Donn Terry <donn@interix.com>
* coffswap.h (IMAGE_BASE): Don't define.
	* pei-arm.c (IMAGE_BASE): Don't define.
	* pei-i386.c (IMAGE_BASE): Don't define.
	* pei-mcore.c (IMAGE_BASE): Don't define.
	* pei-ppc.c (IMAGE_BASE): Don't define.
1999-09-11 22:10:33 +00:00
Ian Lance Taylor
8add8e3099 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_link_input_bfd): When writing out a
	symbol, switch on the class when determining whether to modify the
	value.  For PE, don't modify the value of a C_FCN symbol not named
	.bf.
1999-09-11 22:04:16 +00:00
Ian Lance Taylor
c0bed66d09 1999-09-11 Donn Terry <donn@interix.com>
* libbfd-in.h (_bfd_abort): Declare.
	(abort): Define.
	* bfd.c (_bfd_abort): New function.
	* libbfd.h: Rebuild.
1999-09-11 21:51:55 +00:00
Ian Lance Taylor
a50f8417d5 * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11  Donn Terry  <donn@interix.com>

	* coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
	special handling.
1999-09-11 21:39:03 +00:00
Ian Lance Taylor
b545f675c1 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
	don't write out the associated line numbers.
1999-09-11 21:27:15 +00:00
Ian Lance Taylor
2c546cd84f 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
	aux entries.
1999-09-11 21:15:16 +00:00
Ian Lance Taylor
d510f9a69b 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
	for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
	symbols named .bf.
1999-09-11 21:04:09 +00:00
Ian Lance Taylor
eeaf533e61 * elfcode.h (write_relocs): Handle an absolute symbol in REL
relocs as we do for RELA relocs.
1999-09-11 20:14:57 +00:00
Ian Lance Taylor
5d3aaa749f 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (coff_link_add_symbols): Don't warn about symbol type
	changes when the base type is unknown.
1999-09-11 15:26:22 +00:00
Ian Lance Taylor
312191a689 1999-09-11 Donn Terry <donn@interix.com>
* coffgen.c (coff_print_symbol): Fix printing of aux record for
	function symbols.
1999-09-11 15:16:14 +00:00
Ian Lance Taylor
e723ef7c5f * write.c (dump_section_relocs): Call print_symbol_value_1 to
print the symbol, rather than printing it here.

1999-09-11  Donn Terry  <donn@interix.com>

	* write.c (adjust_reloc_syms): Print adjusted fixup.
1999-09-11 14:59:14 +00:00
Ian Lance Taylor
703153b566 1999-09-11 Donn Terry <donn@interix.com>
* syms.c (BSF_DEBUGGING_RELOC): Define.
	* coffgen.c (fixup_symbol_value): Relocate a symbol which has
	BSF_DEBUGGING_RELOC set.
	* bfd-in2.h: Rebuild.
1999-09-11 14:41:11 +00:00
Ian Lance Taylor
fa16d38700 1999-09-11 Donn Terry <donn@interix.com>
* expr.c (integer_constant): Correct too_many_digits calculation
	in base 10 case.
1999-09-11 14:24:59 +00:00
Ian Lance Taylor
7b50b349e2 * ecoff.c (bfd_debug_section): Update initialization for new
comdat_info field.
	(_bfd_ecoff_styp_to_sec_flags): Add section parameter.
	* libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.

1999-09-10  H.J. Lu  <hjl@gnu.org>

	* coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
	_bfd_filnmlen field.
	* coff-mips.c (mips_ecoff_backend_data): Likewise.
1999-09-10 23:25:51 +00:00
Jeff Law
e48c661ee6 * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
for FPTR relocs involving local symbols.
1999-09-10 15:46:37 +00:00
Jeff Law
e5b08bf0d3 * emulparms/elf64hppa.sh (LIB_PATH): Define. 1999-09-10 14:31:09 +00:00
Jeff Law
6a0b987115 * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
value for the stub address in a call through a stub.
        Install the value for a local symbol directly into the DLT
        instead of generating a reloc.  Correctly handle FPTR64 relocs.
1999-09-10 14:05:36 +00:00
Jeff Law
af7dc6449e * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
(elf_hppa_remark_useless_dynamic_symbols): Similarly.
        (elf_hppa_final_link): Call them.
1999-09-10 06:38:05 +00:00
Jeff Law
904ecb2d78 * emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before
unwinders so that they are closer to the text section.
        (OTHER_BSS_SECTIONS): Define.
        (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS.
        (INIT_START, INIT_END): Define.
        (FINI_START, FINI_END): Define.
        * scripttempl/elf.sc: Add support for INIT_START, INIT_END,
        FINI_START, FINI_END and OTHER_BSS_SECTIONS.
1999-09-10 06:30:37 +00:00
Ian Lance Taylor
fc4cc5bb8f * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
(elf_adjust_dynamic_symbol): ...from here.
1999-09-10 04:22:23 +00:00
Jeff Law
7e4d694ea7 * emulparms/elf64hppa.sh (TEXT_START_ADDR): Move up one page.
(DATA_ADDR): Define.
1999-09-10 03:49:14 +00:00
Richard Henderson
2f2bc1bb67 * emulparams/d10velf.sh (READONLY_START_ADDR): Set to 0x2000004. 1999-09-10 01:04:25 +00:00
Andreas Schwab
1d0a3c9c5f * ld.texinfo: Fix arguments of @var to not contain punctuation. 1999-09-09 16:12:28 +00:00
Andreas Schwab
13a830b61a * doc/c-arm.texi: Fix arguments of @var to not contain
punctuation.
1999-09-09 16:09:52 +00:00
Andreas Schwab
ad0481cd94 * binutils.texi: Add info dir entries for all programs described
here.  Fix arguments of @var to not contain punctuation.
1999-09-09 16:01:34 +00:00
Jeff Law
b1d5590577 Update some comments. 1999-09-09 14:52:15 +00:00
Jeff Law
b726396160 * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
relocation, remove them.  SECREL64->LTOFF16WF.
        (elf_hppa_final_link_relocate): Handle LTOFF* relocations.  Handle
        DIR* relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 14:51:33 +00:00
Jeff Law
8267b1550c * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
(elf_hppa_relocate_insn): Similarly.
1999-09-09 14:20:18 +00:00
Jeff Law
6849fb4de7 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
GPREL* relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 14:10:24 +00:00
Jeff Law
b233eaabc0 * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
Handle LTOFF_TP* relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 13:55:46 +00:00
Jeff Law
571047ad0a * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
Consistently deal with addends.  Handle DLTIND14F and DLTREL14F.
        (elf_hppa_relocate_insn): Handle PCREL* relocs.
1999-09-09 13:32:38 +00:00
Jeff Law
e5bb3efcc5 * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
DIR32, DIR64 and FPTR64 relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 13:01:11 +00:00
Jeff Law
be7582f38a Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
* elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
        address of the .PARISC.global section.
        (elf_hppa_relocate_section): Lookup and pass the PA64 hash
        table entry elf_hppa_final_link_relocate.  Do not give a warning
        for a reloc against an external symbol if it has a PA64 hash
        table entry.
        (elf_hppa_final_link_relocate): Significantly rework.  Handle
        DLTIND relocations.  Compute the final value of the relocation
        before passing the value of elf_hppa_relocate_insn.
        (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
        relocation support.  Handle DLTIND relocation requests just like
        DLTREL relocation requests.  Simplify branch handling.

1999-09-08  Ulrich Drepper  <drepper@cygnus.com>

        * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
        non-allocated section as done in i386 version.
        (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
        statement since this is no know relocation.
1999-09-09 12:01:24 +00:00
Jeff Law
040266ab33 Thu Sep 9 05:52:34 1999 Jeffrey A Law (law@cygnus.com)
* emulparms/elf64hppa.sh (OTHER_READWRITE_SECTIONS): Define.

1999-09-08  Ulrich Drepper  <drepper@cygnus.com>

        * emulparams/elf64hppa.sh (ELFSIZE): New.  Set to 64.

Wed Sep  8 00:07:39 1999  Jeffrey A Law  (law@cygnus.com)

        * emulparms/elf64hppa.sh (ENTRY): Define to main.
1999-09-09 11:56:00 +00:00
Stan Shebs
d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Nick Clifton
325188ecac Only support interworking and pic for ELF or COFF targets 1999-09-08 13:10:28 +00:00
Jeff Law
084d930bff * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-08 01:00:12 +00:00
Jeff Law
11c19a4e3c * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
DLTREL14WD relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-08 00:50:50 +00:00
Jeff Law
c8933571da * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
DLTREL21L relocs.  Pass the output bfd to elf_hppa_relocate_insn.
        Pass the relocate type rather than the insn format to
        elf_hppa_relocate_insn.
        (elf_hppa_relocate_insn): Make switch dependent on relocation type
        rather than the opcode.  Handle DLTREL21L and DLTREL14R relocs.
1999-09-08 00:09:52 +00:00
Jeff Law
2beaab59a5 * hppa-dis.c (print_insn_hppa): Escape '%' in output strings. 1999-09-07 19:57:23 +00:00
Jeff Law
d1e9bd1f11 * hppa-dis.c (print_insn_hppa): Handle 'Z' argument. 1999-09-07 19:52:51 +00:00
Jeff Law
4964086a66 * config/tc-hppa.c (pa_ip): Support 'Z' argument. 1999-09-07 19:48:13 +00:00
Jeff Law
52d836e28f * hppa.h (pa_opcodes): Add "addil" variant which has the %r1 as
an explicit output argument.
1999-09-07 19:46:47 +00:00
Jeff Law
e7c1f43c29 * config/tc-hppa.c (pa_ip): Put strict register checks before
call to pa_parse_number.
1999-09-07 19:30:14 +00:00
Nick Clifton
f45812f66a Add patterns with correct names for mulu and muls instructions (mulu.w and muls.w) 1999-09-07 17:26:21 +00:00
Ian Lance Taylor
692b7d62e8 * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
(bfd_coff_filnmlen): Define.
	(bfd_coff_std_swap_table): Initialize new field.
	* coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
	than FILNMLEN.
	(coff_write_symbols): Likewise.
	(coff_get_normalized_symtab): Likewise.
	* coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
	* libcoff.h: Rebuild.
1999-09-07 04:28:27 +00:00
Ian Lance Taylor
4c117b10b2 reformat for 80 column screen 1999-09-07 04:14:35 +00:00
Ian Lance Taylor
75cc718903 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (sort_by_secaddr): New static function if
	COFF_IMAGE_WITH_PE.
	(coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
	sections by VMA when assigning target_index values.  Always set
	virt_size.
1999-09-07 04:06:50 +00:00
Ian Lance Taylor
fdfd89ab43 remove unneeded ifdefs 1999-09-07 03:42:53 +00:00
Ian Lance Taylor
8d3ad4e16f 1999-09-06 Donn Terry <donn@interix.com>
* libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
	* coffcode.h (coff_set_alignment_hook): Set pe_flags field if
	COFF_WITH_PE.
	* libcoff.h: Rebuild.
1999-09-07 03:40:32 +00:00
Ian Lance Taylor
25bcc51d8f 1999-09-06 Donn Terry <donn@interix.com>
* internal.h (DTYPE): Define.
	* pe.h (struct external_PEI_filehdr): Rename from
	external_PE_filehdr.  Define even if COFF_IMAGE_WITH_PE is not
	defined.
1999-09-07 03:28:54 +00:00
Ian Lance Taylor
c4bf532f53 * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for
BFD_ASSEMBLER code.
1999-09-07 03:26:58 +00:00
Ian Lance Taylor
8a1ad8e793 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (coff_set_custom_section_alignment): Add const to
	declaration to match definition.
	(coff_write_object_contents): Don't set F_AR32W(R)? if
	COFF_WITH_PE.
1999-09-07 03:00:32 +00:00
Ian Lance Taylor
6fb72d08dc * coff-i386.c (in_reloc_p): Add declaration.
(i386coff_vec): Simplify initialization of
	application_section_flags.
1999-09-07 02:59:17 +00:00
Ian Lance Taylor
2820a0b713 add comment 1999-09-07 02:58:00 +00:00
Ian Lance Taylor
a33132fd8e 1999-09-06 Donn Terry <donn@interix.com>
* as.c (perform_an_assembly_pass): Set SEC_DATA for data_section.
1999-09-07 02:23:44 +00:00
Ian Lance Taylor
417335159b 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
	version.  Move COFF_WITH_PE specific code to new version.
	(stype_to_sec_flags): Likewise.  Add section parameter.
	* coffgen.c (make_a_section_from_file): Set target_index before
	calling styp_to_sec_flags.  Pass section to styp_to_sec_flags.
	* libcoff.h: Rebuild.
1999-09-07 02:11:54 +00:00
Ian Lance Taylor
1865dcb816 1999-09-06 Donn Terry <donn@interix.com>
* nm.c (print_symbol_info_bsd): Check for 'w' as well as 'U'.
	(print_symbol_info_sysv): Likewise.
	(print_symbol_info_posix): Likewise.
1999-09-06 18:47:31 +00:00
Ian Lance Taylor
9296256064 1999-09-06 Donn Terry <donn@interix.com>
* syms.c (stt): Add some PE/PEI section names.
	(bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
	symbol.
	(bfd_symbol_info): Check for 'w'.
1999-09-06 18:44:56 +00:00
Ian Lance Taylor
022a5af495 1999-09-06 Donn Terry <donn@interix.com>
* section.c (struct bfd_comdat_info): Define.
	(asection): Add comdat field.
	(STD_SECTION): Initialize comdat field.
	(bfd_make_section_anyway): Likewise.
	* bfd-in2.h: Rebuild.
1999-09-06 18:34:29 +00:00
Andreas Schwab
0d271c1a5e * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
to version symbols.
1999-09-06 10:56:08 +00:00
Jeff Law
90765e3a9e * hppa.h: Add strict variants of PA1.0/PA1.1 loads and stores.
Add a few PA2.0 loads and store variants.
1999-09-06 10:42:11 +00:00
Jeff Law
0f4f8b56e7 * config/tc-hppa.c (pa_ip): Get strict/non-strict mode from the
candidate instruction.  Require registers for register arguments
        when in strict mode.  Require assemble-time constants for
        constants when in strict mode.
        (pa_get_absolute_expression): Require a constant when in strict
        mode.
1999-09-06 10:28:21 +00:00
Nick Clifton
d33886536c Fix value for -Wnuh command line option 1999-09-06 10:24:19 +00:00
Nick Clifton
1c56fb878f Applied patch from Scott Bambrough <scottb@netwinder.org>:
Added HOSTING_CRT0, HOSTING_LIBS for target "arm*-*-linux-gnu*"
1999-09-06 09:51:16 +00:00
Nick Clifton
fed79cc616 use bfd memory allcation routines 1999-09-06 08:57:49 +00:00
Ian Lance Taylor
d9ea9319a9 fix date 1999-09-04 17:40:28 +00:00
Ian Lance Taylor
7d46606982 1999-09-04 Steve Chamberlain <sac@pobox.com>
* readelf.c: Include "elf/pj.h".
	(dump_relocations): Handle EM_PJ.
	(get_machine_name): Likewise.
	(get_machine_flags): Likewise.
1999-09-04 17:40:18 +00:00
Ian Lance Taylor
6a0aef968b 1999-09-02 Steve Chamberlain <sac@pobox.com>
* binutils-all/objdump.exp: Add pj to cpus_expected.
1999-09-04 17:38:46 +00:00
Ian Lance Taylor
c6c8c6dc7a 1999-09-04 Steve Chamberlain <sac@pobox.com>
* configure.tgt (pjl-*-*, pj-*-*): New targets.
	* emulparams/pjelf.sh: New file.
	* emulparams/pjlelf.sh: New file.
	* scripttempl/pj.sc: New file.
	* Makefile.am (ALL_EMULATIONS): Add epjelf.o and epjlelf.o.
	(epjelf.o, epjlelf.o): New targets.
	* Makefile.in: Rebuild.
1999-09-04 17:37:36 +00:00
Ian Lance Taylor
6040cc9d99 remove extraneous period 1999-09-04 17:29:42 +00:00
Ian Lance Taylor
041dd5a9f4 1999-09-04 Steve Chamberlain <sac@pobox.com>
* config/tc-pj.c: New file, supports picoJava in ELF.
	* config/tc-pj.h: Ditto.
	* configure.in (pjl*, pj*): New targets.
	* Makefile.am: Rebuild dependencies.
	(CPU_TYPES): Add pj.
	(TARGET_CPU_CFILES): Add config/tc-pj.c.
	(TARGET_CPU_HFILES): Add config/tc-pj.h.
	* doc/c-pj.texi: New file.
	* doc/as.texinfo: Add some PJ specifics.
	* doc/all.texi: Add PJ to the list of all architectures, sort them
	all alphabetically.
	* doc/Makefile.in (CPU_DOCS): Add c-pj.texi.
	* configure, Makefile.in, doc/Makefile.in: Rebuild.
1999-09-04 17:29:22 +00:00
Ian Lance Taylor
2ef5e2a158 1999-09-04 Steve Chamberlain <sac@pobox.com>
* gas/pj/{pj.exp, ops.c, ops.d}: New tests for picoJava.
1999-09-04 17:18:59 +00:00
Ian Lance Taylor
5bb59d6527 1999-09-04 Steve Chamberlain <sac@pobox.com>
* dis-asm.h (print_insn_pj): Declare.
1999-09-04 17:17:37 +00:00
Ian Lance Taylor
8340b17f41 1999-09-04 Steve Chamberlain <sac@pobox.com>
* pj.h: New file.
1999-09-04 17:16:21 +00:00
Ian Lance Taylor
c6a40e00bc 1999-09-04 Steve Chamberlain <sac@pobox.com>
* pj.h: New file.
	* common.h (EM_PJ): Define.
1999-09-04 17:15:44 +00:00
Ian Lance Taylor
1e608f986c 1999-09-04 Steve Chamberlain <sac@pobox.com>
* pj-opc.c: New file.
	* pj-dis.c: New file.
	* disassemble.c	(disassembler): Handle bfd_arch_pj.
	* configure.in: Handle bfd_pj_arch.
	* Makefile.am: Rebuild dependencies.
	(CFILES): Add pj-dis.c and pj-opc.c.
	(ALL_MACHINES): Add pj-dis.lo and pj-opc.lo.
	* configure, Makefile.in: Rebuild.
1999-09-04 17:14:37 +00:00
Ian Lance Taylor
0bcb993b9f 1999-09-04 Steve Chamberlain <sac@pobox.com>
* cpu-pj.c: New file.
	* elf32-pj.c: New file.
	* config.bfd (pj*): New cpu.
	(pj-*-*, pjl-*-*): New targets.
	* configure.in (bfd_elf32_pj_vec): New target vector.
	(bfd_elf32_pjl_vec): New target vector.
 	* archures.c (bfd_arch_pj): Define.
	* elf.c (prep_headers): Handle bfd_arch_pj.
	* reloc.c: Define BFD_RELOC_PJ_* relocations.
	* targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
	to target vector list.
	* Makefile.am: Rebuild dependencies.
	(ALL_MACHINES): Add cpu-pj.lo.
	(ALL_MACHINES_CFILES): Add cpu-pj.c.
	(BFD32_BACKENDS): Add elf32-pj.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-pj.c.
	* configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
1999-09-04 17:07:46 +00:00
Ian Lance Taylor
ef14edc44e 1999-09-04 Steve Chamberlain <sac@pobox.com>
* config.sub: Add support for configuring for pj.
1999-09-04 16:52:13 +00:00
Ian Lance Taylor
7843f00e2d * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
* elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
	and NON_GOT_REF from weak defined symbol to real symbol.
	* elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
	(elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
	create a COPY reloc.
	* elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
	(elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
	don't create a COPY reloc.
1999-09-04 16:26:08 +00:00
Ian Lance Taylor
4fe53c9827 1999-09-04 H.J. Lu <hjl@gnu.org>
* i386-dis.c (print_insn_i386): Set bytes_per_line to 7.
1999-09-04 15:49:35 +00:00
Jeff Law
4b69d4ada3 * emulparams/elf64hppa.sh (MAXPAGESIZE): Define.
(OTHER_READONLY_SECTIONS, DATA_PLT): Likewise.
1999-09-04 02:20:41 +00:00
Ian Lance Taylor
dca1443537 rebuild 1999-09-03 18:34:45 +00:00
Ian Lance Taylor
814fe68ac5 * elflink.h (elf_bfd_final_link): When counting relocations, don't
count those in sections we are not including in the link.
1999-09-03 18:34:02 +00:00
Jeff Law
97578bb047 * hppa.h: Add HPUX specific symbol type definitions. 1999-09-03 02:23:08 +00:00
Jeff Law
20e29382fd * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
field in hpux11 shared libraries.
1999-09-02 23:44:54 +00:00
Jeff Law
f6e143a199 * emulparams/elf64hppa.sh: New file.
* configure.tgt (hppa*w-*-*): Use elf64hppa emulation.
        * Makefile.am (ALL_64_EMULATIONS): Add eelf64hppa.o
        (eelf64hppa.c): Add dependencies.
        * Makefile.in: Rebuilt.
1999-09-02 20:35:35 +00:00
Jeff Law
70fa6ef568 * hppa.h: Add HPUX specific dynamic and program header table
specific definitions.
1999-09-02 20:17:33 +00:00
Nick Clifton
4b56dbbd4a Fix memory leak. 1999-09-02 17:56:51 +00:00
Alan Modra
4ca72d3829 Enable --emulation={i386coff,i386elf} for i386 gas. 1999-09-02 15:12:01 +00:00
Nick Clifton
bcef92fa23 Do not dump literal pool when a .section .line directive is encountered. 1999-09-02 10:39:18 +00:00
Nick Clifton
c5089c8475 Add test for strongarm to ScottB's patch. 1999-09-02 10:11:11 +00:00
Catherine Moore
f3d180e977 * gas/vtable/vtable.exp: Added [istarget "arm*-*-*"] to run dump
test "entry0" instead of "entry1".  ARM targets use REL relocs,
        and should use the test entry0.
1999-09-01 21:17:36 +00:00
Jeff Law
f273939b8e Fix minor typos introduced while cleaning up the previous patch. 1999-09-01 20:06:15 +00:00
Jeff Law
2eb429af04 * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
(elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
        (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
1999-09-01 19:42:17 +00:00
Nick Clifton
21461bfd9b fix typo. 1999-09-01 16:18:50 +00:00
Nick Clifton
231b5e2936 slight code improvement over previous delta 1999-09-01 15:32:46 +00:00
Alan Modra
c35dfbebaf Coff fix for i386 gas testsuite 1999-09-01 14:57:03 +00:00
Nick Clifton
5856c19ac4 Do not align sectins when producing ELF format objects. 1999-09-01 10:57:19 +00:00
Nick Clifton
cdf82bcf48 Document new command line switches. 1999-09-01 09:28:07 +00:00
Nick Clifton
0ac3848055 ooops - omitted from previous delta 1999-08-31 16:57:37 +00:00
Nick Clifton
893e10f9bb oops - omitted from previous delta 1999-08-31 16:57:03 +00:00
Nick Clifton
7e3c779ac6 Patch from Scott Bambrough <scottb@netwinder.org> to define NT_TASKSTRUCT. 1999-08-31 16:56:26 +00:00
Nick Clifton
779fe53312 Apply patch from Scott Bambrough to display the contents of a NOTES segment
in a core file.
1999-08-31 16:54:56 +00:00
Ian Lance Taylor
757acbc593 * binutils.texi (Bug Reporting): Clarify that large files should
not be sent to bug-gnu-utils.
1999-08-31 15:34:29 +00:00
Ian Lance Taylor
d7f1f2b0be fix FSF address 1999-08-31 15:12:20 +00:00
Nick Clifton
994819d267 When possible, keep the original type of the symbol. 1999-08-31 14:07:27 +00:00
Nick Clifton
afb478e8cd Add support for configuring for fr30. 1999-08-31 09:47:21 +00:00
Richard Henderson
bfe5c752f1 * alpha-opc.c (fetch, fetch_m, ecb, wh64): RA must be R31. 1999-08-31 02:01:22 +00:00
Jason Molenda
104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda
fd485a97b1 import gdb-1999-08-30 snapshot 1999-08-31 01:06:22 +00:00
Jeff Law
735c91d811 Check in correct version of previous patch. 1999-08-30 21:57:08 +00:00
Jeff Law
0d571602ca * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
        tools were configured.
        * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
1999-08-30 21:30:36 +00:00
Jeff Law
cb63de9b03 * gas/hppa/unsorted/*.s: Use .code instead of .SPACE/.SUBSPA for
sectioning.
        * gas/hppa/unsorted/unsorted.exp: Disable tests not appropriate for
        PA64.
1999-08-30 21:15:01 +00:00
Jeff Law
a91f57fd4b * gas/hppa/reloc/*.s: Use .code instead of .SPACE/.SUBSPA for
sectioning.
        * gas/hppa/parse/parse.exp: Disable tests not appropriate for PA64.
        Revamp address expressions slightly to handle an arbitrary sized
        address.
1999-08-30 21:00:59 +00:00
Jeff Law
a022ef54db * gas/hppa/parse/*.s: Use .code instead of .SPACE/.SUBSPA for
sectioning.
        * gas/hppa/parse/parse.exp: Disable tests not appropriate for PA64.
1999-08-30 20:09:00 +00:00
Jeff Law
68196d703a * gas/hppa/basic/*.s: Use .code instead of .SPACE/.SUBSPA for
sectioning.
1999-08-30 18:20:18 +00:00
Alan Modra
3f9ed93baf New i386 tests for naked register syntax, ie. "eax" instead of "%eax" 1999-08-30 14:09:43 +00:00
Alan Modra
af6bdddf8c i386 gas code cleanups: combine i386_is_reg and parse_register. 1999-08-30 13:12:54 +00:00
Alan Modra
5f47d35be1 Allow spaces in i386 FP reg names, eg. %st ( 1 ). 1999-08-29 23:44:27 +00:00
Doug Evans
eb1b03df1a * fr30-asm.c,fr30-desc.h,fr30-dis.c,fr30-ibld.c,fr30-opc.c: Rebuild.
* m32r-asm.c,m32r-desc.h,m32r-dis.c,m32r-ibld.c,m32r-opc.c: Rebuild.
	* m32r-opinst.c: Rebuild.
1999-08-29 21:16:25 +00:00
Doug Evans
1174497c8a * config/tc-m32r.c (md_parse_option): Delete unrecognized option
error message (done elsewhere).
1999-08-29 20:45:22 +00:00
Jeff Law
a349b1517f * hppa-dis.c (print_insn_hppa): Replace 'f' by 'v'. Prefix float
register args by 'f'.
1999-08-29 07:53:24 +00:00
Jeff Law
97e1581b3f * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register
args by 'f'.
1999-08-29 07:52:32 +00:00
Jeff Law
7d8fdb64f6 * hppa.h (pa_opcodes): Replace 'f' by 'v'. Prefix float register args
by 'f'.
1999-08-29 07:51:43 +00:00
Jeff Law
e3ca10d721 * gas/hppa/basic/basic.exp: Add new tests shift2.s,
shift3.s, extract2.s, extract3.s, deposit2.s, and deposit3.s.
        * gas/hppa/basic/shift2.s, shift3.s, extract2.s,
        extract3.s, deposit2.s, deposit3.s:  New.
1999-08-28 11:00:36 +00:00
Jeff Law
9e4f2d3a85 * config/tc-hppa.c (pa_ip): Add args q, %, and |. 1999-08-28 10:59:37 +00:00
Jeff Law
af10de8240 * hppa-dis.c (print_insn_hppa): Add args q, %, !, and |. 1999-08-28 10:59:07 +00:00
Jeff Law
90927b9c0e * hppa.h (pa_opcodes): Add extrd, extrw, depd, depdi, depw, depwi.
Add supporting args.
1999-08-28 10:58:26 +00:00
Jeff Law
436709eeb3 * gas/hppa/basic/add.s,addi.s,dcor.s,shladd.s,sub.s,subi.s,unit.s:
Add new syntax versions of instructions to tests.
        * gas/hppa/basic/add2.s,dcor2.s,perf.s,purge2.s,shladd2.s,sub2.s,
        system2.s, unit2.s:  New tests.
        * hppa/basic/basic.exp: Add new tests.
1999-08-28 10:32:43 +00:00
Jeff Law
680ef6de90 * config/tc-hppa.c (pa_ip): Absorb white space in instructions
between args.
        Add new completers.  Fix bug in 64 bit condition handling.
1999-08-28 10:18:12 +00:00
Jeff Law
3b67cf2b51 * hppa-dis.c (MASK_10, read_write_names, add_compl_names,
extract_10U_store):  New.
        (print_insn_hppa):  Add new completers.
1999-08-28 10:17:07 +00:00
Jeff Law
1d16bf9c3b * hppa.h: Document new completers and args.
* hppa.h (pa_opcodes):  Add 64 bit patterns and pa2.0 syntax for uxor,
        uaddcm, dcor, addi, add, sub, subi, shladd, rfi, and probe.  Add pa2.0
        extensions for ssm, rsm, pdtlb, pitlb.  Add performance instructions
        pmenb and pmdis.
1999-08-28 10:16:15 +00:00
Jeff Law
5e6ca42117 Fix minor bug in last change. 1999-08-28 09:28:31 +00:00
Jeff Law
3c5c4310a6 * gas/hppa/basic/basic.exp:
* gas/hppa/basic/media.s:  Add test cases for new instructions.
1999-08-28 08:50:00 +00:00
Jeff Law
413c94baca * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH',
'cS', and 'c*'.
1999-08-28 08:48:40 +00:00
Jeff Law
1eee34f59f * hppa-dis.c (signed_unsigned_names,mix_half_names,
saturation_names):  New.
        (print_insn_hppa): Add completer codes 'a', 'ch', 'cH', 'cS', and 'c*'.
1999-08-28 08:47:50 +00:00
Jeff Law
96226a686f * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
hshr, hsub, mixh, mixw, permh.
1999-08-28 08:46:57 +00:00
Jeff Law
3281117ae1 * hppa-dis.c (print_insn_hppa): Place completers behind prefix 'c'. 1999-08-28 08:17:36 +00:00
Jeff Law
5d4ba527e1 * hppa.h (pa_opcodes): Change completers in instructions to
use 'c' prefix.
1999-08-28 08:16:55 +00:00
Jeff Law
28252e6156 * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'. 1999-08-28 08:16:30 +00:00
Nick Clifton
3590ea008d Applied patch from Stephane Carrez <stcarrez@worldnet.fr> to fix pointer size assumption. 1999-08-28 08:13:43 +00:00
Jeff Law
3d756caf33 Fix minor goofs in previous delta. 1999-08-28 08:02:52 +00:00
Jeff Law
b7d6d48509 Add missing '!' change. 1999-08-28 08:00:27 +00:00
Jeff Law
17d9105c0a * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers. 1999-08-28 07:23:42 +00:00
Jeff Law
46424e052b * hppa-dis.c (print_insn_hppa): Add cases for '.', '~'. '$'. and '!' 1999-08-28 06:45:18 +00:00
Jeff Law
be3f1865fb * gas/hppa/basic/basic.exp (do_branch2,do_media): New.
* gas/hppa/basic/branch2.s:  New.
        * gas/hppa/basic/media.s:  New.
1999-08-28 06:44:31 +00:00
Jeff Law
a97685e901 * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!' 1999-08-28 06:42:06 +00:00
Jeff Law
e9fc28c6b6 * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
hshladd, hshradd, shrpd, and shrpw instructions.  Update arg comments.
1999-08-28 06:41:11 +00:00
Jeff Law
4f31259178 * hppa-dis.c (print_insn_hppa): Look at next arg instead of bits
to decide to print a space.
1999-08-28 06:29:15 +00:00
Jeff Law
9ecc05f0de * config/tc-hppa.c (pa_ip): Add case for 'I'. 1999-08-28 06:28:21 +00:00
Jeff Law
1c1432026f * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
fnegabs to use 'I' instead of 'F'.
1999-08-28 06:27:12 +00:00
Jeff Law
40a825c310 * binutils-all/hppa/freg.s: New file.
* binutils-all/hppa/objdump.exp:  Add freg.s test.
1999-08-28 06:26:22 +00:00
Jeff Law
0791df6ce3 * gas/testsuite/gas/hppa/basic/basic.exp (do_fp_comp2): New.
* gas/testsuite/gas/hppa/basic/fp_comp2.s:  New.
1999-08-28 06:18:40 +00:00
Nick Clifton
ceaa7778c0 Do not build ld for native AIX platforms. 1999-08-27 10:42:58 +00:00
Nick Clifton
7a4b7442d4 Patch from Jim Wilson - more bug fixes for line table decoding. 1999-08-27 10:34:58 +00:00
Nick Clifton
cb30237e0f Apply Jim Wilson's patch to track current frag for line number changes. 1999-08-27 09:03:18 +00:00
Nick Clifton
2366453a56 (display_debug_lines, case DW_LNS_const_add_pc): Multiply adv by info.li_min_insn_length. 1999-08-27 08:45:02 +00:00
Mark Mitchell
9458945f8f * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
GOT entries for GOT16 relocations; they're not required.
1999-08-27 00:08:50 +00:00
Richard Henderson
9a09773023 * readelf.c (get_sparc64_dynamic_type): New function.
(get_dynamic_type): Use it.
1999-08-26 18:25:20 +00:00
Nick Clifton
09a798eacc This makes the line number info for the end of a function match what the
standard specifies.  The current code could confuse a debugger.
1999-08-26 12:13:01 +00:00
Nick Clifton
e1c05f12ca Applied patch from Jim Wilson to fix several bugs in line table generation. 1999-08-26 11:11:43 +00:00
Nick Clifton
75d74c4827 (display_debug_lines, case default): Change second line setting adv to use = not += 1999-08-26 10:53:40 +00:00
Nick Clifton
0f1ee88922 Patch from Philip Blundell <pb@nexus.co.uk>: Define __end__ 1999-08-25 13:46:28 +00:00
Nick Clifton
8959586aab Patch from Roland McGrath <roland@baalperazim.frob.com>
Add arm-netbsd target.
1999-08-24 15:17:23 +00:00
Nick Clifton
021e3cc067 Path from Roland McGrath <roland@baalperazim.frob.com>
Added arm-netbsd target.
1999-08-24 15:16:53 +00:00
Jeff Law
7da1b1756d * som.c (som_slurp_symbol_table): Fix typo in comment. 1999-08-24 06:26:39 +00:00
Jason Molenda
0d2856175c Files removed as of the 1999-08-23 snapshot. 1999-08-23 23:15:40 +00:00
Jason Molenda
53a5351d90 import gdb-1999-08-23 snapshot 1999-08-23 22:40:00 +00:00
Nick Clifton
093505ad61 Implement --base-file command line switch. 1999-08-23 09:13:56 +00:00
Nick Clifton
3b108066c9 Add ability for individual targets to have their own command line switches by
defining PARSE_AND_LIST_ARGS.
1999-08-23 09:07:45 +00:00
Alan Modra
9e525108fe Add AMD athlon support to x86 assembler and disassembler. 1999-08-21 12:40:39 +00:00
Jeff Law
1ca740621c * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
here instead of using elf_section_data...
1999-08-20 23:03:04 +00:00
Alan Modra
b23bac3600 *gas/config/tc-i386.c: Fix errors in displacement size when
automatically inferring an address prefex.
1999-08-20 11:59:19 +00:00
Nick Clifton
ddda4409ce fix bug in previous delta 1999-08-20 07:56:08 +00:00
Nick Clifton
aff05906d2 extend comment. 1999-08-19 13:11:30 +00:00
Nick Clifton
69e70d3056 Add code to emit relocs into a base file. 1999-08-19 13:04:45 +00:00
Nick Clifton
98c1d4aab7 Fix partial REL relocs. 1999-08-19 10:12:28 +00:00
Andreas Schwab
cd5d26f264 * configure.host: Use ${CC} instead of gcc for finding compiler
related files.
1999-08-19 07:34:07 +00:00
Doug Evans
e8da1bf1bd * cgen.h (CGEN_INSN_MACH_HAS_P): New macro. 1999-08-19 05:45:30 +00:00
Ian Lance Taylor
b2d638c7ec 1999-08-18 Donn Terry <donn@interix.com>
* cofflink.c: Move definitions of N_TMASK, et. al., out of
	_bfd_coff_link_input_bfd into top level.
1999-08-19 00:55:50 +00:00
Nick Clifton
6e7d820549 only emit -mthumb-interowrk directive if really necessary. 1999-08-18 14:52:59 +00:00
Nick Clifton
50f4163fd6 If an offset is invalid, display it. 1999-08-18 09:12:11 +00:00
Ian Lance Taylor
00692651e0 1999-08-18 Donn Terry <donn@interix.com>
* coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
	(RTYPE2HOWTO): Return NULL if reloc type is out of range.
	(coff_i386_rtype_to_howto): Likewise.
	* coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
	Completely ignore symbols which are all zero.
	(dummy_reloc16_estimate): Add return 0.
	* cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
	variable copy to name_copy to avoid shadowing outer scope
	variable.
	* libcoff-in.h (coff_data_type): Change raw_syment_count field
	from unsigned int to unsigned long.  Add timestamp field.
	* libcoff.h: Rebuild.

Also comment changes.
1999-08-18 06:00:13 +00:00
Ian Lance Taylor
7bb9db4d63 comment changes from Donn Terry, and indentation changes 1999-08-18 05:59:47 +00:00
Ian Lance Taylor
f994ccccd3 add comment from Donn Terry 1999-08-18 05:58:46 +00:00
Ian Lance Taylor
f589a541dc * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to
handle 0xffffNNNN constants correctly.
1999-08-17 18:26:49 +00:00
Ian Lance Taylor
2190b5a5a8 1999-08-17 H.J. Lu <hjl@gnu.org>
* gas/elf/elf.exp: Expected to fail on alpha*-*-*.
1999-08-17 07:59:00 +00:00
Ian Lance Taylor
5be8a006bb 1999-08-17 H.J. Lu <hjl@gnu.org>
* ld-cdtest/cdtest-foo.cc (Foo::init_foo): Use "%ld" for sizeof.
1999-08-17 07:56:29 +00:00
Ian Lance Taylor
1396cd2d7f 1999-08-17 H.J. Lu <hjl@gnu.org>
* elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
	macro definition.
1999-08-17 07:53:37 +00:00
Ian Lance Taylor
0035bd7bda * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
for special section symbols.
	* elflink.h (elf_merge_symbol): If we have no old BFD, check
	BSF_DYNAMIC on the section symbol to see whether the old BFD is
	dynamic.
1999-08-17 07:50:30 +00:00
Jason Molenda
c31fd3fe9f These files removed in the 1999-08-16 snapshot. 1999-08-16 20:02:19 +00:00
Jason Molenda
7be570e7ce import gdb-1999-08-16 snapshot 1999-08-16 19:57:19 +00:00
Jason Molenda
ed288bb597 This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
1999-08-16 19:57:18 +00:00
Jason Molenda
d18570046c import gdb-1999-08-16 snapshot 1999-08-16 19:57:18 +00:00
Jason Molenda
041d852c03 import gdb-1999-08-16 snapshot 1999-08-16 19:54:17 +00:00
Nick Clifton
114502711b Look for register conflicts on stores as well as loads. 1999-08-16 17:47:29 +00:00
Mark Mitchell
8535d39cc8 * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
coincidence of variable names between old and new code.
1999-08-15 22:56:21 +00:00
Nick Clifton
276b1dc2a2 Only pass positive values to validate_offset_imm() 1999-08-13 08:38:20 +00:00
Nick Clifton
ae5ad4adf9 Tidy up formatting.
Fix Thubm weak function support.
1999-08-12 10:32:42 +00:00
Nick Clifton
bcbdc74cb2 Fix interworking problems. 1999-08-12 08:37:15 +00:00
Jeff Law
183df869b6 Fix typo. 1999-08-11 18:15:39 +00:00
Alan Modra
bf6d389561 config/tc-i386.c: Remove dead code 1999-08-11 14:10:07 +00:00
Nick Clifton
230801466a Check for overflow on R_ARM_PC24 relocs. 1999-08-11 10:56:35 +00:00
Jeff Law
b100be6695 * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section
flags for the unwind subspace.
1999-08-11 09:41:28 +00:00
Jeff Law
052e120f44 * elf-hppa.h (elf_hppa_fake_sections): New function.
* elf32-hppa.c (elf_backend_fake_sections): Define.
1999-08-11 09:30:20 +00:00
Nick Clifton
0811443ae7 Fix typo in defintion of OUTPUT_FORMAT. 1999-08-11 09:21:38 +00:00
Nick Clifton
2f1386ccf7 remove bigus code. 1999-08-11 08:57:44 +00:00
Jeff Law
3a9acac86a * elf-hppa.h (elf_hppa_final_write_processing): Update for
recent changes to the arch_info structure.
1999-08-10 19:19:22 +00:00
Jeff Law
9100134ca0 Fix typos in last change. 1999-08-10 19:09:43 +00:00
Jeff Law
46031ca9e4 * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF.
(pa_build_unwind_subspace): Remove #if 0 wrapper.  Select a
        suitable relocation based on the size of the target's pointer.
        Always Use subsegment zero for the unwinders.
        (pa_level): Handle "2.0w".
1999-08-10 19:02:30 +00:00
Jeff Law
fc91f6585b * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
R_HPPA_SEGBASE and R_HPPA_SEGREL32.
        * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
        list.
1999-08-10 18:51:53 +00:00
Ian Lance Taylor
9c492adce5 From Wally Iimura <iimura@microunity.com>:
* dis-buf.c (buffer_read_memory): Rewrite expression to avoid
	overflow at end of address space.
	(generic_print_address): Use sprintf_vma.
1999-08-10 15:02:41 +00:00
Mark Mitchell
5499724a85 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
output DT_MIPS_GOTSYM.
	(_bfd_mips_elf_finish_dynamic_sections): Use the same value as
 	DT_MIPS_SYMTABNO if there are no global GOT symbols.
1999-08-10 06:43:11 +00:00
Mark Mitchell
7b1f123191 * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
prototype.  Handle local symbols.  Add commentary.
	(mips_elf_calculate_relocation): Adjust accordingly.
	(_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
	relocations.
1999-08-10 06:27:48 +00:00
Mark Mitchell
ce00621771 * elflink.h (elf_bfd_final_link): Tweak last change. 1999-08-10 06:22:57 +00:00
Mark Mitchell
b037af20d6 * elflink.h (elf_link_size_reloc_section): Use the counts in the
elf-section data to allocate just the right amount of relocation
	space.  Don't allocate the hash space twice.
	(elf_bfd_final_link): Calculate the amount of space to allocate in
	each relocation section.
1999-08-10 03:36:28 +00:00
Ian Lance Taylor
c363de4434 * Makefile.in (LDFLAGS): Define. 1999-08-10 03:33:09 +00:00
Ian Lance Taylor
9c9ef45f16 1999-08-09 Mark Elbrecht <snowball3@bigfoot.com>
* scripttempl/i386go32.sc: Handle g++ exception sections.
1999-08-10 03:07:46 +00:00
Jeff Law
432bdd91dd * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
64bit mode, generate a section relative relocation for a 32bit
        wide relocation.
        (elf_hppa_is_local_label_name): New function.
        * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted.  To be
        shared between 32bit and 64bit port.
1999-08-09 23:47:04 +00:00
Mark Mitchell
b944b044fb * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
R_MIPS_GOT16 and R_MIPS_CALL16.
	(mips_elf_got16_entry): Use mips_elf_high to calculate the value
	to use wheen looking for a preexisting GOT entry.
1999-08-09 22:45:39 +00:00
Jason Molenda
96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Ian Lance Taylor
10e80b4145 rebuild with patched automake 1999-08-09 20:22:04 +00:00
Jason Molenda
169f3bd8b5 1999-08-09 Jason Molenda (jsm@bugshack.cygnus.com)
* README-gdb, gdb/testsuite/gdb.c++/ref-types2.cc,
	gdb/testsuite/gdb.c++/ref-types2.exp, readline/MANIFEST.doc,
	readline/doc/inc-hist.texi:  Removed in the 1999-08-02 snapshot.
1999-08-09 19:26:28 +00:00
Joern Rennecke
0825afba5d * config/tc-d30v.c (write_2_short): Don't group repeat instructions
with the following instruction unless this was specified.
1999-08-09 19:04:27 +00:00
Nick Clifton
a3f779dbea Hans-Peter Nilsson <hp@bitrange.com>
* readelf.c (process_abbrev_section): Handle standard-conforming
	single zero at the end of the section.
1999-08-09 17:16:23 +00:00
Ian Lance Taylor
840a9995b3 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
	the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
	not binutils.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1999-08-09 15:07:32 +00:00
Ian Lance Taylor
b33b6e4569 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
* ld-elfvers/vers.exp: Run tests on sparc*-*-linux*.
	* ld-shared/shared.exp: Likewise.
1999-08-09 14:49:32 +00:00
Ian Lance Taylor
fe9edd2275 From Wally Iimura <iimura@microunity.com>:
* ldlang.c (lang_size_sections): When checking whether an address
	is within a region, don't get confused by wrapping around at the
	end of the address space.
1999-08-09 06:14:09 +00:00
Ian Lance Taylor
91d3970e7d 1999-08-09 Geoff Keating <geoffk@cygnus.com>
* elflink.h (elf_link_output_extsym): Don't output a weak
	reference to an undefined symbol just because it was defined weak
	in a shared object.
1999-08-09 05:42:31 +00:00
Ian Lance Taylor
75cd796a72 * objdump.c (exit_status): New static variable.
(nonfatal): New static function.
	(disassemble_data): Set exit_status on error.
	(read_section_stabs): Likewise.
	(display_bfd): Likewise.  Call nonfatal rather than bfd_nonfatal.
	(display_file): Call nonfatal rather than bfd_nonfatal.
	(display_target_list, display_info_table): Likewise.
	(main): Return exit_status rather than 0.
1999-08-09 05:23:29 +00:00
Ian Lance Taylor
1a1ae23e52 * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for
certain sections, to match BFD changes.
1999-08-09 04:42:15 +00:00
Ian Lance Taylor
171a4983e7 * gas/i386/float.s, gas/i386/float.l: Modify to work correctly
when gas uses 2**4 alignment for .text.
	* gas/i386/general.s, gas/i386/general.l: Likewise.
	* gas/i386/katmai.s, gas/i386/katmai.d: Likewise.
	* gas/i386/modrm.s, gas/i386/modrm.l: Likewise.
	* gas/i386/prefix.s, gas/i386/prefix.d: Likewise.
1999-08-09 04:41:00 +00:00
Ian Lance Taylor
e6bc794707 * binutils-all/objcopy.exp: Add setup_xfail for simple copy test
for i*86-*-msdos*.
1999-08-09 04:37:25 +00:00
Ian Lance Taylor
798c1fb8d7 1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
* coffgen.c (coff_find_nearest_line): When looking for file, use
	last best match rather than first.  If address is beyond last line
	number record, don't return the last line as the correct value.
1999-08-09 04:04:17 +00:00
Ian Lance Taylor
24c411edf7 * objdump.c (dump_section_header): Update for renaming of
SEC_SHORT to SEC_SMALL_DATA.  Print SEC_SHARED flag.
1999-08-09 03:23:37 +00:00
Ian Lance Taylor
667f51773f * ldlang.c (wild_doit): Update for renaming of SEC_SHORT to
SEC_SMALL_DATA.
1999-08-09 03:22:27 +00:00
Ian Lance Taylor
851edbafcc * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
* bfd-in2.h: Rebuild.
1999-08-09 03:20:31 +00:00
Ian Lance Taylor
5dccc1ddaa 1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
* libcoff-in.h (struct coff_section_alignment_entry): Define.
	* coffcode.h (coff_set_custom_section_alignment): New static
	function.
	(coff_section_alignment_table): New static array.
	(coff_new_section_hook): Use coff_set_customer_section_alignment.
	* coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* libcoff.h: Rebuild.
1999-08-09 02:56:16 +00:00
Ian Lance Taylor
dc8bc5a62a 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
* configure.in (i[3456]-*-mingw32*): Don't put gprof in
	noconfigdirs.
	(*-*-cygwin*): Likewise.
1999-08-08 23:32:46 +00:00
Ian Lance Taylor
81afc8460e 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
* Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT).
	(EXTRA_SCRIPTS): Define to keep automake happy.
1999-08-08 23:31:18 +00:00
Ian Lance Taylor
9d51cc66fb From Eli Zaretskii <eliz@gnu.org>:
* binutils.texi: Document cxxfilt as MS-DOS name for c++filt.
1999-08-08 18:18:11 +00:00
Ian Lance Taylor
8a9659466d * configure.in: Define and substitute DEMANGLER_NAME.
* Makefile.am (DEMANGLER_PROG): Set to cxxfilt.
	(man_MANS): Use DEMANGLER_NAME rather than DEMANGLER_PROG.
	(bin_PROGRAMS): Remove $(DEMANGLER_PROG).
	(noinst_PROGRAMS): Add $(DEMANGLER_PROG).
	(cxxfilt_SOURCES): Rename from c__filt_SOURCES.
	(cxxfilt_LDADD): Rename from c__filt_LDADD.
	($(DEMANGLER_NAME).1): Rename from $(DEMANGLER_PROG).1.  Use
	DEMANGLER_NAME rather than DEMANGLER_PROG in substitution.
	(MOSTLYCLEANFILES): Use DEMANGLER_NAME rather than
	DEMANGLER_PROG.
	(install-exec-local): When installing noinst_PROGRAMS, change
	cxxfilt to $(DEMANGLER_NAME).
	* configure, Makefile.in: Rebuild.
1999-08-08 18:09:48 +00:00
Ian Lance Taylor
04ad15439a * Makefile.am: Rename .dep* files to DEP*.
(MKDEP): Rename from DEP.  Change all uses.  Use $${srcdir} rather
	than $(srcdir).  Rename TCDEP targets to DEPTC.  Rename OBJDEP
	targets to DEPOBJ.
	* Makefile.in: Rebuild.
1999-08-08 17:48:38 +00:00
Ian Lance Taylor
71141bb60f * mkdep: New file.
* Makefile.in (GAS_SUPPORT_DIRS): Add mkdep.
	(BINUTILS_SUPPORT_DIRS): Add mkdep.
1999-08-08 17:46:02 +00:00
Ian Lance Taylor
f4162f5cef * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
MKDEP.  Rebuild dependencies.
	* Makefile.in: Rebuild.
1999-08-08 17:37:50 +00:00
Ian Lance Taylor
c278c1507b * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
MKDEP.
	* Makefile.in: Rebuild.
1999-08-08 17:34:16 +00:00
Ian Lance Taylor
73c418f421 * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
MKDEP.  Rebuild dependencies.
	* Makefile.in: Rebuild.
1999-08-08 17:31:00 +00:00
Richard Henderson
1eb7027ca2 * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg. 1999-08-08 17:27:23 +00:00
Ian Lance Taylor
74eeebeafb * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
MKDEP.
	* Makefile.in: Rebuild.
1999-08-08 17:26:50 +00:00
Ian Lance Taylor
46eec08e57 * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to
avoid problems on DOS filesystems.
	* Makefile.in: Rebuild.
1999-08-08 17:08:00 +00:00
Ian Lance Taylor
2dcc60be2b * doc/as.texinfo (Section): Document 's' flag for COFF version.
1999-08-08  Mumit Khan  <khan@xraylith.wisc.edu>

	* config/obj-coff.c (obj_coff_section): Handle 's' (shared)
	section flag.
1999-08-08 16:53:30 +00:00
Ian Lance Taylor
bd826630b1 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
* section.c (SEC_SHARED): Define.
	* coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
	(styp_to_sec_flags): Likewise.
	* peicode.h (coff_swap_scnhdr_out): Likewise.
	* bfd-in2.h: Rebuild.

1999-08-08  Ian Lance Taylor  <ian@zembu.com>

	* coffcode.h (coff_classify_symbol): Comment out part of
	1999-08-05 change which breaks cygwin DLLs.
1999-08-08 16:50:27 +00:00
Ian Lance Taylor
153b546a7a comment additions 1999-08-08 16:04:36 +00:00
Ian Lance Taylor
855b0be7f7 * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
* aclocal.m4, configure: Rebuild.
1999-08-08 16:01:13 +00:00
Ian Lance Taylor
76a279225c * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT
line to crate ${GDBINIT} rather than .gdbinit.
	* configure, Makefile.in, doc/Makefile.in: Rebuild.
1999-08-08 15:56:55 +00:00
Ian Lance Taylor
6ca3858e7c From Eli Zaretskii <eliz@is.elta.co.il>:
* configure (tmpfile): Change cONf$$ to cNf$$ to avoid an overly
	long file name when using DJGPP on MS-DOS.
1999-08-08 15:36:13 +00:00
Ian Lance Taylor
ae97059cc1 1999-08-08 Jakub Jelinek <jj@ultra.linux.cz>
* configure.host (sparc-*-linux-gnu*): New host.
	(sparc64-*-linux-gnu*): New host.
1999-08-08 15:30:08 +00:00
Ian Lance Taylor
3d9f627799 * lexsup.c (is_num): Reindent.
(parse_args): Mention program name in error message.
1999-08-06 23:33:33 +00:00
Ian Lance Taylor
22bc497dda * section.c (global_syms): Only initialize union field if
__STDC__.
1999-08-06 23:31:14 +00:00
Ian Lance Taylor
597e25914e * emultempl/ostring.sed: Rename from stringify.sed.
* emultempl/astring.sed: New file.
	* Makefile.am (stringify.sed): New target.
	(GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to
	stringify.sed.
	* configure.in: Define and substitute STRINGIFY.
	* emultempl/*.em: Use stringify.sed from build directory rather
	than source directory.
	* emultempl/elf32.em: Use stringify.sed rather than inline sed
	script.
	* emultempl/gld960.em, emultempl/gld960c.em: Likewise.
	* emultempl/hppaelf.em, emultempl/linux.em: Likewise.
	* emultempl/lnk960.em, emultempl/sunos.em: Likewise.
	* configure, Makefile.in: Rebuild.
1999-08-06 22:46:03 +00:00
Ian Lance Taylor
4a607dcc2c From Brad Lucier <lucier@math.purdue.edu>:
* corefile.c (core_create_line_syms): Add cast for printf.
1999-08-06 18:57:53 +00:00
Jeff Law
0741736bf6 * config/tc-hppa.c (pa_ip, case '?'): Add missing break. 1999-08-06 18:13:31 +00:00
Jeff Law
5696871a98 * hppa.h (pa_opcodes): Add 64 bit versions of or, xor, and,
and andcm.  Add 32 and 64 bit version of cmpclr, cmpiclr.
1999-08-06 16:03:53 +00:00
Jeff Law
b333b6c6d3 * hppa-dis.c (compare_cond_64_names, cmpib_cond_64_names,
add_cond_64_names, wide_add_cond_names, logical_cond_64_names,
        unit_cond_64_names, shift_cond_64_names, bb_cond_64_names): New.
        (print_insn_hppa): Add 64 bit condition completers.
1999-08-06 15:50:21 +00:00
Jeff Law
7d62725820 * hppa.h: Document 64 bit condition completers. 1999-08-06 15:49:29 +00:00
Jeff Law
9a913dfbfb * config/tc-hppa.c (pa_ip): Add 64 bit condition completers. 1999-08-06 15:48:42 +00:00
Ian Lance Taylor
a1f2d7424f 1999-08-06 Jakub Jelinek <jj@ultra.linux.cz>
* config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local
	non-adjustable symbols.
1999-08-06 14:02:34 +00:00
Mark Mitchell
4f2860cafc * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
the size of a GOT entry here.
	(mips_elf_calculate_relocation): Don't create a local GOT entry
	for the symbol in a GOT16 relocation; just for it's high-order bit
	(_bfd_mips_elf_relocate_section): Fix thinko.
1999-08-06 02:44:41 +00:00
Jeff Law
feb129926a * hppa-dis.c (print_insn_hppa): Change condition args to use
'?' prefix.
1999-08-05 23:02:01 +00:00
Jeff Law
c5e5291642 * hppa.h (pa_opcodes): Change condition args to use '?' prefix. 1999-08-05 22:58:08 +00:00
Jeff Law
55a914bc48 * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix. 1999-08-05 22:56:06 +00:00
Joern Rennecke
336f7c7060 Fix year. 1999-08-05 22:19:17 +00:00
Joern Rennecke
5fc44b2d43 * config/tc-sh.c (md_assemble): Call as_bad when there are excess
operands.
1999-08-05 22:09:04 +00:00
Ian Lance Taylor
c1687039eb Revert last patch to xmalloc.c, and instead bring over this patch from
egcs:
Thu Apr 15 23:00:55 1999  Mumit Khan  <khan@xraylith.wisc.edu>

	* configure.in (checkfuncs): Check for sbrk.
	* config.in: Rebuilt.
	* configure: Likewise.
	* xmalloc.c: Use HAVE_SBRK instead of the host specific definitions.
1999-08-05 21:15:29 +00:00
Ian Lance Taylor
5d54c62870 Based on patches from Donn Terry <donn@interix.com>:
* coffcode.h (enum coff_symbol_classification): Define.
	(bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
	_bfd_coff_classify_symbol.  Change return type.
	(bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
	(coff_slurp_symbol_table): Use coff_classify_symbol.
	(coff_classify_symbol): New static function.
	(coff_sym_is_global): Never define.
	(bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
	* cofflink.c (coff_link_check_ar_symbols): Use
	bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
	(coff_link_add_symbols): Likewise.
	(_bfd_coff_link_input_bfd): Likewise.
	* coff-sh.c (bfd_coff_small_swap_table): Initialize with
	coff_classify_symbol.
	* libcoff.h: Rebuild.
1999-08-05 21:01:37 +00:00
Ian Lance Taylor
1198f921ae * xmalloc.c: Control all uses of SBRK with a single define,
USE_SBRK.  Don't define it if __INTERIX.
1999-08-05 16:22:42 +00:00
Ian Lance Taylor
a7e78dae79 1999-08-05 Donn Terry <donn@interix.com>
* emulparams/i386pe.sh: Define ENTRY, SUBSYSTEM, and
	INITIAL_SYMBOL_CHAQR.
	* emulparams/i386pe_posix.sh: New file.
	* Makefile.am (YACC): If bison is not in the source tree, use
	@YACC@ rather than bison -y.
	(LEX): If flex is not in the source tree, use @LEX@ rather than
	flex.
	(ALL_EMULATIONS): Add ei386pe_posix.o.
	(ei386pe_posix.c): New target.
	* configure.tgt (i[3456]86-*-interix*): New target.
	* configure.host (i[3456]86-pc-interix*): New host.
	* Makefile.in: Rebuild.
1999-08-05 16:03:56 +00:00
Ian Lance Taylor
9750fcc502 1999-08-05 Donn Terry <donn@interix.com>
* config/te-interix.h: New file.
	* configure.in (i386-*-interix*): New target.
	* configure: Rebuild.
1999-08-05 15:41:31 +00:00
Ian Lance Taylor
7a7b06ef3d 1999-08-05 Donn Terry <donn@interix.com>
* Makefile.am (YACC): If bison is not in the source tree, use
	@YACC@ rather than bison -y.
	(LEX): If flex is not in the source tree, use @LEX@ rather than
	flex.
	* configure.in: Build dlltool for i[3-6]86-*-interix.
	* Makefile.in, configure: Rebuild.
1999-08-05 15:35:10 +00:00
Jeff Law
1560fbe45e * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
(e_ltpsel, e_rtpsel): Similarly.
1999-08-05 03:50:28 +00:00
Jeff Law
3686090072 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
and 14bit ertpsel.  Handle 64bit psel.
1999-08-05 00:12:22 +00:00
Jeff Law
39ba556164 * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte
selectors for ELF too.
        (selector_table): Add "ltp" and "rtp" selectors.
1999-08-05 00:09:42 +00:00
Mark Mitchell
e7c4421855 * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
handling for REL relocations.  And only left-shift R_MIPS26
	relocation addends where necessary.
1999-08-04 16:32:34 +00:00
Alan Modra
eecb386cd7 Support for gcc to generate 16-bit i386 code. (.code16gcc) 1999-08-04 10:07:41 +00:00
Mark Mitchell
23b255aadd * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
(mips_elf_next_lo16_relocation): Don't compute the addend here.
	Just return the relocation found.
	(mips_elf_relocate_section): Pull the LO16 addend out of the
	section itself when using REL relocations.
1999-08-04 03:52:59 +00:00
Mark Mitchell
3811169e5f * elf32-mips.c (mips_elf_calculate_relocation): Restore
_DYNAMIC_LINK handling and handling of undefined symbols in shared
	libraries.
1999-08-03 16:58:26 +00:00
Ian Lance Taylor
18069efc88 * emulparams/elf32ppc.sh (MAXPAGESIZE): Change to 0x10000.
* emulparams/elf32ppclinux.sh (MAXPAGESIZE): Likewise.
1999-08-03 16:47:16 +00:00
Ian Lance Taylor
2d14625061 * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
value of a symbol in a SEC_DEBUGGING section.  Warn when doing a
	relocation against a symbol in an input section with no output
	section.  From Daniel Jacobowitz <drow@false.org>.
1999-08-03 16:40:25 +00:00
Ian Lance Taylor
cb94091feb * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used. 1999-08-03 16:31:37 +00:00
Ian Lance Taylor
aab0843134 * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
look for generated file correctly.
	* aclocal.m4, configure: Rebuild.
1999-08-03 16:10:38 +00:00
Ian Lance Taylor
08372f1427 * floatformat.c: Add casts to avoid signed/unsigned warnings.
* pexecute.c: Add ATTRIBUTE_UNUSED as needed on Unix.
1999-08-03 16:00:39 +00:00
Ian Lance Taylor
19c33eebb1 * Makefile.in (install_to_libdir): Change $(TARGETLIB).n to
$(TARGETLIB)n so it works on MSDOS.
	(install_to_tooldir): Likewise.
1999-08-03 16:00:16 +00:00
Ian Lance Taylor
f7cc0a4d91 1999-08-03 H.J. Lu <hjl@gnu.org>
* Makefile.am (ALL_EMULATIONS): Remove ego32.o.
	(ego32.c): Remove.
	* Makefile.in: Rebuild.
1999-08-03 15:34:40 +00:00
Ian Lance Taylor
a04b544b56 * config/obj-coff.c (coff_frob_symbol): Always update set_end with
next_set_end even if the end symbol is being discarded.

	* gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER.
	* output-file.c, symbols.c, config/tc-i386.c: Likewise.
	* config/obj-coff.c: Likewise.
	(seg_info_type): Remove.
	(seg_info_off_by_4): Change to array of segT.
	(s_get_segment): Adjust accordingly.
	(obj_pseudo_table): Fully initialize sentinel entry.
1999-08-03 15:29:04 +00:00
Ian Lance Taylor
f173e82ec8 * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From
Ralf Baechle <ralf@uni-koblenz.de>.
1999-08-03 15:22:38 +00:00
Alan Modra
24eab124bd Rationalize some of the i386 intel mode code.
Indentation and white space changes.
1999-08-03 14:30:05 +00:00
Mark Mitchell
05fad94de0 Fix typo 1999-08-03 06:06:47 +00:00
Mark Mitchell
5a44662b54 * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
and R_MIPS16_26 relocations correctly when relocating.
	(_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
	and R_MIPS_CALL_LO16 are for global symbols.
1999-08-03 06:04:21 +00:00
Alan Modra
c3332e24e8 * config/tc-i386.c: Add INFER_ADDR_PREFIX code. Fix 16 bit mode nop. 1999-08-03 05:47:26 +00:00
Jason Molenda
a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda
c862e87b3e import gdb-1999-08-02 snapshot 1999-08-02 23:48:02 +00:00
Jason Molenda
30727aa6d1 This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
1999-08-02 23:48:02 +00:00
Richard Henderson
1fa0ddb30b Jakub Jelinek <jj@ultra.linux.cz>
* elflink.h (elf_bfd_final_link): Copy the whole isym, not just
        some fields.
        * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
        variables and initialize them.
1999-08-02 22:31:18 +00:00
Mark Mitchell
7a12753dad Fix typo 1999-08-01 22:45:06 +00:00
Mark Mitchell
8b237a8965 * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
there are no global symbols requiring GOT entries.
	(_bfd_mips_elf_size_dynamic_sections): Likewise.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
1999-08-01 22:38:53 +00:00
Mark Mitchell
972875741c * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
symbols are considered to have the value zero.
	(_bfd_mips_elf_relocate_section): Don't try to perform a
	relocation for an undefined symbol.
	(_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
	GOT16 relocations.
1999-08-01 20:58:19 +00:00
Richard Henderson
a11c78e7dd Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
        wants ba,a,pt %xcc instead of %icc.
        Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
        of large PLT entries.
        (sparc64_elf_plt_ptr_offset): Fix calculation.
        (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
        addend should be relative to load address, not .plt section start.
        (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
1999-07-30 21:42:21 +00:00
Richard Henderson
6d8809aa62 Jakub Jelinek <jj@ultra.linux.cz>
* config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option.
        (sparc_ip): Warn if %g2 or %g3 register is used and not covered
        by .register pseudo-op if -64 and --no-undeclared-regs.
        (s_register, sparc_adjust_symtab): New functions.
        * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab):
        Declare sparc_adjust_symtab as tc_adjust_symtab.
        * doc/c-sparc.texi: Add description of #ignore special literal
        for .register pseudo-op.
1999-07-30 21:39:53 +00:00
Richard Henderson
587ff49e9a Jakub Jelinek <jj@ultra.linux.cz>
* elf-bfd.h (struct elf_backend_data): Add
        print_symbol_all and output_arch_syms backend methods.
        * elfxx-target.h: Likewise.
        * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
        sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
        sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
        functions.
        (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
        symbols in .dynsym, add their names into .dynstr. Put those symbols
        into dynlocal.
        (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
        pointers to STT_REGISTER symbols in dynsym section.
        (sparc64_elf_print_symbol_all): New function.
        * elf.c (bfd_elf_print_symbol): Allow special backend symbol
        printing using the print_symbol_all hook.
1999-07-30 21:34:44 +00:00
Catherine Moore
d512aa072e Correctly handle Vtentry relocs. 1999-07-30 15:09:54 +00:00
Catherine Moore
c8d259f7df Fix up vtable entry relocs 1999-07-30 15:08:39 +00:00
Alan Modra
2735a32765 * Makefile.in (check-target-libio): Remove all-target-libstdc++
dependency as this causes "make check" to globally "make all"
1999-07-30 07:40:51 +00:00
Richard Henderson
441d6d7953 * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
dynamic_sections_created.
1999-07-29 22:20:26 +00:00
Richard Henderson
c9b3cbf33c * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
(mips_rtype_to_howto): ... new function.
        (_bfd_mips_elf_relocate_section): Use it.
1999-07-29 21:39:01 +00:00
Alan Modra
b77ad1d4c9 Fix an overflow checking bug uncovered when a 32 bit target is compiled
with a 64 bit bfd.
1999-07-28 23:19:26 +00:00
Jeff Law
25ef477f61 Fix oops. 1999-07-28 10:36:38 +00:00
Jeff Law
3ea80b3388 * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
code.
1999-07-28 10:36:10 +00:00
Jeff Law
88a380f31e * hppa.h (pa_opcodes): Add "pushnom" and "pushbts".
* hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
1999-07-28 10:31:15 +00:00
Mark Mitchell
b89db8f2f0 * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo. 1999-07-28 08:19:34 +00:00
Nick Clifton
38e31547d1 Notice multlib switches. 1999-07-28 08:18:22 +00:00
Jeff Law
b53fcc20b1 * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code
processing.
1999-07-28 08:07:14 +00:00
Jeff Law
d60e8dcabe * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
and fmpynfadd to use 'J' and 'K' instead of 'E' and 'X'.
1999-07-28 08:06:30 +00:00
Ian Lance Taylor
d2e71411fe * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or
VTABLE relocations.
1999-07-27 19:26:39 +00:00
Nick Clifton
f81112823f Change to strip out only symbols that start with LOCAL_LABEL_PREFIX followed
by 'L'.
1999-07-27 14:45:44 +00:00
Alan Modra
6812da59f2 Tweak for when --enable-targets includes 64-bit bfd target. 1999-07-27 11:43:20 +00:00
Jason Molenda
5a2468f5c5 import gdb-1999-07-26 snapshot 1999-07-27 00:51:29 +00:00
Ian Lance Taylor
7fd9c19135 1999-07-23 Donn Terry <donn@interix.com>
* libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
	field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
	* cofflink.c (coff_link_add_symbols): If PE, handle section
	symbols specially.
	* libcoff.h: Rebuild.
1999-07-24 03:16:50 +00:00
Ian Lance Taylor
7d923127c0 1999-07-23 Donn Terry <donn@interix.com>
* config.bfd (i[3456]86-*-interix*): New target.
1999-07-24 02:35:30 +00:00
Ian Lance Taylor
08d836d6bb * Makefile.in (binutils.tar.bz2): Don't pass makeall.bat and
configure.bat in SUPPORT_FILES.
	(gas+binutils.tar.bz2): Likewise.

	* makeall.bat: Remove; obsolete.
1999-07-23 00:56:28 +00:00
Nick Clifton
5fa803d337 Philip Blundell <pb@nexus.co.uk>
* emulparams/armelf_linux26.sh (DATA_START_SYMBOLS): Define.
	(OTHER_BSS_SYMBOLS, OTHER_BSS_END_SYMBOLS): Likewise.
	* emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Define.

	* configure.tgt (arm*-*-uclinux*, thumb-*-uclinux*,
	thumb-*-linux-gnu*): New targets.
1999-07-22 12:51:45 +00:00
Ian Lance Taylor
5a1bd109d4 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
* scripttempl/i386go32.sc: Add handling of linkonce sections.
1999-07-22 01:42:27 +00:00
Ian Lance Taylor
e9f56b1d20 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
* config/te-go32.h (COFF_LONG_SECTION_NAMES): Define.
1999-07-22 01:41:00 +00:00
Ian Lance Taylor
242eabea02 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
* coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
	COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
	.gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
	* coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
	(COFF_SUPPORT_GNU_LINKONCE): Define.
	* coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
	(COFF_SUPPORT_GNU_LINKONCE): Define.
1999-07-22 01:39:23 +00:00
Ian Lance Taylor
b4089fdd75 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
* emulparams/go32.sh: Remove; obsolete.
	* scripttempl/go32coff.sc: Remove; obsolete.
1999-07-22 01:25:10 +00:00
Ian Lance Taylor
8f36e47c10 From Mark Elbrecht:
* configure.bat: Remove; obsolete.
1999-07-22 01:16:49 +00:00
Ian Lance Taylor
980e4bf7fe From Mark Elbrecht:
* configure.bat: Remove; obsolete.
1999-07-22 01:07:15 +00:00
Ian Lance Taylor
1a39f480d3 From Mark Elbrecht:
* configure.bat: Remove; obsolete.
	* config/go32.cfg: Likewise.
1999-07-22 00:59:07 +00:00
Ian Lance Taylor
9c8ac5a997 From Mark Elbrecht:
* makefile.dos: Remove; obsolete.
1999-07-22 00:55:12 +00:00
Ian Lance Taylor
b23b8e6e55 rebuild 1999-07-22 00:51:51 +00:00
Ian Lance Taylor
957ccf4406 1999-07-21 H.J. Lu <hjl@gnu.org>
* config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
1999-07-22 00:51:11 +00:00
Ian Lance Taylor
41d390a7ac 1999-07-21 H.J. Lu <hjl@gnu.org>
* configure.tgt (mips*el-*-vxworks*): New target.

1999-07-21  Brad M. Garcia  <bgarcia@fore.com>

	* configure.tgt (i[3456]86-*-vxworks*): New target.
1999-07-22 00:49:09 +00:00
Ian Lance Taylor
29fe79d3a8 1999-07-21 Brad M. Garcia <bgarcia@fore.com>
* configure.in (i386-*-vxworks*): New target.
	* configure: Rebuild.
1999-07-22 00:46:39 +00:00
Ian Lance Taylor
0cd9f5f03b 1999-07-21 H.J. Lu <hjl@gnu.org>
* ld-elfvers/vers1.c: Add missing prototypes and include
	<stdio.h> if necessary.
	* ld-elfvers/vers15.c: Likewise.
	* ld-elfvers/vers19.c: Likewise.
	* ld-elfvers/vers2.c: Likewise.
	* ld-elfvers/vers3.c: Likewise.
	* ld-elfvers/vers4.c: Likewise.
	* ld-elfvers/vers6.c: Likewise.
	* ld-elfvers/vers7.c: Likewise.
	* ld-elfvers/vers9.c: Likewise.
	* ld-shared/main.c: Likewise.
	* ld-srec/sr3.cc (Foo::Foo): Remove arg name.
1999-07-22 00:40:34 +00:00
Ian Lance Taylor
75987f837d 1999-07-21 Philippe De Muyter <phdm@macqel.be>
* cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
	message	and fail if a symbol index is out of range.
1999-07-22 00:29:35 +00:00
Ian Lance Taylor
0691c3ca1f 1999-07-21 H.J. Lu <hjl@gnu.org>
* binutils-all/testprog.c: Include <stdio.h>.
1999-07-22 00:20:30 +00:00
Ian Lance Taylor
2841ecd078 * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
when looking at a R_MIPS_GOT16 relocation.
1999-07-21 23:32:29 +00:00
Doug Evans
7c83b342ee * ldlang.c (lang_gc_sections): Only handle the start symbol
specially if there is one.
1999-07-20 22:27:31 +00:00
Nick Clifton
8a70eff3a2 Use CREATE_BIG_COFF_TARGET_VEC 1999-07-20 08:52:54 +00:00
Jason Molenda
97ab6f9f4b 1999-07-19 Jason Molenda (jsm@bugshack.cygnus.com)
* a1-selftest.exp, pointers2.c, pointers2.exp: These files were
	renamed as of this snapshot.
1999-07-19 23:32:44 +00:00
Jason Molenda
adf40b2e16 import gdb-1999-07-19 snapshot 1999-07-19 23:30:11 +00:00
Jason Molenda
c95b01a9b0 import gdb-1999-07-19 snapshot 1999-07-19 23:29:27 +00:00
Jason Molenda
dc9e099fc0 This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
1999-07-19 23:29:27 +00:00
Mark Mitchell
0ca638235f * emulparams/elf32bmipn32.sh (OTHER_RELOCATING_SECTIONS): Add
.MIPS.events and .MIPS.content handling.
	* emulparams/elf64bmip.sh (OTHER_RELOCATING_SECTIONS): Likewise.
1999-07-19 20:21:52 +00:00
Mark Mitchell
f1a5f37efe Fix typo in last change. 1999-07-19 20:11:22 +00:00
Mark Mitchell
0db63c1868 * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
removed in previous change.
	(_bfd_mips_elf_relocate_section): Adjust GP relative relocations
 	in relocateable output.
1999-07-19 20:06:24 +00:00
Ian Lance Taylor
272dc76f04 * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
structure.
1999-07-19 19:22:02 +00:00
Ian Lance Taylor
accc7f6940 * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
if they appear to be specially created by the linker.
1999-07-19 19:08:33 +00:00
Nick Clifton
e50d80767c Improve selection of output format 1999-07-19 14:57:03 +00:00
Nick Clifton
c3c89269f8 Add new field to bfd_target structure.
Initialise this field for all known bfd targets.
Add new search function to targets.c
1999-07-19 14:55:16 +00:00
Andreas Schwab
a9602746fa * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
and rel_hdr.
1999-07-19 09:11:14 +00:00
Mark Mitchell
31367b81b7 * elflink.h (elf_link_adjust_relocs): New function.
(elf_bfd_final_link): Use it.
	(elf_link_input_bfd): Deal with the fact that there can be
	two relocation sections for a single section.
	(elf_reloc_link_order): Likewise.

	* elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
	a relocateable object.
	(_bfd_mips_elf_relocate_section): Handle relocateable links.
1999-07-18 06:31:29 +00:00
Nick Clifton
c2c594b87d Rename F_SOFTFLOAt to F_SOFT_FLOAT for compatability with include/elf/arm.h 1999-07-17 15:40:17 +00:00
Richard Henderson
e76d716a43 * emulparams/elf64_sparc.sh: Add 64-bit directories to native LIB_PATH. 1999-07-16 21:43:43 +00:00
Richard Henderson
d07faca298 Jakub Jelinek <jj@ultra.linux.cz>
* readelf.c (get_machine_flags): Print EF_SPARC_SUN_US3.
1999-07-16 21:38:16 +00:00
Richard Henderson
97272b323d Jakub Jelinek <jj@ultra.linux.cz>
* sparc.h (EF_SPARC_SUN_US3): Define in Cheetah extensions
        flag (as per SCD2.4.1).
1999-07-16 21:36:38 +00:00
Richard Henderson
e06510e6e7 Jakub Jelinek <jj@ultra.linux.cz>
* doc/c-sparc.texi: Document .register and .nword pseudo-ops.
1999-07-16 21:32:18 +00:00
Richard Henderson
dabe3bbc57 Jakub Jelinek <jj@ultra.linux.cz>
* config/tc-sparc.c (sparc_ip): Allow OLO10 relocations
        on -64 and not pic.
        (output_insn): Put OLO10's secondary addend into tc_fix_data.
        (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10.
        (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13.
        * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE,
        MAX_RELOC_EXPANSION): Define.
        (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise.
1999-07-16 21:30:35 +00:00
Richard Henderson
f65054f7be Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
        (sparc64_elf_get_reloc_upper_bound,
        sparc64_elf_get_dynamic_reloc_upper_bound,
        sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
        sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
        New functions.
        (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
        ELF64_R_TYPE_ID/DATA where appropriate.
1999-07-16 21:28:40 +00:00
Richard Henderson
437d5cf011 Jakub Jelinek <jj@ultra.linux.cz>
* sparc.h (ELF64_R_TYPE_DATA): Only use ELF64_R_TYPE bits, not
        ELF64_R_SYM bits.
1999-07-16 21:26:39 +00:00
Richard Henderson
d6bcbdc1fe Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
        DT_SPARC_PLTFMT.
1999-07-16 21:25:28 +00:00
Ian Lance Taylor
6387d6028b * elf32-mips.c (mips_elf_local_relocation_p): New static
function.
	(mips_elf_next_lo16_addend): Call bfd_set_error on failure.
	(mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
	Always set *require_jalxp.
	(mips_elf_stub_section_p): Mark abfd parameter as unused.
	(_bfd_mips_elf_relocate_section): Only look for LO16 following
	GOT16 if the GOT16 is against a local symbol.  Don't return false
	for an undefined symbol.  If there is an overflow, assert that we
	have a name.
1999-07-16 19:09:22 +00:00
Alan Modra
b4cac588ae * gas/config/tc-i386.c: Fix for immediates and displacements in 16-bit
mode when no insn suffix present, eg. push $0x12345678.  Fix some
compiler warnings.  Disallow immediate jump absolute.
1999-07-16 11:09:15 +00:00
Andreas Schwab
318da145ed * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
variables `link' and `elfsec'.
	(elf_bfd_final_link): Remove unused variable `os'.
1999-07-16 08:10:27 +00:00
Mark Mitchell
d49560a9c3 * ld-undefined/undefined.exp: XFAIL on IRIX6 for the usual as
with other DWARF2 targets.
1999-07-15 17:02:34 +00:00
Mark Mitchell
435394bff7 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
a PT_PHDR program headers.
	(_bfd_mips_elf_final_link): Don't assume there are going to be
	section symbols when we're not building a shared object.
	(_bfd_mips_elf_check_relocs): Make sure we have a GOT when
	we need one.
1999-07-15 16:57:57 +00:00
Mark Mitchell
88659ef5b6 * configure.host: Set up HOSTING_CRT0 and HOSTING_LIBS for IRIX6. 1999-07-15 14:57:35 +00:00
Ian Lance Taylor
ac352105e1 1999-07-15 J.T. Conklin <jtc@redback.com>
* config.bfd (i[3456]86-*-vxworks*): New target.
1999-07-15 14:38:23 +00:00
Mark Mitchell
197b9ca0f9 * elf32-mips.c (mips_elf_stub_section_p): New function.
(mips_elf_calculate_relocation): Handle MIPS16 stub functions.
	(mips_elf_relocate_section): Adjust calling sequence for
	mips_elf_calculate_relocation and mips_elf_perform_relocation.
	(mips_elf_perform_relocation): Turn `jal' into `jalx' where
	required.
1999-07-15 13:12:02 +00:00
Ian Lance Taylor
fb57846b1e * configure.in: Bump version number to 2.9.5.
* configure: Rebuild.
1999-07-15 12:15:17 +00:00
Ian Lance Taylor
2844ed430f * configure.in: Bump version number to 2.9.5.
* configure: Rebuild.
1999-07-15 12:09:55 +00:00
Ian Lance Taylor
0ed1584392 * configure.in: Bump version number to 2.9.5.
* configure: Rebuild.
1999-07-15 11:58:23 +00:00
Ian Lance Taylor
3a6ae6163b * configure.in: Bump version number to 2.9.5.
* configure: Rebuild.
1999-07-15 11:48:14 +00:00
Ian Lance Taylor
966ed0b4d8 * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long
or %llx work.
1999-07-15 11:27:08 +00:00
Jeff Law
6e2bf930a0 è
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
        64bit format.
        (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
        to derive final type instead of hardwiring a selection.
1999-07-15 02:06:03 +00:00
Jeff Law
1b83fcb388 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
64bit format.
        (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
        to derive final type instead of hardwiring a selection.
1999-07-15 02:06:02 +00:00
Jeff Law
077db52a1e d
* config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op.
        (cons_fix_new_hppa): Derive size of fixup from size of the object.
1999-07-15 01:49:48 +00:00
Jeff Law
67f1cff00c * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op.
(cons_fix_new_hppa): Derive size of fixup from size of the object.
1999-07-15 01:49:45 +00:00
Nick Clifton
ab02a59986 1999-06-21 Philip Blundell <pb@nexus.co.uk>
* arm.h (EF_SOFT_FLOAT, F_SOFT_FLOAT): Define.
1999-07-15 01:35:40 +00:00
Nick Clifton
db688e87e2 1999-06-21 Philip Blundell <pb@nexus.co.uk>
* arm.h (F_SOFTFLOAT): Define.
1999-07-15 01:34:30 +00:00
Nick Clifton
f84dd1f035 oops - omitted from previous delta 1999-07-15 01:33:35 +00:00
Nick Clifton
2f992c04c2 Apply patch from Philip Blundell <pb@nexus.co.uk>
Prepend LOCAL_LABEL_PREFIX (if defined) to local symbols.
  ARM: Set F_SOFTFLOAT in the output file if -mno-fpu was given.
1999-07-15 01:33:07 +00:00
Mark Mitchell
6296902ea5 * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
things relocated by R_MIPS16_GPREL.
	(mips_elf_perform_relocation): Likewise.
1999-07-14 19:00:32 +00:00
Richard Henderson
35ca97eacf * argv.c: Include stdlib.h and string.h instead of
prototyping directly.
        * choose-temp.c: Conditionally include string.h.
1999-07-14 17:32:02 +00:00
Richard Henderson
c235b8f824 * objdump.c (dump_section_header): Print SEC_SHORT. 1999-07-14 17:24:46 +00:00
Richard Henderson
0eaf982050 Update 1999-07-14 16:46:20 +00:00
Richard Henderson
9e4141bc7b * scripttempl/elf.sc: Re-order .rel[a].foo outputs to the
same order seen for the main sections.  Add
        OTHER_READONLY_RELOC_SECTIONS and OTHER_GOT_RELOC_SECTIONS.
1999-07-14 16:45:54 +00:00
Richard Henderson
9e41f97317 * ldlang.c (wild_doit): Copy SEC_SHORT to output section. 1999-07-14 16:45:13 +00:00
Richard Henderson
2ac8ce5fe0 * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss. 1999-07-14 16:14:49 +00:00
Richard Henderson
b3be9b46c2 * elf32-mips.c (struct mips_got_info): Add global_gotno.
(_bfd_mips_elf_size_dynamic_sections): Set it.
        (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
        (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
        new argument max_local.
1999-07-14 14:23:13 +00:00
Ian Lance Taylor
14ad458a39 * write.c (cvt_frag_to_fill): Use frag file and line in rs_org
error message.
	(relax_segment): Likewise.  After giving a rs_org error, convert
	the frag to rs_align to avoid cascading errors.
1999-07-14 14:02:33 +00:00
Mark Mitchell
1e52e2ee34 * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
subwords when handling an R_MIPS16_26 relocation.
	(mips_elf_perform_relocation): Don't be paranoid abour right-shift
	semantics.
1999-07-14 11:46:04 +00:00
Mark Mitchell
b7233c24e1 * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
dst_mask to match reality.
	(_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
	(mips_elf_obtain_contents): Use bfd_get.
	(mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
	(mips_elf_relocate_section): Likewise.
1999-07-14 09:45:46 +00:00
Mark Mitchell
81edd86dd1 * dwarf2.c (read_attribute): Support DW_FORM_ref8.
* elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
	to possibly_dynamic_relocs.  Adjust usage throughout code.
	(elf_mips_howto_table): Handle R_MIPS_64 correctly.
	(elf_mips_ctor64_howto): Likewise.
	(mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
	Adjust indentation.
	(mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
	(_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
	Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
	* elf64-mips.c (elf_backend_may_use_rel_p): Define.
1999-07-14 08:49:40 +00:00
Mark Mitchell
e53bd91b0f * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
(mips_elf_relocate_section): Adjust calling sequence for
	mips_elf_perform_relocation.
	(mips_elf_perform_relocation): Take additional argument.  Handle
	R_MIPS16_26.  Use bfd_put for convenience.
1999-07-13 23:55:08 +00:00
Richard Henderson
28a7f3e70d * elf.c (assign_file_positions_for_segments): Thinko last change.
Always overwrite p_flags.
1999-07-13 20:10:26 +00:00
Richard Henderson
3018b44153 * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
* elflink.c (_bfd_elf_create_dynamic_sections): Only create
        .dynbss and .rel[a].bss if want_dynbss.
        * elfxx-target.h (elf_backend_want_dynbss): Provide default.
1999-07-13 18:31:17 +00:00
Richard Henderson
30b30c2181 * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
(struct elf_link_hash_table): Add dynlocal.
	(_bfd_elf_link_lookup_local_dynindx): Prototype.
	(_bfd_elf_link_adjust_dynindx): Delete.
	(_bfd_elf_link_renumber_dynsyms): Prototype.
	(_bfd_elf,link_record_local_dynamic_symbol): Prototype.
	* elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
	* elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
	(_bfd_elf_link_lookup_local_dynindx): New function.
	(elf_link_renumber_hash_table_dynsyms): New function.
	(_bfd_elf_link_renumber_dynsyms): New function.
	* elflink.h (elf_link_record_local_dynamic_symbol): New function.
	(struct elf_assign_sym_version_info): Delete removed_dynamic.
	(bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
	instead of elf_link_remove_section_and_adjust_dynindices.
	Remove removed_dynamic code.  Use _bfd_elf_link_renumber_dynsyms.
	(elf_link_assign_sym_version): Remove removed_dynamic code.
	(elf_link_renumber_dynsyms): Delete.
	(elf_bfd_final_link): Install section and local symbols into .dynsym.
	* elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
	(elf_m68k_size_dynamic_sections): Don't set section dynindicies.
	(elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
	* elf32-mips.c: Similarly.
	* elf32-ppc.c: Similarly.
	* elf32-sparc.c: Similarly.
	* elf64-alpha.c: Similarly.
	* elf64-sparc.c: Similarly.
1999-07-13 18:21:29 +00:00
Richard Henderson
e1ee1229a2 * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags. 1999-07-13 17:30:21 +00:00
Mark Mitchell
97a4bb053f * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
when _gp_disp is undefined.  Do not check R_MIPS_LO16 for overflow
	when the relocation is against _gp_disp.
1999-07-13 15:23:22 +00:00
Nick Clifton
5dcf458ac4 Remove xfails for arm toolchains. 1999-07-13 09:25:10 +00:00
Alan Modra
b09389bd97 8
include/opcode/i386.h: Add "undocumented" AMD 3DNow! pf2iw, pi2fw, pswapw
1999-07-13 07:41:47 +00:00
Alan Modra
145cf1f06b o
include/opcode/i386.h: Add "undocumented" AMD 3DNow! pf2iw, pi2fw, pswapw
1999-07-13 07:41:46 +00:00
Andreas Schwab
4b3aff1a3b * m68k.h (EF_CPU32): Move definition inside multiple inclusion
guard.
1999-07-13 00:50:47 +00:00
Jason Molenda
daf3f280eb import gdb-1999-07-12 snapshot 1999-07-12 18:08:43 +00:00
Mark Mitchell
a3c7651d1a * dwarf2.c (read_attribute): Support DW_FORM_ref8.
* elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
	to possibly_dynamic_relocs.  Adjust usage throughout code.
	(elf_mips_howto_table): Handle R_MIPS_64 correctly.
	(elf_mips_ctor64_howto): Likewise.
	(mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
	Adjust indentation.
	(mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
	(_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
	Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
	* elf64-mips.c (elf_backend_may_use_rel_p): Define.
1999-07-12 17:15:34 +00:00
Jason Molenda
4476592ff9 Removed as of the gdb-1999-07-12 snapshot. 1999-07-12 11:23:01 +00:00
Jason Molenda
43e526b9b4 import gdb-1999-07-12 snapshot 1999-07-12 11:15:22 +00:00
Ian Lance Taylor
edac9bffc1 * aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
defined as 0.
1999-07-12 11:12:37 +00:00
Ian Lance Taylor
67e5d3d6d0 * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
* bfd-in2.h: Rebuild.
1999-07-12 11:06:03 +00:00
Ian Lance Taylor
e788a1a310 * Makefile.am: Rebuild dependencies.
* Makefile.in: Rebuild.
1999-07-12 11:05:04 +00:00
Ian Lance Taylor
5f771d47c7 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Use EMPTY_HOWTO as appropriate.  Fill in
	structure initializations.  Add casts.
	* reloc.c (EMPTY_HOWTO): Define.
	* bfd-in2.h: Rebuild.
	* coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
	comparisons against 0.
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
	previous_ibfd_e_flags to unsigned long.
	* vms.h (struct vms_private_data_struct): Change section_count to
	unsigned.
	* vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
	(_bfd_vms_write_gsd): Change symnum to unsigned.
	* vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
	* vms-tir.c (etir_sta): Change psect to unsigned.
	(alloc_section): Change idx to unsigned.
	(tir_sta, tir_ctl): Change psect to unsigned.
	(_bfd_vms_write_tir): Change len and before to bfd_size_type.
	* vms.c (priv_section_count): Change to unsigned.
1999-07-12 10:30:21 +00:00
Andreas Schwab
3682307616 * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED. 1999-07-12 08:34:56 +00:00
Andreas Schwab
49bdcdba9f * emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Fill in
structure initializations.
1999-07-12 08:31:34 +00:00
Andreas Schwab
121089cbf0 * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
* m68klinux.c: Likewise.
1999-07-12 08:15:36 +00:00
Ian Lance Taylor
e049a0de5a * Many files: Changes to avoid gcc warnings: Remove unused local
variables.  Add default case to enum switches.
	* coff-arm.c (bfd_arm_allocate_interworking_sections): Only
	compile if not COFF_IMAGE_WITH_PE.
	(record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
	(bfd_arm_get_bfd_for_interworking): Likewise.
	(bfd_arm_process_before_allocation): Likewise.
	* epoc-pei-arm.c: Don't rename bfd_arm functions.
	* pei-arm.c: Likewise.
	* elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
	(MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
	(mips_elf_got16_entry): Put parens around & in body of ==.
	(mips_elf_calculate_relocation): Correct test for empty string.
	* vms-gsd.c: Use _bfd_error_handler rather than fprintf to
	stderr.
	* vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
	format.
1999-07-12 07:35:20 +00:00
Andreas Schwab
5d341b0e2a * emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Add missing
comma in initializer.
1999-07-12 06:24:03 +00:00
Ian Lance Taylor
ab9da55419 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Fill in structure initializations.  Add variable
	initializations.  Add casts.
	* dwarf2dbg.c (print_stats): Change i to size_t.
	* listing.c (listing_listing): Change list_line to unsigned int.
1999-07-11 20:20:04 +00:00
Ian Lance Taylor
85e5d57188 rebuild 1999-07-11 20:17:40 +00:00
Ian Lance Taylor
87f2a3464b * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Fill in structure initializations.
1999-07-11 20:09:04 +00:00
Ian Lance Taylor
8622e41b9f * corefile.c (core_create_function_syms): Add ATTRIBUTED_UNUSED.
* sym-ids.c (non_existent_file): Fully initialize structure.
1999-07-11 20:06:47 +00:00
Ian Lance Taylor
57d91c3ced * dis-buf.c: Add ATTRIBUTE_UNUSED as appropriate.
(generic_strcat_address): Add cast to avoid warning.
	* i386-dis.c: Initialize all structure fields to avoid warnings.
	Add ATTRIBUTE_UNUSED as appropriate.
1999-07-11 20:04:29 +00:00
Ian Lance Taylor
b4c96d0d37 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Add variable initializations.  Add casts.
	* objdump.c (disassemble_bytes): Change j to bfd_vma.
	* readelf.c (process_syminfo): Change i to unsigned int.
	(display_debug_info): Change abbrev_number to unsigned long.
	(process_mips_specific): Change fcnt to size_t.
1999-07-11 20:02:30 +00:00
Ian Lance Taylor
7442e600c8 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Fill in structure initializations.  Add variable
	initializations.  Add casts.
	* dwarf1.c (parse_line_table): Change eachLine to unsigned long.
	(dwarf1_unit_find_nearest_line): Change i to unsigned long.
1999-07-11 19:49:48 +00:00
Ian Lance Taylor
893e959397 * ansidecl.h: Copy attribute support macros from egcs. 1999-07-11 19:15:01 +00:00
Ian Lance Taylor
af32ff6969 * splay-tree.c (splay_tree_insert): Add initialization to avoid
warning.
1999-07-11 19:13:51 +00:00
Ian Lance Taylor
56e82f2587 * configure: Add -W -Wall to the default CFLAGS when compiling with
gcc.
1999-07-11 17:26:49 +00:00
Ian Lance Taylor
3a99b017b3 * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
char *.
	* elf-bfd.h (bfd_elf_hash): Update declaration.
	* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
	when calling bfd_elf_hash.
1999-07-11 17:13:36 +00:00
Mark Mitchell
2848824236 Fix typo in previous change. 1999-07-11 09:46:10 +00:00
Mark Mitchell
9ebbd33e6f * libbfd.c (bfd_put_8): Make it of type `void'.
* bfd-in2.h: Regenerated.
	* elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
	for 32-bit hosts.
	(_bfd_mips_elf_final_link): Likewise.
1999-07-11 09:28:45 +00:00
Mark Mitchell
65388f2d50 * elflink.h (elf_link_read_relocs_from_section): Be type-correct. 1999-07-11 00:12:14 +00:00
Ian Lance Taylor
e0accf0cb8 * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL
rather than checking for \001 and \002 in symbol name.
	* config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise.
1999-07-09 22:56:21 +00:00
Ian Lance Taylor
b90d114661 * ldfile.c: Revert patch of 1999-07-08.
(ldfile_try_open_bfd): If we are searching for the file, skip
	files with an incompatible architecture.
1999-07-09 22:52:05 +00:00
Ian Lance Taylor
734caf4d9f * ld-elfvers/vers.exp: Use -rpath in new vers19 test. 1999-07-09 22:45:24 +00:00
Nick Clifton
6da0974a11 Include big endian and little endian formats in OUTPUT_FORMAT directive. 1999-07-09 08:12:48 +00:00
Nick Clifton
7a2746396a Applied patch from Felix Lee <flee@cygnus.com>:
Fix quoting problem, for bash 2.x
1999-07-09 03:27:25 +00:00
Nick Clifton
a952a37550 Only decode 64bit ELF files if the host compiler supports a 64bit data type. 1999-07-09 03:14:15 +00:00
Richard Henderson
99f8f232c6 Jakub Jelinek <jj@ultra.linux.cz>
* ldfile.c (ldfile_open_file_search): Skip libraries made for
        incompatible architectures in the search path. Let the user know
        about any such skips.
1999-07-08 16:50:53 +00:00
Richard Henderson
9df31319e8 Jakub Jelinek <jj@ultra.linux.cz>
* sparc-dis.c (print_insn_sparc): Differentiate between
        addition and oring when guessing symbol for comment.
1999-07-08 16:14:07 +00:00
Richard Henderson
feb90132a0 * sparc.h (ELF64_R_TYPE_DATA): Sign extend the value.
(ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data.
        (DT_SPARC_PLTFMT): Delete.
1999-07-08 16:01:06 +00:00
Richard Henderson
351b4b401b Jakub Jelinek <jj@ultra.linux.cz>
* readelf.c (guess_is_rela): Sparcv9 and v8plus use rela.
        (dump_relocations): Use ELF64_R_TYPE_ID for Sparc, for R_SPARC_OLO10
        print the secondary addend.
        (get_machine_flags): Print Sparc machine flags.
        (get_symbol_type): Print STT_REGISTER.
1999-07-08 15:49:41 +00:00
Jeff Law
5c61c5ab19 * configure.tgt (hppa*-linux-gnu*): New target. 1999-07-08 11:38:48 +00:00
Jeff Law
7d4ce8a99b * configure.in (hppa*-linux-gnu*): New target.
* configure: Rebuilt.
1999-07-08 11:37:23 +00:00
Jeff Law
f7bddfb6d9 è
* configure.in: Build ld, binutils & gas for hppa*-*-linux-gnu*.
1999-07-08 11:35:04 +00:00
Jeff Law
1001d816c8 ÿ
* configure.in: Build ld, binutils & gas for hppa*-*-linux-gnu*.
1999-07-08 11:35:03 +00:00
Jeff Law
5b4e28187c * config.bfd (hppa*-*-linux-gnu*): New target 1999-07-08 11:33:37 +00:00
Nick Clifton
5395a469da Document .thumb_set directive. 1999-07-08 01:49:09 +00:00
Ian Lance Taylor
c602a1658f * stabs.c (parse_stab_type): Fix handling of template names with
template parameters containing `::'.
	(stab_demangle_type): Handle a qualified name in a pointer to
	member.
1999-07-08 00:49:04 +00:00
Jason Molenda
c2a1d49a27 import gdb-1999-07-07 pre reformat 1999-07-08 00:26:39 +00:00
Mark Mitchell
22c675a780 * Makefile.am (ALL_64_EMULATIONS): Add eelf64bmip.
(eelf64bmip): New target.
	* Makefile.in: Regenerated.
	* configure.tgt (mips-sgi-irix6*): Add 64-bit emulation.
	* emulparams/elf64bmip.sh: New file.
1999-07-08 00:22:51 +00:00
Jason Molenda
c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda
3a4b77d8be import gdb-1999-07-07 post reformat 1999-07-07 20:11:14 +00:00
Mark Mitchell
103186c62b * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
(_bfd_mips_elf_create_dynamic_sections): New function.
	(_bfd_mips_elf_add_symbol_hook): Likewise.
	(_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
	(_bfd_mips_elf_gc_mark_hook): Likewise.
	(_bfd_mips_elf_gc_sweep_hook): Likewise.
	(_bfd_mips_elf_always_size_sections): Likewise.
	(_bfd_mips_elf_size_dynamic_sections): Likewise.
	(_bfd_mips_elf_check_relocs): Likewise.
	(_bfd_mips_elf_link_hash_table_create): Likewise.
	(_bfd_mips_elf_print_private_data): Likewise.
	(_bfd_mips_elf_link_output_symbol_hook): Likewise.
	(_bfd_mips_elf_final_link): Likewise.
	(_bfd_mips_elf_additional_program_headers): Likewise.
	(_bfd_mips_elf_modify_segment_map): Likewise.
	(_bfd_mips_elf_relocate_section): Likewise.
	* elf32-mips.c (mips_elf32_object_p): Move contents into
	_bfd_mips_elf_object_p.
	(mips_elf_additional_program_headers): Rename to
	_bfd_mips_elf_additional_program_headers.
	(mips_elf_modify_segment_map): Rename to
	_bfd_mips_elf_modify_segment_map.
	(elf_mips_abi_name): Change prototype.
	(mips_elf32_section_from_shdr): Merge into
	_bfd_mips_elf_section_from_shdr.
	(mips_elf32_section_processing): Merge into
	_bfd_mips_elf_section_processing.
	(mips_elf_final_link): Rename to _bfd_mips_elf_final_link.  Invoke
	the right back-end ELF linker.
	(mips_elf_relocate_section): Rename to
	_bfd_mips_elf_relocate_section.  Clean up.  Adjust for 64-bit code.
	(mips_elf_link_output_symbol_hook): Rename to
	_bfd_mips_elf_link_output_symbol_hook.
	(mips_elf_create_dynamic_section): Rename to
	_bfd_mips_elf_create_dynamic_section.
	(mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
	Adjust for 64-bit code.  Use mips_elf_got_section.
	(mips_elf_adjust_dynamic_symbol): Rename to
	_bfd_mips_elf_adjust_dynamic_symbol.  Use
	mips_elf_allocate_dynamic_relocations.
	(mips_elf_finish_dynamic_symbol): Rename to
	_bfd_mips_elf_finish_dynamic_symbol.  Use mips_elf_got_section.
	Adjust for 64-bit code.
	(mips_elf_finish_dynamic_sections): Rename to
	_bfd_mips_elf_finish_dynamic_sections.  Adjust for 64-bit code.
	(mips_elf_always_size_sections): Rename to
	_bfd_mips_elf_always_size_sections.
	(mips_elf_add_symbol_hook): Rename to
	_bfd_mips_elf_add_symbol_hook.
	(mips_elf_next_lo16_addend): Constify.
	(mips_elf_calculate_relocation): Likewise.
	(mips_elf_obtain_contents): Likewise.
	(mips_elf_perform_relocation): Likewise.
	(mips_elf_create_dynamic_relocation): Likewise.
	(mips_elf_allocate_dynamic_relocations): New function.
	(MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
	(MIPS_ELF_REL_SIZE): Likewise.
	(MIPS_ELF_DYN_SIZE): Likewise.
	(MIPS_ELF_GOT_SIZE): Likewise.
	(MIPS_ELF_SYM_SIZE): Likewise.
	(MIPS_ELF_LOG_FILE_ALIGN): Likewise.
	(MIPS_ELF_GET_WORD): Likewise.
	(MIPS_ELF_PUT_WORD): Likewise.
	(MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
	(STUB_LW): Conditionalize for 64-bit value.
	(elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
	entries.
	(_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
	Check it for inconsistency.
	(_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
	ABI.
	(_bfd_mips_elf_fake_sections): Remove duplicate handling of
	.msym.
	(mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
	(mips_elf_got_offset_from_index): Use misp_elf_got_section.
	(mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
	(mips_elf_local_got_index): Likewise.
	(mips_elf_got_page): Likewise.
	(mips_elf_got_info): Likewise.
	(mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
	(ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
	(mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
	instead of constant `2'.
	(mips_elf_create_got_section): Tidy.  Use MIPS_ELF_GOT_SIZE.
	(mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
	(mips_elf_size_dynamic_sections): Use
	MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
	MIPS_ELF_ADD_DYNAMIC_ENTRY.  Remove #if 0'd code.
	Adjust all releveant entries in elf backend table.
	* elf64-mips.c (mips_elf64_section_from_shdr): Remove.
	(mips_elf64_section_processing): Likewise.
	Adjust elf backend entries to use _bfd_mips_elf variants now
	publicly available.
1999-07-07 19:23:22 +00:00
Mark Mitchell
c7ac6ff835 * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
hash-entry sizes.
	(size_dynamic_sections): Likewise.
	(elf_link_output_extsym): Likewise.
	* elf.c: (elf_fake_sections): Likewise.
	* libbfd.c (bfd_get): New macro.
	(bfd_put): Likewise.
	* bfd-in2.h: Regenerated.
	* elf-bfd.h (elf_size_info): Add hash_entry_size,
	int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
	wap_reloca_in, and swap_reloca_out.
	* elflink.h (elf_link_read_relocs_from_section): Adjust to handle
	multiple internal relocations per external relocation.
	(link_read_relocs): Likewise.
	(elf_bfd_final_link): Likewise.
	(elf_link_input_bfd): Likewise.
	(elf_gc_mark): Likewise.
	(elf_gc_smash_unused_vtentry_relocs): Likewise.
	* elfcode.h (elf_swap_dyn_out): Adjust type to match
	elf_swap_dyn_in.
	(size_info): Add entries for new fields.
	* elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
	(mips_elf64_be_swap_reloc_in): New function.
	(mips_elf64_be_swap_reloc_out): Likewise.
	(mips_elf64_be_swap_reloca_in): Likewise.
	(mips_elf64_be_swap_reloca_out): Likewise.
	(mips_elf64_size_info): Add entries for new fields.
1999-07-07 17:50:56 +00:00
Jason Molenda
9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +00:00
Ian Lance Taylor
f04894943e * ld-elfvers/vers.exp: Add new tests vers17 to vers19.
* ld/elfvers/{vers17.*, vers18.*, vers19.*}: New files.
1999-07-07 15:36:29 +00:00
Ian Lance Taylor
b4536acd1f tweak last elf_merge_symbol patch 1999-07-07 15:29:06 +00:00
Ian Lance Taylor
3b62fea85c rebuild 1999-07-07 11:40:42 +00:00
Ian Lance Taylor
0525d26ec3 * elflink.h (elf_bfd_final_link): Assert that section reloc_count
field equals the new rel_count field.
	(elf_link_input_bfd): When doing a relocateable link, use the new
	rel_count field rather than the reloc_count field.
	(elf_reloc_link_order): Likewise.
	(elf_finish_pointer_linker_section): Likewise.
	Based on patch from H.J. Lu <hjl@gnu.org>:
	* elflink.h (elf_merge_symbol): Permit a non-weak definition in a
	shared library to override a weak definition in a regular object.
1999-07-07 11:39:43 +00:00
Nick Clifton
cac58fa6ef Use symbol_get_obj() rather than accessing symbolP directly. 1999-07-07 09:34:14 +00:00
Jeff Law
37afc161ab * libhppa.h: Revert July 2, 1999 patch. 1999-07-06 23:50:45 +00:00
Jeff Law
5437775413 h
* config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol
        for ELF.
1999-07-06 09:44:58 +00:00
Jeff Law
03b36ee109 ÿ
* config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol
        for ELF.
1999-07-06 09:44:56 +00:00
Jeff Law
f31cedf7ae è
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
        need to generate DLTIND relocations, not DLTREL relocations.
1999-07-06 09:27:18 +00:00
Jeff Law
9db37001c6 ÿ
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
        need to generate DLTIND relocations, not DLTREL relocations.
1999-07-06 09:27:17 +00:00
Jason Molenda
3535ad499b import gdb-1999-07-05 snapshot 1999-07-06 00:58:41 +00:00
Jason Molenda
43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Nick Clifton
f11523b013 Abort if input format is ARM and output format is not 1999-07-05 07:51:39 +00:00
Nick Clifton
9f20bbfd4c Display hex equivalent of rotated ARM constants. 1999-07-05 07:44:09 +00:00
Nick Clifton
49a5575c32 Add support for armv5 architecture
Add ADRL pseudo op.
1999-07-05 07:39:01 +00:00
Nick Clifton
849a0ebfb7 Define F_ARM_5 1999-07-05 07:29:04 +00:00
Nick Clifton
478d07d67c Add support for arm v5 architectures. 1999-07-05 07:28:24 +00:00
Nick Clifton
752149a058 Add BFD_RELOC_ARM_ADRL_IMMEDIATE. 1999-07-05 06:29:47 +00:00
Mark Mitchell
5e38c3b856 * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
(_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
	* elf.c (_bfd_elf_find_nearest_line): Pass it.
	* elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
	* elf32-mips.c (ABI_64_P): New macro.
	(IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
	(_bfd_mips_elf_find_nearest_line): Adjust call to
	_bfd_dwarf2_find_nearest_line.
	* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
	* libbfd.h: Regenerated.
1999-07-02 21:03:56 +00:00
Ian Lance Taylor
4766cbee7a * config.bfd: Add * at the end of i[3456]86-*-unixware. 1999-07-02 12:52:21 +00:00
Jeff Law
2a6d0fe7b3 * libhppa.h (HPPA_R_ARG_RELOC): Delete.
(HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
1999-07-02 11:26:12 +00:00
Ian Lance Taylor
39e878bf53 x 1999-07-02 07:46:15 +00:00
Ian Lance Taylor
e361c369df * ldlang.c: Revert change of 1999-06-23. 1999-07-02 07:45:31 +00:00
Ian Lance Taylor
85f7047147 rebuild 1999-07-02 07:18:40 +00:00
Mark Mitchell
23bc299bd8 * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
fields.
	(_bfd_elf_init_reloc_shdr): New function.
	* elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
	bfd_alloc followed by memset.
	(_bfd_elf_init_reloc_shdr): New function, split out from ...
	(elf_fake_sections): Here.
	(assign_section_numbers): Assign section numbers for the second
	relocation section, if required.
	* elflink.h (elf_link_output_relocs): New function.
	(elf_link_size_reloc_section): Likewise.
	(elf_bfd_final_link): Use elf_link_size_reloc_section.
	(elf_link_input_bfd): Use elf_link_output_relocs.
	* elf32-mips.c (_bfd_mips_elf_fake_sections): Use
	_bfd_elf_init_reloc_shdr to initialize rel_hdr2.
1999-07-01 23:20:08 +00:00
Jeff Law
b1c5e0ee59 h
* config/tc-hppa.c (pa_ip): Convert the opcode and all completers
        into lower case.
1999-07-01 14:37:29 +00:00
Jeff Law
09ecf0ba55 * config/tc-hppa.c (pa_ip): Convert the opcode and all completers
into lower case.
1999-07-01 14:37:28 +00:00
Jeff Law
341362b58e X
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
        with 22bit format.
1999-07-01 13:02:50 +00:00
Jeff Law
17bb48e0f2 è
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
        with 22bit format.
1999-07-01 13:02:48 +00:00
Jeff Law
7382664060 * hppa.h (struct pa_opcode): Add new field "flags".
(FLAGS_STRICT): Define.
1999-06-30 23:20:56 +00:00
Ian Lance Taylor
fdcf7d4328 * Many files: Add casts in many print statements to cast bfd_vma
values to unsigned long when calling printf.
	* Makefile.am ($(OBJECTS)): Add gmon.h.
	* Makefile.in: Rebuild.
1999-06-30 22:38:30 +00:00
Mark Mitchell
106117aa9f * configure.in: Build ld on IRIX6. 1999-06-30 21:00:59 +00:00
Mark Mitchell
dc83197880 * Makefile.am (ALL_EMULATIONS): Add eelf32bmipn32.o.
(eelf32bmipn32.c): New target.
	* Makefile.in: Regenerated.
	* configure.tgt (mips-sgi-irix6*): Make n32 the default
	emulation.
	* emulparams/elf32bmipn32.sh: New file.
1999-06-30 21:00:10 +00:00
Mark Mitchell
7403cb6305 * elf32-mips.c (mips_elf_got_info): Move declaration before
prototypes.  Change global_gotsym to be a pointer to a hash entry,
	rather than a number index.
	(mips_elf_link_hash_entry): Move declaration before prototypes.
	(mips_elf_irix6_finish_dynamic_symbol): New function.
	(mips_elf_sign_extend): Likewise.
	(mips_elf_high): Likewise.
	(mips_elf_higher): Likewise.
	(mips_elf_highest): Likewise.
	(mips_elf_global_got_index): Likewise.
	(mips_elf_local_got_index): Likewise.
	(mips_elf_got_offset_from_index): Likeiwse.
	(mips_elf_record_global_got_symbol): Likewise.
	(mips_elf_got_page): Likewise.
	(mips_elf_next_lo16_addend): Likewise.
	(mips_elf_calculate_relocation): Likewise.
	(mips_elf_obtain_contents): Likewise.
	(mips_elf_perform_relocation): Likewise.
	(mips_elf_assign_gp): Likewise.
	(mips_elf_sort_hash_table_f): Likewise.
	(mips_elf_sort_hash_table): Likewise.
	(mips_elf_got_section): Likewise.
	(mips_elf_got_info): Likewise.
	(mips_elf_create_local_got_entry): Likewise.
	(mips_elf_got16_entry): Likewise.
	(mips_elf_create_dynamic_relocation): Likewise.
	(elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
	(mips_elf_final_gp): Use mips_elf_assign_gp.
	(_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
	into SHN_SCOMMON automatically on IRIX6.
	(mips_elf_add_symbol_hook): Likewise.
	(mips_elf_relocate_section): Rewrite, using
	mips_elf_calculate_relocation and mips_elf_perform_relocation.
	(mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
	Don't deal with .rld_map on IRIX6.
	(mips_elf_create_got_section): Adjust use of global_gotsym.  Set
	section flags appropriately for .got.
	(mips_elf_check_relocs): Handle IRIX6 relocations making use of
	the got.  Call mips_elf_record_global_got_symbol and allocate
	local got space appropriately.
	(mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
	char *.  Rework calculation of GOT size.  Sort dynamic symbol
	table entries so entries that do not require GOT entries appear at
	the beginning.  Don't use DT_MIPS_HIPAGENO on IRIX6.  Remove dead
	code dealing with DT_INIT and DT_FINI.  Remove fiddling with
	global_gotsym.
	(mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
	entries.
	(mips_elf_finish_dynamic_symbol): Use
	mips_elf_irix6_finish_dynamic_symbol.
	(mips_elf_finish_dynamic_sections): Correct off-by-one error
	setting DT_MIPS_UNREFEXTNO.  Adjust setting of DT_MIPS_GOTSYM for
	change to global_gotsym.  Set DT_MIPS_OPTIONS on IRIX6.
1999-06-30 20:13:43 +00:00
Ian Lance Taylor
0dda5f7af8 * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
relocateable link.  From Ralf Baechle <ralf@uni-koblenz.de>.
1999-06-30 18:16:46 +00:00
Nick Clifton
04f7c78d64 Define 'elf_backend_got_header_size' and 'elf_backend_plt_header_size'. 1999-06-30 02:30:04 +00:00
Nick Clifton
a72747a354 Patch from: Jim Pick <jim@jimpick.com>
Take note of 'no_undefined'.
1999-06-29 02:51:50 +00:00
Nick Clifton
a0290afa96 Patch from: Jim Pick <jim@jimpick.com>
Added code so that .xs linker scripts are called so that ARM shared libraries
are built correctly.
  CVS: ----------------------------------------------------------------------
1999-06-29 02:45:00 +00:00
Nick Clifton
4eb4387d5e Add fr30 and mcore to expected cpus list.
Fix readelf -r test to not assume a fixed number of spaces in the output.
1999-06-29 01:31:19 +00:00
Jeff Law
9acc3dfe89 °
* elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
        relocation function.
        * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
1999-06-29 01:28:26 +00:00
Jeff Law
caf3d37ccc è
* elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
        relocation function.
        * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
1999-06-29 01:28:25 +00:00
Jason Molenda
74cf13956f import gdb-1999-06-28 snapshot 1999-06-28 23:04:32 +00:00
Jason Molenda
9cd2c67bac These files were removed in the 1999-06-28 snapshot. 1999-06-28 17:11:12 +00:00
Jason Molenda
085dd6e638 import gdb-1999-06-28 snapshot 1999-06-28 16:06:02 +00:00
Mark Mitchell
303f629d61 * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
(MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
	(MIPS_ELF_STUB_SECTION_NAME): Likewise.
	(_bfd_mips_elf_section_from_shdr): Use them.
	(_bfd_mips_elf_fake_sections): Likewise.  Add .srdata to the list
	of GP-relative sections.
	(_bfd_mips_elf_set_section_contents): Use them.
	(_bfd_mips_elf_section_processing): Share code between .sdata and
	.lit4/.lit8 sections.  Set appropriate flags for .srdata.
	(mips_elf_additional_program_headers): Add handling for
	PT_MIPS_OPTIONS segment on IRIX6.
	(mips_elf_modify_segment_map): Likeiwse.
	(mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
	Include the options sections on IRIX6.  Don't look for GP-relative
	sections by name; use SHF_MIPS_GPREL instead.
	(ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
	the N32 ABI.
	(mips_elf_create_dynamic_sections): Don't muck about with section
	alignments and such on IRIX6.
	(mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
	(mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
	fact that ELF_DYNAMIC_INTERPRETER is no longer a constant.  Use
	bfd_zalloc rather than bfd_alloc and memset.
	(mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
	Don't assert the existence of .rld_map on IRIX6.
	(mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
1999-06-27 21:23:34 +00:00
Mark Mitchell
9886bd4365 * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
(mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
	instead.
1999-06-27 16:11:13 +00:00
Mark Mitchell
c6142e5d05 * elf32-mips.c (mips_elf_swap_msym_in): New function.
(mips_elf_swap_msym_out): New function.
	(mips_elf_create_msym_section): Likewise.
	(MIPS_ELF_MSYM_SECTION_NAME): New macro.
	(_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
	(_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
	section not named .msym.
	(_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
	.msym directly.  Set appropriate attributes for the .msym
	section.
	(mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
	(mips_elf_link_hash_newfunc): Clear it.
	(mips_elf_create_dynamic_sections): Create the .msym section
	on IRIX6.
	(mips_elf_size_dynamic_sections):  Allocate space for the
	.msym section.  Add a DT_MIPS_MSYM entry.
	(mips_elf_finish_dynamic_symbol): Write out a .msym entry for
	the symbol.
	(mips_elf_finish_dynamic_sections): Assign a value for
	DT_MIPS_MSYM.  Add .msym entries for the section symbols as well.
1999-06-27 11:05:15 +00:00
Ian Lance Taylor
264d6861c7 1999-06-27 H.J. Lu <hjl@gnu.org>
* subsegs.c (subseg_text_p): Use 1/0 instead of true/false for
	non BFD_ASSEMBLER case.
1999-06-27 08:29:27 +00:00
Mark Mitchell
a94a7c1c32 * elf32-mips.c (irix_compat_t): New enumeration.
(ABI_N32_P): New macro.
	(IRIX_COMPAT): Likewise.
	(SGI_COMPAT): Implement in terms of IRIX_COMPAT.
	(mips_elf_relocate_section): Fix typo.
1999-06-26 21:17:49 +00:00
Ian Lance Taylor
827c01493e 1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
* config/obj-coff.c (obj_coff_section): Mark writable sections as
	data.
1999-06-26 19:35:44 +00:00
Ian Lance Taylor
368d086045 fix copyright 1999-06-26 19:33:44 +00:00
Ian Lance Taylor
254f5c45f5 1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
* peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
	as writable PE sections.
1999-06-26 19:32:54 +00:00
Richard Henderson
a340d27090 David Mosberger <davidm@hpl.hp.com>
* dwarf2dbg.c (dwarf2_gen_line_info): Don't call
        out_end_sequence() when the address decreases due to a new frag.
        (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file
        numbering starts with 1.
1999-06-26 16:10:10 +00:00
Richard Henderson
f623be2b68 David Mosberger <davidm@hpl.hp.com>
* dwarf2.c (struct arange): New type.
        (struct comp_unit): Replace LOW and HIGH by member ARANGE.
        (arange_add): New function.
        (decode_line_info): Keep track of address ranges that a compilation
        unit covers.
        (comp_unit_contains_address): Return true if address is contained
        in _any_ of the address ranges associated with a compilation unit.
        (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
        on the first comp_unit that contains the address.
1999-06-26 16:05:58 +00:00
Richard Henderson
69dd2e2d55 David Mosberger <davidm@hpl.hp.com>
* dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
        (decode_line_info): Add variable STASH and initialize it to point
        to the per-bfd dwarf2_debug info.  Remove static variable
        dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
1999-06-26 15:48:47 +00:00
Ian Lance Taylor
1d7b28df8d * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
shared library to have an undefined symbol.
1999-06-26 09:00:19 +00:00
Ian Lance Taylor
0429ebd010 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
* elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
1999-06-26 08:57:54 +00:00
Jeff Law
f7fc668b8e * hppa.h (pa_opcodes): Add pa2.0 clrbts instruction. 1999-06-25 03:29:45 +00:00
Jeff Law
b65db25218 * hppa.h (pa_opcodes): Add entries for mfia and mtsarcm instructions. 1999-06-25 03:23:12 +00:00
Jeff Law
31bd8f254f ð
* elf-hppa.c (elf_hppa_final_write_processing): New function.
        * elf32-hppa.c: Remove everything related to symbol extension
        sections & records.  Use the common elf_hppa_final_write_processing.
1999-06-24 20:01:44 +00:00
Jeff Law
95cbae0b17 *** empty log message *** 1999-06-24 20:01:43 +00:00
Jeff Law
4517897e01 d
* elf-hppa.c (elf_hppa_final_write_processing): New function.
        * elf32-hppa.c: Remove everything related to symbol extension
        sections & records.  Use the common elf_hppa_final_write_processing.
1999-06-24 20:01:42 +00:00
Mark Mitchell
3dbf70a218 * ldmain.c (main): Initialize link_info.init_function and
link_info.fini_function.
	* lexsup.c (OPTION_INIT): New macro.
	(OPTION_FINI): Likewise.
	(ld_options): Add descriptions for them.
	(parse_args): Handle them.
1999-06-23 11:09:30 +00:00
Mark Mitchell
f0c2e336c8 * elflink.h (size_dynamic_sections): Use user-specified init/fini
functions instead of _init/_fini if requested.
1999-06-23 11:06:57 +00:00
Mark Mitchell
94883c63a8 * bfdlink.h (struct bfd_link_hash_entry): Add init_function and
fini_function.
1999-06-23 11:03:45 +00:00
Nick Clifton
40b10cc76f ooops - omitted from previous delta. 1999-06-23 09:31:57 +00:00
Nick Clifton
16b93d8878 Make the mcore even more paranoid about section switching 1999-06-23 09:27:09 +00:00
Alan Modra
1008451944 P
include/opcode/i386.h: Allow bswapl, arplw, and other dodgy insns.
opcodes/i386-dis.c: Fix a comment
1999-06-23 06:00:14 +00:00
Ian Lance Taylor
83d765b3ed * Makefile.am (dlltool_SOURCES): Add dyn-string.c.
* Makefile.in: Rebuild.
1999-06-22 22:58:06 +00:00
Ian Lance Taylor
2481e6a24f 1999-06-23 Mumit Khan <khan@xraylith.wisc.edu>
* configure.in (HAVE_EXECUTABLE_SUFFIX): Define.
	* dlltool.c (look_for_prog): Use HAVE_EXECUTABLE_SUFFIX.
	* dllwrap.c (look_for_prog): Likewise.
	* resrc.c (look_for_default): Likewise.
	* configure, config.in: Rebuild.
1999-06-22 22:50:22 +00:00
Ian Lance Taylor
03ae5f594e * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
field.
1999-06-22 21:25:49 +00:00
Ian Lance Taylor
7b9eea348f * ldlang.c (section_already_linked): Only discard link once
sections if we are building constructors.
1999-06-22 21:13:24 +00:00
Ian Lance Taylor
464e1740d2 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
	field to 0, not -1.
	(ppc_elf_finish_dynamic_sections): Check for positive section
	dynindx field, rather than comparing against -1.
	(ppc_elf_relocate_section): Only return false if undefined_symbol
	or reloc_overflow fail, not always upon encountering an error.
1999-06-22 21:01:24 +00:00
Ian Lance Taylor
75945f9f4c clarify section dynindx comment 1999-06-22 20:58:43 +00:00
Ian Lance Taylor
bb0cb4db08 Based on patches from Mumit Khan <khan@xraylith.wisc.EDU>:
* configure.in: Define EXECUTABLE_SUFFIX.
	* dlltool.c: Include "dyn-string.h".  Include <stdarg.h> based on
	ANSI_PROTOTYPES, not __STDC__.
	(outfile): Remove.
	(gen_exp_file): Change uses of outfile to use alloca.
	(make_one_lib_file, make_head, make_tail): Likewise.
	(gen_lib_file): Likewise.
	(look_for_prog): New static function.
	(deduce_name): Rewrite to use look_for_prog.
	(mcore_elf_gen_out_file): Use dyn_string_t rather than outfile.
	* dllwrap.c: Don't include <stdio.h>, <errno.h>, <string.h>,
	<stdlib.h>, or <unistd.h>.  Include <sys/stat.h> and either
	<stdarg.h> or <varargs.h>.
	(driver_name): Initialize to NULL, not "gcc".
	(dlltool_name): Initialize to NULL, not "dlltool".
	(display, inform, look_for_prog, deduce_name): New static
	functions.
	(usage): Mention -mno-cygwin.
	(OPTION_MNO_CYGWIN): Define.
	(main): Handle -mno-cygwin.  Deduce driver_name and dlltool_name.
	* resrc.c (look_for_default): Make static.  Remove unused local
	path.  Check using EXECUTABLE_SUFFIX.
	(read_rc_file): Allocate enough space to hold EXECUTABLE_SUFFIX.
	* Makefile.am: Rebuild dependencies.
	(dllwrap_LDADD): Add $(INTLLIBS).
	* configure, Makefile.in, config.in: Rebuild.
1999-06-22 20:39:46 +00:00
Ian Lance Taylor
be2acf2756 * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use
a list of names, to try obj_segment_name, and to try abbreviated
	names when using COFF without long section names.
1999-06-22 19:04:42 +00:00
Ian Lance Taylor
7dcc986550 * config/tc-alpha.c: More use of symbol accessor functions.
* config/tc-arc.c: Likewise.
	* config/tc-d30v.c: Likewise.
	* config/tc-fr30.c: Likewise.
	* config/tc-i860.c: Likewise.
	* config/tc-m88k.c: Likewise.
	* config/tc-mcore.c: Likewise.
	* config/tc-ns32k.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-v850.c: Likewise.
1999-06-22 14:53:01 +00:00
Ian Lance Taylor
a77f5182c7 * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of
sy_value with appropriate accessor functions.
	* config/tc-arm.c (md_apply_fix3): Likewise.
	* config/tc-d10v.c (AT_WORD_P): Likewise.
	* config/tc-v850.c (reg_name_search): Likewise.
1999-06-22 14:35:19 +00:00
Ian Lance Taylor
8fc2b121ea reformat copyright paragraph 1999-06-22 14:32:33 +00:00
Ian Lance Taylor
d02d939fdb add a couple of if/else/endif comments 1999-06-22 14:32:12 +00:00
Ian Lance Taylor
fed9b18aea * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to
use symbol_get_bfdsym instead.
	* config/tc-ppc.c (md_assemble): Likewise.
	* config/tc-v850.c (v850_comm): Likewise.
1999-06-22 14:17:55 +00:00
Ian Lance Taylor
310b5aa239 1999-06-22 Jonathan Larmour <jlarmour@cygnus.co.uk>
* config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at
	the symbol, rather than accessing the bsym member.
	* config/tc-d10v.c (tc_gen_reloc): Likewise.
	* config/tc-d30v.c (tc_gen_reloc): Likewise.
	* config/tc-mcore.c (tc_gen_reloc): Likewise.
	* config/tc-mn10200.c (tc_gen_reloc): Likewise.
	* config/tc-mn10300.c (tc_gen_reloc): Likewise.
	* config/tc-ns32k.c (tc_gen_reloc): Likewise.
	* config/tc-tic30.c (tc_gen_reloc): Likewise.
	* config/tc-v850.c (tc_gen_reloc): Likewise.
1999-06-22 14:07:40 +00:00
Mark Mitchell
2f5116e25d * elflink.h (link_read_relocs): Explicitly cast external_relocs to
bfd_byte * before performing pointer arithmetic.
1999-06-22 13:57:15 +00:00
Jeff Law
9e103c9cd2 * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA
support.
        * elf32-hppa.c: Include elf-hppa.h.
        (ARCH_SIZE): Define.
        (elf_hppa_reloc_type_lookup): Delete.  Found in the common code
        now.
        (elf32_hppa_info_to_howto): Similarly.
        (elf_hppa_howto_table): Similarly.
        (elf_hppa_reloc_type_lookup): Similarly.
        (hppa_elf_gen_reloc_type): Similarly.
        * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
1999-06-22 12:20:30 +00:00
Nick Clifton
5c6bbab8fe document behaviour of dot inside sections. 1999-06-22 11:23:06 +00:00
Nick Clifton
232fb1a3f6 Catch overflow in 22_PCREL reloc. 1999-06-22 02:41:43 +00:00
Jeff Law
69e617ca27 h
* readelf.c (dump_relocations): Use elf_hppa_reloc_type instead of
        elf32_hppa_reloc_type.
1999-06-21 15:55:49 +00:00
Jeff Law
6202000d60 m
* readelf.c (dump_relocations): Use elf_hppa_reloc_type instead of
        elf32_hppa_reloc_type.
1999-06-21 15:55:47 +00:00
Jeff Law
b388df8754 d
* tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
        (hppa_gen_reloc_type): Conditionalize on BFD64.
        (tc_gen_reloc): Re-enable ELF relocations.
        * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format.
1999-06-21 15:48:51 +00:00
Jeff Law
9cb8e75e6c * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
(hppa_gen_reloc_type): Conditionalize on BFD64.
        (tc_gen_reloc): Re-enable ELF relocations.
        * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format.
1999-06-21 15:48:48 +00:00
Jeff Law
45b1824802 8
* hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
1999-06-21 15:37:49 +00:00
Jeff Law
dd1a42115b b
* hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
1999-06-21 15:37:48 +00:00
Jason Molenda
9e0b60a847 import gdb-1999-06-21 snapshot 1999-06-21 13:27:42 +00:00
Mark Mitchell
a8e53fb060 * scripttempl/elf.sc (WRITABLE_RODATA): New variable for
controlling whether or not .rodata is in the data segment or the
	text segment.
1999-06-21 13:11:05 +00:00
Ian Lance Taylor
6094e721e9 * alpha-dis.c: Don't include <stdlib.h>.
* arm-dis.c: Include "sysdep.h".
	* tic30-dis.c: Don't include <stdlib.h> or <string.h>.  Include
	"sysdep.h".
	* Makefile.am: Rebuild dependencies.
	* Makefile.in: Rebuild.
1999-06-21 10:11:52 +00:00
Ian Lance Taylor
271025ebee * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
type.
1999-06-21 10:04:37 +00:00
Ian Lance Taylor
3d10331912 * config/tc-arm.c (ldst_extend): Add parentheses to avoid
warning.
	(do_ldst): Move assignment out of if condition.
	(md_apply_fix3): Add casts to avoid printf format warnings.  Add
	parentheses to avoid warning.
1999-06-21 10:03:29 +00:00
Nick Clifton
155f0fe7a5 Use symbol_get_bfdsym() macro 1999-06-21 09:11:27 +00:00
Nick Clifton
776b24b437 Include struc-symbol.h so that symbol structure definition is available. 1999-06-21 08:08:52 +00:00
Mark Mitchell
030d863d4f * mips.h (Elf32_Internal_Msym): New structure.
(Elf32_External_Msym): Likewise.
	(ELF32_MS_REL_INDEX): New macro.
	(ELF32_MS_FLAGS): Likewise.
	(ELF32_MS_INFO): Likewise.
1999-06-21 06:57:35 +00:00
Nick Clifton
6f798e5c17 Add new command line switch --thumb-entry. 1999-06-21 03:30:32 +00:00
Nick Clifton
74479bd3b9 Link object files with the .exp file, not the .lib file 1999-06-21 03:25:35 +00:00
Richard Henderson
ba2be5816c H.J. Lu <hjl@gnu.org>
* configure.in (all_libpath): Accumulate across all enabled targets.
1999-06-20 17:43:44 +00:00
Richard Henderson
0bde07d41a * section.c (_bfd_strip_section_from_output): Ignore sections
DISCARDed by the link script.
1999-06-20 14:15:42 +00:00
Richard Henderson
f97f730029 * emultempl/armelf.em: Watch EMULATION_LIBPATH instead of
DEFAULT_EMULATION.
        * emultempl/elf32.em: Likewise.
        * emultempl/sunos.em: Likewise.
1999-06-20 14:12:08 +00:00
Ian Lance Taylor
f800e11d88 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
Remove unused local variable spp.
1999-06-19 14:10:28 +00:00
Ian Lance Taylor
cdb72c32be * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
the entry symbol is not set.
1999-06-19 14:08:46 +00:00
Ian Lance Taylor
809ffe0deb * config/tc-ppc.c: Update for symbol handling changes.
* config/obj-coff.c: Likewise.
1999-06-19 14:04:45 +00:00
DJ Delorie
aab3279588 * deflex.l: Accept single-character symbol names. 1999-06-18 19:44:21 +00:00
Richard Henderson
3336653ad1 * Makefile.am (GENSCRIPTS): Pass EMULATION_LIBPATH, not EMUL.
* configure.in (all_emuls): Add targ_extra_libpath.
        (all_libpath, EMULATION_LIBPATH): Define.
        * configure.tgt (powerpc-*-linux-gnu*): Define targ_extra_libpath.
        * genscripts.sh (LIB_PATH): Define if emulation in EMULATION_LIBPATH.
1999-06-18 15:25:45 +00:00
Jeff Law
49863f82f0 * tc-hppa.c: General cleanups of ELF support. No more spaces
and subspaces for ELF.
        (GDB_DEBUG_SPACE_NAME): Delete definition for ELF.
        (GDB_STRINGS_SUBSPACE_NAME): Likewise.
        (GDB_SYMBOLS_SUBSPACE_NAME): Likewise
        (UNWIND_SECTION_NAME): Likewise.
        (space/subspace related structures): Conditionalize definitions
        on OBJ_SOM.
        (space/subspace directives and support routines): Conditionalize
        definitions and references/uses on OBJ_SOM.
        (label_symbol_struct): For ELF, track the symbol's segment.  For
        SOM track its space.
        (pa_define_label, pa_undefine_label, pa_get_label): Corresponding
        changes.
        (USE_ALIASES): Kill for both SOM & ELF.
        (pa_def_subspaces, pa_def_spaces): Corresponding changes.
        (pa_space, pa_subspace): Corresponding changes.
        (pa_spaces_begin): Corresponding chagnes.
        (md_begin): Do not muck around with space/subspace stuff for
        OBJ_ELF.
        (md_apply_fix): Temporarily disable argument relocation stuff
        for OBJ_ELF.
        (tc_gen_reloc): Temporarily disable relocation generation for
        OBJ_ELF
        (pa_build_unwind_subspace): Similarly.
1999-06-18 13:35:16 +00:00
Richard Henderson
72b60c230f * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
GPDISP or LITUSE in a relocatable link.
1999-06-18 04:25:56 +00:00
Nick Clifton
fed881b14b Patches for eCos: Dump literal pool on section change. Mark thumb function
aliases as being thumb functions as well.
1999-06-18 01:38:26 +00:00
Joern Rennecke
aec89efbf6 * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
* (alloc_dwarf1_func): Likewise.
1999-06-17 13:26:08 +00:00
Nick Clifton
2f3519a231 Fix -Wuh and -Wnhu options so that they work. 1999-06-17 04:51:25 +00:00
Nick Clifton
0f94f4c867 Detect illegal use of hash symbols in assembler mnemonics. 1999-06-17 02:13:18 +00:00
Nick Clifton
df75f1af9c Detect symbols typed as thumb functions. 1999-06-16 10:03:59 +00:00
Nick Clifton
5876e06d81 Add detection of IMB and IMBRange SWIs. 1999-06-16 02:58:52 +00:00
Nick Clifton
dd92f63977 Add -M command line switch to objdump - text of switch is passed on to disassembler
Add support for register name set selection ot ARM disassembler.
1999-06-16 02:24:36 +00:00
Jeff Law
5ba624b0f4 * libhppa.h: Fix various formatting errors.
(assemble_3); Rewrite using CATENATE.
        (assemble_17): Fix various bugs.
1999-06-16 02:13:40 +00:00
Nick Clifton
59d23ada01 Fix definition of R_MCORE_NONE reloc 1999-06-16 02:11:50 +00:00
Richard Henderson
0c3ff40b22 * section.c (SEC_SHORT): Define.
* bfd-in2.h: Rebuild.
1999-06-15 15:12:23 +00:00
Jason Molenda
2dcad5ea23 import gdb-1999-06-14 snapshot 1999-06-15 01:08:59 +00:00
Jason Molenda
0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +00:00
Andreas Schwab
308b1ffded Fix use of @item vs. @itemx. 1999-06-14 01:40:26 +00:00
Andreas Schwab
a53f781e57 Fix typo. 1999-06-14 01:36:32 +00:00
Andreas Schwab
c89746f691 Fix typos. 1999-06-14 01:30:19 +00:00
Ian Lance Taylor
f6886bc42e remove duplicate entry, add missing blank line 1999-06-13 19:46:31 +00:00
Ian Lance Taylor
ffc0eff1cd x 1999-06-13 19:39:23 +00:00
Ian Lance Taylor
bd917ff662 * cg_dfn.c: Include "libiberty.h"
(DFN_INCR_DEPTH): Define instead of DFN_DEPTH.
	(dfn_stack): Define as pointer rather than array.
	(pre_visit): Reallocate dfn_stack as needed.
1999-06-13 19:38:06 +00:00
Ian Lance Taylor
2575273dcb mention --no-undefined 1999-06-13 19:25:57 +00:00
Ian Lance Taylor
e4a86f6fb4 From K. Richard Pixley <rich@noir.com>:
* configure.in (ppc-*-vxworks*): New target.
	* configure: Rebuild.
1999-06-13 19:12:01 +00:00
Ian Lance Taylor
e07bf1ac47 * objdump.c (disassemble_bytes): If the disassembler returns an
error, print out anything it may have printed to the buffer.  From
	H.J. Lu <hjl@gnu.org>.
1999-06-13 19:02:25 +00:00
Mark Mitchell
78de0b4335 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
Remove abfd parameter.  Use _bfd_strip_section_from_output.
	(bfd_elf_size_dynamic_sections): Adjust callers accordingly.
1999-06-13 18:35:29 +00:00
Ian Lance Taylor
aa1b0fd6fe * gas/i386/katmai.d: Tweak for recent disassembler changes. 1999-06-13 17:13:19 +00:00
Ian Lance Taylor
63a5042b9b x 1999-06-13 17:05:17 +00:00
Ian Lance Taylor
7d4210142a Rework last checkin to the following:
* i386-dis.c (FWAIT_OPCODE): Define.
	(used_prefixes): New static variable.
	(fetch_data): Don't print an error message if we have already
	fetched some bytes successfully.
	(ckprefix): Clear used_prefixes.  Use FWAIT_OPCODE, not 0x9b.
	(prefix_name): New static function.
	(print_insn_i386): If setjmp fails, indicating a data error, but
	we have managed to fetch some bytes, print the first one as a
	prefix or a .byte pseudo-op.  If fwait is followed by a non
	floating point instruction, print the first prefix.  Set
	used_prefixes when prefixes are used.  If any prefixes were not
	used after disassembling the instruction, print the first prefix
	instead of printing the instruction.
	(putop): Set used_prefixes when prefixes are used.
	(append_seg, OP_E, OP_G, OP_REG, OP_I, OP_sI, OP_J): Likewise.
	(OP_DIR, OP_SIMD_Suffix): Likewise.
1999-06-13 17:04:42 +00:00
Mark Mitchell
42751cf354 * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
* elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
	* elflink.h (elf_link_remove_section_and_adjust_dynindices): New
	function.
	(bfd_elf_size_dynamic_sections): Use it.
1999-06-13 14:49:51 +00:00
Ian Lance Taylor
5076851fbc * i386-dis.c (FWAIT_OPCODE): Define.
(fetch_data): Don't print an error message if we have already
	found an fwait prefix.
	(ckprefix): Use FWAIT_OPCODE rather than 0x9b.
	(print_insn_i386): If setjmp fails, indicating a data error, but
	we have found an fwait prefix, then print it as an fwait
	instruction.  In any case, return the number of bytes consumed, if
	any, rather than always returning -1.
1999-06-13 13:56:26 +00:00
Ian Lance Taylor
277c9afe08 mention EXCLUDE_FILE 1999-06-13 10:20:50 +00:00
Ian Lance Taylor
d7ec8102d9 * defparse.y (explist): Remove separate expline to eliminate
shift/reduce conflict.
	From Kai-Uwe Rommel <rommel@ars.de>:
	* defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE,
	INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
	(command): Add option_list after LIBRARY.
	(attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE.
	(option_list, option): New nonterminals.
	* deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE,
	INITGLOBAL, TERMINSTANCE, and TERMGLOBAL.
1999-06-13 10:16:43 +00:00
Ian Lance Taylor
3e2699126a 1999-06-13 Alan Modra <alan@spri.levels.unisa.edu.au>
* elf32-i386.c (elf_howto_table): Change R_386_PC8 from
	complain_overflow_bitfield to complain_overflow_signed.
1999-06-13 09:23:04 +00:00
Ulrich Drepper
a8aed0fb2d (tc_gen_reloc): Fix handling of GOTPC relocs. 1999-06-13 06:39:21 +00:00
Mark Mitchell
6b5bd373fb * elflink.h (elf_link_read_relocs_from_section): New function,
split out from ...
	(elf_link_read_relocs): Here.  Use it for both relocation
	sections.
1999-06-13 01:13:26 +00:00
Ian Lance Taylor
197a7bfdca * ld-checks/asm.s: Use a symbol name for .lcomm.
* ld-checks/checks.exp: Use different names for the two tests.
	Don't add extra text when invoking fail.
1999-06-12 22:40:18 +00:00
Ian Lance Taylor
7565ed77a1 * write.c (adjust_reloc_syms): Rather than never reducing reloc
which refer to symbols in linkonce sections, permit reducing the
	relocs if the symbol is local.
1999-06-12 22:15:51 +00:00
Ian Lance Taylor
aa8804e46e This fixes ! to work as documented in a memory region attribute list.
From Thomas Zenker <thz@lennartz-electronic.de>:
	* ldgram.y (attributes_opt): Use attributes_list instead of NAME.
	(attributes_list, attributes_string): New nonterminals.
	* ldlang.c (lang_set_flags): Add invert parameter.  Don't handle
	'!'.
	* ldlang.c (lang_set_flags): Update declaration.
1999-06-12 21:24:56 +00:00
Mark Mitchell
57e21befb9 * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
asect->reloc_count is valid.
1999-06-12 17:56:26 +00:00
Ian Lance Taylor
b9e57a387a * subsegs.c (subseg_text_p): New function.
* as.h (subseg_text_p): Declare.
	* read.c (do_align): Use subseg_text_p to set the default fill.
	* write.c (subsegs_finish): Likewise.
	* config/obj-coff.c (write_object_file): Likewise.
	* config/tc-i386.h (md_maybe_text): Don't define.
	(md_do_align): Use subseg_text_p to set the default fill.
	* config/tc-m32r.c (m32r_do_align): Likewise.
	* config/tc-sh.c (sh_do_align): Likewise.
	* config/tc-sparc.h (md_do_align): Likewise.
1999-06-12 16:49:51 +00:00
Ian Lance Taylor
d84feeaca5 * ar.c (O_BINARY): Define as 0 if not defined.
(ranlib_touch): Open file with O_BINARY.
1999-06-12 16:07:57 +00:00
Ian Lance Taylor
18226413df * rename.c (O_BINARY): Define as 0 if not defined.
(simple_copy): Open files with O_BINARY.
1999-06-12 16:04:07 +00:00
Ian Lance Taylor
f91ea84976 Based on patch from H. Peter Anvin <hpa@transmeta.com>:
* objcopy.c (struct section_list): Add copy field.
	(sections_copied): New static variable.
	(copy_options): Add "only-section".
	(copy_usage): Mention -j and --only-section.
	(find_section_list): Initialize copy field.
	(is_strip_section): Check for copying sections.
	(copy_object): Check sections_copied when calling filter_symbols.
	(setup_section): Check for copying sections.
	(copy_section): Likewise.
	(copy_main): Handle -j/--only-section.
	* binutils.texi, objcopy.1: Document -j/--only-section.
1999-06-12 15:42:04 +00:00
Ian Lance Taylor
f353eb8a51 * configure.in: If frexp is not available, check in -lm.
* configure: Rebuild.
1999-06-12 15:20:21 +00:00
Ian Lance Taylor
2a275620b1 * emultempl/pe.em (gld_${EMULATION_NAME}_after_parse): Don't add
entry_symbol as an undefined symbol when doing a relocateable
	link.  From <jeffdb@goodnet.com>.
1999-06-12 14:00:03 +00:00
Ian Lance Taylor
789be9f7ca * readelf.c (get_elf_class): Use correct printf format for type.
(get_data_encoding): Likewise.
	(get_osabi_name): Likewise.
	(process_file_header): Don't pass an extra argument to printf.
	(process_dynamic_segment): Cast dynamic_size to long before
	printing.
	(decode_location_expression): Cast byte_get to long before
	printing.
1999-06-12 13:30:24 +00:00
Ian Lance Taylor
2641b0c9d8 1999-06-12 David O'Brien <obrien@freebsd.org>
* configure.tgt: (i[3456]86-*-freebsd*): Now defaults to ELF.
1999-06-12 13:18:26 +00:00
Ian Lance Taylor
008960a5a4 1999-06-12 David O'Brien <obrien@freebsd.org>
* configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF.
	* configure: Rebuild.
1999-06-12 13:14:39 +00:00
Ian Lance Taylor
cc3bfcee61 * elf32-mips.c (mips_elf32_section_processing): Permit a
SHT_MIPS_REGINFO section to have a size of 0.
1999-06-12 13:08:29 +00:00
Ian Lance Taylor
7a50d4ac66 1999-06-12 David O'Brien <obrien@freebsd.org>
* config.bfd (alpha*-*-freebsd*): New target.
	(i[3456]86-*-freebsd*): Now defaults to ELF.
1999-06-12 13:06:26 +00:00
Ian Lance Taylor
99c262f8b0 * ld-scripts/phdrs.exp: Change target check from "*-*-linuxaout*"
to "*-*-linux*aout*".
	* ld-scripts/weak.exp: Likewise.
	* ld-shared/shared.exp: Likewise.  Simplify condition a bit.
1999-06-12 10:47:08 +00:00
Ian Lance Taylor
966d5bec04 * gas/elf/elf.exp: Don't run tests on "*-*-linux*aout*" or
"*-*-linux*oldld*".
	* gas/vtable/vtable.exp: Likewise.
	* gas/i386/reloc.d: Modify expected reloc names to accept a.out
	names.
1999-06-12 10:43:43 +00:00
Ian Lance Taylor
c1b640f7dc * Makefile.in: (taz): Don't use texinfo/gpl.texinfo or
texinfo/lgpl.texinfo.
1999-06-12 10:11:02 +00:00
Ian Lance Taylor
c376f4edc3 * Makefile.in: Change distribution targets to use bzip2 instead of
gzip.
	(TEXINFO_SUPPORT): Set to just texinfo/texinfo.tex.
1999-06-12 10:04:11 +00:00
Ian Lance Taylor
ff35fedcc1 add texinfo.tex 1999-06-12 09:59:55 +00:00
Ian Lance Taylor
d9ac5a3b10 * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>.
* Makefile.am: Rebuild dependencies.
	* Makefile.in: Rebuild.
1999-06-12 08:53:18 +00:00
Ian Lance Taylor
89b66cdeb5 fix copyrights 1999-06-12 08:48:00 +00:00
Ian Lance Taylor
a1605869fb * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER.
* symbols.c: Likewise.
	* config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to
	sy_next field when taking address, rather than symbol_next.
1999-06-11 21:07:46 +00:00
Ian Lance Taylor
ae69440806 * config/tc-i386.c (i386_immediate): Remove unused label
seg_unimplemented.
1999-06-11 21:07:03 +00:00
Ian Lance Taylor
9e3af0e72a * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to
offsetT.
	(out_set_addr): Don't use BYTES_PER_ADDRESS.  Instead, get the
	value from the output file architecture.
	(dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code.
	* dwarf2dbg.h: Change bfd_vma to addressT.
1999-06-11 21:06:44 +00:00
Ian Lance Taylor
14c1861305 * gas/i386/amd.s: Add a symbol so a.out tests will work.
* gas/i386/katmai.s: Likewise.
	* gas/i386/amd.d: Corresponding change.
	* gas/i386/katmai.d: Corresponding change.
1999-06-11 21:02:59 +00:00
Ian Lance Taylor
a7cd1c2299 * dwarf2dbg.h: Use PARAMS in function declarations. 1999-06-11 20:29:31 +00:00
Ian Lance Taylor
44257b8b9d * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
wrap if the relocation covers the high bit of an address.
1999-06-11 20:23:58 +00:00
Ian Lance Taylor
76171f81c7 1999-06-11 Martin Dorey <mdorey@madge.com>
* write.c (fixup_segment): Don't add symbol value for i960 ELF.
	* config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if
	OBJ_ELF.
	(md_apply_fix): Simplify BFD_ASSEMBLER handling.
1999-06-11 19:03:06 +00:00
Ian Lance Taylor
5865bb778d * config/tc-i386.c (md_apply_fix3): Add default case to switch. 1999-06-10 21:47:35 +00:00
Ian Lance Taylor
9e7c96d9d0 * config/tc-sparc.c (md_pseudo_table): Remove pushsection and
popsection.
1999-06-10 21:45:36 +00:00
Ian Lance Taylor
1b50c71893 * config/tc-sparc.c (sparc_ip): Add default case to reloc switch. 1999-06-10 21:43:24 +00:00
Ian Lance Taylor
1bf67e0db8 * read.c (read_a_source_file): Only declare inescape if
QUOTES_IN_INSN.
1999-06-10 21:36:37 +00:00
Ian Lance Taylor
41e60a8210 * itbl-ops.c (itbl_disassemble): Change sprintf format strings to
match parameters.
	(find_entry_byval): Add parens to avoid warning.
1999-06-10 21:35:32 +00:00
Ian Lance Taylor
84be4d7117 * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h". 1999-06-10 21:35:13 +00:00
Ian Lance Taylor
f5f9cc4ffb * dwarf2.c (decode_line_info): Remove unused variable first_time. 1999-06-10 21:28:56 +00:00
Ian Lance Taylor
9b4d630bb9 * symbols.c (resolve_symbol_value): Don't permit subtraction of
undefined symbols.
1999-06-10 21:26:10 +00:00
Ian Lance Taylor
8ee99f93eb * gas/mips/sync.d: Pass -mips2 to the assembler.
* gas/mips/elf_e_flags.s: Tweak code so that the tests pass for
	mips-elf target as well as mips64-elf target.
	* gas/mips/elf_e_flags1.d: Corresponding changes.
	* gas/mips/elf_e_flags2.d: Likewise.
	* gas/mips/elf_e_flags3.d: Likewise.
	* gas/mips/elf_e_flags4.d: Likewise.
	* gas/elf/elf.exp: Add setup_xfail for mips*-*-*.
	* gas/all/itbl-test.c (main): Update itbl_get_reg_val call for new
	parameter.
1999-06-10 21:15:05 +00:00
Richard Henderson
a22b281cd7 Jakub Jelinek <jj@ultra.linux.cz>
* config/tc-sparc.c (sparc_ip): Don't use side-effect expression
        with isoctal.
        * config/tc-sparc.c (synthetize_setuw, synthetize_setsw,
        synthetize_setx): New functions.
        (md_assemble): Broken the special cases into the above
        functions. Make compiler happy if sizeof(bfd_vma)==4.
        Fix sethi generated from set/setuw. If instructions have a relloc,
        always clear the fields to be relocated in the opcode.
        (sparc_ip): Remove special_case global variable.
1999-06-10 21:11:39 +00:00
Richard Henderson
b3fb1136bf Jakub Jelinek <jj@ultra.linux.cz>
* gas/sparc/synth64.s: Add checks for single register signx/clruw.
        * gas/sparc/set64.s: Add tests for setuw and setsw synthetic insns.
        * gas/sparc/prefetch.d: Add -64 as switch.
        * gas/sparc/rdpr.d: Ditto.
        * gas/sparc/wrpr.d: Ditto.
        * gas/sparc/synth64.d: Ditto, reflect synth64.s changes.
        * gas/sparc/reloc64.d: Add -64 as switch, be more tolerant, as
        current gas outputs %hi(0) and not %hi(0x0).
        * gas/sparc/set64.d: Add -64 as switch, reflect set64.s changes and
        optimizations for setx instruction.
        * gas/sparc/sparc.exp: Do sparc64*-*-* checks if it is any of the
        compiled-in targets.
1999-06-10 21:08:10 +00:00
Richard Henderson
09cb30ac5e Jakub Jelinek <jj@ultra.linux.cz>
* sparc.h (R_SPARC_max_std): Define.
1999-06-10 21:00:53 +00:00
Richard Henderson
60dac29966 Jakub Jelinek <jj@ultra.linux.cz>
* elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
        instead of R_SPARC_max.
        (sparc64_elf_info_to_howto): Likewise.
        * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
        (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
1999-06-10 20:59:54 +00:00
Ian Lance Taylor
d7ba4a779e Based on patches from John W. Woznack <jwoznack@concentric.net>:
* itbl-ops.c (itbl_get_reg_val): Add pval parameter.  Return
	indication of success rather than a value.
	(itbl_get_val): Likewise.
	(itbl_get_field): Use strcspn.  Change delimiters to include
	parens.
	* itbl-ops.h (itbl_get_reg_val): Update declaration.
	(itbl_get_val): Likewise.
	* config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val.
1999-06-10 20:35:50 +00:00
Ian Lance Taylor
7f2f689c83 * symbols.c (copy_symbol_attributes): Convert local symbols to
regular symbols.
1999-06-10 14:45:58 +00:00
Richard Henderson
18452d405c * gas/macros/irp.s: Use foo' and bar' instead of r' and s'.
* gas/macros/rept.s, gas/macros/test2.s, gas/macros/test3.s: Likewise.
        * gas/macros/{irp,rept,test2,test3}.d: Update.
1999-06-10 13:48:44 +00:00
Nick Clifton
c1d3c45e14 Add support for ARM920 and ARM920t 1999-06-10 01:59:33 +00:00
Nick Clifton
4abec3504c Updated to match latest output. 1999-06-10 01:20:33 +00:00
Jeff Law
41ee1a61d7 è
* hppa.h: Update with various changes from newest PA ELF
        specifications.
1999-06-09 14:22:08 +00:00
Jeff Law
0b3ded27b2 .
* hppa.h: Update with various changes from newest PA ELF
        specifications.
1999-06-09 14:22:07 +00:00
Nick Clifton
f75692fe1a restore previous format of --help output 1999-06-09 05:35:55 +00:00
Andreas Schwab
2bdba6c9ec * ld-cdtest/cdtest-main.cc: Avoid `implicit int' warning.
* ld-shared/sh1.c: Fix typo.
1999-06-09 03:04:03 +00:00
Andreas Schwab
3026443322 * binutils-all/objdump.exp: Tighten regexp to match `objdump -i'
output to avoid massive exponential behaviour.
1999-06-09 03:01:26 +00:00
Andreas Schwab
148d3c43be * readelf.c (dump_section): Cast bfd_vma values to [unsigned] long
for printing, in case it is wider than long.
	(display_block): Likewise.
	(read_and_display_attr): Likewise.
	(decode_location_expression): Likewise.  Don't depend on
	evaluation order.
1999-06-09 02:44:17 +00:00
Jason Molenda
6027a0b892 import gdb-1999-06-07 snapshot 1999-06-08 02:18:01 +00:00
Richard Henderson
9d7428a9e3 * section.c (_bfd_strip_section_from_output): Remove output
sections with no initial link_order.
1999-06-07 23:22:00 +00:00
Jason Molenda
cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Richard Henderson
eb858bb431 Typo. 1999-06-07 12:54:17 +00:00
Richard Henderson
63fab58c7d Jakub Jelinek <jj@ultra.linux.cz>
* config/tc-sparc.c (md_assemble): Fix up setx, support setsw.
        Optimize set if sizeof(bfd_vma) == 64.
        (sparc_ip): Fix sethi - without %hi() it should generate
        R_SPARC_32 reloc, not R_SPARC_HI22.
        (tc_gen_reloc): Handle BFD_RELOC_SPARC22.
1999-06-07 12:53:56 +00:00
Richard Henderson
440034c99f Jakub Jelinek <jj@ultra.linux.cz>
* sparc-opc.c: Fix up set, setsw, setuw operand kinds.
        Support signx %reg, clruw %reg.
1999-06-07 12:44:48 +00:00
Richard Henderson
cf9a13018b Jakub Jelinek <jj@ultra.linux.cz>
* config/tc-sparc.c (md_begin): Handle native wordsize aliases.
        (s_ncons): New function.
        (native_op_table): New table.
        (sparc_ip): Be more strict on %hi() etc.; prepare assembler for
        R_SPARC_OLO10 handling.
1999-06-07 12:40:36 +00:00
Richard Henderson
bed2c8562a Jakub Jelinek <jj@ultra.linux.cz>
* sparc-opc.c: Add aliases Solaris as supports.
1999-06-07 12:26:46 +00:00
Nick Clifton
3c82f80fc0 Define ELF_MAXPAGESIZE 1999-06-07 10:27:21 +00:00
Richard Henderson
bf29b23178 * expr.h (struct expressionS): Revert last change; widen X_op.
* config/tc-alpha.c (md_begin): Check the field is wide enough.
1999-06-07 10:23:47 +00:00
Andreas Schwab
32a5c94a56 * windres.c (usage): Fix typo. 1999-06-07 03:16:55 +00:00
Andreas Schwab
71f221746a * Makefile.am (CFILES): Add arc-{dis,opc}.c and v850-{dis,opc}.c.
* Makefile.in: Regenerated.
1999-06-07 03:06:39 +00:00
Andreas Schwab
a4835b426a * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c.
(TARGET_CPU_HFILES): Add config/tc-fr30.h.
	(TARG_ENV_HFILES): Add config/te-epoc-pe.h.
	* Makefile.in: Regenerated.
1999-06-07 02:58:53 +00:00
Andreas Schwab
eb519dff86 * Makefile.am (SOURCE_HFILES): Add missing headers.
* Makefile.in: Regenerated.
1999-06-07 02:51:40 +00:00
Andreas Schwab
9be1cda6a5 * config/obj-elf.c (obj_elf_common): In MRI mode if called as
`common' pass on to s_mri_common.
	(elf_pseudo_table): Pass 1 to obj_elf_common for `common'.
1999-06-07 02:28:54 +00:00
Mark Mitchell
7f7e7b689c * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
the N32 ABI.
1999-06-06 22:31:46 +00:00
Richard Henderson
623356292c * config/obj-elf.c (obj_elf_section): Don't free the return
value of demand_copy_C_string.
1999-06-06 00:09:50 +00:00
Richard Henderson
9de8d8f184 * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol
creation logic from obj_elf_create_section.
        * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection.
        (section_stack): New.
        (special_sections): Make const.
        (obj_elf_section): Gut and rewrite parsing.
        (obj_elf_change_section): New function broken out of obj_elf_section.
        (obj_elf_parse_section_letters): Likewise.
        (obj_elf_section_word): Likewise.
        (obj_elf_section_type): Likewise.
        (obj_elf_previous): Treat as a toggle.
        (obj_elf_popsection): New.
        * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str.
        (ppc_section_type): Likewise.
        * config/tc-ppc.h: Likewise.
        * expr.h (struct expressionS): Don't make X_op a bitfield.
        * config/tc-alpha.c: Update for symbol handling changes.
        (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section.
        (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise.
1999-06-05 23:15:34 +00:00
Richard Henderson
9894490542 * gas/elf/elf.exp: New directory.
* gas/elf/section0.[sd]: New test.
        * gas/elf/section1.[sd]: New test.
1999-06-05 23:14:42 +00:00
Richard Henderson
58b5739a4e * dwarf2dbg.c (*): Convert to K&R + prototypes.
(dwarf2_gen_line_info): Kill unused variables.
        (dwarf2_finish): Likewise.
        (dwarf2_where): Likewise.
        (dwarf2_directive_file): If we've only got a string,
        hand off to s_app_file.
        * ecoff.c: Move the include of ecoff.h.
        * symbols.h (S_IS_FUNCTION): Prototype.
        * read.c (LEX_HASH): Supply a default.
        (lex_type): Use it.
        (s_globl): Update `c' after skipping whitespace.
        * read.h (LEX_END_NAME, is_name_ender): New.
        * expr.c (get_symbol_end): Respect it.
1999-06-05 18:19:09 +00:00
Ian Lance Taylor
993142d5a4 1999-06-04 Mark Klein <mklein@dis.com>
* config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol
	to real if OBJ_SOM
	(tc_gen_reloc): Still need bfd_abs_symbol in some relocs.
1999-06-04 21:08:54 +00:00
Ian Lance Taylor
77e0b0efdb 1999-06-04 H.J. Lu <hjl@gnu.org>
* lib/ld-lib.exp (default_ld_nm): Clear nm_output first if
	necessary.
1999-06-04 20:49:14 +00:00
Richard Henderson
dc1bc0c9a5 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
        range undefweak symbols.
        * hash.c: Add missing comma after @xref{}
        * linker.c: Likewise.
1999-06-04 13:25:23 +00:00
Nick Clifton
79e5982fed Define ELF_MAXPAGESIZE for all ELF based ports.
Produce an error message of ELF_MAXPAGESIZE is not defined.
1999-06-04 12:45:07 +00:00
Ian Lance Taylor
4a54b4654d * Makefile.am: Rebuild dependencies.
(BFD32_BACKENDS): Add dwarf1.lo.
	(BFD32_BACKENDS_CFILES): Add dwarf1.c.
	* Makefile.in: Rebuild.
1999-06-04 12:00:31 +00:00
Nick Clifton
1993627733 Use 64bit wide values in internal fields.
Check symbol index against number of symbols when displaying relocations
1999-06-04 11:33:32 +00:00
Ian Lance Taylor
398e8c258a 1999-06-04 Mark Klein <mklein@dis.com>
* config/tc-hppa.c: Update for symbol handling changes.
1999-06-04 10:46:25 +00:00
Nick Clifton
9ea033b2df Add support for 64 bit ELF files. 1999-06-04 08:13:04 +00:00
Nick Clifton
7714a18c89 oops - omitted from previous delta 1999-06-04 07:42:55 +00:00
Nick Clifton
434d1125a3 Rename epoc-pe interworking function names to avoid a name space clash 1999-06-04 07:40:35 +00:00
Nick Clifton
10ab5357b1 Rename epoc-pe interworking function names to avoid a name space clash.
Add epoc-pe to built targets.
1999-06-04 07:39:48 +00:00
Nick Clifton
306b7445e1 Add mcore target 1999-06-04 07:20:18 +00:00
Nick Clifton
886796f9fa Make LDRH/LDRB consistent with LDR when target is PC-relative 1999-06-04 07:14:10 +00:00
Nick Clifton
5164c3826e Update to match current gas,bfd and opcodes. 1999-06-04 07:12:40 +00:00
Nick Clifton
dece465892 (ELF_MAXPAGESIZE): Default to 0x1000 not 1 1999-06-04 06:35:04 +00:00
Andreas Schwab
a9d024b8b0 * elf.c (elf_fake_sections): Undo change of 1999-05-10. 1999-06-04 01:07:38 +00:00
Joern Rennecke
06e1ba78a0 * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
start / stop for recalculating of r_addend of R_SH_SWITCH*.
1999-06-03 19:12:54 +00:00
Joern Rennecke
084aa3aa9f * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
in other text sections.
1999-06-03 18:54:32 +00:00
Joern Rennecke
875f7f6940 * libbfd.c (_bfd_generic_verify_endian_match): New function.
* libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
	* libbfd.h: Regenerate.
	* coff-sh.c (sh_merge_private_data): Delete.
	(coff_bfd_merge_private_bfd_data): Change to
	_bfd_generic_verify_endian_match.
	(elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
1999-06-03 18:48:24 +00:00
Nick Clifton
762100ed56 Use macros to hold names of temporary files. 1999-06-03 13:22:45 +00:00
Ian Lance Taylor
080e41e66b * cgen.c: Update for symbol handling changes. 1999-06-03 12:51:21 +00:00
Ulrich Drepper
6a9d5c9a12 Update. 1999-06-03 12:46:39 +00:00
Ian Lance Taylor
f412ead8f6 * config/tc-m32r.c: Update for symbol handling changes. 1999-06-03 12:46:26 +00:00
Ulrich Drepper
f21f3fe0b8 Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE. 1999-06-03 12:46:15 +00:00
Ian Lance Taylor
a0f75b47e9 * config/tc-hppa.h: Update for symbol handling changes.
* config/tc-hppa.c: Likewise.
1999-06-03 12:42:36 +00:00
Ian Lance Taylor
174419c123 * config/tc-arm.h: Update for symbol handling changes.
* config/tc-arm.c: Likewise.
	(symbol_make_empty): Remove.  Just use symbol_create.
1999-06-03 09:50:01 +00:00
Ian Lance Taylor
bf27257ea6 * symbols.c (symbol_set_tc): Correct name. 1999-06-03 09:49:04 +00:00
Ian Lance Taylor
a3e38ad3ed * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
prototype.
	(bfd_elf32_arm_process_before_allocation): Likewise.
	* bfd-in2.h: Rebuild.
1999-06-03 09:21:53 +00:00
Ian Lance Taylor
6104f0a06c * Makefile.am: Rebuild dependencies.
($(OBJS)): Don't depend upon struc-symbol.h.
	(.dep1, .tcdep, .objdep): Create itbl-parse.h.
	* dep-in.sed: Don't remove struc-symbol.h.
	* Makefile.in: Rebuild.
1999-06-03 09:06:24 +00:00
Ian Lance Taylor
b401371382 * doc/internals.texi (Symbols): Describe changes in symbol
handling.
1999-06-03 08:44:04 +00:00
Ian Lance Taylor
348a348349 * common.h (EM_PPC64): Define. 1999-06-03 08:20:07 +00:00
Richard Henderson
e0a2c38a7b Update. 1999-06-03 03:26:53 +00:00
Richard Henderson
c6e94b2767 * internal.h (BEOS_EXE_IMAGE_BASE, BEOS_DLL_IMAGE_BASE): New. 1999-06-03 03:26:17 +00:00
Richard Henderson
ac50fedaa4 Update. 1999-06-03 03:20:40 +00:00
Richard Henderson
6576f0b52a * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol
instead of doing the work by hand.
1999-06-03 03:20:21 +00:00
Richard Henderson
fac0d250c7 * as.c (parse_args): Add option -gdwarf2 to allow requesting
DWARF2 debug info (line information only, at this point).
        * as.h: Update comment about supported debug formats.
        * dwarf2dbg.c, dwarf2dbg.h: New files.
        * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them.
1999-06-03 02:51:53 +00:00
Richard Henderson
b585bc2c0a * expr.c (operand): Don't use [ for parens if we want an index op.
(op_encoding): Switch [ into O_index, if desired.
        (op_rank): Renumber with O_index on bottom.
        (expr): If O_index, match closing bracket.
        * expr.h (O_index): New.
1999-06-03 02:51:27 +00:00
Richard Henderson
1c32af2255 * read.c (read_a_source_file): Conditionally allow matched "
in lines passed to md_assemble.
1999-06-03 02:51:09 +00:00
Richard Henderson
86eab3efc4 * config/obj-elf.c (elf_pseudo_table): Add `common'. 1999-06-03 02:50:51 +00:00
Richard Henderson
159002ff69 David Mosberger <davidm@hpl.hp.com>
* dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
        track of end_sequence markers.
        (add_line_info): Add END_SEQUENCE arg.
        (decode_line_info): Don't try to infer lo_pc and hi_pc from the
        debug-line info---it doesn't work right if a compilation unit
        consists of multiple discontiguous code-sequences.  It would be
        worthwhile to optimize for the common case where a compilation
        unit results in a contiguous set of code sequences, but this is
        quite tricky to get right for arbitrary DWARF2 files.
        (lookup_address_in_line_info_table): Don't use the last line entry
        for a compilation unit for anything with an address higher than
        this line entry.  Also, check for end_sequence markers to
        correctly handle discontinuities.
        (_bfd_dwarf2_find_nearest_line): When checking previously loaded
        compilation units, check all compilation units with each->high==0
        just like when reading compilation units.
        * dwarf2.c (decode_line_info): Initialize table->files and
        table->last_line to NULL to avoid segfaults due to random
        values in these members.
        (concat_filename): Check for out-of-range file number before
        indexing filename table.  Segfaults suck.
        * dwarf2.c (decode_line_info): Don't truncate address to least
        significant 32 bits (breaks 64 bit targets).
        (lookup_address_in_function_table): Ditto.
        (comp_unit_contains_address): Ditto.
1999-06-03 02:46:47 +00:00
Ian Lance Taylor
49309057b4 Add support for storing local symbols in a small structure to save
memory when assembling large files.
	* as.h: Don't include struc-symbol.h.
	(symbolS): Add typedef.
	* symbols.c: Include struc-symbol.h.
	(local_hash): New static variable.
	(save_symbol_name): New static function, from symbol_create.
	(symbol_create): Call save_symbol_name.
	(local_symbol_count): New static variable.
	(local_symbol_conversion_count): Likewise.
	(LOCAL_SYMBOL_CHECK): Define.
	(local_symbol_make): New static function.
	(local_symbol_convert): New static function.
	(colon): Handle local symbols.  Create local symbol for local
	label name.
	(symbol_table_insert): Handle local symbols.
	(symbol_find_or_make): Create local symbol for local label name.
	(symbol_find_base): Check for local symbol.
	(symbol_append, symbol_insert): Check for local symbols.
	(symbol_clear_list_pointers, symbol_remove): Likewise.
	(verify_symbol_chain): Likewise.
	(copy_symbol_attributes): Likewise.
	(resolve_symbol_value): Handle local symbols.
	(resolve_local_symbol): New static function.
	(resolve_local_symbol_values): New function.
	(S_GET_VALUE, S_SET_VALUE): Handle local symbols.
	(S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise.
	(S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise.
	(S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise.
	(S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise.
	(symbol_previous, symbol_next): New functions.
	(symbol_get_value_expression): Likewise.
	(symbol_set_value_expression): Likewise.
	(symbol_set_frag, symbol_get_frag): Likewise.
	(symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise.
	(symbol_mark_used_in_reloc): Likewise.
	(symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise.
	(symbol_mark_mri_common, symbol_clear_mri_common): Likewise.
	(symbol_mri_common_p): Likewise.
	(symbol_mark_written, symbol_clear_written): Likewise.
	(symbol_written_p): Likewise.
	(symbol_mark_resolved, symbol_resolved_p): Likewise.
	(symbol_section_p, symbol_equated_p): Likewise.
	(symbol_constant_p): Likewise.
	(symbol_get_bfdsym, symbol_set_bfdsym): Likewise.
	(symbol_get_obj, symbol_set_obj): Likewise.
	(symbol_get_tc, symbol_set_tc): Likewise.
	(symbol_begin): Initialize local_hash.
	(print_symbol_value_1): Handle local symbols.
	(symbol_print_statistics): Print local symbol statistics.
	* symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER.
	Declare new symbols.c functions.  Move many declarations here from
	struc-symbol.h.
	(SYMBOLS_NEED_BACKPOINTERS): Define if needed.
	* struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set.
	(struct symbol): Move bsym to make it clearly the first field.
	Remove TARGET_SYMBOL_FIELDS.
	(symbolS): Don't typedef.
	(struct broken_word): Remove.
	(N_TYPE_seg, seg_N_TYPE): Move to symbol.h.
	(SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise.
	(symbol_clear_list_pointers): Likewise.
	(symbol_insert, symbol_remove): Likewise.
	(symbol_previous, symbol_append): Likewise.
	(verify_symbol_chain, verify_symbol_chain_2): Likewise.
	(struct local_symbol): Define.
	(local_symbol_converted_p, local_symbol_mark_converted): Define.
	(local_symbol_resolved_p, local_symbol_mark_resolved): Define.
	(local_symbol_get_frag, local_symbol_set_frag): Define.
	(local_symbol_get_real_symbol): Define.
	(local_symbol_set_real_symbol): Define.
	Define.
	* write.c (write_object_file): Call resolve_local_symbol_values.
	* config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define.
	(TARGET_SYMBOL_FIELDS): Don't define.
	* config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field.  If
	ECOFF_DEBUGGING, add ECOFF fields.
	(ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
	* config/obj-multi.h (struct elf_obj_sy): Add local field.  If
	ECOFF_DEBUGGING, add ECOFF fields.
	(ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
	(ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define.
	* config/tc-mcore.h: Don't include struc-symbol.h.
	(TARGET_SYMBOL_FIELDS): Don't define.
	(struct mcore_tc_sy): Define.
	(TC_SYMFIELD_TYPE): Define.
	* Many files: Use symbolS instead of struct symbol.  Use new
	accessor functions rather than referring to symbolS fields
	directly.
	* read.c (s_mri_common): Don't add in value of line_label.
	* config/tc-mips.c (md_apply_fix): Correct parenthesization when
	checking for SEC_LINK_ONCE.
	* config/tc-sh.h (sh_fix_adjustable): Declare.
1999-06-03 00:29:48 +00:00
Ian Lance Taylor
2b47531bf9 * app.c (input_buffer): New static variable.
(app_push): Save saved_input in allocated buffer.
	(app_pop): Restored saved_input.
	(do_scrub_chars): Change get parameter to take char * and int as
	arguments.  Change GET macro to pass input_buffer to get
	function.  Don't save input into allocated buffer.
	* as.h (do_scrub_chars): Update declaration.
	* input-file.c (input_file_get): Change to take char * and int.
	Read data into passed in buffer.  Remove static buffer.
	* read.c (scrub_from_string): Change to take char * and int.  Copy
	data into passed in buffer.
1999-06-03 00:24:14 +00:00
Ian Lance Taylor
1af6dcd2bb * gasp.c (chunksize): New variable.
* macro.c (macro_expand_body): Call hash_jam with NULL rather than
	hash_delete
.CVS: ----------------------------------------------------------------------
1999-06-03 00:23:27 +00:00
Ian Lance Taylor
54d22525bb * hash.h: Neaten. Declare hash_traverse.
* hash.c: Complete rewrite based on BFD hashing code.
1999-06-02 23:22:50 +00:00
Richard Henderson
4305932a21 Jason Merrill <jason@yorick.cygnus.com>
* scripttempl/v850.sc: Add initp support.
1999-06-02 20:47:23 +00:00
Richard Henderson
2581206fa2 Shouldn't have escaped. 1999-06-02 20:33:41 +00:00
Mark Mitchell
d2905643ff * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
* elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
	(mips_elf64_howto_table_rela): Likewise.
1999-06-02 18:17:59 +00:00
Mark Mitchell
42fdc50906 * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
* elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
	(mips_elf64_howto_table_rela): Likewise.
	* elfcode.h (elf_slurp_reloc_table_from_section): New function,
	split out from ...
	(elf_slurp_reloc_table): Here.  Use it to handle the case where a
	single section has two associated relocation sections.
1999-06-02 18:16:48 +00:00
Richard Henderson
6e3db71c77 Stu Grossman <grossman@babylon-5.cygnus.com>
* dwarf.h: Add LANG_JAVA.
        * dwarf2.h: Add DW_LANG_Java.
1999-06-02 18:14:14 +00:00
Mark Mitchell
6c8cb66eb1 Update copyright dates. 1999-06-02 16:31:16 +00:00
Richard Henderson
c71c54c969 Update copyright. 1999-06-02 16:11:43 +00:00
Richard Henderson
9d8cefa978 Mark Salter <msalter@cygnus.com>
* coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
        COFF_WITH_PE defined.
1999-06-02 15:36:48 +00:00
Nick Clifton
c9fca91dfb Rename interworking functions to avoid a name space collision 1999-06-02 14:27:10 +00:00
Nick Clifton
46d23b7c90 Rename ARM interworking functions to avoid a name space collision 1999-06-02 14:26:01 +00:00
Mark Mitchell
bf572ba0b9 * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
may_use_rel_p, may_use_rela_p, default_use_rela_p.
	(bfd_elf_section_data): Add use_rela_p.
	* elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
	(_bfd_elf_new_section_hook): Likewise.
	(elf_fake_sections): Use may_use_rela_p, etc., instead of
	use_rela_p.
	(_bfd_elf_copy_private_section_data): Copy use_rela_p.
	* elfcode.h (write_relocs): Determine whether or not use rela
	relocs based on the relocation section header.
	* elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
	instead of use_rela_p.
	* elfxx-target.h (elf_backend_may_use_relp): New macro.
	(elf_backend_may_use_rela_p): Likewise.
	(elf_backend_default_use_rela_p): Likewise.
	(elfNN_bed): Use them.
1999-06-02 13:01:04 +00:00
Richard Henderson
3fe702fddf * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096. 1999-06-02 12:39:44 +00:00
Richard Henderson
d8bcc1ac10 * dlltool.c (gen_exp_file): Revert 19990411 change. 1999-06-02 12:37:48 +00:00
Richard Henderson
cd785be602 Forgot to commit. 1999-06-02 12:29:27 +00:00
Mark Mitchell
3f830999e3 * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
(BFD_RELOC_MIPS_GOT_PAGE): Likewise.
	(BFD_RELOC_MIPS_GOT_OFST): Likewise.
	(BFD_RELOC_MIPS_GOT_DISP): Likewise.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Likewise.
	* elf32-mips.c (mips_info_to_howto_rela): New function.
	(USE_REL): Adjust for new conventions.
	(MINUS_ONE): New macro.
	(elf_mips_howto_table): Add R_MIPS_SUB.
	(mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
	and MIPS_GOT_DISP.
	(mips_elf_final_write_processing): Set sh_link, not sh_info, for a
	.MIPS.content section.
	(_bfd_mips_elf_fake_sections): Treat all sections that begin
	with .MIPS.content as .MIPS.content sections.  Set
	SHF_MNIPS_NOSTRIP for such section.
	(elf_info_to_howto): Define to mips_info_to_howto_rela.
	* elf64-mips.c (mips_r):  Add entries for MIPS_SUB, MIPS_GOT_PAGE,
	MIPS_GOT_OFST, and MIPS_GOT_DISP.
1999-06-02 10:20:16 +00:00
Andreas Schwab
015985c9fc * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
variable.
1999-06-02 02:56:30 +00:00
Andreas Schwab
70f06c4ad0 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
`else'.
1999-06-02 02:53:21 +00:00
Jason Molenda
ac9a91a77c import gdb-1999-06-01 snapshot 1999-06-01 15:44:41 +00:00
Andreas Schwab
aa903cfb1b * readelf.c (process_relocs): Determine type of reloc from
DT_PLTREL and from section type.
1999-05-31 00:58:59 +00:00
Richard Henderson
af754d91f9 Cort Dougan <cort@cs.nmt.edu>
* config.guess (ppc-*-linux-gnu): Also use ld emul elf32ppclinux.
1999-05-30 16:06:14 +00:00
Richard Henderson
ec2f040d55 Cort Dougan <cort@attis.cs.nmt.edu>
* Makefile.am (ALL_EMULATIONS): Add eelf32ppclinux.o.
        * configure.tgt (powerpc-*-linux-gnu): Use it.
        * emulparams/elf32ppclinux.sh: New file.
1999-05-30 15:55:31 +00:00
Nick Clifton
2ef994e0d6 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
	1993-03-25 (!!).  Take into account the bitmasks for the reloc so
	the addend does not overflow into the rest of the word
1999-05-30 11:36:53 +00:00
Ian Lance Taylor
511ab9e95b * ld.texinfo (Options): Clarify that options which refer to files
must be properly ordered.
1999-05-29 19:43:33 +00:00
Nick Clifton
ba96a88f08 Fix implementation of R_ARM_PC24 and R_ARM_THM_PC22 relocs to conform to spec. 1999-05-29 11:05:22 +00:00
Nick Clifton
7ca69e9e10 Implement new command line option for new ABI: -p which prevents the ARM code
from exhibiting any knowledge of the length of the processor's pipeline.
1999-05-29 10:57:44 +00:00
Nick Clifton
ab5e779453 Display unknown values detected in ELF program header. 1999-05-29 10:51:14 +00:00
Nick Clifton
661e4995b2 Include pipeline offset in addend unless dealing with an old ABI. 1999-05-29 10:47:20 +00:00
Nick Clifton
3d4920d7c3 Define ELFOSABI_ARM 1999-05-29 10:42:45 +00:00
Nick Clifton
ccf04c82c7 fix typo. 1999-05-29 09:09:39 +00:00
Nick Clifton
04a866f231 remove spurious code. 1999-05-28 17:24:21 +00:00
Doug Evans
d9a622197d -Wchar-subscripts cleanup
* listing.c (listing_newline): Use unsigned char variable, so
 	calls to isascii,iscntrl are correct.
	* atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with
	(unsigned char).
	* ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto.
	* config/obj-elf.c (obj_elf_vtable_inherit): Ditto.
	* config/tc-mips.c (mips_ip,mips16_ip): Ditto.
	(my_getSmallExpression,get_number,s_mips_ent): Ditto.
1999-05-28 15:28:56 +00:00
Jeff Law
cd8a80baf2 * hppa.h (pa_opcodes): Move integer arithmetic instructions after
integer logical instructions.
1999-05-28 14:26:52 +00:00
Nick Clifton
e6c51ed4df Initialise EI_OSABI and EI_ABIVERSION fields of e_ident array.
Add ability for backends to process program and section headers after they
have been created.
1999-05-28 13:24:33 +00:00
Nick Clifton
229cf42b33 fix typo. 1999-05-28 10:53:04 +00:00
Nick Clifton
b3043ee4e2 Minor formatting changes. 1999-05-28 10:50:29 +00:00
Nick Clifton
e15e4a6398 Update comment 1999-05-28 10:47:30 +00:00
Nick Clifton
9c19a80986 Better coping with different reloc types. 1999-05-28 10:14:11 +00:00
Ian Lance Taylor
633fd09f3c * configure.in: Check whether getuid and getgid exist.
* archive.c: Define getuid and getgid as macros if HAVE_GETUID or
	HAVE_GETGID are not defined, respectively.
	(bfd_write_armap): Don't special case on _WIN32 for getuid and
	getgid.
	* configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
	* configure, config.in: Rebuild.
1999-05-27 22:48:53 +00:00
Ian Lance Taylor
6da466c730 1999-05-28 Torbjorn Granlund <tege@matematik.su.se>
* config/tc-m68k.c (m68k_ip): Check for disallowed index register
	width for Coldfire.
	(arch_coldfire_p): New #define.
	(m68k_ip, m68k_init_after_args): Use arch_coldfire_p.
1999-05-28  Linus Nordberg  <linus.nordberg@canit.se>
	* config/tc-m68k.c (install_operand): Add places `n', `o'.
	* config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'.
	(install_operand): Add place `N'.
	(init_table): Add registers ACC, MACSR, MASK.
	* config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK.
	* config/tc-m68k.c: Change mcf5200 --> mcf.
	(archs): Add mcf5206e, mcf5307.
	(m68k_ip): Add format `u'.
	(install_operand): Add place `m', `M', `h'.
	(init_table): Add upper/lower registers.
	* config/m68k-parse.h (m68k_register): Add upper/lower registers.
1999-05-27 22:36:51 +00:00
Ian Lance Taylor
461d5ddde0 1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* m68k-opc.c: Rename MACL/MSACL to MAC/MSAC.  Add MACM/MSACM.  Add
	MOVE MACSR,CCR.
	* m68k-dis.c (fetch_arg): Add places `n', `o'.
	* m68k-opc.c: Add MSAC, MACL, MOVE to/from ACC, MACSR, MASK.
	Add mcf5206e to appropriate instructions.
	Add alias for MAC, MSAC.
	* m68k-dis.c (print_insn_arg): Add formats `E', `G', `H' and place
	`N'.
	* m68k-opc.c (m68k_opcodes): Add divsw, divsl, divuw, divul, macl,
	macw, remsl, remul for mcf5307.  Change mcf5200 --> mcf.
	* m68k-dis.c: Add format `u' and places `h', `m', `M'.
1999-05-27 22:33:14 +00:00
Ian Lance Taylor
1fca749bd1 1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* m68k.h: Document new formats `E', `G', `H' and new places `N',
	`n', `o'.
	* m68k.h: Define mcf5206e, mcf5307, mcf.  Document new format `u'
	and new places `m', `M', `h'.
1999-05-27 22:31:03 +00:00
Ian Lance Taylor
0d59e34570 * binutils-all/readelf.h: Update for changes of 1999-04-08. 1999-05-27 22:05:26 +00:00
Ian Lance Taylor
63fcb9e946 * readelf.c: Include "elf/i960.h".
(dump_relocations): Handle EM_960.
1999-05-27 22:04:40 +00:00
Ian Lance Taylor
0dbfb37cce * gas/vtable/vtable.exp: Don't run test for i960 yet. 1999-05-27 21:58:10 +00:00
Ian Lance Taylor
bedf545c12 1999-05-28 Martin Dorey <mdorey@madge.com>
* config/tc-i960.c: Several minor changes to add ELF and
	BFD_ASSEMBLER support.
	* config/tc-i960.h: Likewise.
	* configure.in (i960-*-elf*): New target.
	* aclocal.m4, configure: Rebuild.
1999-05-27 21:57:48 +00:00
Ian Lance Taylor
5379904c27 rebuild dependencies 1999-05-27 21:54:35 +00:00
Ian Lance Taylor
0ccf812a6e 1999-05-28 Martin Dorey <mdorey@madge.com>
* configure.tgt (i960-*-elf*): New target.
	* emulparams/elf32_i960.sh: New file.
	* Makefile.am (ALL_EMULATIONS): Add eelf32_i960.o.
	(eelf32_i960.c): New target.
	* Makefile.in: Rebuild.
1999-05-27 21:49:21 +00:00
Ian Lance Taylor
dc93fc57a9 fix copyrights 1999-05-27 21:44:39 +00:00
Ian Lance Taylor
b2ef150dc1 1999-05-28 Martin Dorey <mdorey@madge.com>
* elf32-i960.c: New file.
	* elf.c (prep_headers): Handle bfd_arch_i960.
	* targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
	* config.bfd (i960-*-elf*): New target.
	* configure.in (bfd_elf32_i960_vec): New target vector.
	* Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-i960.c.
	* Makefile.in, aclocal.m4, configure: Rebuild.
1999-05-27 21:42:14 +00:00
Ian Lance Taylor
2d1d084fef rebuild 1999-05-27 21:40:25 +00:00
Ian Lance Taylor
82599b0c2e * i960.h: New file. 1999-05-27 21:29:05 +00:00
Ian Lance Taylor
c2c40d939b break long line 1999-05-27 20:48:12 +00:00
Nick Clifton
5f97aa0c8a Add support for BFD_RELOC_ARM_PLT32 1999-05-27 07:41:14 +00:00
Jeff Law
aa00890758 * hppa.h (pa_opcodes): Add several processor specific system
instructions.
1999-05-27 03:19:32 +00:00
Andreas Schwab
8066d1a283 * objcopy.c (copy_archive): Preserve dates of archive members if
requested.
1999-05-27 03:16:15 +00:00
Andreas Schwab
1b228002a1 * readelf.c (dump_relocations): Always print the addend on RELA
systems even if there is no symbol.
	(process_program_headers): Reset dynamic_size before looping
	through the program headers.
	(process_version_sections): Cast sh_offset to unsigned long for
	printing in case bfd_vma is wider.
	(process_symbol_table): Use get_symbol_index_type when printing
	st_shndx.
1999-05-27 03:02:23 +00:00
Nick Clifton
a13cba0d36 Use correct template 1999-05-26 17:23:32 +00:00
Jeff Law
e26b85f069 * hppa.h (pa_opcodes): Add second entry for "comb", "comib",
"addb", and "addib" to be used by the disassembler.
1999-05-26 16:04:11 +00:00
Nick Clifton
780a67af1e Applied patches from Philip Blundell <pb@nexus.co.uk>, to improve PIC support. 1999-05-26 08:27:38 +00:00
Jason Molenda
392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
DJ Delorie
751d21b5b9 * windres.c: add verbose option
(main): process verbose option
* resrc.c (look_for_default): new.  Look for the default
preprocessor in a given location.
(read_rc_file): for foo/bar-windres, look for foo/bar-gcc,
foo/gcc (in case of foo/windres), and then gcc (the old default).
1999-05-25 12:10:27 +00:00
Catherine Moore
fa0e42e457 * coff-arm.c (coff_arm_relocate_section): Don't emit
base file entries for pc-relative values.
1999-05-25 11:56:16 +00:00
DJ Delorie
93dfcdf061 * peicode.h (coff_swap_sym_in): When we create the actual section
to reflect the not-there section C_SECTION symbols refer to,
change the symbol class to C_STAT as the section is now really
there.
1999-05-25 11:37:40 +00:00
Alan Modra
e1b283bbb7 ÿ
Fiz i386-iaout breakage introduced by last patch.
1999-05-24 18:25:27 +00:00
Alan Modra
40c62b2548 è
Fiz i386-iaout breakage introduced by last patch.
1999-05-24 18:25:25 +00:00
Nick Clifton
6c3175b08d Updated to match latest version in EGCS 1999-05-24 15:20:21 +00:00
Nick Clifton
31ce062864 1999-05-24 Philip Blundell <philb@gnu.org>
* emultempl/armelf.em (before_parse): Set config.dynamic_link and
 	config.has_shared.
	* emulparams/armelf.sh (GENERATE_SHLIB_SCRIPT): Define.
	* emulparams/armelf_linux.sh (GENERATE_SHLIB_SCRIPT): Likewise
1999-05-24 12:49:30 +00:00
Nick Clifton
db65e864b3 1999-05-24 Philip Blundell <pb@nexus.co.uk>
* elf32-arm.h (elf32_arm_relocate_section): Undo change of
 	1999-03-25
1999-05-24 10:06:39 +00:00
Jason Molenda
5ce7ce3191 Sync up with Cygnus CVS repository (cvs import doesn't handle these
automatically, alas.  This cleanpu must be automated in the near future).
Tue Mar  9 19:25:11 1999  Stan Shebs  <shebs@andros.cygnus.com>
        * h8-cfg.texi: Remove, hasn't been used in years.
1999-05-10  Martin Hunt  <hunt@cygnus.com>
        * debugify.c, debugify.h: Removed because they are no
        longer used.
Tue Mar 16 15:29:04 1999  Stan Shebs  <shebs@andros.cygnus.com>
        * go32-xdep.c: Remove, no longer used by anything.
1999-05-23 20:02:56 +00:00
Nick Clifton
b8a40f5379 Accept 'sp' as a valid register name. 1999-05-22 14:49:51 +00:00
Nick Clifton
1220a72943 Add definitions related to shared objects (copied from elf32.em) 1999-05-22 09:55:50 +00:00
Jason Molenda
9e086581c7 import gdb-1999-0519 1999-05-19 19:58:41 +00:00
Catherine Moore
1ceea51453 * coff-arm.c (coff_arm_relocate_section): Account for
multiple glue sections when generating base file entries.
1999-05-19 10:20:12 +00:00
Nick Clifton
948221a8bd Use renamed ARM cpu flag bits 1999-05-19 07:27:14 +00:00
Nick Clifton
a74ffb029e Renumber cpu flag bits to avoid collision with PE flag bits 1999-05-19 07:25:59 +00:00
Andreas Schwab
3699964af7 * Makefile.am (ALL_EMULATIONS): Remove earmlinux.o and
earm26linux.o, add earmelf_linux.o and earmelf_linux26.o.
	* Makefile.in: Regenerated.
1999-05-19 03:50:52 +00:00
Nick Clifton
8535ca756a Add xfail for mcore-elf 1999-05-17 09:46:52 +00:00
Nick Clifton
2481b576e9 Update to match lattest assembler/objdump outpuyt 1999-05-17 09:26:37 +00:00
Alan Modra
2da11e11a4 è
Add missing files from last change in gas/testsuite.
i386-dis.c: Catch a number of cases where an invalid modrm would result in
bogus disassembly.  const lots of places.
1999-05-17 08:35:42 +00:00
Alan Modra
5028a927f6 a
Add missing files from last change in gas/testsuite.
i386-dis.c: Catch a number of cases where an invalid modrm would result in
bogus disassembly.  const lots of places.
1999-05-17 08:35:41 +00:00
Alan Modra
f4497960b0 Ø
Add missing files from last change in gas/testsuite.
i386-dis.c: Catch a number of cases where an invalid modrm would result in
bogus disassembly.  const lots of places.
1999-05-17 08:35:40 +00:00
Alan Modra
fa67f43732 è
Move bitfield overflow checks to after the md_apply_fix call in
fixup_segment so that md_apply_fix has a chance to modify value.
Handle 8 and 16-bit pcrel relocs for i386.
Prototypes and other minor code cleanups.
1999-05-17 03:21:52 +00:00
Alan Modra
93382f6dd7 n
Move bitfield overflow checks to after the md_apply_fix call in
fixup_segment so that md_apply_fix has a chance to modify value.
Handle 8 and 16-bit pcrel relocs for i386.
Prototypes and other minor code cleanups.
1999-05-17 03:21:50 +00:00
Alan Modra
ec0f0840fc *** empty log message *** 1999-05-17 03:21:49 +00:00
Alan Modra
6d4d30bb14 /
Move bitfield overflow checks to after the md_apply_fix call in
fixup_segment so that md_apply_fix has a chance to modify value.
Handle 8 and 16-bit pcrel relocs for i386.
Prototypes and other minor code cleanups.
1999-05-17 03:21:46 +00:00
Alan Modra
daa01f85d4 Move bitfield overflow checks to after the md_apply_fix call in
fixup_segment so that md_apply_fix has a chance to modify value.
Handle 8 and 16-bit pcrel relocs for i386.
Prototypes and other minor code cleanups.
1999-05-17 03:21:41 +00:00
Nick Clifton
1349dd650d reinstate uin_reloc_p 1999-05-16 14:16:52 +00:00
Nick Clifton
49e315b1a1 Add support for generating an mcore-elf dll. 1999-05-16 14:12:20 +00:00
Nick Clifton
06f2f02a3d Add mcore-elf support for shared libraries 1999-05-16 14:02:47 +00:00
Nick Clifton
7c2499d256 Add PLT relolcs 1999-05-16 13:57:59 +00:00
Nick Clifton
36797d47c9 Add support for mcore RVA relocs. 1999-05-15 15:38:13 +00:00
Nick Clifton
661016bb24 Add support for mcore to dlltool. 1999-05-15 15:25:22 +00:00
Nick Clifton
daa8de753e Defined rva relocations. 1999-05-15 15:13:18 +00:00
Andreas Schwab
97eaf9de67 * elf32-arm.h (elf32_arm_relocate_section): Fix operator
precedence between bit-and and comparison.
1999-05-14 02:02:26 +00:00
Andreas Schwab
19b341776d * config/atof-ieee.c (gen_to_words): Correctly round a
denormalized number.  Fix off-by-one in range checking for
	exponent in a denormal.
1999-05-14 01:53:28 +00:00
Richard Henderson
de24ad2106 Joel Sherrill (joel@OARcorp.com)
* configure.tgt (i386-*-rtemself*, sh-*-rtemself*): New targets.
        (mips*el-*-rtems*, powerpcle-*-rtems*): New targets.
1999-05-13 09:49:48 +00:00
Richard Henderson
53f3de9893 Joel Sherrill (joel@OARcorp.com)
* configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets.
1999-05-13 09:49:29 +00:00
Richard Henderson
2e9a84c864 Joel Sherrill (joel@OARcorp.com)
* config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
        list of target formats (targ_selvecs).
        (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
        (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
1999-05-13 09:49:09 +00:00
Alan Modra
c608c12e5e P
i386 PIII SIMD support, remove ReverseRegRegmem kludge
tidy a few things in i386 intel mode disassembly
1999-05-13 06:00:30 +00:00
Alan Modra
3afcee8ec9 X
i386 PIII SIMD support, remove ReverseRegRegmem kludge
tidy a few things in i386 intel mode disassembly
1999-05-13 06:00:14 +00:00
Alan Modra
3f4438abfd ÿ
i386 PIII SIMD support, remove ReverseRegRegmem kludge
tidy a few things in i386 intel mode disassembly
1999-05-13 06:00:13 +00:00
Alan Modra
578ec497b6 i386 PIII SIMD support, remove ReverseRegRegmem kludge
tidy a few things in i386 intel mode disassembly
1999-05-13 06:00:10 +00:00
DJ Delorie
1a62478879 * rclex.l: add code to suppress certain output from cpp, replace
all returns with MAYBE_RETURN
	(MAYBE_RETURN): new, implement the suppression by returning
	IGNORED_TOKEN as needed.
	(cpp_line): remember which file we're in, mark data from included
	*.h files for suppression.
	* rcparse.y (input): allow IGNORED_TOKEN outside of known constructs
1999-05-12 22:03:10 +00:00
DJ Delorie
c6c37250e9 1999-05-10 DJ Delorie <dj@cygnus.com>
* scripttempl/pe.sc: Specify the output arch, which Ian says is
	the Right Thing to do.
	* emultempl/pe.em: various changes to parameterize the
	target-specific information.
	(gld_i386pe_after_open): Detect and fix MS import libraries
	by renaming the member objects (which are all named the same).
	* pe-dll.c: various changes to parameterize the target-specific
	information.
	(generate_reloc): support relocs more generically to allow for
	expansion.
	(pe_exe_build_sections): new; used to add .relocs to .exes
	(pe_exe_fill_sections): ditto
1999-05-11 21:06:50 +00:00
DJ Delorie
09cda596de 1999-05-10 DJ Delorie <dj@cygnus.com>
* windres.c (quot): Quote shell metacharacters in a string
	(main): quote parameters to cpp that might have metacharacters in
	them.  Allow -D as an alias for --define to allow for sharing make
	macros with gcc.
	* objdump.c (dump_reloc_set): don't core if howto->name is NULL
	* Makefile.am: Give rescoff.c a cpu-specific -D so it can set
	the correct BFD.
	* Makefile.in: ditto
	* rescoff.c (write_coff_file): Set the correct BFD
1999-05-11 21:06:16 +00:00
DJ Delorie
ec0ef80e9f * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
reasonable mode until "ar x" is smart enough to skip it (fixes
	gcc/libgcc.a builds on mips-ecoff targets
	* coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
	to work.  Hack to support MS import libraries, which use different
	COMDAT types than GNU.
	(coff_slurp_symbol_table): C_SECTION symbols are local; they refer
	to implied zero-length sections (see peicode below)
	* coffgen.c (coff_get_normalized_symtab): Properly read long MS
	filename symbols, which use one *or more* auxents.
	* coffswap.h (coff_swap_aux_in): ditto
	* peicode.h (coff_swap_sym_in): Build the implied zero-length
	sections
1999-05-11 21:05:44 +00:00
DJ Delorie
69f868fa5d * ld-srec/srec.exp: Do not run tests for PE based ports. 1999-05-11 20:31:53 +00:00
Stan Shebs
b5a0ac7029 import gdb-1999-05-10 1999-05-11 20:29:07 +00:00
Jeff Law
5c746d907d * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
for all relocations.
1999-05-11 14:57:28 +00:00
Stan Shebs
cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +00:00
Jim Blandy
e9868447b4 *** empty log message *** 1999-05-11 12:42:30 +00:00
Jim Blandy
7d0e3be3b1 * cplus-dem.c (main): Use table lookup to distinguish identifier
characters from non-identifier characters.
(standard_symbol_alphabet, hp_symbol_alphabet): New functions.
1999-05-11 12:42:12 +00:00
Catherine Moore
626e01051a 1999-05-10 Catherine Moore <clm@cygnus.com>
* emulttempl/pe.em (gld_${EMULATION_NAME}_after_open):
	Check for TARGET_IS_arm_epoc_pe.
	(gld_${EMULATION_NAME}_before_allocation): Likewise.
1999-05-10 18:30:21 +00:00
Catherine Moore
ba1b93173e * bfd-in.h (bfd_arm_allocate_interworking_sections): Static
if COFF_IMAGE_WITH_PE.
        (bfd_arm_process_before_allocation): Likewise.
        (bfd_arm_get_bfd_for_interworking): Likewise.
        * coff-arm.c: Likewise.
        * bfd-in2.h: Regenerate.
        * configure.in (armpe_little_vec): Remove coff-arm.lo.
        (armpe_big_vec): Likewise.
        * configure: Rebuild.
1999-05-10 18:27:37 +00:00
Nick Clifton
c1f6bc0323 Check for period after .rel{a} when detecting reloc sections. 1999-05-10 08:36:58 +00:00
Richard Henderson
4dec4d4e74 * ldlang.c (walk_wild, walk_wild_file, walk_wild_section,
output_section_callback, gc_section_callback): New functions for
     generic section walks.
     (wild, lang_gc_wild): Use walk_wild.
     (wild_file, lang_gc_wild_file): Deleted. Common logic moved to
     walk_wild_file.
     (wild_section, lang_gc_wild_section): Deleted. Common logic moved
     to walk_fild_section.  Unique logic moved into callbacks
     output_section_callback and gc_section_callback.
1999-05-08 23:40:58 +00:00
Richard Henderson
d0e9a01c12 * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge.
(md_begin): Allow ppc32 insns in ppc64bridge mode.
        (ppc_insert_operand): Accept SIGNOPT in ppc64 mode.
1999-05-08 23:31:09 +00:00
Richard Henderson
45c18104f8 * ppc.h (PPC_OPCODE_64_BRIDGE): New. 1999-05-08 23:28:34 +00:00
Nick Clifton
886851536e Use .short to display unidentified instructions 1999-05-07 09:14:56 +00:00
Nick Clifton
3f230321da restore mcore files (Duh!) 1999-05-07 07:57:25 +00:00
Nick Clifton
b23f908b61 Replace assert (about endianism) with an error message 1999-05-07 07:44:11 +00:00
Nick Clifton
71acc4e8d5 REstore mcore support (duh!) 1999-05-07 07:40:05 +00:00
Nick Clifton
bb3596ae84 fix output format. 1999-05-07 07:34:06 +00:00
Nick Clifton
09a3f5d4e3 restore. (Duh!) 1999-05-07 07:33:44 +00:00
Richard Henderson
83183c0c36 * config/tc-i386.c (i386_immediate): Skip whitespace before
complaining about junk after expression.
        (i386_displacement): Likewise.
1999-05-06 23:16:36 +00:00
Richard Henderson
33fbbfbc00 * configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
* getruntime.c: Only attempt to include sys/resource.h and
        use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
        are defined.
1999-05-06 20:59:17 +00:00
Richard Henderson
03987ceda1 * symbols.c (symbol_find_base): Use memcpy instead of strcpy.
Don't copy before downcaseing.
1999-05-06 19:52:29 +00:00
Richard Henderson
7fafc0fd27 Fred Fish <fnf@be.com>
* dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
        assignment from "unsigned char *" to "char *".
        (decode_line_info): Likewise for dwarf_line_buffer assignment.
1999-05-06 17:12:02 +00:00
Ian Lance Taylor
82716b788e * rename.c (smart_rename): Fix test of whether file exists. 1999-05-06 11:03:33 +00:00
Nick Clifton
a8a9050d4a Set display_endian based on target endianism. 1999-05-06 07:41:56 +00:00
Nick Clifton
9484f685a5 Remove traces of mcore. 1999-05-06 07:20:24 +00:00
Nick Clifton
76f4998ad1 remove mentions of mcore. 1999-05-06 07:08:37 +00:00
Nick Clifton
87673fab32 Currently CYGNUS local 1999-05-06 07:07:55 +00:00
Stan Shebs
a4cb37cb10 import gdb-19990504 snapshot 1999-05-05 21:45:13 +00:00
Catherine Moore
b890a73569 * dlltool.c (interwork): Remove.
(arm_interwork_jtab): Use bx insn.
        (thumb_jtab): Likewise.
        (MARM_INTERWORK): New machine type.
        (rvaafter): Handle it.
        (rvabefore) Likewise.
        (asm_prefix): Likewise.
        (gen_exp_type): Check machine type instead of
        interwork flag.
        (make_one_lib_file): Likewise.
        (make_head): Likewise.
        (make_tail): Likewise.
        (usage): Update machine types.
        (main): Remove -interwork support.
1999-05-05 19:02:14 +00:00
Catherine Moore
b44267fd40 * coff-arm.c (coff_arm_relocate_section): Add one to
address of ARM_RVA32 thumb functions.
1999-05-05 18:56:25 +00:00
Stan Shebs
b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +00:00
Catherine Moore
e1346c8d09 Remove extra copy of elf32_m68k_copy_private_bfd_data. 1999-05-05 11:34:29 +00:00
Catherine Moore
33c63f9db4 * readelf.c (get_machine_flags): Check for EF_CPU32.
(get_data_encoding): Fix typo.
1999-05-05 11:00:55 +00:00
Catherine Moore
0d96863f2b * tc-m68k.c: Include elf/m68k.h.
(m68k_elf_final_processing): New routine.
        * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing):
        Define.
1999-05-05 10:58:59 +00:00
Catherine Moore
5ce00b97b9 * m68k.h (EF_CPU32): Define. 1999-05-05 10:57:16 +00:00
Catherine Moore
9e1281c780 * elf32-m68k.c (elf32_m68k_set_private_flags): New.
(elf32_m68k_copy_private_bfd_data): New.
        (elf32_m68k_merge_private_bfd_data): New.
        (elf32_m68k_print_private_bfd_data): New.
        (CPU32_FLAG): Define.
        (PLT_CPU32_ENTRY_SIZE): Define.
        (elf_cpu32_plt0_entry): Declare.
        (elf_cpu32_plt_entry): Declare.
        (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
        (elf_m68k_finish_dynamic_symbol): Likewise.
        (elf_m68k_finish_dynamic_sections): Likewise.
        (elf_backend_plt_header_size): Remove definition.
        (bfd_elf32_bfd_copy_private_bfd_data): Define.
        (bfd_elf32_bfd_merge_private_bfd_data): Define.
        (bfd_elf32_bfd_set_private_flags): Define.
        (bfd_elf32_bfd_print_private_bfd_data): Define.
1999-05-05 10:56:18 +00:00
Stan Shebs
7c202dc7f5 Remove pregenerated info file 1999-05-04 18:52:32 +00:00
Jeff Law
90700a5341 * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a
17 bit fmt insn.
1999-05-03 09:26:28 +00:00
Jeff Law
c10067812f M
* som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
        and R_LONG_PCREL_MODE.
1999-05-03 09:12:29 +00:00
Jeff Law
ac79f2f399 ÿ
* som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
        and R_LONG_PCREL_MODE.
1999-05-03 09:12:28 +00:00
Richard Henderson
5b64ad42d3 This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
1999-05-03 07:29:11 +00:00
Richard Henderson
252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00
Stan Shebs
2d514e6f36 import gdb-19990422 snapshot 1999-04-27 01:33:01 +00:00
Stan Shebs
aac4839284 import gdb-19990422 snapshot 1999-04-27 01:30:31 +00:00
Stan Shebs
8b0b198558 This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
1999-04-27 01:30:31 +00:00
Stan Shebs
e49d4fa61a import gdb-19990422 snapshot 1999-04-27 01:26:45 +00:00
Stan Shebs
7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs
771578d160 import gdb-19990422 snapshot 1999-04-26 18:30:31 +00:00
Stan Shebs
1996fae846 This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
1999-04-26 18:30:31 +00:00
Stan Shebs
0714f9bfa3 import gdb-19990422 snapshot 1999-04-26 18:25:51 +00:00
Stan Shebs
3dd8d9225d Not part of the sources 1999-04-26 17:34:15 +00:00
1342 changed files with 166478 additions and 237470 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -143,6 +143,12 @@ Thu Dec 11 13:40:46 1997 Andrew Cagney <cagney@b1.cygnus.com>
* dwarf2read.c (dwarf_decode_lines): Change type of address to
CORE_ADDR.
Thu Dec 11 22:39:02 1997 Mark Alexander <marka@cygnus.com>
From change made to branch by Bob Manson <manson@cygnus.com>:
* tic80-tdep.c (tic80_push_arguments): The compiler always
passes structs by reference.
Thu Dec 11 14:28:01 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (trace_find_command): don't error if going
@@ -1016,6 +1022,10 @@ Sat Aug 9 01:50:14 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
Fri Aug 8 21:35:44 1997 Mark Alexander <marka@cygnus.com>
* config/tic80/tic80.mt:
(GDBSERVER-DEPFILES, GDBSERVER_LIBS): Define for gdbserver.
(SIM): Remove -lm to prevent make errors.
* configure.tgt: add gdbserver to configdirs for tic80.
* gdbserver/utils.c (error): Change prototype to match defs.h.
* gdbserver/low-sim.c: Change simulator calls to use new interface.
* remote.c (remote_write_bytes): Include '$' at start of packet
@@ -1151,6 +1161,11 @@ Wed Aug 6 16:15:31 1997 Geoffrey Noer <noer@cygnus.com>
(_initialize_bdm_ppc): new
* config/powerpc/tm-ppc-eabi.h: add necessary CPU32 BDM defines
Tue Aug 5 23:56:14 1997 Mark Alexander <marka@cygnus.com>
* tic80-tdep.c (tic80_init_extra_frame_info): Allow zero
as a valid SP-relative offset of a saved register.
Wed Aug 6 00:24:08 1997 Jeffrey A Law (law@cygnus.com)
* hpread.c (hpread_read_struct_type): Use accessor macros rather
@@ -1654,6 +1669,15 @@ Wed May 14 08:58:55 1997 Jeffrey A Law (law@cygnus.com)
symbols to find the end of the prologue.
* mn10300-tdep.c (mn10300_skip_prologue): Likewise.
Wed May 14 12:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tm-tic80.h (NUM_REGS): 38 not 37.
Mon May 12 11:35:04 1997 Mark Alexander <marka@cygnus.com>
* tic80-tdep.c, config/tic80/tm-tic80.h: First cut at getting
basic C80 features working.
Thu May 8 08:42:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (AC_TYPE_SIGNAL): Add
@@ -1695,6 +1719,10 @@ Thu May 1 02:28:21 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* printcmd.c (disassemble_command): Adjust low function bound
by FUNCTION_START_OFFSET.
Wed Apr 30 15:23:02 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tm-tic80.h (BREAKPOINT): Set it to trap 73.
Mon Apr 28 21:25:32 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
* Makefile.in: Add rule for gnu-nat.o and i386gnu-nat.o (Gnu Hurd)
@@ -1762,6 +1790,15 @@ Thu Apr 24 13:31:10 1997 Jeffrey A Law (law@cygnus.com)
* mn10300-tdep.c (mn10300_analyze_prologue): Check for a return
insn at "pc", not "fi->pc".
Thu Apr 24 16:11:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tm-tic80.h (NUM_REGS): Four 64bit accumulators.
(REGISTER_BYTE, REGISTER_RAW_SIZE, REGISTER_SIZE,
MAX_REGISTER_RAW_SIZE, REGISTER_VIRTUAL_TYPE): Adjust.
(NPC_REGNUM): Tic80 has a delay slot.
(R0_REGNUM, Rn_REGNUM, An_REGNUM): For sim, provide base/bound for
register blocks.
Wed Apr 23 11:18:45 1997 Jeffrey A Law (law@cygnus.com)
* config/mn10200/tm-mn10200.h (STORE_RETURN_VALUE): Pointers are
@@ -1780,6 +1817,10 @@ Tue Apr 22 11:58:15 1997 Fred Fish <fnf@cygnus.com>
(floatformat_from_doublest): Postswap output words for
the floatformat_littlebyte_bigwords format.
Mon Apr 21 22:44:47 1997 Andrew Cagney <cagney@b1.cygnus.com>
* config/tic80/tic80.mt (SIM): Link in simulator.
Tue Apr 22 09:02:10 1997 Stu Grossman (grossman@critters.cygnus.com)
* config/alpha/alpha-osf3.mh config/i386/{i386gnu linux}.mh
@@ -2102,6 +2143,11 @@ Mon Mar 31 14:55:53 1997 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Generate .gdbinit from gdbinit.in.
* configure: Rebuild.
Sun Mar 30 12:28:24 1997 Fred Fish <fnf@cygnus.com>
* config/tic80/tic80.mt: Disable using the simulator
until it is ready.
Sat Mar 29 13:57:20 1997 Fred Fish <fnf@cygnus.com>
* COPYING: Install new version of file from FSF.
@@ -2111,6 +2157,10 @@ Fri Mar 28 18:33:41 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (distclean): Remove .gdbinit.
Fri Mar 28 15:37:30 1997 Fred Fish <fnf@cygnus.com>
* config/tic80/tm-tic80.h (NAMES_HAVE_UNDERSCORE): Define.
Fri Mar 28 15:38:04 1997 Mike Meissner <meissner@cygnus.com>
* remote-sim.c (gdb_os_{,e}vprintf_filtered): Change stdarg type
@@ -2167,6 +2217,10 @@ Sat Mar 22 16:41:35 1997 Fred Fish <fnf@cygnus.com>
* remote-sim.c (simulator_command): Add comment about dealing with
NULL or empty args.
* Makefile.in (tic80-tdep.o): Add target.
* configure.tgt: Add tic80 case.
* tic80-tdep.c: New file.
* config/tic80/{tic80.mt, tm-tic80.h}: New files.
Sat Mar 22 02:48:11 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)

View File

@@ -3355,11 +3355,62 @@ Fri Dec 18 14:23:34 1998 Andrew Cagney <cagney@chook>
(mips_push_arguments, mips_push_dummy_frame, mips_pop_frame,
mips_extract_return_value): Update.
Fri Dec 18 12:56:56 1998 Andrew Cagney <cagney@chook>
* gdbarch.h (gdbarch_init_ftype): Pass struct gdbarch_info
by-value.
(struct gdbarch_info): Add struct gdbarch_tdep_info *tdep_info.
* gdbarch.c (gdbarch_update): Update.
* gdbarch.c (gdbarch_update): Add more tracing.
Thu Dec 17 02:15:40 1998 Andrew Cagney <cagney@chook.cygnus.com>
* configure.tgt (gdb_target): Identify mips64*vr4100*-*-elf* as
vr4100.
Thu Dec 17 02:01:58 1998 Andrew Cagney <cagney@chook>
* gdbtypes.c (_initialize_gdbtypes): Register all builtin types
with gdbarch so that they are updated whenever the architecture is
changed.
Thu Dec 17 01:58:16 1998 Andrew Cagney <cagney@chook>
* gdbarch.h (GDB_MULTI_ARCH): New macro, default to zero.
(current_gdbarch): Current architecture pointer.
* gdbarch.c (struct gdbarch): Define.
* gdbarch.h (TARGET_ARCHITECTURE, TARGET_BYTE_ORDER,
TARGET_LONG_BIT, TARGET_LONG_LONG_BIT, TARGET_PTR_BIT): When
multi-arch force definition.
* gdbarch.h, gdbarch.c (gdbarch_tdep, gdbarch_bfd_arch_info,
gdbarch_byte_order, {set,}gdbarch_long_bit,
{set,}gdbarch_long_long_bit, {set,}gdbarch_ptr_bit): Corresponding
functions.
* gdbarch.h (struct gdbarch_list, struct gdbarch_info,
gdbarch_init_ftype), gdbarch.c (register_gdbarch_init): Mechanism
for registering an architecture with GDB.
(gdbarch_list_lookup_by_info, gdbarch_alloc, gdbarch_update,
verify_gdbarch): Support functions.
* gdbarch.h (gdbarch_data_ftype), gdbarch.c
(register_gdbarch_data, gdbarch_data): Mechanism for maintaining
per-architecture pointers.
(init_gdbarch_data): Support functions.
* gdbarch.h (gdbarch_swap_ftype), gdbarch.c
(register_gdbarch_swap): Ditto for swapped memory regions.
(init_gdbarch_swap, swapout_gdbarch_swap, swapin_gdbarch_swap):
Support functions.
* gdbarch.c (set_endian_big, set_endian_little, set_architecture,
info_architecture, set_gdbarch_from_file): Hook in multi-arch
code by calling gdbarch_update.
(default_gdbarch): Default multi-arch vector. Use host's type
system for values.
Thu Dec 17 01:34:36 1998 Andrew Cagney <cagney@chook>
* gdbtypes.c (build_gdbtypes): New function.
@@ -4402,6 +4453,11 @@ Thu Oct 8 08:40:42 1998 Mark Alexander <marka@cygnus.com>
* rs6000-tdep.c (get_saved_register): Define only if
USE_GENERIC_DUMMY_FRAMES is defined.
Tue Oct 6 21:35:10 1998 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (DEPFILES): Add TARGET_OBS.
(TARGET_OBS): Defined by configure.
1998-10-06 Jason Molenda (jsm@bugshack.cygnus.com)
Eliminate a few warnings from the compiler.
@@ -5718,6 +5774,13 @@ Wed Apr 29 14:02:59 1998 David Taylor <taylor@texas.cygnus.com>
Wed Apr 29 10:20:40 1998 John Metzler <jmetzler@cygnus.com>
* nec4102rom.c: New file implements ROM monitor adapter for
nec-vr4102 board. This board hosts the vr4111 chip. This file
required extensions to the monitor_ops structure, hooks for wait
filter, new flags. This version does not support more than one
breakpoint and resuming after a breakpoint in 16 bit mode is
completely disfunctional.
* monitor.h: Defined additional hooks for dmpregs, configure_hooks
and wait_filter. These additions require that all ROM monitor
interfaces be recoded to initialize monitor ops using assignments
@@ -6481,6 +6544,9 @@ Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com>
Tue Mar 3 17:19:08 1998 John Metzler <jmetzler@cygnus.com>
* config/mips/tm-vr4xxx.h: implements vr4111 as separate from 4300
* config/mips/vr4xxx.tm: implements vr4111 as separate from 4300
* configure.tgt: Recognise mips64vr4111-*-elf as vr4xxx
* dwarfread.c (read_tag_pointer_type): Pointer sizes now come from
TARGET_PTR_BIT rather from sizeof(char *) on host.

39
gdb/MAINTAINERS Normal file
View File

@@ -0,0 +1,39 @@
hp testsuite (gdb.hp) Jimmy Guo adl-debugger-wdb-merge-guru@cup.hp.com
d10v target Andrew Cagney cagney@cygnus.com
d30v target Andrew Cagney cagney@cygnus.com
mips target Andrew Cagney cagney@cygnus.com
mn10300 target Andrew Cagney cagney@cygnus.com
generic arch support Andrew Cagney cagney@cygnus.com
target vector Andrew Cagney cagney@cygnus.com
remote.c Andrew Cagney cagney@cygnus.com
djgpp native DJ Delorie dj@cygnus.com
win32 host & native Chris Faylor cgf@cygnus.com
main (main.c, top.c) Elena Zannoni ezannoni@cygnus.com
readline Elena Zannoni ezannoni@cygnus.com
arm target Elena Zannoni ezannoni@cygnus.com
powerpc target Elena Zannoni ezannoni@cygnus.com
command interpreter Fernando Nasser fnasser@cygnus.com
generic symtabs Jim Blandy jimb@cygnus.com
dwarf readers Jim Blandy jimb@cygnus.com
elf reader Jim Blandy jimb@cygnus.com
stabs reader Jim Blandy jimb@cygnus.com
x86 linux native Jim Blandy jimb@cygnus.com
Scheme support Jim Blandy jimb@cygnus.com
svr4 shlibs (solib.c) Jim Blandy jimb@cygnus.com
hurd native Mark Kettenis kettenis@wins.va.nl
hpux, hp pa native Jeff Law law@cygnus.com
m32r target Michael Snyder msnyder@cygnus.com
tracing Michael Snyder msnyder@cygnus.com
threads Michael Snyder msnyder@cygnus.com
breakpoint.c Michael Snyder msnyder@cygnus.com
coff reader Philippe De Muyter phdm@macqel.be
macos host & native Stan Shebs shebs@cygnus.com
sds protocol Stan Shebs shebs@cygnus.com
rdi/adp protocol Stan Shebs shebs@cygnus.com
gdbserver Stan Shebs shebs@cygnus.com
documentation Stan Shebs shebs@cygnus.com
testsuite Stan Shebs shebs@cygnus.com
language support David Taylor taylor@cygnus.com
expression eval David Taylor taylor@cygnus.com
defs.h David Taylor taylor@cygnus.com
utils.c David Taylor taylor@cygnus.com

View File

@@ -1,4 +1,4 @@
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
# Free Software Foundation, Inc.
# This file is part of GDB.
@@ -39,6 +39,7 @@ man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = @infodir@
htmldir = $(prefix)/html
includedir = @includedir@
# This can be referenced by `INTLDEPS' as computed by CY_GNU_GETTEXT.
@@ -47,6 +48,8 @@ top_builddir = .
SHELL = @SHELL@
EXEEXT = @EXEEXT@
AWK = @AWK@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -87,6 +90,10 @@ YLWRAP = $(srcdir)/../ylwrap
# where to find makeinfo, preferably one designed for texinfo-2
MAKEINFO=makeinfo
MAKEHTML = texi2html
MAKEHTMLFLAGS = -glossary -menu -split_chapter
# Set this up with gcc if you have gnu ld and the loader will print out
# line numbers for undefined references.
#CC_LD=gcc -static
@@ -118,6 +125,9 @@ READLINE_SRC = $(srcdir)/$(READLINE_DIR)
READLINE_CFLAGS = -I$(READLINE_SRC)/..
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
GDB_WARN_CFLAGS = $(WARN_CFLAGS)
GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
# Where is the INTL library? Typically in ../intl.
INTL_DIR = ../intl
@@ -146,6 +156,8 @@ OPCODES_CFLAGS = -I$(OP_INCLUDE)
# should set this to list all the .o or .a files to be linked in.
SIM =
WIN32LIBS = @WIN32LIBS@
ENABLE_CFLAGS= @ENABLE_CFLAGS@
@@ -174,10 +186,12 @@ CFLAGS = -g
CXXFLAGS = -g -O
# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
INTERNAL_CFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
INTERNAL_WARN_CFLAGS = \
$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
$(BFD_CFLAGS) $(MMALLOC_CFLAGS) $(INCLUDE_CFLAGS) \
$(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(WARN_CFLAGS)
$(INTL_CFLAGS) $(TUI_CFLAGS) $(ENABLE_CFLAGS) $(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
@@ -215,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
VERSION=4.18
VERSION = 19990913
DIST=gdb
LINT=/usr/5bin/lint
@@ -233,7 +247,7 @@ RUNTESTFLAGS=
# part of libiberty) a POSIX interface. But at least for now the
# host-dependent makefile fragment might need to use something else
# besides ser-unix.o
SER_HARDWIRE = ser-unix.o
SER_HARDWIRE = ser-unix.o ser-pipe.o
# The `remote' debugging target is supported for most architectures,
# but not all (e.g. 960)
@@ -249,6 +263,13 @@ ANNOTATE_OBS = annotate.o
@target_makefile_frag@
# End of host and target-dependent makefile fragments
# Possibly ignore the simulator. If the simulator is being ignored,
# these expand into SIM= and SIM_OBJ=, overriding the entries from
# target_makefile_frag
#
@IGNORE_SIM@
@IGNORE_SIM_OBS@
FLAGS_TO_PASS = \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
@@ -265,6 +286,8 @@ FLAGS_TO_PASS = \
"DLLTOOL=$(DLLTOOL)" \
"RANLIB=$(RANLIB)" \
"MAKEINFO=$(MAKEINFO)" \
"MAKEHTML=$(MAKEHTML)" \
"MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
"INSTALL=$(INSTALL)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
@@ -347,6 +370,7 @@ TARGET_FLAGS_TO_PASS = \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"MAKEINFO=$(MAKEINFO)" \
"MAKEHTML=$(MAKEHTML)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)"
@@ -359,8 +383,10 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c coffread.c \
command.c complaints.c corefile.c cp-valprint.c dbxread.c \
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
event-loop.c event-top.c \
expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
findvar.c gdbarch.c gdbtypes.c infcmd.c inflow.c infrun.c language.c \
kod.c kod-cisco.c \
jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c parse.c \
@@ -424,9 +450,12 @@ gdbcmd_h = gdbcmd.h $(command_h)
defs_h = defs.h xm.h tm.h nm.h config.status config.h gdbarch.h
top_h = top.h
inferior_h = inferior.h $(breakpoint_h)
tracepoint_h = tracepoint.h
ax_h = ax.h
event_loop_h = event-loop.h
version_h = version.h
# Header files that need to have srcdir added. Note that in the cases
# where we use a macro like $(gdbcmd_h), things are carefully arranged
@@ -482,8 +511,12 @@ TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o infcmd.o infrun.o command.o \
expprint.o environ.o gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
expprint.o environ.o \
event-loop.o event-top.o \
gdbarch.o gdbtypes.o copying.o $(DEPFILES) \
mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
kod.o kod-cisco.o \
gdb-events.o \
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o elfread.o \
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
@@ -495,9 +528,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS) main.o
LIBGDB_OBS =
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
TSOBS = inflow.o
@@ -505,9 +536,7 @@ NTSOBS = standalone.o
NTSSTART = kdb-start.o
SUBDIRS = doc \
testsuite \
nlm
SUBDIRS = @SUBDIRS@
# For now, shortcut the "configure GDB for fewer languages" stuff.
YYFILES = c-exp.tab.c \
@@ -541,7 +570,7 @@ check: force
$(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
else true; fi
info dvi install-info clean-info: force
info dvi install-info clean-info html install-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
gdb.z:gdb.1
@@ -621,28 +650,22 @@ init.c: $(OBS) $(TSOBS)
.PRECIOUS: init.c
# Removing the old gdb first works better if it is running, at least on SunOS.
gdb$(EXEEXT): $(OBS) $(BUILD_TUI) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
gdb$(EXEEXT): main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
rm -f gdb$(EXEEXT)
$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) \
init.o $(OBS) $(TSOBS) $(TUI_LIBRARY) $(ADD_FILES) $(CLIBS) $(LOADLIBES)
$(HLDENV) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -o gdb$(EXEEXT) main.o libgdb.a $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
nlm: force
rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do
libgdb: libgdb-files $(LIBGDB_OBS)
# libproc is not listed here because all-libproc is a dependency of all-gui,
# not all-gdb, and thus might be built after us.
LIBGDBDEPS=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) $(ADD_DEPS) $(CDEPS) init.o
# libproc needs to be before libiberty for alloca.
LIBGDBFILES=$(COMMON_OBS) $(LIBGDB_OBS) $(TSOBS) ../libproc/libproc.a \
$(ADD_DEPS) $(CDEPS) init.o
libgdb-files: $(LIBGDBDEPS) Makefile.in
-rm -f libgdb-files
for i in $(LIBGDBFILES); do\
echo $$i >> libgdb-files;\
done
# Create a library of the gdb object files and build GDB by linking
# against that.
#
# init.o is very important. It pulls in the rest of GDB.
LIBGDB_OBS= $(OBS) $(TSOBS) $(ADD_FILES) init.o
libgdb.a: $(LIBGDB_OBS)
-rm -f libgdb.a
$(AR) q libgdb.a $(LIBGDB_OBS)
$(RANLIB) libgdb.a
saber_gdb: $(SFILES) $(DEPFILES) copying.c version.c
#setopt load_flags $(CFLAGS) $(BFD_CFLAGS) -DHOST_SYS=SUN4_SYS
@@ -732,7 +755,7 @@ clean mostlyclean:
@$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do
rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp
rm -f init.c version.c
rm -f gdb$(EXEEXT) core make.log libgdb-files
rm -f gdb$(EXEEXT) core make.log
rm -f gdb[0-9]$(EXEEXT)
# This used to depend on c-exp.tab.c m2-exp.tab.c TAGS
@@ -809,9 +832,12 @@ copying.c: COPYING copying.awk
awk -f $(srcdir)/copying.awk < $(srcdir)/COPYING > copying.c
version.c: Makefile
echo 'char *version = "$(VERSION)";' >version.c
echo 'char *host_name = "$(host_alias)";' >> version.c
echo 'char *target_name = "$(target_alias)";' >> version.c
rm -f version.c
echo '#include "version.h"' >> version.c
echo 'const char version[] = "$(VERSION)";' >> version.c
echo 'const char host_name[] = "$(host_alias)";' >> version.c
echo 'const char target_name[] = "$(target_alias)";' >> version.c
version.o: version.c $(version_h)
# c-exp.tab.c is generated in objdir from c-exp.y if it doesn't exist
# in srcdir, then compiled in objdir to c-exp.tab.o.
@@ -919,17 +945,19 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
convex-tdep.c convex-xdep.c \
core-sol2.c core-regset.c core-aout.c corelow.c \
dcache.c delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
go32-xdep.c gould-tdep.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
gould-tdep.c gould-xdep.c h8300-tdep.c h8500-tdep.c \
hp300ux-nat.c hppa-tdep.c hppab-nat.c hppah-nat.c \
hp-psymtab-read.c hp-symtab-read.c \
i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c \
i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c i386-linux-nat.c \
i386aix-nat.c i386m3-nat.c i386v4-nat.c i386ly-tdep.c \
i387-tdep.c \
i960-tdep.c \
infptrace.c inftarg.c irix4-nat.c irix5-nat.c isi-xdep.c \
lynx-nat.c m3-nat.c \
m68k-tdep.c \
m88k-nat.c m88k-tdep.c mac-nat.c mips-nat.c \
m88k-nat.c m88k-tdep.c mac-nat.c \
mcore-tdep.c \
mips-nat.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c news-xdep.c \
nindy-share/Onindy.c nindy-share/nindy.c \
nindy-share/ttyflush.c nindy-tdep.c \
@@ -942,7 +970,8 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
remote-st.c remote-utils.c dcache.c \
remote-udi.c remote-vx.c remote-vx29k.c \
rs6000-nat.c rs6000-tdep.c \
ser-go32.c ser-ocd.c ser-tcp.c sh-tdep.c solib.c sparc-nat.c \
ser-go32.c ser-pipe.c ser-ocd.c ser-tcp.c \
sh-tdep.c solib.c sparc-nat.c \
sparc-tdep.c sparcl-tdep.c sun3-nat.c sun386-nat.c \
symm-tdep.c symm-nat.c \
tahoe-tdep.c ultra3-nat.c ultra3-xdep.c umax-xdep.c \
@@ -969,7 +998,7 @@ alpha-nat.o: alpha-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h
alpha-tdep.o: alpha-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) $(symtab_h) $(dis-asm.h) gdb_string.h
altos-xdep.o: altos-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
# OBSOLETE altos-xdep.o: altos-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
annotate.o: annotate.c $(defs_h) annotate.h $(value_h) target.h $(gdbtypes_h)
@@ -982,7 +1011,8 @@ blockframe.o: blockframe.c $(defs_h) $(gdbcore_h) $(inferior_h) \
objfiles.h symfile.h target.h
breakpoint.o: breakpoint.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) language.h target.h gdbthread.h gdb_string.h
$(inferior_h) language.h target.h gdbthread.h gdb_string.h \
gdb-events.h
buildsym.o: buildsym.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
objfiles.h symfile.h $(symtab_h) gdb_string.h
@@ -1031,11 +1061,11 @@ command.o: command.c $(defs_h) $(expression_h) $(gdbcmd_h) \
complaints.o: complaints.c complaints.h $(defs_h) $(gdbcmd_h)
convex-tdep.o: convex-tdep.c $(wait_h) $(defs_h) $(gdbcmd_h) \
$(gdbcore_h) $(inferior_h)
# OBSOLETE convex-tdep.o: convex-tdep.c $(wait_h) $(defs_h) $(gdbcmd_h) \
# OBSOLETE $(gdbcore_h) $(inferior_h)
convex-xdep.o: convex-xdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h)
# OBSOLETE convex-xdep.o: convex-xdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
# OBSOLETE $(inferior_h)
copying.o: copying.c $(defs_h) $(gdbcmd_h)
@@ -1068,7 +1098,7 @@ delta68-nat.o: delta68-nat.c $(defs_h)
demangle.o: demangle.c $(defs_h) $(gdbcmd_h) gdb_string.h
dink32-rom.o: dink32-rom.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) target.h serial.h terminal.h
$(inferior_h) target.h serial.h terminal.h symfile.h
dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) gdb_string.h
@@ -1092,6 +1122,11 @@ eval.o: eval.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
gdb_string.h
event-loop.o: event-loop.c $(defs_h) $(top_h) $(event_loop_h)
event-top.o: event-top.c top.h $(readline_headers) \
$(defs_h) $(inferior_h) $(event_loop_h) terminal.h $(gdbcmd_h)
exec.o: exec.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
target.h language.h gdb_string.h
@@ -1104,9 +1139,12 @@ findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
fork-child.o: fork-child.c $(wait_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) target.h terminal.h gdbthread.h gdb_string.h
# Due to several ``enum enabled'' declaration clashes it is difficult
# to fix breakpoint.c's compiler warnings.
tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
$(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) target.h \
language.h gdb_string.h $(readline_headers)
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
gdbarch.o: gdbarch.c $(defs_h) $(bfd_h) $(gdbcmd_h)
@@ -1117,8 +1155,6 @@ gdbtypes.o: gdbtypes.c $(bfd_h) complaints.h $(defs_h) $(expression_h) \
gnu-nat.o: process_reply_S.h exc_request_S.h notify_S.h msg_reply_S.h \
exc_request_U.h msg_U.h gnu-nat.h
go32-xdep.o: go32-xdep.c
# OBSOLETE gould-tdep.o: gould-tdep.c $(OP_INCLUDE)/np1.h $(defs_h) $(frame_h) \
# OBSOLETE $(gdbcore_h) $(symtab_h)
@@ -1160,6 +1196,9 @@ i386mach-nat.o: i386mach-nat.c $(defs_h) $(gdbcore_h) $(inferior_h)
i386v-nat.o: i386v-nat.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) language.h target.h
i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(symtab_h) $(frame_h) symfile.h objfiles.h
i386v4-nat.o: i386v4-nat.c $(defs_h)
i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
@@ -1178,7 +1217,7 @@ infptrace.o: infptrace.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
gdb_string.h $(wait_h) $(command_h)
infrun.o: infrun.c $(wait_h) $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) target.h gdbthread.h gdb_string.h
$(inferior_h) target.h gdbthread.h gdb_string.h $(event_loop_h)
inftarg.o: inftarg.c $(wait_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h terminal.h $(command_h)
@@ -1196,11 +1235,15 @@ jv-lang.o: jv-lang.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
jv-typeprint.o: jv-typeprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(INCLUDE_DIR)/demangle.h jv-lang.h gdb_string.h \
typeprint.h
typeprint.h c-lang.h
jv-valprint.o: jv-valprint.c $(bfd_h) $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(expression_h) $(value_h) $(INCLUDE_DIR)/demangle.h valprint.h \
language.h jv-lang.h c-lang.h
language.h jv-lang.h c-lang.h gdbcore.h annotate.h
kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) target.h gdb_string.h
kod-cisco.o: kod-cisco.c $(defs_h) gdb_string.h
language.o: language.c $(bfd_h) $(defs_h) $(expression_h) $(frame_h) \
$(gdbcmd_h) $(gdbtypes_h) language.h parser-defs.h $(symtab_h) \
@@ -1236,11 +1279,16 @@ m88k-tdep.o: m88k-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
mac-nat.o: mac-nat.c $(defs_h) gdb_string.h
main.o: main.c top.h $(defs_h) gdb_string.h
main.o: main.c top.h $(defs_h) gdb_string.h $(event_loop_h)
maint.o: maint.c $(defs_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) language.h \
$(expression_h) objfiles.h symfile.h
mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(gdbcmd_h) $(value_h) $(symtab_h)
mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) target.h monitor.h \
gdb_string.h
mdebugread.o: mdebugread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
$(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \
objfiles.h partial-stab.h stabsread.h symfile.h $(symtab_h) \
@@ -1270,8 +1318,14 @@ mipsread.o: mipsread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h
# FIXME: Monitor.c has -Wformat problems. The code using the macros
# RDEBUG and EXTRA_RDEBUG needs be replaced with something that:
# doesn't cause -Wformat errors; sends all output to gdb_stdlog
# instead of stdout; and controls the output throug a ``set
# monitordebug'' command/variable. cagney, 1999-09-01.
monitor.o: monitor.c monitor.h $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) target.h serial.h terminal.h gdb_string.h
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
news-xdep.o: news-xdep.c
@@ -1297,7 +1351,7 @@ nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h)
ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h)
objfiles.o: objfiles.c $(bfd_h) $(defs_h) objfiles.h symfile.h \
$(symtab_h) gdb_string.h
$(symtab_h) gdb_string.h $(breakpoint_h)
osfsolib.o: osfsolib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
objfiles.h gnu-regex.h symfile.h target.h language.h gdb_string.h
@@ -1307,6 +1361,9 @@ somread.o: somread.c $(bfd_h) buildsym.h complaints.h $(defs_h) \
somsolib.o: somsolib.c $(defs_h)
pa64solib.o: pa64solib.c $(defs_h)
hpux-thread.o: hpux-thread.c $(defs_h) gdbthread.h target.h inferior.h
hpux-thread.o: hpux-thread.c $(defs_h) gdbthread.h target.h inferior.h
$(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
-I$(srcdir)/osf-share/HP800 -I/usr/include/dce $(srcdir)/hpux-thread.c
@@ -1340,9 +1397,15 @@ printcmd.o: printcmd.c $(breakpoint_h) $(defs_h) $(expression_h) \
procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h gdb_string.h
pyr-tdep.o: pyr-tdep.c $(defs_h)
sol-thread.o: sol-thread.c $(defs_h) gdbthread.h target.h $(inferior_h) \
$(gdbcmd_h)
pyr-xdep.o: pyr-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
linux-thread.o: linux-thread.c $(breakpoint_h) $(gdbcmd_h) $(wait_h) \
gdbthread.h $(gdbcore_h) $(inferior_h) target.h $(defs_h)
# OBSOLETE pyr-tdep.o: pyr-tdep.c $(defs_h)
# OBSOLETE pyr-xdep.o: pyr-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
gnu-regex.o: gnu-regex.c gnu-regex.h $(defs_h) gdb_string.h
@@ -1350,7 +1413,8 @@ remote-adapt.o: remote-adapt.c $(wait_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) target.h terminal.h gdb_string.h
remote-array.o: remote-array.c $(wait_h) $(defs_h) $(gdbcore_h) target.h \
gdb_string.h $(command_h) serial.h monitor.h $(remote_utils_h)
gdb_string.h $(command_h) serial.h monitor.h $(remote_utils_h) \
$(version_h)
remote-rdi.o: remote-rdi.c $(wait_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) gdb_string.h
@@ -1374,8 +1438,13 @@ remote-rdp.o: remote-rdp.c $(wait_h) $(defs_h) $(gdbcore_h) \
remote-bug.o: remote-bug.c $(wait_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) target.h terminal.h $(remote_utils_h) gdb_string.h
# FIXME: For the SH target, remote-e7000 contains numerous -Wformat
# warnings. Since the fixes involve modifications to the code that
# handles the SH remote protocol the changes need to be tested against
# an SH board before they can be committed. cagney 1999-09-01.
remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) target.h \
$(wait_h) serial.h gdb_string.h
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
remote-eb.o: remote-eb.c $(wait_h) $(srcdir)/config/a29k/tm-a29k.h \
$(defs_h) $(gdbcore_h) $(inferior_h) symfile.h target.h terminal.h \
@@ -1434,7 +1503,8 @@ remote-utils.o: remote-utils.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(inferior_h) $(remote_utils_h) gdb_string.h
remote.o: remote.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h
$(inferior_h) $(remote_utils_h) symfile.h terminal.h gdb_string.h \
$(event_loop_h)
remote-nrom.o: remote-nrom.c $(bfd_h) $(wait_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) $(remote_utils_h) symfile.h terminal.h
@@ -1463,6 +1533,8 @@ ser-mac.o: ser-mac.c $(defs_h) serial.h signals.h
ser-ocd.o: ser-ocd.c $(defs_h) serial.h signals.h gdb_string.h
ser-pipe.o: ser-pipe.c $(defs_h) serial.h signals.h gdb_string.h
ser-tcp.o: ser-tcp.c $(defs_h) serial.h signals.h gdb_string.h
ser-unix.o: ser-unix.c $(defs_h) serial.h
@@ -1504,7 +1576,7 @@ stabsread.o: stabsread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
language.h target.h gdb_string.h
ax-general.o: ax-general.c $(ax_h) $(defs_h)
ax-general.o: ax-general.c $(ax_h) $(defs_h) $(value_h)
ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) symfile.h $(gdbtypes_h) \
$(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h
@@ -1530,17 +1602,19 @@ symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \
gnu-regex.h symfile.h $(symtab_h) target.h $(value_h) \
gdb_string.h
tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
$(symtab_h)
# OBSOLETE tahoe-tdep.o: tahoe-tdep.c $(OP_INCLUDE)/tahoe.h $(defs_h) \
# OBSOLETE $(symtab_h)
tic80-tdep.o: tic80-tdep.c $(defs_h)
target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
objfiles.h symfile.h target.h gdb_string.h
thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h)
thread.o: thread.c $(defs_h) gdbthread.h $(gdbcmd_h) target.h
top.o: top.c top.h $(bfd_h) $(getopt_h) $(readline_headers) call-cmds.h \
$(defs_h) $(gdbcmd_h) $(inferior_h) language.h signals.h \
$(remote_utils_h) gdb_string.h
$(remote_utils_h) gdb_string.h $(event_loop_h) $(version_h)
typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \
@@ -1554,7 +1628,7 @@ umax-xdep.o: umax-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
language.h signals.h target.h terminal.h $(readline_headers) \
gdb_string.h
gdb_string.h $(event_loop_h)
valarith.o: valarith.c $(bfd_h) $(defs_h) $(expression_h) \
$(gdbtypes_h) language.h $(symtab_h) target.h $(value_h) \
@@ -1598,8 +1672,12 @@ xcoffread.o: xcoffread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
xcoffsolib.o: xcoffsolib.c $(bfd_h) $(defs_h) xcoffsolib.h
# FIXME: z8k-tdep.c calls _initialize_gdbtypes(). Since that isn't
# declared -Wimplicit fails. It should be using the GDBARCH framework.
# cagney 1999-09-02.
z8k-tdep.o: z8k-tdep.c $(bfd_h) $(dis-asm_h) $(defs_h) $(frame_h) \
$(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(gdbcore_h)
$(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(gdbcore_h) $(value_h)
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
c-exp.tab.o: c-exp.tab.c c-lang.h $(defs_h) $(expression_h) \
$(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
@@ -1616,4 +1694,7 @@ m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
language.h m2-lang.h parser-defs.h $(symtab_h) $(value_h) \
$(bfd_h) objfiles.h symfile.h
gdb-events.o: gdb-events.c gdb-events.h $(defs_h) $(gdbcmd_h)
### end of the gdb Makefile.in.

View File

@@ -1,6 +1,53 @@
What has changed in GDB?
(Organized release by release)
*** Changes since GDB-4.18:
* New features
On SVR4 native platforms (such as Solaris), if you attach to a process
without first loading a symbol file, GDB will now attempt to locate and
load symbols from the running process's executable file.
* New targets
Motorola MCore mcore-*-*
x86 VxWorks i[3456]86-*-vxworks*
PowerPC VxWorks powerpc-*-vxworks*
TI TMS320C80 tic80-*-*
* OBSOLETE configurations
Altos 3068 m68*-altos-*
Convex c1-*-*, c2-*-*
Pyramid pyramid-*-*
Tahoe tahoe-*-*
* Remote targets can connect to a sub-program
A popen(3) style serial-device has been added. This device starts a
sub-process (such as a stand-alone simulator) and then communicates
with that. The sub-program to run is specified using the syntax
``|<program> <args>'' vis:
(gdb) set remotedebug 1
(gdb) target extended-remote |mn10300-elf-sim program-args
* MIPS 64 remote protocol
A long standing bug in the mips64 remote protocol where by GDB
expected certain 32 bit registers (ex SR) to be transfered as 32
instead of 64 bits has been fixed.
The command ``set remote-mips64-transfers-32bit-regs on'' has been
added to provide backward compatibility with older versions of GDB.
* ``set remotebinarydownload'' replaced by ``set remote X-packet''
The command ``set remotebinarydownload'' command has been replaced by
``set remote X-packet''. Other commands in ``set remote'' family
include ``set remote P-packet''.
*** Changes in GDB-4.18:
* New native configurations

View File

@@ -4,8 +4,8 @@
This is GDB, the GNU source-level debugger.
A summary of new features is in the file `NEWS'.
See the GDB home page at http://www.cygnus.com/gdb/ for up to date
release information, mailing list links and archives, etc.
See the GDB home page at http://sourceware.cygnus.com/gdb/ for up to
date release information, mailing list links and archives, etc.
Unpacking and Installation -- quick overview
@@ -152,6 +152,8 @@ directory. That directory contains:
`gdb-4.18/readline'
source for the GNU command-line interface
NOTE: The readline library is compiled for use by GDB, but will
not be installed on your system when "make install" is issued.
`gdb-4.18/sim'
source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)

View File

@@ -9,6 +9,20 @@ General To Do List
This list is probably not up to date, and opinions vary about the
importance or even desirability of some of the items.
Document trace machinery.
Document overlay machinery.
Extend .gdbinit mechanism to specify name on command line, allow for
lists of files to load, include function of --tclcommand.
@c This does not work (yet if ever). FIXME.
@c @item --parse=@var{lang} @dots{}
@c Configure the @value{GDBN} expression parser to parse the listed languages.
@c @samp{all} configures @value{GDBN} for all supported languages. To get a
@c list of all supported languages, omit the argument. Without this
@c option, @value{GDBN} is configured to parse all supported languages.
Add an "info bfd" command that displays supported object formats,
similarly to objdump -i.
@@ -382,9 +396,6 @@ Why do we allow a target to omit standard register names (NO_STD_REGS
in tm-z8k.h)? I thought the standard register names were supposed to
be just that, standard.
Make DEBUG_EXPRESSIONS a maintenance command, dependent on
MAINTENANCE_COMMANDS.
Allow core file without exec file on RS/6000.
Make sure "shell" with no arguments works right on DOS.
@@ -466,6 +477,9 @@ Add a command for searching memory, a la adb. It specifies size,
mask, value, start address. ADB searches until it finds it or hits
an error (or is interrupted).
Remove the range and type checking code and documentation, if not
going to implement.
# Local Variables:
# mode: text
# End:

View File

@@ -3,21 +3,22 @@
Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon.
This file is part of GDB.
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 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.
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. */
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 "gdbcore.h"
@@ -59,10 +60,10 @@ struct prologue_info
{
CORE_ADDR pc; /* First addr after fn prologue */
unsigned rsize, msize; /* register stack frame size, mem stack ditto */
unsigned mfp_used : 1; /* memory frame pointer used */
unsigned rsize_valid : 1; /* Validity bits for the above */
unsigned msize_valid : 1;
unsigned mfp_valid : 1;
unsigned mfp_used:1; /* memory frame pointer used */
unsigned rsize_valid:1; /* Validity bits for the above */
unsigned msize_valid:1;
unsigned mfp_valid:1;
};
/* Examine the prologue of a function which starts at PC. Return
@@ -94,7 +95,7 @@ examine_prologue (pc, rsize, msize, mfp_used)
struct prologue_info *mi = 0;
if (msymbol != NULL)
mi = (struct prologue_info *) msymbol -> info;
mi = (struct prologue_info *) msymbol->info;
if (mi != 0)
{
@@ -124,21 +125,21 @@ examine_prologue (pc, rsize, msize, mfp_used)
*msize = 0;
if (mfp_used != NULL)
*mfp_used = 0;
/* Prologue must start with subtracting a constant from gr1.
Normally this is sub gr1,gr1,<rsize * 4>. */
insn = read_memory_integer (p, 4);
if ((insn & 0xffffff00) != 0x25010100)
{
/* If the frame is large, instead of a single instruction it
might be a pair of instructions:
const <reg>, <rsize * 4>
sub gr1,gr1,<reg>
*/
might be a pair of instructions:
const <reg>, <rsize * 4>
sub gr1,gr1,<reg>
*/
int reg;
/* Possible value for rsize. */
unsigned int rsize0;
if ((insn & 0xff000000) != 0x03000000)
{
p = pc;
@@ -172,7 +173,7 @@ examine_prologue (pc, rsize, msize, mfp_used)
* way down.
*/
insn = read_memory_integer (p, 4);
if ((insn & 0xff00ffff) == (0x5e000100|RAB_HW_REGNUM))
if ((insn & 0xff00ffff) == (0x5e000100 | RAB_HW_REGNUM))
{
p += 4;
}
@@ -191,9 +192,9 @@ examine_prologue (pc, rsize, msize, mfp_used)
else
{
/* However, for large frames it can be
const <reg>, <size *4>
add lr1,gr1,<reg>
*/
const <reg>, <size *4>
add lr1,gr1,<reg>
*/
int reg;
CORE_ADDR q;
@@ -221,8 +222,8 @@ examine_prologue (pc, rsize, msize, mfp_used)
to be looking for a "sub" instruction here, but the mask was set
up to lose all the time. */
insn = read_memory_integer (p, 4);
if (((insn & 0xff80ffff) == (0x15800000|(MSP_HW_REGNUM<<8))) /* add */
|| ((insn & 0xff80ffff) == (0x81800000|(MSP_HW_REGNUM<<8)))) /* sll */
if (((insn & 0xff80ffff) == (0x15800000 | (MSP_HW_REGNUM << 8))) /* add */
|| ((insn & 0xff80ffff) == (0x81800000 | (MSP_HW_REGNUM << 8)))) /* sll */
{
p += 4;
if (mfp_used != NULL)
@@ -238,24 +239,24 @@ examine_prologue (pc, rsize, msize, mfp_used)
Normally this is just
sub msp,msp,<msize>
*/
*/
insn = read_memory_integer (p, 4);
if ((insn & 0xffffff00) ==
(0x25000000|(MSP_HW_REGNUM<<16)|(MSP_HW_REGNUM<<8)))
if ((insn & 0xffffff00) ==
(0x25000000 | (MSP_HW_REGNUM << 16) | (MSP_HW_REGNUM << 8)))
{
p += 4;
if (msize != NULL)
if (msize != NULL)
*msize = insn & 0xff;
}
else
{
/* For large frames, instead of a single instruction it might
be
be
const <reg>, <msize>
consth <reg>, <msize> ; optional
sub msp,msp,<reg>
*/
const <reg>, <msize>
consth <reg>, <msize> ; optional
sub msp,msp,<reg>
*/
int reg;
unsigned msize0;
CORE_ADDR q = p;
@@ -276,8 +277,8 @@ examine_prologue (pc, rsize, msize, mfp_used)
insn = read_memory_integer (q, 4);
}
/* Check for sub msp,msp,<reg>. */
if ((insn & 0xffffff00) ==
(0x24000000|(MSP_HW_REGNUM<<16)|(MSP_HW_REGNUM<<8))
if ((insn & 0xffffff00) ==
(0x24000000 | (MSP_HW_REGNUM << 16) | (MSP_HW_REGNUM << 8))
&& (insn & 0xff) == reg)
{
p = q + 4;
@@ -295,19 +296,19 @@ examine_prologue (pc, rsize, msize, mfp_used)
* way down after everything else.
*/
insn = read_memory_integer (p, 4);
if ((insn & 0xff00ffff) == (0x5e000100|RAB_HW_REGNUM))
if ((insn & 0xff00ffff) == (0x5e000100 | RAB_HW_REGNUM))
{
p += 4;
}
done:
done:
if (msymbol != NULL)
{
if (mi == 0)
{
/* Add a new cache entry. */
mi = (struct prologue_info *)xmalloc (sizeof (struct prologue_info));
msymbol -> info = (char *)mi;
mi = (struct prologue_info *) xmalloc (sizeof (struct prologue_info));
msymbol->info = (char *) mi;
mi->rsize_valid = 0;
mi->msize_valid = 0;
mi->mfp_valid = 0;
@@ -337,7 +338,7 @@ examine_prologue (pc, rsize, msize, mfp_used)
to reach some "real" code. */
CORE_ADDR
skip_prologue (pc)
a29k_skip_prologue (pc)
CORE_ADDR pc;
{
return examine_prologue (pc, NULL, NULL, NULL);
@@ -353,7 +354,7 @@ skip_prologue (pc)
* msize is return in bytes.
*/
static int /* 0/1 - failure/success of finding the tag word */
static int /* 0/1 - failure/success of finding the tag word */
examine_tag (p, is_trans, argcount, msize, mfp_used)
CORE_ADDR p;
int *is_trans;
@@ -366,19 +367,20 @@ examine_tag (p, is_trans, argcount, msize, mfp_used)
tag1 = read_memory_integer (p, 4);
if ((tag1 & TAGWORD_ZERO_MASK) != 0) /* Not a tag word */
return 0;
if (tag1 & (1<<23)) /* A two word tag */
if (tag1 & (1 << 23)) /* A two word tag */
{
tag2 = read_memory_integer (p-4, 4);
if (msize)
*msize = tag2 * 2;
tag2 = read_memory_integer (p - 4, 4);
if (msize)
*msize = tag2 * 2;
}
else /* A one word tag */
else
/* A one word tag */
{
if (msize)
*msize = tag1 & 0x7ff;
if (msize)
*msize = tag1 & 0x7ff;
}
if (is_trans)
*is_trans = ((tag1 & (1<<21)) ? 1 : 0);
*is_trans = ((tag1 & (1 << 21)) ? 1 : 0);
/* Note that this includes the frame pointer and the return address
register, so the actual number of registers of arguments is two less.
argcount can be zero, however, sometimes, for strange assembler
@@ -386,7 +388,7 @@ examine_tag (p, is_trans, argcount, msize, mfp_used)
if (argcount)
*argcount = (tag1 >> 16) & 0x1f;
if (mfp_used)
*mfp_used = ((tag1 & (1<<22)) ? 1 : 0);
*mfp_used = ((tag1 & (1 << 22)) ? 1 : 0);
return 1;
}
@@ -413,8 +415,8 @@ init_frame_info (innermost_frame, frame)
frame->frame = read_register (GR1_REGNUM);
else
frame->frame = frame->next->frame + frame->next->rsize;
#if 0 /* CALL_DUMMY_LOCATION == ON_STACK */
#if 0 /* CALL_DUMMY_LOCATION == ON_STACK */
This wont work;
#else
if (PC_IN_CALL_DUMMY (p, 0, 0))
@@ -422,34 +424,35 @@ init_frame_info (innermost_frame, frame)
{
frame->rsize = DUMMY_FRAME_RSIZE;
/* This doesn't matter since we never try to get locals or args
from a dummy frame. */
from a dummy frame. */
frame->msize = 0;
/* Dummy frames always use a memory frame pointer. */
frame->saved_msp =
frame->saved_msp =
read_register_stack_integer (frame->frame + DUMMY_FRAME_RSIZE - 4, 4);
frame->flags |= (TRANSPARENT_FRAME|MFP_USED);
frame->flags |= (TRANSPARENT_FRAME | MFP_USED);
return;
}
func = find_pc_function (p);
if (func != NULL)
p = BLOCK_START (SYMBOL_BLOCK_VALUE (func));
else
{
/* Search backward to find the trace-back tag. However,
do not trace back beyond the start of the text segment
(just as a sanity check to avoid going into never-never land). */
do not trace back beyond the start of the text segment
(just as a sanity check to avoid going into never-never land). */
#if 1
while (p >= text_start
&& ((insn = read_memory_integer (p, 4)) & TAGWORD_ZERO_MASK) != 0)
&& ((insn = read_memory_integer (p, 4)) & TAGWORD_ZERO_MASK) != 0)
p -= 4;
#else /* 0 */
char pat[4] = {0, 0, 0, 0};
char pat[4] =
{0, 0, 0, 0};
char mask[4];
char insn_raw[4];
store_unsigned_integer (mask, 4, TAGWORD_ZERO_MASK);
/* Enable this once target_search is enabled and tested. */
target_search (4, pat, mask, p, -4, text_start, p+1, &p, &insn_raw);
target_search (4, pat, mask, p, -4, text_start, p + 1, &p, &insn_raw);
insn = extract_unsigned_integer (insn_raw, 4);
#endif /* 0 */
@@ -475,18 +478,18 @@ init_frame_info (innermost_frame, frame)
If one doesn't exist, try using a more exhaustive search of
the prologue. */
if (examine_tag(p-4,&trans,(int *)NULL,&msize,&mfp_used)) /* Found good tag */
examine_prologue (p, &rsize, 0, 0);
else /* No tag try prologue */
examine_prologue (p, &rsize, &msize, &mfp_used);
if (examine_tag (p - 4, &trans, (int *) NULL, &msize, &mfp_used)) /* Found good tag */
examine_prologue (p, &rsize, 0, 0);
else /* No tag try prologue */
examine_prologue (p, &rsize, &msize, &mfp_used);
frame->rsize = rsize;
frame->msize = msize;
frame->flags = 0;
if (mfp_used)
frame->flags |= MFP_USED;
frame->flags |= MFP_USED;
if (trans)
frame->flags |= TRANSPARENT_FRAME;
frame->flags |= TRANSPARENT_FRAME;
if (innermost_frame)
{
frame->saved_msp = read_register (MSP_REGNUM) + msize;
@@ -494,10 +497,10 @@ init_frame_info (innermost_frame, frame)
else
{
if (mfp_used)
frame->saved_msp =
read_register_stack_integer (frame->frame + rsize - 4, 4);
frame->saved_msp =
read_register_stack_integer (frame->frame + rsize - 4, 4);
else
frame->saved_msp = frame->next->saved_msp + msize;
frame->saved_msp = frame->next->saved_msp + msize;
}
}
@@ -509,8 +512,9 @@ init_extra_frame_info (frame)
/* Assume innermost frame. May produce strange results for "info frame"
but there isn't any way to tell the difference. */
init_frame_info (1, frame);
else {
/* We're in get_prev_frame_info.
else
{
/* We're in get_prev_frame.
Take care of everything in init_frame_pc. */
;
}
@@ -522,7 +526,7 @@ init_frame_pc (fromleaf, frame)
struct frame_info *frame;
{
frame->pc = (fromleaf ? SAVED_PC_AFTER_CALL (frame->next) :
frame->next ? FRAME_SAVED_PC (frame->next) : read_pc ());
frame->next ? FRAME_SAVED_PC (frame->next) : read_pc ());
init_frame_info (fromleaf, frame);
}
@@ -534,7 +538,7 @@ CORE_ADDR
frame_locals_address (fi)
struct frame_info *fi;
{
if (fi->flags & MFP_USED)
if (fi->flags & MFP_USED)
return fi->saved_msp;
else
return fi->saved_msp - fi->msize;
@@ -562,10 +566,11 @@ read_register_stack (memaddr, myaddr, actual_mem_addr, lval)
long rsp = read_register (RSP_REGNUM);
/* If we don't do this 'info register' stops in the middle. */
if (memaddr >= rstack_high_address)
if (memaddr >= rstack_high_address)
{
/* a bogus value */
static char val[] = {~0, ~0, ~0, ~0};
static char val[] =
{~0, ~0, ~0, ~0};
/* It's in a local register, but off the end of the stack. */
int regnum = (memaddr - rsp) / 4 + LR0_REGNUM;
if (myaddr != NULL)
@@ -573,7 +578,7 @@ read_register_stack (memaddr, myaddr, actual_mem_addr, lval)
/* Provide bogusness */
memcpy (myaddr, val, 4);
}
supply_register(regnum, val); /* More bogusness */
supply_register (regnum, val); /* More bogusness */
if (lval != NULL)
*lval = lval_register;
if (actual_mem_addr != NULL)
@@ -599,7 +604,7 @@ read_register_stack (memaddr, myaddr, actual_mem_addr, lval)
else
{
/* It's in the memory portion of the register stack. */
if (myaddr != NULL)
if (myaddr != NULL)
read_memory (memaddr, myaddr, 4);
if (lval != NULL)
*lval = lval_memory;
@@ -632,11 +637,11 @@ write_register_stack (memaddr, myaddr, actual_mem_addr)
long rfb = read_register (RFB_REGNUM);
long rsp = read_register (RSP_REGNUM);
/* If we don't do this 'info register' stops in the middle. */
if (memaddr >= rstack_high_address)
if (memaddr >= rstack_high_address)
{
/* It's in a register, but off the end of the stack. */
if (actual_mem_addr != NULL)
*actual_mem_addr = 0;
*actual_mem_addr = 0;
}
else if (memaddr < rfb)
{
@@ -645,7 +650,7 @@ write_register_stack (memaddr, myaddr, actual_mem_addr)
if (regnum < LR0_REGNUM || regnum > LR0_REGNUM + 127)
error ("Attempt to read register stack out of range.");
if (myaddr != NULL)
write_register (regnum, *(long *)myaddr);
write_register (regnum, *(long *) myaddr);
if (actual_mem_addr != NULL)
*actual_mem_addr = 0;
}
@@ -668,7 +673,7 @@ write_register_stack (memaddr, myaddr, actual_mem_addr)
The argument RAW_BUFFER must point to aligned memory. */
void
get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
char *raw_buffer;
int *optimized;
CORE_ADDR *addrp;
@@ -733,7 +738,7 @@ get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
else if (regnum < LR0_REGNUM || regnum >= LR0_REGNUM + 128)
{
/* These registers are not saved over procedure calls,
so just print out the current values. */
so just print out the current values. */
if (raw_buffer != NULL)
read_register_gen (regnum, raw_buffer);
if (lvalp != NULL)
@@ -742,7 +747,7 @@ get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lvalp)
*addrp = REGISTER_BYTE (regnum);
return;
}
addr = frame->frame + (regnum - LR0_REGNUM) * 4;
if (raw_buffer != NULL)
read_register_stack (addr, raw_buffer, &addr, &lval);
@@ -760,9 +765,9 @@ void
pop_frame ()
{
struct frame_info *frame = get_current_frame ();
CORE_ADDR rfb = read_register (RFB_REGNUM);
CORE_ADDR rfb = read_register (RFB_REGNUM);
CORE_ADDR gr1 = frame->frame + frame->rsize;
CORE_ADDR lr1;
CORE_ADDR lr1;
CORE_ADDR original_lr0;
int must_fix_lr0 = 0;
int i;
@@ -772,54 +777,54 @@ pop_frame ()
read_register (SP_REGNUM),
FRAME_FP (frame)))
{
int lrnum = LR0_REGNUM + DUMMY_ARG/4;
int lrnum = LR0_REGNUM + DUMMY_ARG / 4;
for (i = 0; i < DUMMY_SAVE_SR128; ++i)
write_register (SR_REGNUM (i + 128),read_register (lrnum++));
write_register (SR_REGNUM (i + 128), read_register (lrnum++));
for (i = 0; i < DUMMY_SAVE_SR160; ++i)
write_register (SR_REGNUM(i+160), read_register (lrnum++));
write_register (SR_REGNUM (i + 160), read_register (lrnum++));
for (i = 0; i < DUMMY_SAVE_GREGS; ++i)
write_register (RETURN_REGNUM + i, read_register (lrnum++));
/* Restore the PCs and prepare to restore LR0. */
write_register(PC_REGNUM, read_register (lrnum++));
write_register(NPC_REGNUM, read_register (lrnum++));
write_register(PC2_REGNUM, read_register (lrnum++));
write_register (PC_REGNUM, read_register (lrnum++));
write_register (NPC_REGNUM, read_register (lrnum++));
write_register (PC2_REGNUM, read_register (lrnum++));
original_lr0 = read_register (lrnum++);
must_fix_lr0 = 1;
}
/* Restore the memory stack pointer. */
write_register (MSP_REGNUM, frame->saved_msp);
/* Restore the register stack pointer. */
/* Restore the register stack pointer. */
write_register (GR1_REGNUM, gr1);
/* If we popped a dummy frame, restore lr0 now that gr1 has been restored. */
if (must_fix_lr0)
if (must_fix_lr0)
write_register (LR0_REGNUM, original_lr0);
/* Check whether we need to fill registers. */
lr1 = read_register (LR0_REGNUM + 1);
if (lr1 > rfb)
{
/* Fill. */
/* Check whether we need to fill registers. */
lr1 = read_register (LR0_REGNUM + 1);
if (lr1 > rfb)
{
/* Fill. */
int num_bytes = lr1 - rfb;
int i;
int i;
long word;
write_register (RAB_REGNUM, read_register (RAB_REGNUM) + num_bytes);
write_register (RFB_REGNUM, lr1);
for (i = 0; i < num_bytes; i += 4)
{
write_register (RAB_REGNUM, read_register (RAB_REGNUM) + num_bytes);
write_register (RFB_REGNUM, lr1);
for (i = 0; i < num_bytes; i += 4)
{
/* Note: word is in host byte order. */
word = read_memory_integer (rfb + i, 4);
write_register (LR0_REGNUM + ((rfb - gr1) % 0x80) + i / 4, word);
}
word = read_memory_integer (rfb + i, 4);
write_register (LR0_REGNUM + ((rfb - gr1) % 0x80) + i / 4, word);
}
}
flush_cached_frames ();
flush_cached_frames ();
}
/* Push an empty stack frame, to record the current PC, etc. */
void
void
push_dummy_frame ()
{
long w;
@@ -827,13 +832,13 @@ push_dummy_frame ()
CORE_ADDR msp = read_register (MSP_REGNUM);
int lrnum, i;
CORE_ADDR original_lr0;
/* Read original lr0 before changing gr1. This order isn't really needed
since GDB happens to have a snapshot of all the regs and doesn't toss
it when gr1 is changed. But it's The Right Thing To Do. */
original_lr0 = read_register (LR0_REGNUM);
/* Allocate the new frame. */
/* Allocate the new frame. */
gr1 = read_register (GR1_REGNUM) - DUMMY_FRAME_RSIZE;
write_register (GR1_REGNUM, gr1);
@@ -877,7 +882,7 @@ push_dummy_frame ()
write_register (MSP_REGNUM, msp - 16 * 4);
/* Save registers. */
lrnum = LR0_REGNUM + DUMMY_ARG/4;
lrnum = LR0_REGNUM + DUMMY_ARG / 4;
for (i = 0; i < DUMMY_SAVE_SR128; ++i)
write_register (lrnum++, read_register (SR_REGNUM (i + 128)));
for (i = 0; i < DUMMY_SAVE_SR160; ++i)
@@ -917,8 +922,8 @@ setup_arbitrary_frame (argc, argv)
frame = create_new_frame (argv[0], argv[1]);
if (!frame)
fatal ("internal: create_new_frame returned invalid frame id");
internal_error ("create_new_frame returned invalid frame id");
/* Creating a new frame munges the `frame' value from the current
GR1, so we restore it again here. FIXME, untangle all this
29K frame stuff... */
@@ -991,25 +996,25 @@ a29k_get_processor_type ()
#ifdef GET_LONGJMP_TARGET
/* Figure out where the longjmp will land. We expect that we have just entered
longjmp and haven't yet setup the stack frame, so the args are still in the
longjmp and haven't yet setup the stack frame, so the args are still in the
output regs. lr2 (LR2_REGNUM) points at the jmp_buf structure from which we
extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
This routine returns true on success */
int
get_longjmp_target(pc)
get_longjmp_target (pc)
CORE_ADDR *pc;
{
CORE_ADDR jb_addr;
char buf[sizeof(CORE_ADDR)];
char buf[sizeof (CORE_ADDR)];
jb_addr = read_register(LR2_REGNUM);
jb_addr = read_register (LR2_REGNUM);
if (target_read_memory(jb_addr + JB_PC * JB_ELEMENT_SIZE, (char *) buf,
sizeof(CORE_ADDR)))
if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, (char *) buf,
sizeof (CORE_ADDR)))
return 0;
*pc = extract_address ((PTR) buf, sizeof(CORE_ADDR));
*pc = extract_address ((PTR) buf, sizeof (CORE_ADDR));
return 1;
}
#endif /* GET_LONGJMP_TARGET */
@@ -1024,7 +1029,7 @@ _initialize_a29k_tdep ()
/* FIXME, there should be a way to make a CORE_ADDR variable settable. */
add_show_from_set
(add_set_cmd ("rstack_high_address", class_support, var_uinteger,
(char *)&rstack_high_address,
(char *) &rstack_high_address,
"Set top address in memory of the register stack.\n\
Attempts to access registers saved above this address will be ignored\n\
or will produce the value -1.", &setlist),
@@ -1033,8 +1038,8 @@ or will produce the value -1.", &setlist),
/* FIXME, there should be a way to make a CORE_ADDR variable settable. */
add_show_from_set
(add_set_cmd ("call_scratch_address", class_support, var_uinteger,
(char *)&text_end,
"Set address in memory where small amounts of RAM can be used\n\
(char *) &text_end,
"Set address in memory where small amounts of RAM can be used\n\
when making function calls into the inferior.", &setlist),
&showlist);
}

View File

@@ -1,21 +1,22 @@
/* Host-dependent code for Apollo-68ks for GDB, the GNU debugger.
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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"
@@ -30,41 +31,40 @@ extern int errno;
void
fetch_inferior_registers (ignored)
int ignored;
int ignored;
{
struct ptrace_$data_regs_m68k inferior_registers;
struct ptrace_$floating_regs_m68k inferior_fp_registers;
struct ptrace_$control_regs_m68k inferior_control_registers;
extern char registers[];
ptrace_$init_control(&inferior_control_registers);
inferior_fp_registers.size = sizeof(inferior_fp_registers);
ptrace_$init_control (&inferior_control_registers);
inferior_fp_registers.size = sizeof (inferior_fp_registers);
registers_fetched ();
ptrace (PTRACE_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers,
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set,
(PTRACE_ARG3_TYPE) &inferior_registers,
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set);
ptrace (PTRACE_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
ptrace_$floating_set_m68k);
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k);
ptrace (PTRACE_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_control_registers,
ptrace_$control_set_m68k);
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
bcopy (&inferior_registers, registers, 16 * 4);
bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.regs);
*(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
*(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
*(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
*(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
}
/* Store our register values back into the inferior.
@@ -78,46 +78,45 @@ store_inferior_registers (regno)
struct ptrace_$data_regs_m68k inferior_registers;
struct ptrace_$floating_regs_m68k inferior_fp_registers;
struct ptrace_$control_regs_m68k inferior_control_registers;
extern char registers[];
ptrace_$init_control(&inferior_control_registers);
inferior_fp_registers.size = sizeof(inferior_fp_registers);
ptrace_$init_control (&inferior_control_registers);
inferior_fp_registers.size = sizeof (inferior_fp_registers);
ptrace (PTRACE_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
ptrace_$floating_set_m68k);
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k);
ptrace (PTRACE_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_control_registers,
ptrace_$control_set_m68k);
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
bcopy (registers, &inferior_registers, sizeof(inferior_registers));
bcopy (registers, &inferior_registers, sizeof (inferior_registers));
bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.regs,
sizeof inferior_fp_registers.regs);
inferior_control_registers.sr = *(int *)&registers[REGISTER_BYTE (PS_REGNUM)];
inferior_control_registers.pc = *(int *)&registers[REGISTER_BYTE (PC_REGNUM)];
inferior_control_registers.sr = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
inferior_control_registers.pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
ptrace (PTRACE_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_registers,
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_registers,
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set_m68k);
ptrace (PTRACE_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k);
ptrace (PTRACE_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_control_registers,
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) &inferior_control_registers,
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
}

View File

@@ -3,21 +3,22 @@
Written by Rob Savoye of Cygnus Support
This file is part of GDB.
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 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.
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. */
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 "gdbcore.h"
@@ -92,61 +93,62 @@ static char *abug_regnames[NUM_REGS] =
static struct target_ops abug_ops;
static char *abug_inits[] = {"\r", NULL};
static char *abug_inits[] =
{"\r", NULL};
static struct monitor_ops abug_cmds ;
static void
init_abug_cmds(void)
{
abug_cmds.flags = MO_CLR_BREAK_USES_ADDR;
abug_cmds.init = abug_inits; /* Init strings */
abug_cmds.cont = "g\r"; /* continue command */
abug_cmds.step = "t\r"; /* single step */
abug_cmds.stop = NULL; /* interrupt command */
abug_cmds.set_break = "br %x\r"; /* set a breakpoint */
abug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
abug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
abug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
abug_cmds.setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
abug_cmds.setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
abug_cmds.setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
abug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
abug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
abug_cmds.setmem.term = NULL; /* setreg.term */
abug_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
abug_cmds.getmem.cmdb = "md %x:%x;b\r"; /* getmem.cmdb (addr, len) */
abug_cmds.getmem.cmdw = "md %x:%x;b\r"; /* getmem.cmdw (addr, len) */
abug_cmds.getmem.cmdl = "md %x:%x;b\r"; /* getmem.cmdl (addr, len) */
abug_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
abug_cmds.getmem.resp_delim = " "; /* getmem.resp_delim */
abug_cmds.getmem.term = NULL; /* getmem.term */
abug_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
abug_cmds.setreg.cmd = "rm %s %x\r"; /* setreg.cmd (name, value) */
abug_cmds.setreg.resp_delim = "="; /* setreg.resp_delim */
abug_cmds.setreg.term = "? "; /* setreg.term */
abug_cmds.setreg.term_cmd = ".\r" ; /* setreg.term_cmd */
abug_cmds.getreg.cmd = "rm %s\r"; /* getreg.cmd (name) */
abug_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
abug_cmds.getreg.term = "? "; /* getreg.term */
abug_cmds.getreg.term_cmd = ".\r" ; /* getreg.term_cmd */
abug_cmds.dump_registers = "rd\r"; /* dump_registers */
abug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
abug_cmds.supply_register = abug_supply_register; /* supply_register */
abug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
abug_cmds.load = "lo 0\r"; /* download command */
abug_cmds.loadresp = "\n"; /* load response */
abug_cmds.prompt = "135Bug>"; /* monitor command prompt */
abug_cmds.line_term = "\r"; /* end-of-line terminator */
abug_cmds.cmd_end = NULL; /* optional command terminator */
abug_cmds.target = &abug_ops; /* target operations */
abug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
abug_cmds.regnames = abug_regnames; /* registers names */
abug_cmds.magic = MONITOR_OPS_MAGIC ; /* magic */
};
static struct monitor_ops abug_cmds;
static void
abug_open(args, from_tty)
init_abug_cmds (void)
{
abug_cmds.flags = MO_CLR_BREAK_USES_ADDR;
abug_cmds.init = abug_inits; /* Init strings */
abug_cmds.cont = "g\r"; /* continue command */
abug_cmds.step = "t\r"; /* single step */
abug_cmds.stop = NULL; /* interrupt command */
abug_cmds.set_break = "br %x\r"; /* set a breakpoint */
abug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
abug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
abug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
abug_cmds.setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
abug_cmds.setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
abug_cmds.setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
abug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
abug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
abug_cmds.setmem.term = NULL; /* setreg.term */
abug_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
abug_cmds.getmem.cmdb = "md %x:%x;b\r"; /* getmem.cmdb (addr, len) */
abug_cmds.getmem.cmdw = "md %x:%x;b\r"; /* getmem.cmdw (addr, len) */
abug_cmds.getmem.cmdl = "md %x:%x;b\r"; /* getmem.cmdl (addr, len) */
abug_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
abug_cmds.getmem.resp_delim = " "; /* getmem.resp_delim */
abug_cmds.getmem.term = NULL; /* getmem.term */
abug_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
abug_cmds.setreg.cmd = "rm %s %x\r"; /* setreg.cmd (name, value) */
abug_cmds.setreg.resp_delim = "="; /* setreg.resp_delim */
abug_cmds.setreg.term = "? "; /* setreg.term */
abug_cmds.setreg.term_cmd = ".\r"; /* setreg.term_cmd */
abug_cmds.getreg.cmd = "rm %s\r"; /* getreg.cmd (name) */
abug_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
abug_cmds.getreg.term = "? "; /* getreg.term */
abug_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
abug_cmds.dump_registers = "rd\r"; /* dump_registers */
abug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
abug_cmds.supply_register = abug_supply_register; /* supply_register */
abug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
abug_cmds.load = "lo 0\r"; /* download command */
abug_cmds.loadresp = "\n"; /* load response */
abug_cmds.prompt = "135Bug>"; /* monitor command prompt */
abug_cmds.line_term = "\r"; /* end-of-line terminator */
abug_cmds.cmd_end = NULL; /* optional command terminator */
abug_cmds.target = &abug_ops; /* target operations */
abug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
abug_cmds.regnames = abug_regnames; /* registers names */
abug_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
};
static void
abug_open (args, from_tty)
char *args;
int from_tty;
{
@@ -156,7 +158,7 @@ abug_open(args, from_tty)
void
_initialize_abug_rom ()
{
init_abug_cmds() ;
init_abug_cmds ();
init_monitor_ops (&abug_ops);
abug_ops.to_shortname = "abug";

View File

@@ -1,17 +1,3 @@
/* Whether malloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_MALLOC
/* Whether realloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_REALLOC
/* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE
/* Whether strerror must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRERROR
@TOP@
/* Define if pstatus_t type is available */
#undef HAVE_PSTATUS_T
@@ -88,6 +74,9 @@
name, as a C string. */
#undef TARGET_CPU_DEFAULT
/* Define if the simulator is being linked in. */
#undef WITH_SIM
/* Set to true if the save_state_t structure is present */
#define HAVE_STRUCT_SAVE_STATE_T 0

View File

@@ -493,7 +493,7 @@ AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
if test x"${no_itcl}" = x ; then
# we reset no_itcl in case something fails here
no_itcl=true
AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)],
AC_ARG_WITH(itclconfig, [ --with-itclconfig Directory containing itcl configuration (itclConfig.sh)],
with_itclconfig=${withval})
AC_MSG_CHECKING([for Itcl configuration])
AC_CACHE_VAL(ac_cv_c_itclconfig,[
@@ -619,7 +619,7 @@ AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
if test x"${no_itk}" = x ; then
# we reset no_itk in case something fails here
no_itk=true
AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)],
AC_ARG_WITH(itkconfig, [ --with-itkconfig Directory containing itk configuration (itkConfig.sh)],
with_itkconfig=${withval})
AC_MSG_CHECKING([for Itk configuration])
AC_CACHE_VAL(ac_cv_c_itkconfig,[
@@ -765,7 +765,7 @@ AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
if test x"${no_tix}" = x ; then
# we reset no_tix in case something fails here
no_tix=true
AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
AC_ARG_WITH(tixconfig, [ --with-tixconfig Directory containing tix configuration (tixConfig.sh)],
with_tixconfig=${withval})
AC_MSG_CHECKING([for Tix configuration])
AC_CACHE_VAL(ac_cv_c_tixconfig,[

6
gdb/aclocal.m4 vendored
View File

@@ -505,7 +505,7 @@ AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
if test x"${no_itcl}" = x ; then
# we reset no_itcl in case something fails here
no_itcl=true
AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)],
AC_ARG_WITH(itclconfig, [ --with-itclconfig Directory containing itcl configuration (itclConfig.sh)],
with_itclconfig=${withval})
AC_MSG_CHECKING([for Itcl configuration])
AC_CACHE_VAL(ac_cv_c_itclconfig,[
@@ -631,7 +631,7 @@ AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
if test x"${no_itk}" = x ; then
# we reset no_itk in case something fails here
no_itk=true
AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)],
AC_ARG_WITH(itkconfig, [ --with-itkconfig Directory containing itk configuration (itkConfig.sh)],
with_itkconfig=${withval})
AC_MSG_CHECKING([for Itk configuration])
AC_CACHE_VAL(ac_cv_c_itkconfig,[
@@ -777,7 +777,7 @@ AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
if test x"${no_tix}" = x ; then
# we reset no_tix in case something fails here
no_tix=true
AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
AC_ARG_WITH(tixconfig, [ --with-tixconfig Directory containing tix configuration (tixConfig.sh)],
with_tixconfig=${withval})
AC_MSG_CHECKING([for Tix configuration])
AC_CACHE_VAL(ac_cv_c_tixconfig,[

View File

@@ -1,21 +1,22 @@
/* Low level Alpha interface, for GDB when running native.
Copyright 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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"
@@ -23,10 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "target.h"
#include <sys/ptrace.h>
#ifdef __linux__
# include <asm/reg.h>
# include <alpha/ptrace.h>
#include <asm/reg.h>
#include <alpha/ptrace.h>
#else
# include <machine/reg.h>
#include <machine/reg.h>
#endif
#include <sys/user.h>
@@ -62,13 +63,13 @@ get_longjmp_target (pc)
CORE_ADDR jb_addr;
char raw_buffer[MAX_REGISTER_RAW_SIZE];
jb_addr = read_register(A0_REGNUM);
jb_addr = read_register (A0_REGNUM);
if (target_read_memory(jb_addr + JB_PC * JB_ELEMENT_SIZE, raw_buffer,
sizeof(CORE_ADDR)))
if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, raw_buffer,
sizeof (CORE_ADDR)))
return 0;
*pc = extract_address (raw_buffer, sizeof(CORE_ADDR));
*pc = extract_address (raw_buffer, sizeof (CORE_ADDR));
return 1;
}
@@ -78,11 +79,11 @@ get_longjmp_target (pc)
CORE_REG_SECT points to the register values themselves, read into memory.
CORE_REG_SIZE is the size of that area.
WHICH says which set of registers we are handling (0 = int, 2 = float
on machines where they are discontiguous).
on machines where they are discontiguous).
REG_ADDR is the offset from u.u_ar0 to the register values relative to
core_reg_sect. This is used with old-fashioned core files to
locate the registers in a large upage-plus-stack ".reg" section.
Original upage address X is at location core_reg_sect+x+reg_addr.
core_reg_sect. This is used with old-fashioned core files to
locate the registers in a large upage-plus-stack ".reg" section.
Original upage address X is at location core_reg_sect+x+reg_addr.
*/
static void
@@ -101,17 +102,18 @@ fetch_osf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
static int core_reg_mapping[NUM_REGS] =
{
#define EFL (EF_SIZE / 8)
EF_V0, EF_T0, EF_T1, EF_T2, EF_T3, EF_T4, EF_T5, EF_T6,
EF_T7, EF_S0, EF_S1, EF_S2, EF_S3, EF_S4, EF_S5, EF_S6,
EF_A0, EF_A1, EF_A2, EF_A3, EF_A4, EF_A5, EF_T8, EF_T9,
EF_T10, EF_T11, EF_RA, EF_T12, EF_AT, EF_GP, EF_SP, -1,
EFL+0, EFL+1, EFL+2, EFL+3, EFL+4, EFL+5, EFL+6, EFL+7,
EFL+8, EFL+9, EFL+10, EFL+11, EFL+12, EFL+13, EFL+14, EFL+15,
EFL+16, EFL+17, EFL+18, EFL+19, EFL+20, EFL+21, EFL+22, EFL+23,
EFL+24, EFL+25, EFL+26, EFL+27, EFL+28, EFL+29, EFL+30, EFL+31,
EF_PC, -1
EF_V0, EF_T0, EF_T1, EF_T2, EF_T3, EF_T4, EF_T5, EF_T6,
EF_T7, EF_S0, EF_S1, EF_S2, EF_S3, EF_S4, EF_S5, EF_S6,
EF_A0, EF_A1, EF_A2, EF_A3, EF_A4, EF_A5, EF_T8, EF_T9,
EF_T10, EF_T11, EF_RA, EF_T12, EF_AT, EF_GP, EF_SP, -1,
EFL + 0, EFL + 1, EFL + 2, EFL + 3, EFL + 4, EFL + 5, EFL + 6, EFL + 7,
EFL + 8, EFL + 9, EFL + 10, EFL + 11, EFL + 12, EFL + 13, EFL + 14, EFL + 15,
EFL + 16, EFL + 17, EFL + 18, EFL + 19, EFL + 20, EFL + 21, EFL + 22, EFL + 23,
EFL + 24, EFL + 25, EFL + 26, EFL + 27, EFL + 28, EFL + 29, EFL + 30, EFL + 31,
EF_PC, -1
};
static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
static char zerobuf[MAX_REGISTER_RAW_SIZE] =
{0};
for (regno = 0; regno < NUM_REGS; regno++)
{
@@ -144,7 +146,7 @@ fetch_elf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
int which;
CORE_ADDR reg_addr;
{
if (core_reg_size < 32*8)
if (core_reg_size < 32 * 8)
{
error ("Core file register section too small (%u bytes).", core_reg_size);
return;
@@ -153,15 +155,15 @@ fetch_elf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
if (which == 2)
{
/* The FPU Registers. */
memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], core_reg_sect, 31*8);
memset (&registers[REGISTER_BYTE (FP0_REGNUM+31)], 0, 8);
memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], core_reg_sect, 31 * 8);
memset (&registers[REGISTER_BYTE (FP0_REGNUM + 31)], 0, 8);
memset (&register_valid[FP0_REGNUM], 1, 32);
}
else
{
/* The General Registers. */
memcpy (&registers[REGISTER_BYTE (V0_REGNUM)], core_reg_sect, 31*8);
memcpy (&registers[REGISTER_BYTE (PC_REGNUM)], core_reg_sect+31*8, 8);
memcpy (&registers[REGISTER_BYTE (V0_REGNUM)], core_reg_sect, 31 * 8);
memcpy (&registers[REGISTER_BYTE (PC_REGNUM)], core_reg_sect + 31 * 8, 8);
memset (&registers[REGISTER_BYTE (ZERO_REGNUM)], 0, 8);
memset (&register_valid[V0_REGNUM], 1, 32);
register_valid[PC_REGNUM] = 1;
@@ -201,18 +203,19 @@ kernel_u_size ()
* See the comment in m68k-tdep.c regarding the utility of these functions.
*/
void
void
supply_gregset (gregsetp)
gregset_t *gregsetp;
{
register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
static char zerobuf[MAX_REGISTER_RAW_SIZE] =
{0};
for (regi = 0; regi < 31; regi++)
supply_register (regi, (char *)(regp + regi));
supply_register (regi, (char *) (regp + regi));
supply_register (PC_REGNUM, (char *)(regp + 31));
supply_register (PC_REGNUM, (char *) (regp + 31));
/* Fill inaccessible registers with zero. */
supply_register (ZERO_REGNUM, zerobuf);
@@ -248,7 +251,7 @@ supply_fpregset (fpregsetp)
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
for (regi = 0; regi < 32; regi++)
supply_register (regi + FP0_REGNUM, (char *)(regp + regi));
supply_register (regi + FP0_REGNUM, (char *) (regp + regi));
}
void
@@ -269,8 +272,8 @@ fill_fpregset (fpregsetp, regno)
}
}
#endif
/* Register that we are able to handle alpha core file formats. */
static struct core_fns alpha_osf_core_fns =

File diff suppressed because it is too large Load Diff

View File

@@ -1,164 +1,163 @@
/* Low level interface to ptrace, for GDB when running under m68k SVR2 Unix
on Altos 3068. Report bugs to Jyrki Kuoppala <jkp@cs.hut.fi>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#ifdef USG
#include <sys/types.h>
#endif
#include <sys/param.h>
#include <sys/dir.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#ifdef USG
#include <sys/page.h>
#ifdef ALTOS
#include <sys/net.h>
#include <errno.h>
#endif
#endif
#include "gdbcore.h"
#include <sys/user.h> /* After a.out.h */
#include <sys/file.h>
#include "gdb_stat.h"
/* Work with core dump and executable files, for GDB.
This code would be in corefile.c if it weren't machine-dependent. */
void
core_file_command (filename, from_tty)
char *filename;
int from_tty;
{
int val;
extern char registers[];
/* Discard all vestiges of any previous core file
and mark data and stack spaces as empty. */
if (corefile)
free (corefile);
corefile = 0;
if (corechan >= 0)
close (corechan);
corechan = -1;
data_start = 0;
data_end = 0;
stack_start = STACK_END_ADDR;
stack_end = STACK_END_ADDR;
/* Now, if a new core file was specified, open it and digest it. */
if (filename)
{
filename = tilde_expand (filename);
make_cleanup (free, filename);
if (have_inferior_p ())
error ("To look at a core file, you must kill the program with \"kill\".");
corechan = open (filename, O_RDONLY, 0);
if (corechan < 0)
perror_with_name (filename);
/* 4.2-style (and perhaps also sysV-style) core dump file. */
{
struct user u;
unsigned int reg_offset;
val = myread (corechan, &u, sizeof u);
if (val < 0)
perror_with_name ("Not a core file: reading upage");
if (val != sizeof u)
error ("Not a core file: could only read %d bytes", val);
data_start = exec_data_start;
#if !defined (NBPG)
#define NBPG NBPP
#endif
#if !defined (UPAGES)
#define UPAGES USIZE
#endif
data_end = data_start + NBPG * u.u_dsize;
stack_start = stack_end - NBPG * u.u_ssize;
data_offset = NBPG * UPAGES + exec_data_start % NBPG /* Not sure about this //jkp */;
stack_offset = NBPG * (UPAGES + u.u_dsize);
/* Some machines put an absolute address in here and some put
the offset in the upage of the regs. */
reg_offset = (int) u.u_state;
if (reg_offset > NBPG * UPAGES)
reg_offset -= KERNEL_U_ADDR;
memcpy (&core_aouthdr, &u.u_exdata, sizeof (AOUTHDR));
printf_unfiltered ("Core file is from \"%s\".\n", u.u_comm);
/* I don't know where to find this info.
So, for now, mark it as not available. */
N_SET_MAGIC (core_aouthdr, 0);
/* Read the register values out of the core file and store
them where `read_register' will find them. */
{
register int regno;
for (regno = 0; regno < NUM_REGS; regno++)
{
char buf[MAX_REGISTER_RAW_SIZE];
val = lseek (corechan, register_addr (regno, reg_offset), 0);
if (val < 0
|| (val = myread (corechan, buf, sizeof buf)) < 0)
{
char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
+ 30);
strcpy (buffer, "Reading register ");
strcat (buffer, REGISTER_NAME (regno));
perror_with_name (buffer);
}
supply_register (regno, buf);
}
}
}
if (filename[0] == '/')
corefile = savestring (filename, strlen (filename));
else
{
corefile = concat (current_directory, "/", filename, NULL);
}
flush_cached_frames ();
select_frame (get_current_frame (), 0);
validate_files ();
}
else if (from_tty)
printf_unfiltered ("No core file now.\n");
}
/* OBSOLETE /* Low level interface to ptrace, for GDB when running under m68k SVR2 Unix */
/* OBSOLETE on Altos 3068. Report bugs to Jyrki Kuoppala <jkp@cs.hut.fi> */
/* OBSOLETE Copyright (C) 1989, 1991 Free Software Foundation, Inc. */
/* OBSOLETE */
/* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
/* OBSOLETE it under the terms of the GNU General Public License as published by */
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
/* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
/* OBSOLETE This program is distributed in the hope that it will be useful, */
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
/* OBSOLETE You should have received a copy of the GNU General Public License */
/* OBSOLETE along with this program; if not, write to the Free Software */
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */
/* OBSOLETE */
/* OBSOLETE #include "defs.h" */
/* OBSOLETE #include "frame.h" */
/* OBSOLETE #include "inferior.h" */
/* OBSOLETE */
/* OBSOLETE #ifdef USG */
/* OBSOLETE #include <sys/types.h> */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE #include <sys/param.h> */
/* OBSOLETE #include <sys/dir.h> */
/* OBSOLETE #include <signal.h> */
/* OBSOLETE #include <sys/ioctl.h> */
/* OBSOLETE #include <fcntl.h> */
/* OBSOLETE #ifdef USG */
/* OBSOLETE #include <sys/page.h> */
/* OBSOLETE #ifdef ALTOS */
/* OBSOLETE #include <sys/net.h> */
/* OBSOLETE #include <errno.h> */
/* OBSOLETE #endif */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE #include "gdbcore.h" */
/* OBSOLETE #include <sys/user.h> /* After a.out.h *x/ */
/* OBSOLETE #include <sys/file.h> */
/* OBSOLETE #include "gdb_stat.h" */
/* OBSOLETE */
/* OBSOLETE */
/* OBSOLETE /* Work with core dump and executable files, for GDB. */
/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */
/* OBSOLETE */
/* OBSOLETE void */
/* OBSOLETE core_file_command (filename, from_tty) */
/* OBSOLETE char *filename; */
/* OBSOLETE int from_tty; */
/* OBSOLETE { */
/* OBSOLETE int val; */
/* OBSOLETE */
/* OBSOLETE /* Discard all vestiges of any previous core file */
/* OBSOLETE and mark data and stack spaces as empty. *x/ */
/* OBSOLETE */
/* OBSOLETE if (corefile) */
/* OBSOLETE free (corefile); */
/* OBSOLETE corefile = 0; */
/* OBSOLETE */
/* OBSOLETE if (corechan >= 0) */
/* OBSOLETE close (corechan); */
/* OBSOLETE corechan = -1; */
/* OBSOLETE */
/* OBSOLETE data_start = 0; */
/* OBSOLETE data_end = 0; */
/* OBSOLETE stack_start = STACK_END_ADDR; */
/* OBSOLETE stack_end = STACK_END_ADDR; */
/* OBSOLETE */
/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */
/* OBSOLETE */
/* OBSOLETE if (filename) */
/* OBSOLETE { */
/* OBSOLETE filename = tilde_expand (filename); */
/* OBSOLETE make_cleanup (free, filename); */
/* OBSOLETE */
/* OBSOLETE if (have_inferior_p ()) */
/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */
/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */
/* OBSOLETE if (corechan < 0) */
/* OBSOLETE perror_with_name (filename); */
/* OBSOLETE /* 4.2-style (and perhaps also sysV-style) core dump file. *x/ */
/* OBSOLETE { */
/* OBSOLETE struct user u; */
/* OBSOLETE */
/* OBSOLETE unsigned int reg_offset; */
/* OBSOLETE */
/* OBSOLETE val = myread (corechan, &u, sizeof u); */
/* OBSOLETE if (val < 0) */
/* OBSOLETE perror_with_name ("Not a core file: reading upage"); */
/* OBSOLETE if (val != sizeof u) */
/* OBSOLETE error ("Not a core file: could only read %d bytes", val); */
/* OBSOLETE data_start = exec_data_start; */
/* OBSOLETE */
/* OBSOLETE #if !defined (NBPG) */
/* OBSOLETE #define NBPG NBPP */
/* OBSOLETE #endif */
/* OBSOLETE #if !defined (UPAGES) */
/* OBSOLETE #define UPAGES USIZE */
/* OBSOLETE #endif */
/* OBSOLETE */
/* OBSOLETE data_end = data_start + NBPG * u.u_dsize; */
/* OBSOLETE stack_start = stack_end - NBPG * u.u_ssize; */
/* OBSOLETE data_offset = NBPG * UPAGES + exec_data_start % NBPG /* Not sure about this //jkp *x/; */
/* OBSOLETE stack_offset = NBPG * (UPAGES + u.u_dsize); */
/* OBSOLETE */
/* OBSOLETE /* Some machines put an absolute address in here and some put */
/* OBSOLETE the offset in the upage of the regs. *x/ */
/* OBSOLETE reg_offset = (int) u.u_state; */
/* OBSOLETE if (reg_offset > NBPG * UPAGES) */
/* OBSOLETE reg_offset -= KERNEL_U_ADDR; */
/* OBSOLETE */
/* OBSOLETE memcpy (&core_aouthdr, &u.u_exdata, sizeof (AOUTHDR)); */
/* OBSOLETE printf_unfiltered ("Core file is from \"%s\".\n", u.u_comm); */
/* OBSOLETE */
/* OBSOLETE /* I don't know where to find this info. */
/* OBSOLETE So, for now, mark it as not available. *x/ */
/* OBSOLETE N_SET_MAGIC (core_aouthdr, 0); */
/* OBSOLETE */
/* OBSOLETE /* Read the register values out of the core file and store */
/* OBSOLETE them where `read_register' will find them. *x/ */
/* OBSOLETE */
/* OBSOLETE { */
/* OBSOLETE register int regno; */
/* OBSOLETE */
/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */
/* OBSOLETE { */
/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */
/* OBSOLETE */
/* OBSOLETE val = lseek (corechan, register_addr (regno, reg_offset), 0); */
/* OBSOLETE if (val < 0 */
/* OBSOLETE || (val = myread (corechan, buf, sizeof buf)) < 0) */
/* OBSOLETE { */
/* OBSOLETE char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) */
/* OBSOLETE + 30); */
/* OBSOLETE strcpy (buffer, "Reading register "); */
/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */
/* OBSOLETE */
/* OBSOLETE perror_with_name (buffer); */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE supply_register (regno, buf); */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE } */
/* OBSOLETE if (filename[0] == '/') */
/* OBSOLETE corefile = savestring (filename, strlen (filename)); */
/* OBSOLETE else */
/* OBSOLETE { */
/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE flush_cached_frames (); */
/* OBSOLETE select_frame (get_current_frame (), 0); */
/* OBSOLETE validate_files (); */
/* OBSOLETE } */
/* OBSOLETE else if (from_tty) */
/* OBSOLETE printf_unfiltered ("No core file now.\n"); */
/* OBSOLETE } */

View File

@@ -1,21 +1,22 @@
/* Annotation routines for GDB.
Copyright 1986, 89, 90, 91, 92, 95, 1998 Free Software Foundation, Inc.
Copyright 1986, 89, 90, 91, 92, 95, 98, 1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "annotate.h"
@@ -27,6 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Prototypes for local functions. */
extern void _initialize_annotate PARAMS ((void));
static void print_value_flags PARAMS ((struct type *));
static void breakpoint_changed PARAMS ((struct breakpoint *));
@@ -34,6 +37,7 @@ static void breakpoint_changed PARAMS ((struct breakpoint *));
void (*annotate_starting_hook) PARAMS ((void));
void (*annotate_stopped_hook) PARAMS ((void));
void (*annotate_signalled_hook) PARAMS ((void));
void (*annotate_signal_hook) PARAMS ((void));
void (*annotate_exited_hook) PARAMS ((void));
static void
@@ -89,9 +93,9 @@ annotate_starting ()
else
{
if (annotation_level > 1)
{
printf_filtered ("\n\032\032starting\n");
}
{
printf_filtered ("\n\032\032starting\n");
}
}
}
@@ -103,7 +107,7 @@ annotate_stopped ()
else
{
if (annotation_level > 1)
printf_filtered ("\n\032\032stopped\n");
printf_filtered ("\n\032\032stopped\n");
}
}
@@ -116,7 +120,7 @@ annotate_exited (exitstatus)
else
{
if (annotation_level > 1)
printf_filtered ("\n\032\032exited %d\n", exitstatus);
printf_filtered ("\n\032\032exited %d\n", exitstatus);
}
}
@@ -161,6 +165,9 @@ annotate_signal_string_end ()
void
annotate_signal ()
{
if (annotate_signal_hook)
annotate_signal_hook ();
if (annotation_level > 1)
printf_filtered ("\n\032\032signal\n");
}

View File

@@ -1,21 +1,22 @@
/* Annotation routines for GDB.
Copyright 1986, 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
Copyright 1986, 1989, 1990, 1991, 1992, 1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "symtab.h"
#include "gdbtypes.h"
@@ -43,9 +44,7 @@ extern void annotate_breakpoints_table_end PARAMS ((void));
extern void annotate_frames_invalid PARAMS ((void));
#ifdef __STDC__
struct type;
#endif
extern void annotate_field_begin PARAMS ((struct type *));
extern void annotate_field_name_end PARAMS ((void));
@@ -101,4 +100,5 @@ extern void annotate_array_section_end PARAMS ((void));
extern void (*annotate_starting_hook) PARAMS ((void));
extern void (*annotate_stopped_hook) PARAMS ((void));
extern void (*annotate_signalled_hook) PARAMS ((void));
extern void (*annotate_signal_hook) PARAMS ((void));
extern void (*annotate_exited_hook) PARAMS ((void));

View File

@@ -1,21 +1,22 @@
/* ARC target-dependent stuff.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "frame.h"
@@ -26,18 +27,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "symtab.h"
#include "gdbcmd.h"
/* Local functions */
static int arc_set_cpu_type (char *str);
/* Current CPU, set with the "set cpu" command. */
static int arc_bfd_mach_type;
char *arc_cpu_type;
char *tmp_arc_cpu_type;
/* Table of cpu names. */
struct {
char *name;
int value;
} arc_cpu_type_table[] = {
{ "base", bfd_mach_arc_base },
{ NULL, 0 }
struct
{
char *name;
int value;
}
arc_cpu_type_table[] =
{
{
"base", bfd_mach_arc_base
}
,
{
NULL, 0
}
};
/* Used by simulator. */
@@ -81,7 +94,7 @@ static void codestream_read PARAMS ((unsigned int *, int));
static void codestream_seek PARAMS ((CORE_ADDR));
static unsigned int codestream_fill PARAMS ((int));
#define CODESTREAM_BUFSIZ 16
#define CODESTREAM_BUFSIZ 16
static CORE_ADDR codestream_next_addr;
static CORE_ADDR codestream_addr;
static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
@@ -99,9 +112,9 @@ static int codestream_cnt;
? codestream_fill (0) \
: codestream_buf[codestream_off++])
static unsigned int
static unsigned int
codestream_fill (peek_flag)
int peek_flag;
int peek_flag;
{
codestream_addr = codestream_next_addr;
codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
@@ -121,7 +134,7 @@ codestream_fill (peek_flag)
for (j = 0; j < n / 2; ++j)
tmp = p[j], p[j] = p[n - 1 - j], p[n - 1 - j] = tmp;
}
if (peek_flag)
return codestream_peek ();
else
@@ -130,7 +143,7 @@ codestream_fill (peek_flag)
static void
codestream_seek (place)
CORE_ADDR place;
CORE_ADDR place;
{
codestream_next_addr = place / CODESTREAM_BUFSIZ;
codestream_next_addr *= CODESTREAM_BUFSIZ;
@@ -203,16 +216,16 @@ arc_get_frame_setup (pc)
{
insn = codestream_get ();
/* Frame may not be necessary, even though blink is saved.
At least this is something we recognize. */
At least this is something we recognize. */
frame_size = 0;
}
if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st fp,[sp] */
if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st fp,[sp] */
== BUILD_INSN (2, 0, SP_REGNUM, FP_REGNUM, 0))
{
{
insn = codestream_get ();
if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
!= BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
!= BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
return -1;
/* Check for stack adjustment sub sp,sp,N. */
@@ -229,12 +242,12 @@ arc_get_frame_setup (pc)
if (frame_size < 0)
return -1;
codestream_get ();
codestream_get ();
/* This sequence is used to get the address of the return
buffer for a function that returns a structure. */
insn = codestream_peek ();
if (insn & OPMASK == 0x60000000)
if ((insn & OPMASK) == 0x60000000)
codestream_get ();
}
/* Frameless fn. */
@@ -264,7 +277,7 @@ arc_get_frame_setup (pc)
This allows a quicker answer. */
CORE_ADDR
skip_prologue (pc, frameless_p)
arc_skip_prologue (pc, frameless_p)
CORE_ADDR pc;
int frameless_p;
{
@@ -283,8 +296,8 @@ skip_prologue (pc, frameless_p)
insn = codestream_peek ();
if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
!= BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
break; /* not st insn */
if (! ARC_CALL_SAVED_REG (X_C (insn)))
break; /* not st insn */
if (!ARC_CALL_SAVED_REG (X_C (insn)))
break;
codestream_get ();
}
@@ -360,11 +373,11 @@ frame_find_saved_regs (fip, fsrp)
dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
/* Check if the PC is in the stack, in a dummy frame. */
if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
{
/* all regs were saved by push_call_dummy () */
adr = fip->frame;
for (i = 0; i < NUM_REGS; i++)
for (i = 0; i < NUM_REGS; i++)
{
adr -= REGISTER_RAW_SIZE (i);
fsrp->regs[i] = adr;
@@ -374,7 +387,7 @@ frame_find_saved_regs (fip, fsrp)
locals = arc_get_frame_setup (get_pc_function_start (fip->pc));
if (locals >= 0)
if (locals >= 0)
{
/* Set `adr' to the value of `sp'. */
adr = fip->frame - locals;
@@ -382,9 +395,9 @@ frame_find_saved_regs (fip, fsrp)
{
insn = codestream_get ();
if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
!= BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
!= BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
break;
regnum = X_C (insn);
regnum = X_C (insn);
offset = X_D (insn);
fsrp->regs[regnum] = adr + offset;
}
@@ -395,14 +408,14 @@ frame_find_saved_regs (fip, fsrp)
}
void
push_dummy_frame ()
arc_push_dummy_frame (void)
{
CORE_ADDR sp = read_register (SP_REGNUM);
int regnum;
char regbuf[MAX_REGISTER_RAW_SIZE];
read_register_gen (PC_REGNUM, regbuf);
write_memory (sp+4, regbuf, REGISTER_SIZE);
write_memory (sp + 4, regbuf, REGISTER_SIZE);
read_register_gen (FP_REGNUM, regbuf);
write_memory (sp, regbuf, REGISTER_SIZE);
write_register (FP_REGNUM, sp);
@@ -411,22 +424,22 @@ push_dummy_frame ()
read_register_gen (regnum, regbuf);
sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
}
sp += (2*REGISTER_SIZE);
sp += (2 * REGISTER_SIZE);
write_register (SP_REGNUM, sp);
}
void
pop_frame ()
arc_pop_frame (void)
{
struct frame_info *frame = get_current_frame ();
CORE_ADDR fp;
int regnum;
struct frame_saved_regs fsr;
char regbuf[MAX_REGISTER_RAW_SIZE];
fp = FRAME_FP (frame);
get_frame_saved_regs (frame, &fsr);
for (regnum = 0; regnum < NUM_REGS; regnum++)
for (regnum = 0; regnum < NUM_REGS; regnum++)
{
CORE_ADDR adr;
adr = fsr.regs[regnum];
@@ -447,11 +460,12 @@ pop_frame ()
typedef enum
{
NORMAL4, /* a normal 4 byte insn */
NORMAL8, /* a normal 8 byte insn */
BRANCH4, /* a 4 byte branch insn, including ones without delay slots */
BRANCH8, /* an 8 byte branch insn, including ones with delay slots */
} insn_type;
NORMAL4, /* a normal 4 byte insn */
NORMAL8, /* a normal 8 byte insn */
BRANCH4, /* a 4 byte branch insn, including ones without delay slots */
BRANCH8, /* an 8 byte branch insn, including ones with delay slots */
}
insn_type;
/* Return the type of INSN and store in TARGET the destination address of a
branch if this is one. */
@@ -466,26 +480,30 @@ get_insn_type (insn, pc, target)
switch (insn >> 27)
{
case 0 : case 1 : case 2 : /* load/store insns */
case 0:
case 1:
case 2: /* load/store insns */
if (LIMM_P (X_A (insn))
|| LIMM_P (X_B (insn))
|| LIMM_P (X_C (insn)))
return NORMAL8;
return NORMAL4;
case 4 : case 5 : case 6 : /* branch insns */
case 4:
case 5:
case 6: /* branch insns */
*target = pc + 4 + X_L (insn);
/* ??? It isn't clear that this is always the right answer.
The problem occurs when the next insn is an 8 byte insn. If the
branch is conditional there's no worry as there shouldn't be an 8
byte insn following. The programmer may be cheating if s/he knows
the branch will never be taken, but we don't deal with that.
Note that the programmer is also allowed to play games by putting
an insn with long immediate data in the delay slot and then duplicate
the long immediate data at the branch target. Ugh! */
The problem occurs when the next insn is an 8 byte insn. If the
branch is conditional there's no worry as there shouldn't be an 8
byte insn following. The programmer may be cheating if s/he knows
the branch will never be taken, but we don't deal with that.
Note that the programmer is also allowed to play games by putting
an insn with long immediate data in the delay slot and then duplicate
the long immediate data at the branch target. Ugh! */
if (X_N (insn) == 0)
return BRANCH4;
return BRANCH8;
case 7 : /* jump insns */
case 7: /* jump insns */
if (LIMM_P (X_B (insn)))
{
limm = read_memory_integer (pc + 4, 4);
@@ -499,7 +517,7 @@ get_insn_type (insn, pc, target)
if (X_Q (insn) == 0 && X_N (insn) == 0)
return BRANCH4;
return BRANCH8;
default : /* arithmetic insns, etc. */
default: /* arithmetic insns, etc. */
if (LIMM_P (X_A (insn))
|| LIMM_P (X_B (insn))
|| LIMM_P (X_C (insn)))
@@ -518,7 +536,7 @@ get_insn_type (insn, pc, target)
void
arc_software_single_step (ignore, insert_breakpoints_p)
enum target_signal ignore; /* sig but we don't need it */
enum target_signal ignore; /* sig but we don't need it */
int insert_breakpoints_p;
{
static CORE_ADDR next_pc, target;
@@ -543,10 +561,10 @@ arc_software_single_step (ignore, insert_breakpoints_p)
brktrg_p = 0;
if ((type == BRANCH4 || type == BRANCH8)
/* Watch out for branches to the following location.
We just stored a breakpoint there and another call to
target_insert_breakpoint will think the real insn is the
breakpoint we just stored there. */
/* Watch out for branches to the following location.
We just stored a breakpoint there and another call to
target_insert_breakpoint will think the real insn is the
breakpoint we just stored there. */
&& target != next_pc)
{
brktrg_p = 1;
@@ -575,7 +593,7 @@ arc_software_single_step (ignore, insert_breakpoints_p)
This routine returns true on success. */
int
get_longjmp_target(pc)
get_longjmp_target (pc)
CORE_ADDR *pc;
{
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
@@ -583,7 +601,7 @@ get_longjmp_target(pc)
sp = read_register (SP_REGNUM);
if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
buf,
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
@@ -627,9 +645,7 @@ arc_print_insn (vma, info)
/* Command to set cpu type. */
void
arc_set_cpu_type_command (args, from_tty)
char *args;
int from_tty;
arc_set_cpu_type_command (char *args, int from_tty)
{
int i;
@@ -644,7 +660,7 @@ arc_set_cpu_type_command (args, from_tty)
return;
}
if (!arc_set_cpu_type (tmp_arc_cpu_type))
{
error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
@@ -663,7 +679,7 @@ arc_show_cpu_type_command (args, from_tty)
/* Modify the actual cpu type.
Result is a boolean indicating success. */
int
static int
arc_set_cpu_type (str)
char *str;
{

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,22 @@
/* Acorn Risc Machine host machine support.
Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "frame.h"
@@ -42,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
void
fetch_inferior_registers (regno)
int regno; /* Original value discarded */
int regno; /* Original value discarded */
{
register unsigned int regaddr;
char buf[MAX_REGISTER_RAW_SIZE];
@@ -51,34 +52,35 @@ fetch_inferior_registers (regno)
struct user u;
unsigned int offset = (char *) &u.u_ar0 - (char *) &u;
offset = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0)
- KERNEL_U_ADDR;
- KERNEL_U_ADDR;
registers_fetched ();
for (regno = 0; regno < 16; regno++)
{
regaddr = offset + regno * 4;
*(int *)&buf[0] = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) regaddr, 0);
*(int *) &buf[0] = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) regaddr, 0);
if (regno == PC_REGNUM)
*(int *)&buf[0] = GET_PC_PART(*(int *)&buf[0]);
*(int *) &buf[0] = GET_PC_PART (*(int *) &buf[0]);
supply_register (regno, buf);
}
*(int *)&buf[0] = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) (offset + PC*4), 0);
supply_register (PS_REGNUM, buf); /* set virtual register ps same as pc */
*(int *) &buf[0] = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) (offset + PC * 4), 0);
supply_register (PS_REGNUM, buf); /* set virtual register ps same as pc */
/* read the floating point registers */
offset = (char *) &u.u_fp_regs - (char *)&u;
*(int *)buf = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0);
offset = (char *) &u.u_fp_regs - (char *) &u;
*(int *) buf = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0);
supply_register (FPS_REGNUM, buf);
for (regno = 16; regno < 24; regno++) {
for (regno = 16; regno < 24; regno++)
{
regaddr = offset + 4 + 12 * (regno - 16);
for (i = 0; i < 12; i += sizeof(int))
*(int *) &buf[i] = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) (regaddr + i), 0);
for (i = 0; i < 12; i += sizeof (int))
*(int *) &buf[i] = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) (regaddr + i), 0);
supply_register (regno, buf);
}
}
}
/* Store our register values back into the inferior.
@@ -96,15 +98,17 @@ store_inferior_registers (regno)
unsigned long value;
unsigned int offset = (char *) &u.u_ar0 - (char *) &u;
offset = ptrace (PT_READ_U, inferior_pid, (PTRACE_ARG3_TYPE) offset, 0)
- KERNEL_U_ADDR;
- KERNEL_U_ADDR;
if (regno >= 0) {
if (regno >= 16) return;
if (regno >= 0)
{
if (regno >= 16)
return;
regaddr = offset + 4 * regno;
errno = 0;
value = read_register(regno);
value = read_register (regno);
if (regno == PC_REGNUM)
value = SET_PC_PART(read_register (PS_REGNUM), value);
value = SET_PC_PART (read_register (PS_REGNUM), value);
ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value);
if (errno != 0)
{
@@ -112,20 +116,21 @@ store_inferior_registers (regno)
perror_with_name (buf);
}
}
else for (regno = 0; regno < 15; regno++)
{
regaddr = offset + regno * 4;
errno = 0;
value = read_register(regno);
if (regno == PC_REGNUM)
value = SET_PC_PART(read_register (PS_REGNUM), value);
ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value);
if (errno != 0)
{
sprintf (buf, "writing all regs, number %d", regno);
perror_with_name (buf);
}
}
else
for (regno = 0; regno < 15; regno++)
{
regaddr = offset + regno * 4;
errno = 0;
value = read_register (regno);
if (regno == PC_REGNUM)
value = SET_PC_PART (read_register (PS_REGNUM), value);
ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, value);
if (errno != 0)
{
sprintf (buf, "writing all regs, number %d", regno);
perror_with_name (buf);
}
}
}
/* Work with core dump and executable files, for GDB.
@@ -135,20 +140,21 @@ store_inferior_registers (regno)
by the execfile.
e.g. prog shares Xt which shares X11 which shares c. */
struct shared_library {
struct exec_header header;
char name[SHLIBLEN];
CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file */
long data_offset; /* offset of data section in file */
int chan; /* file descriptor for the file */
struct shared_library *shares; /* library this one shares */
struct shared_library
{
struct exec_header header;
char name[SHLIBLEN];
CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file */
long data_offset; /* offset of data section in file */
int chan; /* file descriptor for the file */
struct shared_library *shares; /* library this one shares */
};
static struct shared_library *shlib = 0;
/* Hook for `exec_file_command' command to call. */
extern void (*exec_file_display_hook) ();
static CORE_ADDR unshared_text_start;
/* extended header from exec file (for shared library info) */
@@ -161,7 +167,6 @@ core_file_command (filename, from_tty)
int from_tty;
{
int val;
extern char registers[];
/* Discard all vestiges of any previous core file
and mark data and stack spaces as empty. */
@@ -185,7 +190,7 @@ core_file_command (filename, from_tty)
{
filename = tilde_expand (filename);
make_cleanup (free, filename);
if (have_inferior_p ())
error ("To look at a core file, you must kill the program with \"kill\".");
corechan = open (filename, O_RDONLY, 0);
@@ -219,7 +224,7 @@ core_file_command (filename, from_tty)
reg_offset = (int) u.u_ar0;
if (reg_offset > NBPG * UPAGES)
reg_offset -= KERNEL_U_ADDR;
fp_reg_offset = (char *) &u.u_fp_regs - (char *)&u;
fp_reg_offset = (char *) &u.u_fp_regs - (char *) &u;
/* I don't know where to find this info.
So, for now, mark it as not available. */
@@ -236,26 +241,26 @@ core_file_command (filename, from_tty)
char buf[MAX_REGISTER_RAW_SIZE];
if (regno < 16)
val = lseek (corechan, reg_offset + 4 * regno, 0);
val = lseek (corechan, reg_offset + 4 * regno, 0);
else if (regno < 24)
val = lseek (corechan, fp_reg_offset + 4 + 12*(regno - 24), 0);
val = lseek (corechan, fp_reg_offset + 4 + 12 * (regno - 24), 0);
else if (regno == 24)
val = lseek (corechan, fp_reg_offset, 0);
val = lseek (corechan, fp_reg_offset, 0);
else if (regno == 25)
val = lseek (corechan, reg_offset + 4 * PC, 0);
val = lseek (corechan, reg_offset + 4 * PC, 0);
if (val < 0
|| (val = myread (corechan, buf, sizeof buf)) < 0)
{
char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
+ 30);
char *buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
+ 30);
strcpy (buffer, "Reading register ");
strcat (buffer, REGISTER_NAME (regno));
perror_with_name (buffer);
}
if (regno == PC_REGNUM)
*(int *)buf = GET_PC_PART(*(int *)buf);
*(int *) buf = GET_PC_PART (*(int *) buf);
supply_register (regno, buf);
}
}
@@ -283,20 +288,21 @@ core_file_command (filename, from_tty)
by the execfile.
e.g. prog shares Xt which shares X11 which shares c. */
struct shared_library {
struct exec_header header;
char name[SHLIBLEN];
CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file */
long data_offset; /* offset of data section in file */
int chan; /* file descriptor for the file */
struct shared_library *shares; /* library this one shares */
struct shared_library
{
struct exec_header header;
char name[SHLIBLEN];
CORE_ADDR text_start; /* CORE_ADDR of 1st byte of text, this file */
long data_offset; /* offset of data section in file */
int chan; /* file descriptor for the file */
struct shared_library *shares; /* library this one shares */
};
static struct shared_library *shlib = 0;
/* Hook for `exec_file_command' command to call. */
extern void (*exec_file_display_hook) ();
static CORE_ADDR unshared_text_start;
/* extended header from exec file (for shared library info) */
@@ -326,10 +332,11 @@ exec_file_command (filename, from_tty)
if (execchan >= 0)
close (execchan);
execchan = -1;
if (shlib) {
close_shared_library(shlib);
if (shlib)
{
close_shared_library (shlib);
shlib = 0;
}
}
/* Now open and digest the file the user requested, if any. */
@@ -349,7 +356,7 @@ exec_file_command (filename, from_tty)
#ifdef HEADER_SEEK_FD
HEADER_SEEK_FD (execchan);
#endif
val = myread (execchan, &exec_header, sizeof exec_header);
exec_aouthdr = exec_header.a_exec;
@@ -360,21 +367,23 @@ exec_file_command (filename, from_tty)
/* Look for shared library if needed */
if (exec_header.a_exec.a_magic & MF_USES_SL)
shlib = open_shared_library(exec_header.a_shlibname, text_start);
shlib = open_shared_library (exec_header.a_shlibname, text_start);
text_offset = N_TXTOFF (exec_aouthdr);
exec_data_offset = N_TXTOFF (exec_aouthdr) + exec_aouthdr.a_text;
if (shlib) {
unshared_text_start = shared_text_end(shlib) & ~0x7fff;
if (shlib)
{
unshared_text_start = shared_text_end (shlib) & ~0x7fff;
stack_start = shlib->header.a_exec.a_sldatabase;
stack_end = STACK_END_ADDR;
} else
unshared_text_start = 0x8000;
}
else
unshared_text_start = 0x8000;
text_end = unshared_text_start + exec_aouthdr.a_text;
exec_data_start = unshared_text_start + exec_aouthdr.a_text;
exec_data_end = exec_data_start + exec_aouthdr.a_data;
exec_data_end = exec_data_start + exec_aouthdr.a_data;
data_start = exec_data_start;
data_end += exec_data_start;
@@ -422,19 +431,19 @@ xfer_core_file (memaddr, myaddr, len)
xferchan = 0;
/* Determine which file the next bunch of addresses reside in,
and where in the file. Set the file's read/write pointer
to point at the proper place for the desired address
and set xferfile and xferchan for the correct file.
and where in the file. Set the file's read/write pointer
to point at the proper place for the desired address
and set xferfile and xferchan for the correct file.
If desired address is nonexistent, leave them zero.
If desired address is nonexistent, leave them zero.
i is set to the number of bytes that can be handled
along with the next address.
i is set to the number of bytes that can be handled
along with the next address.
We put the most likely tests first for efficiency. */
We put the most likely tests first for efficiency. */
/* Note that if there is no core file
data_start and data_end are equal. */
data_start and data_end are equal. */
if (memaddr >= data_start && memaddr < data_end)
{
i = min (len, data_end - memaddr);
@@ -443,29 +452,33 @@ xfer_core_file (memaddr, myaddr, len)
xferchan = corechan;
}
/* Note that if there is no core file
stack_start and stack_end define the shared library data. */
stack_start and stack_end define the shared library data. */
else if (memaddr >= stack_start && memaddr < stack_end)
{
if (corechan < 0) {
struct shared_library *lib;
for (lib = shlib; lib; lib = lib->shares)
if (memaddr >= lib->header.a_exec.a_sldatabase &&
memaddr < lib->header.a_exec.a_sldatabase +
lib->header.a_exec.a_data)
break;
if (lib) {
i = min (len, lib->header.a_exec.a_sldatabase +
lib->header.a_exec.a_data - memaddr);
fileptr = lib->data_offset + memaddr -
lib->header.a_exec.a_sldatabase;
xferfile = execfile;
xferchan = lib->chan;
if (corechan < 0)
{
struct shared_library *lib;
for (lib = shlib; lib; lib = lib->shares)
if (memaddr >= lib->header.a_exec.a_sldatabase &&
memaddr < lib->header.a_exec.a_sldatabase +
lib->header.a_exec.a_data)
break;
if (lib)
{
i = min (len, lib->header.a_exec.a_sldatabase +
lib->header.a_exec.a_data - memaddr);
fileptr = lib->data_offset + memaddr -
lib->header.a_exec.a_sldatabase;
xferfile = execfile;
xferchan = lib->chan;
}
} else {
i = min (len, stack_end - memaddr);
fileptr = memaddr - stack_start + stack_offset;
xferfile = &corefile;
xferchan = corechan;
}
else
{
i = min (len, stack_end - memaddr);
fileptr = memaddr - stack_start + stack_offset;
xferfile = &corefile;
xferchan = corechan;
}
}
else if (corechan < 0
@@ -478,22 +491,25 @@ xfer_core_file (memaddr, myaddr, len)
}
else if (memaddr >= text_start && memaddr < text_end)
{
struct shared_library *lib;
for (lib = shlib; lib; lib = lib->shares)
if (memaddr >= lib->text_start &&
memaddr < lib->text_start + lib->header.a_exec.a_text)
break;
if (lib) {
i = min (len, lib->header.a_exec.a_text +
lib->text_start - memaddr);
fileptr = memaddr - lib->text_start + text_offset;
xferfile = &execfile;
xferchan = lib->chan;
} else {
i = min (len, text_end - memaddr);
fileptr = memaddr - unshared_text_start + text_offset;
xferfile = &execfile;
xferchan = execchan;
struct shared_library *lib;
for (lib = shlib; lib; lib = lib->shares)
if (memaddr >= lib->text_start &&
memaddr < lib->text_start + lib->header.a_exec.a_text)
break;
if (lib)
{
i = min (len, lib->header.a_exec.a_text +
lib->text_start - memaddr);
fileptr = memaddr - lib->text_start + text_offset;
xferfile = &execfile;
xferchan = lib->chan;
}
else
{
i = min (len, text_end - memaddr);
fileptr = memaddr - unshared_text_start + text_offset;
xferfile = &execfile;
xferchan = execchan;
}
}
else if (memaddr < text_start)
@@ -501,7 +517,7 @@ xfer_core_file (memaddr, myaddr, len)
i = min (len, text_start - memaddr);
}
else if (memaddr >= text_end
&& memaddr < (corechan >= 0? data_start : exec_data_start))
&& memaddr < (corechan >= 0 ? data_start : exec_data_start))
{
i = min (len, data_start - memaddr);
}
@@ -512,21 +528,21 @@ xfer_core_file (memaddr, myaddr, len)
}
else if (corechan < 0 && memaddr >= exec_data_end)
{
i = min (len, - memaddr);
i = min (len, -memaddr);
}
else if (memaddr >= stack_end && stack_end != 0)
{
i = min (len, - memaddr);
i = min (len, -memaddr);
}
else
{
/* Address did not classify into one of the known ranges.
This shouldn't happen; we catch the endpoints. */
fatal ("Internal: Bad case logic in xfer_core_file.");
internal_error ("Bad case logic in xfer_core_file.");
}
/* Now we know which file to use.
Set up its pointer and transfer the data. */
Set up its pointer and transfer the data. */
if (xferfile)
{
if (*xferfile == 0)
@@ -542,8 +558,8 @@ xfer_core_file (memaddr, myaddr, len)
perror_with_name (*xferfile);
}
/* If this address is for nonexistent memory,
read zeros if reading, or do nothing if writing.
Actually, we never right. */
read zeros if reading, or do nothing if writing.
Actually, we never right. */
else
{
memset (myaddr, '\0', i);

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +1,27 @@
/* GDB-specific functions for operating on agent expressions
Copyright 1998 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
/* $Id$ */
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. */
#ifndef AX_GDB_H
#define AX_GDB_H
/* Types and enums */
/* GDB stores expressions in the form of a flattened tree (struct
@@ -50,62 +49,66 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Different kinds of agent expression static values. */
enum axs_lvalue_kind {
/* We generated code to compute the subexpression's value.
Constants and arithmetic operators yield this. */
axs_rvalue,
enum axs_lvalue_kind
{
/* We generated code to compute the subexpression's value.
Constants and arithmetic operators yield this. */
axs_rvalue,
/* We generated code to yield the subexpression's value's address on
the top of the stack. If the caller needs an rvalue, it should
call require_rvalue to produce the rvalue from this address. */
axs_lvalue_memory,
/* We generated code to yield the subexpression's value's address on
the top of the stack. If the caller needs an rvalue, it should
call require_rvalue to produce the rvalue from this address. */
axs_lvalue_memory,
/* We didn't generate any code, and the stack is undisturbed,
because the subexpression's value lives in a register; u.reg is
the register number. If the caller needs an rvalue, it should
call require_rvalue to produce the rvalue from this register
number. */
axs_lvalue_register
};
/* We didn't generate any code, and the stack is undisturbed,
because the subexpression's value lives in a register; u.reg is
the register number. If the caller needs an rvalue, it should
call require_rvalue to produce the rvalue from this register
number. */
axs_lvalue_register
};
/* Structure describing what we got from a subexpression. Think of
this as parallel to value.h's enum lval_type, except that we're
describing a value which will exist when the expression is
evaluated in the future, not a value we have in our hand. */
struct axs_value {
enum axs_lvalue_kind kind; /* see above */
struct axs_value
{
enum axs_lvalue_kind kind; /* see above */
/* The type of the subexpression. Even if lvalue == axs_lvalue_memory,
this is the type of the value itself; the value on the stack is a
"pointer to" an object of this type. */
struct type *type;
union {
/* if kind == axs_lvalue_register, this is the register number */
int reg;
} u;
};
/* The type of the subexpression. Even if lvalue == axs_lvalue_memory,
this is the type of the value itself; the value on the stack is a
"pointer to" an object of this type. */
struct type *type;
union
{
/* if kind == axs_lvalue_register, this is the register number */
int reg;
}
u;
};
/* Translating GDB expressions into agent expressions. */
/* Given a GDB expression EXPR, translate it into the agent bytecode,
and return it. FLAGS are from enum expr_to_agent_flags. */
extern struct agent_expr *expr_to_agent PARAMS ((struct expression *EXPR,
struct axs_value *VALUE));
extern struct agent_expr *expr_to_agent PARAMS ((struct expression * EXPR,
struct axs_value * VALUE));
/* Given a GDB expression EXPR denoting an lvalue in memory, produce a
string of agent bytecode which will leave its address and size on
the top of stack. Return the agent expression. */
extern struct agent_expr *expr_to_address_and_size
PARAMS ((struct expression *EXPR));
PARAMS ((struct expression * EXPR));
/* Given a GDB expression EXPR, return bytecode to trace its value.
The result will use the `trace' and `trace_quick' bytecodes to
record the value of all memory touched by the expression, and leave
no values on the stack. The caller can then use the ax_reqs
function to discover which registers the expression uses. */
extern struct agent_expr *gen_trace_for_expr PARAMS ((CORE_ADDR,
extern struct agent_expr *gen_trace_for_expr PARAMS ((CORE_ADDR,
struct expression *));
#endif /* AX_GDB_H */

View File

@@ -1,23 +1,22 @@
/* Functions for manipulating expressions designed to be executed on the agent
Copyright 1998 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
/* $Id$ */
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. */
/* Despite what the above comment says about this file being part of
GDB, we would like to keep these functions free of GDB
@@ -27,6 +26,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "ax.h"
#include "value.h"
static void grow_expr PARAMS ((struct agent_expr * x, int n));
static void append_const PARAMS ((struct agent_expr * x, LONGEST val, int n));
static LONGEST read_const PARAMS ((struct agent_expr * x, int o, int n));
static void generic_ext PARAMS ((struct agent_expr * x, enum agent_op op, int n));
/* Functions for building expressions. */
@@ -36,10 +44,10 @@ new_agent_expr (scope)
CORE_ADDR scope;
{
struct agent_expr *x = xmalloc (sizeof (*x));
x->len = 0;
x->len = 0;
x->size = 1; /* Change this to a larger value once
reallocation code is tested. */
x->buf = xmalloc (x->size);
x->buf = xmalloc (x->size);
x->scope = scope;
return x;
@@ -108,7 +116,7 @@ read_const (x, o, n)
for (i = 0; i < n; i++)
accum = (accum << 8) | x->buf[o + i];
return accum;
}
@@ -187,7 +195,8 @@ ax_trace_quick (x, n)
for the target, and return the offset in EXPR of that space, so we
can backpatch it once we do know the target offset. Use ax_label
to do the backpatching. */
int ax_goto (x, op)
int
ax_goto (x, op)
struct agent_expr *x;
enum agent_op op;
{
@@ -201,7 +210,7 @@ int ax_goto (x, op)
/* Suppose a given call to ax_goto returns some value PATCH. When you
know the offset TARGET that goto should jump to, call
ax_label (EXPR, PATCH, TARGET)
ax_label (EXPR, PATCH, TARGET)
to patch TARGET into the ax_goto instruction. */
void
ax_label (x, patch, target)
@@ -213,7 +222,7 @@ ax_label (x, patch, target)
offset; that's our magic sentinel value for unpatched branches. */
if (target < 0 || target >= 0xffff)
error ("GDB bug: ax-general.c (ax_label): label target out of range");
x->buf[patch] = (target >> 8) & 0xff;
x->buf[patch + 1] = target & 0xff;
}
@@ -226,7 +235,8 @@ ax_const_l (x, l)
LONGEST l;
{
static enum agent_op ops[]
= { aop_const8, aop_const16, aop_const32, aop_const64 };
=
{aop_const8, aop_const16, aop_const32, aop_const64};
int size;
int op;
@@ -263,7 +273,8 @@ ax_const_d (x, d)
/* Assemble code to push the value of register number REG on the
stack. */
void ax_reg (x, reg)
void
ax_reg (x, reg)
struct agent_expr *x;
int reg;
{
@@ -271,67 +282,68 @@ void ax_reg (x, reg)
if (reg < 0 || reg > 0xffff)
error ("GDB bug: ax-general.c (ax_reg): register number out of range");
grow_expr (x, 3);
x->buf[x->len ] = aop_reg;
x->buf[x->len] = aop_reg;
x->buf[x->len + 1] = (reg >> 8) & 0xff;
x->buf[x->len + 2] = (reg ) & 0xff;
x->buf[x->len + 2] = (reg) & 0xff;
x->len += 3;
}
/* Functions for disassembling agent expressions, and otherwise
debugging the expression compiler. */
struct aop_map aop_map[] = {
{ 0, 0, 0, 0, 0 },
{ "float", 0, 0, 0, 0 }, /* 0x01 */
{ "add", 0, 0, 2, 1 }, /* 0x02 */
{ "sub", 0, 0, 2, 1 }, /* 0x03 */
{ "mul", 0, 0, 2, 1 }, /* 0x04 */
{ "div_signed", 0, 0, 2, 1 }, /* 0x05 */
{ "div_unsigned", 0, 0, 2, 1 }, /* 0x06 */
{ "rem_signed", 0, 0, 2, 1 }, /* 0x07 */
{ "rem_unsigned", 0, 0, 2, 1 }, /* 0x08 */
{ "lsh", 0, 0, 2, 1 }, /* 0x09 */
{ "rsh_signed", 0, 0, 2, 1 }, /* 0x0a */
{ "rsh_unsigned", 0, 0, 2, 1 }, /* 0x0b */
{ "trace", 0, 0, 2, 0 }, /* 0x0c */
{ "trace_quick", 1, 0, 1, 1 }, /* 0x0d */
{ "log_not", 0, 0, 1, 1 }, /* 0x0e */
{ "bit_and", 0, 0, 2, 1 }, /* 0x0f */
{ "bit_or", 0, 0, 2, 1 }, /* 0x10 */
{ "bit_xor", 0, 0, 2, 1 }, /* 0x11 */
{ "bit_not", 0, 0, 1, 1 }, /* 0x12 */
{ "equal", 0, 0, 2, 1 }, /* 0x13 */
{ "less_signed", 0, 0, 2, 1 }, /* 0x14 */
{ "less_unsigned", 0, 0, 2, 1 }, /* 0x15 */
{ "ext", 1, 0, 1, 1 }, /* 0x16 */
{ "ref8", 0, 8, 1, 1 }, /* 0x17 */
{ "ref16", 0, 16, 1, 1 }, /* 0x18 */
{ "ref32", 0, 32, 1, 1 }, /* 0x19 */
{ "ref64", 0, 64, 1, 1 }, /* 0x1a */
{ "ref_float", 0, 0, 1, 1 }, /* 0x1b */
{ "ref_double", 0, 0, 1, 1 }, /* 0x1c */
{ "ref_long_double", 0, 0, 1, 1 }, /* 0x1d */
{ "l_to_d", 0, 0, 1, 1 }, /* 0x1e */
{ "d_to_l", 0, 0, 1, 1 }, /* 0x1f */
{ "if_goto", 2, 0, 1, 0 }, /* 0x20 */
{ "goto", 2, 0, 0, 0 }, /* 0x21 */
{ "const8", 1, 8, 0, 1 }, /* 0x22 */
{ "const16", 2, 16, 0, 1 }, /* 0x23 */
{ "const32", 4, 32, 0, 1 }, /* 0x24 */
{ "const64", 8, 64, 0, 1 }, /* 0x25 */
{ "reg", 2, 0, 0, 1 }, /* 0x26 */
{ "end", 0, 0, 0, 0 }, /* 0x27 */
{ "dup", 0, 0, 1, 2 }, /* 0x28 */
{ "pop", 0, 0, 1, 0 }, /* 0x29 */
{ "zero_ext", 1, 0, 1, 1 }, /* 0x2a */
{ "swap", 0, 0, 2, 2 }, /* 0x2b */
{ 0, 0, 0, 0, 0 }, /* 0x2c */
{ 0, 0, 0, 0, 0 }, /* 0x2d */
{ 0, 0, 0, 0, 0 }, /* 0x2e */
{ 0, 0, 0, 0, 0 }, /* 0x2f */
{ "trace16", 2, 0, 1, 1 }, /* 0x30 */
struct aop_map aop_map[] =
{
{0, 0, 0, 0, 0},
{"float", 0, 0, 0, 0}, /* 0x01 */
{"add", 0, 0, 2, 1}, /* 0x02 */
{"sub", 0, 0, 2, 1}, /* 0x03 */
{"mul", 0, 0, 2, 1}, /* 0x04 */
{"div_signed", 0, 0, 2, 1}, /* 0x05 */
{"div_unsigned", 0, 0, 2, 1}, /* 0x06 */
{"rem_signed", 0, 0, 2, 1}, /* 0x07 */
{"rem_unsigned", 0, 0, 2, 1}, /* 0x08 */
{"lsh", 0, 0, 2, 1}, /* 0x09 */
{"rsh_signed", 0, 0, 2, 1}, /* 0x0a */
{"rsh_unsigned", 0, 0, 2, 1}, /* 0x0b */
{"trace", 0, 0, 2, 0}, /* 0x0c */
{"trace_quick", 1, 0, 1, 1}, /* 0x0d */
{"log_not", 0, 0, 1, 1}, /* 0x0e */
{"bit_and", 0, 0, 2, 1}, /* 0x0f */
{"bit_or", 0, 0, 2, 1}, /* 0x10 */
{"bit_xor", 0, 0, 2, 1}, /* 0x11 */
{"bit_not", 0, 0, 1, 1}, /* 0x12 */
{"equal", 0, 0, 2, 1}, /* 0x13 */
{"less_signed", 0, 0, 2, 1}, /* 0x14 */
{"less_unsigned", 0, 0, 2, 1}, /* 0x15 */
{"ext", 1, 0, 1, 1}, /* 0x16 */
{"ref8", 0, 8, 1, 1}, /* 0x17 */
{"ref16", 0, 16, 1, 1}, /* 0x18 */
{"ref32", 0, 32, 1, 1}, /* 0x19 */
{"ref64", 0, 64, 1, 1}, /* 0x1a */
{"ref_float", 0, 0, 1, 1}, /* 0x1b */
{"ref_double", 0, 0, 1, 1}, /* 0x1c */
{"ref_long_double", 0, 0, 1, 1}, /* 0x1d */
{"l_to_d", 0, 0, 1, 1}, /* 0x1e */
{"d_to_l", 0, 0, 1, 1}, /* 0x1f */
{"if_goto", 2, 0, 1, 0}, /* 0x20 */
{"goto", 2, 0, 0, 0}, /* 0x21 */
{"const8", 1, 8, 0, 1}, /* 0x22 */
{"const16", 2, 16, 0, 1}, /* 0x23 */
{"const32", 4, 32, 0, 1}, /* 0x24 */
{"const64", 8, 64, 0, 1}, /* 0x25 */
{"reg", 2, 0, 0, 1}, /* 0x26 */
{"end", 0, 0, 0, 0}, /* 0x27 */
{"dup", 0, 0, 1, 2}, /* 0x28 */
{"pop", 0, 0, 1, 0}, /* 0x29 */
{"zero_ext", 1, 0, 1, 1}, /* 0x2a */
{"swap", 0, 0, 2, 2}, /* 0x2b */
{0, 0, 0, 0, 0}, /* 0x2c */
{0, 0, 0, 0, 0}, /* 0x2d */
{0, 0, 0, 0, 0}, /* 0x2e */
{0, 0, 0, 0, 0}, /* 0x2f */
{"trace16", 2, 0, 1, 1}, /* 0x30 */
};
@@ -349,13 +361,13 @@ ax_print (f, x)
if ((sizeof (aop_map) / sizeof (aop_map[0]))
!= aop_last)
error ("GDB bug: ax-general.c (ax_print): opcode map out of sync");
for (i = 0; i < x->len; )
for (i = 0; i < x->len;)
{
enum agent_op op = x->buf[i];
if (op >= (sizeof (aop_map) / sizeof (aop_map[0]))
|| ! aop_map[op].name)
|| !aop_map[op].name)
{
fprintf_filtered (f, "%3d <bad opcode %02x>\n", i, op);
i++;
@@ -372,7 +384,7 @@ ax_print (f, x)
if (aop_map[op].op_size > 0)
{
fputs_filtered (" ", f);
print_longest (f, 'd', 0,
read_const (x, i + 1, aop_map[op].op_size));
}
@@ -433,13 +445,13 @@ ax_reqs (ax, reqs)
op = &aop_map[ax->buf[i]];
if (! op->name)
if (!op->name)
{
reqs->flaw = agent_flaw_bad_instruction;
free (reg_mask);
return;
}
if (i + 1 + op->op_size > ax->len)
{
reqs->flaw = agent_flaw_incomplete_instruction;
@@ -470,8 +482,8 @@ ax_reqs (ax, reqs)
reqs->max_data_size = op->data_size;
/* For jump instructions, check that the target is a valid
offset. If it is, record the fact that that location is a
jump target, and record the height we expect there. */
offset. If it is, record the fact that that location is a
jump target, and record the height we expect there. */
if (aop_goto == op - aop_map
|| aop_if_goto == op - aop_map)
{
@@ -498,13 +510,13 @@ ax_reqs (ax, reqs)
heights[target] = height;
}
}
/* For unconditional jumps with a successor, check that the
successor is a target, and pick up its stack height. */
if (aop_goto == op - aop_map
&& i + 3 < ax->len)
{
if (! targets[i + 3])
if (!targets[i + 3])
{
reqs->flaw = agent_flaw_hole;
free (reg_mask);
@@ -524,9 +536,9 @@ ax_reqs (ax, reqs)
if (byte >= reg_mask_len)
{
/* It's not appropriate to double here. This isn't a
string buffer. */
string buffer. */
int new_len = byte + 1;
reg_mask = xrealloc (reg_mask,
reg_mask = xrealloc (reg_mask,
new_len * sizeof (reg_mask[0]));
memset (reg_mask + reg_mask_len, 0,
(new_len - reg_mask_len) * sizeof (reg_mask[0]));

305
gdb/ax.h
View File

@@ -1,23 +1,22 @@
/* Definitions for expressions designed to be executed on the agent
Copyright 1998 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
/* $Id$ */
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. */
#ifndef AGENTEXPR_H
#define AGENTEXPR_H
@@ -49,8 +48,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
is independent of symbolic information. This means the agent can
evaluate them on the fly without reference to data only available
to the host GDB. */
/* Agent expression data structures. */
/* The type of an element of the agent expression stack.
@@ -58,18 +57,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
the value itself has no typing information. GDB generates all
bytecode streams, so we don't have to worry about type errors. */
union agent_val {
LONGEST l;
DOUBLEST d;
};
union agent_val
{
LONGEST l;
DOUBLEST d;
};
/* A buffer containing a agent expression. */
struct agent_expr {
unsigned char *buf;
int len; /* number of characters used */
int size; /* allocated size */
CORE_ADDR scope;
};
struct agent_expr
{
unsigned char *buf;
int len; /* number of characters used */
int size; /* allocated size */
CORE_ADDR scope;
};
@@ -84,56 +85,57 @@ struct agent_expr {
agentexpr.h behaves like an opcode map. If you want to see them
grouped logically, see doc/agentexpr.texi. */
enum agent_op {
aop_float = 0x01,
aop_add = 0x02,
aop_sub = 0x03,
aop_mul = 0x04,
aop_div_signed = 0x05,
aop_div_unsigned = 0x06,
aop_rem_signed = 0x07,
aop_rem_unsigned = 0x08,
aop_lsh = 0x09,
aop_rsh_signed = 0x0a,
aop_rsh_unsigned = 0x0b,
aop_trace = 0x0c,
aop_trace_quick = 0x0d,
aop_log_not = 0x0e,
aop_bit_and = 0x0f,
aop_bit_or = 0x10,
aop_bit_xor = 0x11,
aop_bit_not = 0x12,
aop_equal = 0x13,
aop_less_signed = 0x14,
aop_less_unsigned = 0x15,
aop_ext = 0x16,
aop_ref8 = 0x17,
aop_ref16 = 0x18,
aop_ref32 = 0x19,
aop_ref64 = 0x1a,
aop_ref_float = 0x1b,
aop_ref_double = 0x1c,
aop_ref_long_double = 0x1d,
aop_l_to_d = 0x1e,
aop_d_to_l = 0x1f,
aop_if_goto = 0x20,
aop_goto = 0x21,
aop_const8 = 0x22,
aop_const16 = 0x23,
aop_const32 = 0x24,
aop_const64 = 0x25,
aop_reg = 0x26,
aop_end = 0x27,
aop_dup = 0x28,
aop_pop = 0x29,
aop_zero_ext = 0x2a,
aop_swap = 0x2b,
aop_trace16 = 0x30,
aop_last
};
enum agent_op
{
aop_float = 0x01,
aop_add = 0x02,
aop_sub = 0x03,
aop_mul = 0x04,
aop_div_signed = 0x05,
aop_div_unsigned = 0x06,
aop_rem_signed = 0x07,
aop_rem_unsigned = 0x08,
aop_lsh = 0x09,
aop_rsh_signed = 0x0a,
aop_rsh_unsigned = 0x0b,
aop_trace = 0x0c,
aop_trace_quick = 0x0d,
aop_log_not = 0x0e,
aop_bit_and = 0x0f,
aop_bit_or = 0x10,
aop_bit_xor = 0x11,
aop_bit_not = 0x12,
aop_equal = 0x13,
aop_less_signed = 0x14,
aop_less_unsigned = 0x15,
aop_ext = 0x16,
aop_ref8 = 0x17,
aop_ref16 = 0x18,
aop_ref32 = 0x19,
aop_ref64 = 0x1a,
aop_ref_float = 0x1b,
aop_ref_double = 0x1c,
aop_ref_long_double = 0x1d,
aop_l_to_d = 0x1e,
aop_d_to_l = 0x1f,
aop_if_goto = 0x20,
aop_goto = 0x21,
aop_const8 = 0x22,
aop_const16 = 0x23,
aop_const32 = 0x24,
aop_const64 = 0x25,
aop_reg = 0x26,
aop_end = 0x27,
aop_dup = 0x28,
aop_pop = 0x29,
aop_zero_ext = 0x2a,
aop_swap = 0x2b,
aop_trace16 = 0x30,
aop_last
};
/* Functions for building expressions. */
/* Allocate a new, empty agent expression. */
@@ -143,19 +145,19 @@ extern struct agent_expr *new_agent_expr PARAMS ((CORE_ADDR));
extern void free_agent_expr PARAMS ((struct agent_expr *));
/* Append a simple operator OP to EXPR. */
extern void ax_simple PARAMS ((struct agent_expr *EXPR, enum agent_op OP));
extern void ax_simple PARAMS ((struct agent_expr * EXPR, enum agent_op OP));
/* Append the floating-point prefix, for the next bytecode. */
#define ax_float(EXPR) (ax_simple ((EXPR), aop_float))
/* Append a sign-extension instruction to EXPR, to extend an N-bit value. */
extern void ax_ext PARAMS ((struct agent_expr *EXPR, int N));
extern void ax_ext PARAMS ((struct agent_expr * EXPR, int N));
/* Append a zero-extension instruction to EXPR, to extend an N-bit value. */
extern void ax_zero_ext PARAMS ((struct agent_expr *EXPR, int N));
extern void ax_zero_ext PARAMS ((struct agent_expr * EXPR, int N));
/* Append a trace_quick instruction to EXPR, to record N bytes. */
extern void ax_trace_quick PARAMS ((struct agent_expr *EXPR, int N));
extern void ax_trace_quick PARAMS ((struct agent_expr * EXPR, int N));
/* Append a goto op to EXPR. OP is the actual op (must be aop_goto or
aop_if_goto). We assume we don't know the target offset yet,
@@ -163,123 +165,126 @@ extern void ax_trace_quick PARAMS ((struct agent_expr *EXPR, int N));
for the target, and return the offset in EXPR of that space, so we
can backpatch it once we do know the target offset. Use ax_label
to do the backpatching. */
extern int ax_goto PARAMS ((struct agent_expr *EXPR, enum agent_op OP));
extern int ax_goto PARAMS ((struct agent_expr * EXPR, enum agent_op OP));
/* Suppose a given call to ax_goto returns some value PATCH. When you
know the offset TARGET that goto should jump to, call
ax_label (EXPR, PATCH, TARGET)
ax_label (EXPR, PATCH, TARGET)
to patch TARGET into the ax_goto instruction. */
extern void ax_label PARAMS ((struct agent_expr *EXPR, int patch, int target));
extern void ax_label PARAMS ((struct agent_expr * EXPR, int patch, int target));
/* Assemble code to push a constant on the stack. */
extern void ax_const_l PARAMS ((struct agent_expr *EXPR, LONGEST l));
extern void ax_const_d PARAMS ((struct agent_expr *EXPR, LONGEST d));
extern void ax_const_l PARAMS ((struct agent_expr * EXPR, LONGEST l));
extern void ax_const_d PARAMS ((struct agent_expr * EXPR, LONGEST d));
/* Assemble code to push the value of register number REG on the
stack. */
extern void ax_reg PARAMS ((struct agent_expr *EXPR, int REG));
extern void ax_reg PARAMS ((struct agent_expr * EXPR, int REG));
/* Functions for printing out expressions, and otherwise debugging
things. */
/* Disassemble the expression EXPR, writing to F. */
extern void ax_print PARAMS ((GDB_FILE *f, struct agent_expr *EXPR));
extern void ax_print PARAMS ((GDB_FILE * f, struct agent_expr * EXPR));
/* An entry in the opcode map. */
struct aop_map {
struct aop_map
{
/* The name of the opcode. Null means that this entry is not a
valid opcode --- a hole in the opcode space. */
char *name;
/* The name of the opcode. Null means that this entry is not a
valid opcode --- a hole in the opcode space. */
char *name;
/* All opcodes take no operands from the bytecode stream, or take
unsigned integers of various sizes. If this is a positive number
n, then the opcode is followed by an n-byte operand, which should
be printed as an unsigned integer. If this is zero, then the
opcode takes no operands from the bytecode stream.
/* All opcodes take no operands from the bytecode stream, or take
unsigned integers of various sizes. If this is a positive number
n, then the opcode is followed by an n-byte operand, which should
be printed as an unsigned integer. If this is zero, then the
opcode takes no operands from the bytecode stream.
If we get more complicated opcodes in the future, don't add other
magic values of this; that's a crock. Add an `enum encoding'
field to this, or something like that. */
int op_size;
If we get more complicated opcodes in the future, don't add other
magic values of this; that's a crock. Add an `enum encoding'
field to this, or something like that. */
int op_size;
/* The size of the data operated upon, in bits, for bytecodes that
care about that (ref and const). Zero for all others. */
int data_size;
/* The size of the data operated upon, in bits, for bytecodes that
care about that (ref and const). Zero for all others. */
int data_size;
/* Number of stack elements consumed, and number produced. */
int consumed, produced;
};
/* Number of stack elements consumed, and number produced. */
int consumed, produced;
};
/* Map of the bytecodes, indexed by bytecode number. */
extern struct aop_map aop_map[];
/* Different kinds of flaws an agent expression might have, as
detected by agent_reqs. */
enum agent_flaws {
agent_flaw_none = 0, /* code is good */
enum agent_flaws
{
agent_flaw_none = 0, /* code is good */
/* There is an invalid instruction in the stream. */
agent_flaw_bad_instruction,
/* There is an invalid instruction in the stream. */
agent_flaw_bad_instruction,
/* There is an incomplete instruction at the end of the expression. */
agent_flaw_incomplete_instruction,
/* There is an incomplete instruction at the end of the expression. */
agent_flaw_incomplete_instruction,
/* agent_reqs was unable to prove that every jump target is to a
valid offset. Valid offsets are within the bounds of the
expression, and to a valid instruction boundary. */
agent_flaw_bad_jump,
/* agent_reqs was unable to prove that every jump target is to a
valid offset. Valid offsets are within the bounds of the
expression, and to a valid instruction boundary. */
agent_flaw_bad_jump,
/* agent_reqs was unable to prove to its satisfaction that, for each
jump target location, the stack will have the same height whether
that location is reached via a jump or by straight execution. */
agent_flaw_height_mismatch,
/* agent_reqs was unable to prove to its satisfaction that, for each
jump target location, the stack will have the same height whether
that location is reached via a jump or by straight execution. */
agent_flaw_height_mismatch,
/* agent_reqs was unable to prove that every instruction following
an unconditional jump was the target of some other jump. */
agent_flaw_hole
};
/* agent_reqs was unable to prove that every instruction following
an unconditional jump was the target of some other jump. */
agent_flaw_hole
};
/* Structure describing the requirements of a bytecode expression. */
struct agent_reqs {
struct agent_reqs
{
/* If the following is not equal to agent_flaw_none, the rest of the
information in this structure is suspect. */
enum agent_flaws flaw;
/* If the following is not equal to agent_flaw_none, the rest of the
information in this structure is suspect. */
enum agent_flaws flaw;
/* Number of elements left on stack at end; may be negative if expr
only consumes elements. */
int final_height;
/* Number of elements left on stack at end; may be negative if expr
only consumes elements. */
int final_height;
/* Maximum and minimum stack height, relative to initial height. */
int max_height, min_height;
/* Maximum and minimum stack height, relative to initial height. */
int max_height, min_height;
/* Largest `ref' or `const' opcode used, in bits. Zero means the
expression has no such instructions. */
int max_data_size;
/* Largest `ref' or `const' opcode used, in bits. Zero means the
expression has no such instructions. */
int max_data_size;
/* Bit vector of registers used. Register R is used iff
reg_mask[R / 8] & (1 << (R % 8))
/* Bit vector of registers used. Register R is used iff
is non-zero. Note! You may not assume that this bitmask is long
enough to hold bits for all the registers of the machine; the
agent expression code has no idea how many registers the machine
has. However, the bitmask is reg_mask_len bytes long, so the
valid register numbers run from 0 to reg_mask_len * 8 - 1.
reg_mask[R / 8] & (1 << (R % 8))
We're assuming eight-bit bytes. So sue me.
is non-zero. Note! You may not assume that this bitmask is long
enough to hold bits for all the registers of the machine; the
agent expression code has no idea how many registers the machine
has. However, the bitmask is reg_mask_len bytes long, so the
valid register numbers run from 0 to reg_mask_len * 8 - 1.
The caller should free reg_list when done. */
int reg_mask_len;
unsigned char *reg_mask;
};
We're assuming eight-bit bytes. So sue me.
The caller should free reg_list when done. */
int reg_mask_len;
unsigned char *reg_mask;
};
/* Given an agent expression AX, fill in an agent_reqs structure REQS
describing it. */
extern void ax_reqs PARAMS ((struct agent_expr *ax,
struct agent_reqs *reqs));
extern void ax_reqs PARAMS ((struct agent_expr * ax,
struct agent_reqs * reqs));
#endif /* AGENTEXPR_H */

View File

@@ -2,21 +2,22 @@
Written by Fred Fish (fnf@cygnus.com)
Copyright 1995, 1998 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "obstack.h"
@@ -30,8 +31,8 @@ static unsigned int hash PARAMS ((void *, int));
static void *lookup_cache PARAMS ((void *, int, int, struct bcache *));
/* FIXME: Incredibly simplistic hash generator. Probably way too expensive
(consider long strings) and unlikely to have good distribution across hash
values for typical input. */
(consider long strings) and unlikely to have good distribution across hash
values for typical input. */
static unsigned int
hash (bytes, count)
@@ -68,7 +69,7 @@ lookup_cache (bytes, count, hashval, bcachep)
struct hashlink **hashtablep;
struct hashlink *linkp;
hashtablep = bcachep -> indextable[count];
hashtablep = bcachep->indextable[count];
if (hashtablep != NULL)
{
linkp = hashtablep[hashval];
@@ -79,7 +80,7 @@ lookup_cache (bytes, count, hashval, bcachep)
location = BCACHE_DATA (linkp);
break;
}
linkp = linkp -> next;
linkp = linkp->next;
}
}
return (location);
@@ -101,9 +102,9 @@ bcache (bytes, count, bcachep)
{
/* Rare enough to just stash unique copies */
location = (void *) obstack_alloc (&bcachep->cache, count);
bcachep -> cache_bytes += count;
bcachep->cache_bytes += count;
memcpy (location, bytes, count);
bcachep -> bcache_overflows++;
bcachep->bcache_overflows++;
}
else
{
@@ -111,26 +112,26 @@ bcache (bytes, count, bcachep)
location = lookup_cache (bytes, count, hashval, bcachep);
if (location != NULL)
{
bcachep -> cache_savings += count;
bcachep -> cache_hits++;
bcachep->cache_savings += count;
bcachep->cache_hits++;
}
else
{
bcachep -> cache_misses++;
hashtablepp = &bcachep -> indextable[count];
bcachep->cache_misses++;
hashtablepp = &bcachep->indextable[count];
if (*hashtablepp == NULL)
{
*hashtablepp = (struct hashlink **)
obstack_alloc (&bcachep->cache, BCACHE_HASHSIZE * sizeof (struct hashlink *));
bcachep -> cache_bytes += BCACHE_HASHSIZE * sizeof (struct hashlink *);
bcachep->cache_bytes += BCACHE_HASHSIZE * sizeof (struct hashlink *);
memset (*hashtablepp, 0, BCACHE_HASHSIZE * sizeof (struct hashlink *));
}
linkpp = &(*hashtablepp)[hashval];
newlink = (struct hashlink *)
obstack_alloc (&bcachep->cache, BCACHE_DATA_ALIGNMENT + count);
bcachep -> cache_bytes += BCACHE_DATA_ALIGNMENT + count;
bcachep->cache_bytes += BCACHE_DATA_ALIGNMENT + count;
memcpy (BCACHE_DATA (newlink), bytes, count);
newlink -> next = *linkpp;
newlink->next = *linkpp;
*linkpp = newlink;
location = BCACHE_DATA (newlink);
}
@@ -138,8 +139,6 @@ bcache (bytes, count, bcachep)
return (location);
}
#if MAINTENANCE_CMDS
void
print_bcache_statistics (bcachep, id)
struct bcache *bcachep;
@@ -151,7 +150,7 @@ print_bcache_statistics (bcachep, id)
for (lmax = lcount = tcount = hcount = tidx = 0; tidx < BCACHE_MAXLENGTH; tidx++)
{
hashtablep = bcachep -> indextable[tidx];
hashtablep = bcachep->indextable[tidx];
if (hashtablep != NULL)
{
tcount++;
@@ -161,7 +160,7 @@ print_bcache_statistics (bcachep, id)
if (linkp != NULL)
{
hcount++;
for (temp = 0; linkp != NULL; linkp = linkp -> next)
for (temp = 0; linkp != NULL; linkp = linkp->next)
{
lcount++;
temp++;
@@ -177,21 +176,21 @@ print_bcache_statistics (bcachep, id)
}
}
printf_filtered (" Cached '%s' statistics:\n", id);
printf_filtered (" Cache hits: %d\n", bcachep -> cache_hits);
printf_filtered (" Cache misses: %d\n", bcachep -> cache_misses);
printf_filtered (" Cache hits: %d\n", bcachep->cache_hits);
printf_filtered (" Cache misses: %d\n", bcachep->cache_misses);
printf_filtered (" Cache hit ratio: ");
if (bcachep -> cache_hits + bcachep -> cache_misses > 0)
if (bcachep->cache_hits + bcachep->cache_misses > 0)
{
printf_filtered ("%d%%\n", ((bcachep -> cache_hits) * 100) /
(bcachep -> cache_hits + bcachep -> cache_misses));
printf_filtered ("%d%%\n", ((bcachep->cache_hits) * 100) /
(bcachep->cache_hits + bcachep->cache_misses));
}
else
{
printf_filtered ("(not applicable)\n");
}
printf_filtered (" Space used for caching: %d\n", bcachep -> cache_bytes);
printf_filtered (" Space saved by cache hits: %d\n", bcachep -> cache_savings);
printf_filtered (" Number of bcache overflows: %d\n", bcachep -> bcache_overflows);
printf_filtered (" Space used for caching: %d\n", bcachep->cache_bytes);
printf_filtered (" Space saved by cache hits: %d\n", bcachep->cache_savings);
printf_filtered (" Number of bcache overflows: %d\n", bcachep->bcache_overflows);
printf_filtered (" Number of index buckets used: %d\n", tcount);
printf_filtered (" Number of hash table buckets used: %d\n", hcount);
printf_filtered (" Number of chained items: %d\n", lcount);
@@ -215,5 +214,3 @@ print_bcache_statistics (bcachep, id)
}
printf_filtered (" Maximum chain length %d at %d:%d\n", lmax, lmaxt, lmaxh);
}
#endif /* MAINTENANCE_CMDS */

View File

@@ -2,21 +2,22 @@
Written by Fred Fish (fnf@cygnus.com)
Copyright 1995 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef BCACHE_H
#define BCACHE_H 1
@@ -29,13 +30,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
it needs to have the same alignment as the most strict alignment of
any type on the host machine. So do it the same way obstack does. */
struct hashlink {
struct hashlink *next;
union {
char data[1];
double dummy;
} d;
};
struct hashlink
{
struct hashlink *next;
union
{
char data[1];
double dummy;
}
d;
};
/* BCACHE_DATA is used to get the address of the cached data. */
@@ -49,24 +53,21 @@ struct hashlink {
#define BCACHE_DATA_ALIGNMENT \
(((char *) BCACHE_DATA((struct hashlink*) 0) - (char *) 0))
struct bcache {
struct obstack cache;
struct hashlink **indextable[BCACHE_MAXLENGTH];
int cache_hits;
int cache_misses;
int cache_bytes;
int cache_savings;
int bcache_overflows;
};
struct bcache
{
struct obstack cache;
struct hashlink **indextable[BCACHE_MAXLENGTH];
int cache_hits;
int cache_misses;
int cache_bytes;
int cache_savings;
int bcache_overflows;
};
extern void *
bcache PARAMS ((void *bytes, int count, struct bcache *bcachep));
#if MAINTENANCE_CMDS
bcache PARAMS ((void *bytes, int count, struct bcache * bcachep));
extern void
print_bcache_statistics PARAMS ((struct bcache *, char *));
#endif /* MAINTENANCE_CMDS */
#endif /* BCACHE_H */

View File

@@ -1,23 +1,24 @@
/* Get info from stack frames;
convert between frames, blocks, functions and pc values.
Copyright 1986, 87, 88, 89, 91, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "symtab.h"
@@ -33,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Prototypes for exported functions. */
void _initialize_blockframe PARAMS ((void));
void _initialize_blockframe (void);
/* A default FRAME_CHAIN_VALID, in the form that is suitable for most
targets. If FRAME_CHAIN_VALID returns zero it means that the given
@@ -45,14 +46,14 @@ default_frame_chain_valid (chain, thisframe)
struct frame_info *thisframe;
{
return ((chain) != 0
&& !inside_main_func ((thisframe) -> pc)
&& !inside_entry_func ((thisframe) -> pc));
&& !inside_main_func ((thisframe)->pc)
&& !inside_entry_func ((thisframe)->pc));
}
/* Use the alternate method of avoiding running up off the end of the
frame chain or following frames back into the startup code. See
the comments in objfiles.h. */
int
alternate_frame_chain_valid (chain, thisframe)
CORE_ADDR chain;
@@ -63,7 +64,7 @@ alternate_frame_chain_valid (chain, thisframe)
}
/* A very simple method of determining a valid frame */
int
nonnull_frame_chain_valid (chain, thisframe)
CORE_ADDR chain;
@@ -88,15 +89,16 @@ inside_entry_file (addr)
return 1;
if (symfile_objfile == 0)
return 0;
#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (addr, 0, 0))
return 0;
#endif
return (addr >= symfile_objfile -> ei.entry_file_lowpc &&
addr < symfile_objfile -> ei.entry_file_highpc);
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (addr, 0, 0))
return 0;
}
return (addr >= symfile_objfile->ei.entry_file_lowpc &&
addr < symfile_objfile->ei.entry_file_highpc);
}
/* Test a specified PC value to see if it is in the range of addresses
@@ -109,7 +111,7 @@ inside_entry_file (addr)
int
inside_main_func (pc)
CORE_ADDR pc;
CORE_ADDR pc;
{
if (pc == 0)
return 1;
@@ -120,22 +122,22 @@ CORE_ADDR pc;
This is for FRAME_CHAIN_VALID_ALTERNATE. I do this for coff, because
it is unable to set it up and symbol reading time. */
if (symfile_objfile -> ei.main_func_lowpc == INVALID_ENTRY_LOWPC &&
symfile_objfile -> ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
if (symfile_objfile->ei.main_func_lowpc == INVALID_ENTRY_LOWPC &&
symfile_objfile->ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
{
struct symbol *mainsym;
mainsym = lookup_symbol ("main", NULL, VAR_NAMESPACE, NULL, NULL);
if (mainsym && SYMBOL_CLASS(mainsym) == LOC_BLOCK)
{
symfile_objfile->ei.main_func_lowpc =
if (mainsym && SYMBOL_CLASS (mainsym) == LOC_BLOCK)
{
symfile_objfile->ei.main_func_lowpc =
BLOCK_START (SYMBOL_BLOCK_VALUE (mainsym));
symfile_objfile->ei.main_func_highpc =
symfile_objfile->ei.main_func_highpc =
BLOCK_END (SYMBOL_BLOCK_VALUE (mainsym));
}
}
}
return (symfile_objfile -> ei.main_func_lowpc <= pc &&
symfile_objfile -> ei.main_func_highpc > pc);
return (symfile_objfile->ei.main_func_lowpc <= pc &&
symfile_objfile->ei.main_func_highpc > pc);
}
/* Test a specified PC value to see if it is in the range of addresses
@@ -148,21 +150,22 @@ CORE_ADDR pc;
int
inside_entry_func (pc)
CORE_ADDR pc;
CORE_ADDR pc;
{
if (pc == 0)
return 1;
if (symfile_objfile == 0)
return 0;
#if CALL_DUMMY_LOCATION == AT_ENTRY_POINT
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (pc, 0, 0))
return 0;
#endif
return (symfile_objfile -> ei.entry_func_lowpc <= pc &&
symfile_objfile -> ei.entry_func_highpc > pc);
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
/* Do not stop backtracing if the pc is in the call dummy
at the entry point. */
/* FIXME: Won't always work with zeros for the last two arguments */
if (PC_IN_CALL_DUMMY (pc, 0, 0))
return 0;
}
return (symfile_objfile->ei.entry_func_lowpc <= pc &&
symfile_objfile->ei.entry_func_highpc > pc);
}
/* Info about the innermost stack frame (contents of FP register) */
@@ -186,7 +189,7 @@ void
frame_saved_regs_zalloc (fi)
struct frame_info *fi;
{
fi->saved_regs = (CORE_ADDR*)
fi->saved_regs = (CORE_ADDR *)
frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
}
@@ -235,7 +238,7 @@ create_new_frame (addr, pc)
fi->prev = NULL;
fi->frame = addr;
fi->pc = pc;
find_pc_partial_function (pc, &name, (CORE_ADDR *)NULL,(CORE_ADDR *)NULL);
find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
fi->signal_handler_caller = IN_SIGTRAMP (fi->pc, name);
#ifdef INIT_EXTRA_FRAME_INFO
@@ -245,16 +248,6 @@ create_new_frame (addr, pc)
return fi;
}
/* Return the frame that called FI.
If FI is the original frame (it has no caller), return 0. */
struct frame_info *
get_prev_frame (frame)
struct frame_info *frame;
{
return get_prev_frame_info (frame);
}
/* Return the frame that FRAME calls (NULL if FRAME is the innermost
frame). */
@@ -274,7 +267,7 @@ flush_cached_frames ()
obstack_free (&frame_cache_obstack, 0);
obstack_init (&frame_cache_obstack);
current_frame = NULL; /* Invalidate cache */
current_frame = NULL; /* Invalidate cache */
select_frame (NULL, -1);
annotate_frames_invalid ();
}
@@ -293,11 +286,6 @@ reinit_frame_cache ()
}
}
/* If a machine allows frameless functions, it should define a macro
FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) in param.h. FI is the struct
frame_info for the frame, and FRAMELESS should be set to nonzero
if it represents a frameless function invocation. */
/* Return nonzero if the function for this frame lacks a prologue. Many
machines can define FRAMELESS_FUNCTION_INVOCATION to just call this
function. */
@@ -307,25 +295,26 @@ frameless_look_for_prologue (frame)
struct frame_info *frame;
{
CORE_ADDR func_start, after_prologue;
func_start = get_pc_function_start (frame->pc);
if (func_start)
{
func_start += FUNCTION_START_OFFSET;
after_prologue = func_start;
#ifdef SKIP_PROLOGUE_FRAMELESS_P
/* This is faster, since only care whether there *is* a prologue,
not how long it is. */
SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
/* This is faster, since only care whether there *is* a
prologue, not how long it is. */
after_prologue = SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
#else
SKIP_PROLOGUE (after_prologue);
after_prologue = SKIP_PROLOGUE (after_prologue);
#endif
return after_prologue == func_start;
}
else if (frame->pc == 0)
/* A frame with a zero PC is usually created by dereferencing a NULL
function pointer, normally causing an immediate core dump of the
inferior. Mark function as frameless, as the inferior has no chance
of setting up a stack frame. */
/* A frame with a zero PC is usually created by dereferencing a
NULL function pointer, normally causing an immediate core dump
of the inferior. Mark function as frameless, as the inferior
has no chance of setting up a stack frame. */
return 1;
else
/* If we can't find the start of the function, we don't really
@@ -352,7 +341,7 @@ frameless_look_for_prologue (frame)
if there is no such frame. */
struct frame_info *
get_prev_frame_info (next_frame)
get_prev_frame (next_frame)
struct frame_info *next_frame;
{
CORE_ADDR address = 0;
@@ -368,9 +357,9 @@ get_prev_frame_info (next_frame)
{
#if 0
/* This screws value_of_variable, which just wants a nice clean
NULL return from block_innermost_frame if there are no frames.
I don't think I've ever seen this message happen otherwise.
And returning NULL here is a perfectly legitimate thing to do. */
NULL return from block_innermost_frame if there are no frames.
I don't think I've ever seen this message happen otherwise.
And returning NULL here is a perfectly legitimate thing to do. */
if (!current_frame)
{
error ("You haven't set up a process's stack to examine.");
@@ -389,33 +378,32 @@ get_prev_frame_info (next_frame)
define this macro to take two args; a frameinfo pointer
identifying a frame and a variable to set or clear if it is
or isn't leafless. */
#ifdef FRAMELESS_FUNCTION_INVOCATION
/* Still don't want to worry about this except on the innermost
frame. This macro will set FROMLEAF if NEXT_FRAME is a
frameless function invocation. */
if (!(next_frame->next))
{
FRAMELESS_FUNCTION_INVOCATION (next_frame, fromleaf);
fromleaf = FRAMELESS_FUNCTION_INVOCATION (next_frame);
if (fromleaf)
address = FRAME_FP (next_frame);
}
#endif
if (!fromleaf)
{
/* Two macros defined in tm.h specify the machine-dependent
actions to be performed here.
First, get the frame's chain-pointer.
If that is zero, the frame is the outermost frame or a leaf
called by the outermost frame. This means that if start
calls main without a frame, we'll return 0 (which is fine
anyway).
actions to be performed here.
First, get the frame's chain-pointer.
If that is zero, the frame is the outermost frame or a leaf
called by the outermost frame. This means that if start
calls main without a frame, we'll return 0 (which is fine
anyway).
Nope; there's a problem. This also returns when the current
routine is a leaf of main. This is unacceptable. We move
this to after the ffi test; I'd rather have backtraces from
start go curfluy than have an abort called from main not show
main. */
Nope; there's a problem. This also returns when the current
routine is a leaf of main. This is unacceptable. We move
this to after the ffi test; I'd rather have backtraces from
start go curfluy than have an abort called from main not show
main. */
address = FRAME_CHAIN (next_frame);
if (!FRAME_CHAIN_VALID (address, next_frame))
return 0;
@@ -441,11 +429,11 @@ get_prev_frame_info (next_frame)
after INIT_EXTRA_FRAME_INFO and come up with a simple way to
express what goes on here.
INIT_EXTRA_FRAME_INFO is called from two places: create_new_frame
(where the PC is already set up) and here (where it isn't).
INIT_FRAME_PC is only called from here, always after
INIT_EXTRA_FRAME_INFO.
INIT_EXTRA_FRAME_INFO is called from two places: create_new_frame
(where the PC is already set up) and here (where it isn't).
INIT_FRAME_PC is only called from here, always after
INIT_EXTRA_FRAME_INFO.
The catch is the MIPS, where INIT_EXTRA_FRAME_INFO requires the PC
value (which hasn't been set yet). Some other machines appear to
require INIT_EXTRA_FRAME_INFO before they can do INIT_FRAME_PC. Phoo.
@@ -457,24 +445,24 @@ get_prev_frame_info (next_frame)
INIT_EXTRA_FRAME_INFO, one possible scheme:
SETUP_INNERMOST_FRAME()
Default version is just create_new_frame (read_fp ()),
read_pc ()). Machines with extra frame info would do that (or the
local equivalent) and then set the extra fields.
Default version is just create_new_frame (read_fp ()),
read_pc ()). Machines with extra frame info would do that (or the
local equivalent) and then set the extra fields.
SETUP_ARBITRARY_FRAME(argc, argv)
Only change here is that create_new_frame would no longer init extra
frame info; SETUP_ARBITRARY_FRAME would have to do that.
Only change here is that create_new_frame would no longer init extra
frame info; SETUP_ARBITRARY_FRAME would have to do that.
INIT_PREV_FRAME(fromleaf, prev)
Replace INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC. This should
also return a flag saying whether to keep the new frame, or
whether to discard it, because on some machines (e.g. mips) it
is really awkward to have FRAME_CHAIN_VALID called *before*
INIT_EXTRA_FRAME_INFO (there is no good way to get information
deduced in FRAME_CHAIN_VALID into the extra fields of the new frame).
Replace INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC. This should
also return a flag saying whether to keep the new frame, or
whether to discard it, because on some machines (e.g. mips) it
is really awkward to have FRAME_CHAIN_VALID called *before*
INIT_EXTRA_FRAME_INFO (there is no good way to get information
deduced in FRAME_CHAIN_VALID into the extra fields of the new frame).
std_frame_pc(fromleaf, prev)
This is the default setting for INIT_PREV_FRAME. It just does what
the default INIT_FRAME_PC does. Some machines will call it from
INIT_PREV_FRAME (either at the beginning, the end, or in the middle).
Some machines won't use it.
This is the default setting for INIT_PREV_FRAME. It just does what
the default INIT_FRAME_PC does. Some machines will call it from
INIT_PREV_FRAME (either at the beginning, the end, or in the middle).
Some machines won't use it.
kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94. */
#ifdef INIT_FRAME_PC_FIRST
@@ -482,13 +470,13 @@ get_prev_frame_info (next_frame)
#endif
#ifdef INIT_EXTRA_FRAME_INFO
INIT_EXTRA_FRAME_INFO(fromleaf, prev);
INIT_EXTRA_FRAME_INFO (fromleaf, prev);
#endif
/* This entry is in the frame queue now, which is good since
FRAME_SAVED_PC may use that queue to figure out its value
(see tm-sparc.h). We want the pc saved in the inferior frame. */
INIT_FRAME_PC(fromleaf, prev);
INIT_FRAME_PC (fromleaf, prev);
/* If ->frame and ->pc are unchanged, we are in the process of getting
ourselves into an infinite backtrace. Some architectures check this
@@ -506,7 +494,7 @@ get_prev_frame_info (next_frame)
}
find_pc_partial_function (prev->pc, &name,
(CORE_ADDR *)NULL,(CORE_ADDR *)NULL);
(CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
if (IN_SIGTRAMP (prev->pc, name))
prev->signal_handler_caller = 1;
@@ -533,7 +521,7 @@ get_frame_saved_regs (frame, saved_regs_addr)
{
if (frame->saved_regs == NULL)
{
frame->saved_regs = (CORE_ADDR*)
frame->saved_regs = (CORE_ADDR *)
frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
}
if (saved_regs_addr == NULL)
@@ -627,13 +615,13 @@ blockvector_for_pc_sect (pc, section, pindex, symtab)
struct sec *section;
int *pindex;
struct symtab *symtab;
{
register struct block *b;
register int bot, top, half;
struct blockvector *bl;
if (symtab == 0) /* if no symtab specified by caller */
if (symtab == 0) /* if no symtab specified by caller */
{
/* First search all symtabs for one whose file contains our pc */
if ((symtab = find_pc_sect_symtab (pc, section)) == 0)
@@ -664,7 +652,7 @@ blockvector_for_pc_sect (pc, section, pindex, symtab)
while (bot >= 0)
{
b = BLOCKVECTOR_BLOCK (bl, bot);
if (BLOCK_END (b) >= pc)
if (BLOCK_END (b) > pc)
{
if (pindex)
*pindex = bot;
@@ -742,19 +730,19 @@ find_pc_function (pc)
/* These variables are used to cache the most recent result
* of find_pc_partial_function. */
static CORE_ADDR cache_pc_function_low = 0;
static CORE_ADDR cache_pc_function_high = 0;
static char *cache_pc_function_name = 0;
static CORE_ADDR cache_pc_function_low = 0;
static CORE_ADDR cache_pc_function_high = 0;
static char *cache_pc_function_name = 0;
static struct sec *cache_pc_function_section = NULL;
/* Clear cache, e.g. when symbol table is discarded. */
void
clear_pc_function_cache()
clear_pc_function_cache ()
{
cache_pc_function_low = 0;
cache_pc_function_high = 0;
cache_pc_function_name = (char *)0;
cache_pc_function_name = (char *) 0;
cache_pc_function_section = NULL;
}
@@ -771,23 +759,23 @@ clear_pc_function_cache()
int
find_pc_sect_partial_function (pc, section, name, address, endaddr)
CORE_ADDR pc;
asection *section;
char **name;
CORE_ADDR pc;
asection *section;
char **name;
CORE_ADDR *address;
CORE_ADDR *endaddr;
{
struct partial_symtab *pst;
struct symbol *f;
struct symbol *f;
struct minimal_symbol *msymbol;
struct partial_symbol *psb;
struct obj_section *osect;
struct obj_section *osect;
int i;
CORE_ADDR mapped_pc;
mapped_pc = overlay_mapped_address (pc, section);
if (mapped_pc >= cache_pc_function_low &&
if (mapped_pc >= cache_pc_function_low &&
mapped_pc < cache_pc_function_high &&
section == cache_pc_function_section)
goto return_cached_value;
@@ -795,11 +783,11 @@ find_pc_sect_partial_function (pc, section, name, address, endaddr)
/* If sigtramp is in the u area, it counts as a function (especially
important for step_1). */
#if defined SIGTRAMP_START
if (IN_SIGTRAMP (mapped_pc, (char *)NULL))
if (IN_SIGTRAMP (mapped_pc, (char *) NULL))
{
cache_pc_function_low = SIGTRAMP_START (mapped_pc);
cache_pc_function_high = SIGTRAMP_END (mapped_pc);
cache_pc_function_name = "<sigtramp>";
cache_pc_function_low = SIGTRAMP_START (mapped_pc);
cache_pc_function_high = SIGTRAMP_END (mapped_pc);
cache_pc_function_name = "<sigtramp>";
cache_pc_function_section = section;
goto return_cached_value;
}
@@ -828,9 +816,9 @@ find_pc_sect_partial_function (pc, section, name, address, endaddr)
|| (BLOCK_START (SYMBOL_BLOCK_VALUE (f))
>= SYMBOL_VALUE_ADDRESS (msymbol))))
{
cache_pc_function_low = BLOCK_START (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_name = SYMBOL_NAME (f);
cache_pc_function_low = BLOCK_START (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_high = BLOCK_END (SYMBOL_BLOCK_VALUE (f));
cache_pc_function_name = SYMBOL_NAME (f);
cache_pc_function_section = section;
goto return_cached_value;
}
@@ -881,21 +869,21 @@ find_pc_sect_partial_function (pc, section, name, address, endaddr)
return 0;
}
cache_pc_function_low = SYMBOL_VALUE_ADDRESS (msymbol);
cache_pc_function_name = SYMBOL_NAME (msymbol);
cache_pc_function_low = SYMBOL_VALUE_ADDRESS (msymbol);
cache_pc_function_name = SYMBOL_NAME (msymbol);
cache_pc_function_section = section;
/* Use the lesser of the next minimal symbol in the same section, or
the end of the section, as the end of the function. */
/* Step over other symbols at this same address, and symbols in
other sections, to find the next symbol in this section with
a different address. */
for (i=1; SYMBOL_NAME (msymbol+i) != NULL; i++)
for (i = 1; SYMBOL_NAME (msymbol + i) != NULL; i++)
{
if (SYMBOL_VALUE_ADDRESS (msymbol+i) != SYMBOL_VALUE_ADDRESS (msymbol)
&& SYMBOL_BFD_SECTION (msymbol+i) == SYMBOL_BFD_SECTION (msymbol))
if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
&& SYMBOL_BFD_SECTION (msymbol + i) == SYMBOL_BFD_SECTION (msymbol))
break;
}
@@ -907,33 +895,33 @@ find_pc_sect_partial_function (pc, section, name, address, endaddr)
So the end address is the end of the section. */
cache_pc_function_high = osect->endaddr;
return_cached_value:
return_cached_value:
if (address)
{
if (pc_in_unmapped_range (pc, section))
*address = overlay_unmapped_address (cache_pc_function_low, section);
*address = overlay_unmapped_address (cache_pc_function_low, section);
else
*address = cache_pc_function_low;
*address = cache_pc_function_low;
}
if (name)
*name = cache_pc_function_name;
if (endaddr)
{
if (pc_in_unmapped_range (pc, section))
{
{
/* Because the high address is actually beyond the end of
the function (and therefore possibly beyond the end of
the overlay), we must actually convert (high - 1)
and then add one to that. */
*endaddr = 1 + overlay_unmapped_address (cache_pc_function_high - 1,
*endaddr = 1 + overlay_unmapped_address (cache_pc_function_high - 1,
section);
}
}
else
*endaddr = cache_pc_function_high;
*endaddr = cache_pc_function_high;
}
return 1;
@@ -943,12 +931,12 @@ find_pc_sect_partial_function (pc, section, name, address, endaddr)
int
find_pc_partial_function (pc, name, address, endaddr)
CORE_ADDR pc;
char **name;
CORE_ADDR pc;
char **name;
CORE_ADDR *address;
CORE_ADDR *endaddr;
{
asection *section;
asection *section;
section = find_pc_overlay (pc);
return find_pc_sect_partial_function (pc, section, name, address, endaddr);
@@ -991,7 +979,7 @@ find_frame_addr_in_frame_chain (frame_addr)
{
struct frame_info *frame = NULL;
if (frame_addr == (CORE_ADDR)0)
if (frame_addr == (CORE_ADDR) 0)
return NULL;
while (1)
@@ -1024,7 +1012,7 @@ sigtramp_saved_pc (frame)
ptrbytes);
else
sigcontext_addr = read_memory_integer (read_register (SP_REGNUM)
+ sigcontext_offs,
+ sigcontext_offs,
ptrbytes);
/* Don't cause a memory_error when accessing sigcontext in case the stack
@@ -1034,7 +1022,72 @@ sigtramp_saved_pc (frame)
}
#endif /* SIGCONTEXT_PC_OFFSET */
#ifdef USE_GENERIC_DUMMY_FRAMES
/* Are we in a call dummy? The code below which allows DECR_PC_AFTER_BREAK
below is for infrun.c, which may give the macro a pc without that
subtracted out. */
extern CORE_ADDR text_end;
int
pc_in_call_dummy_before_text_end (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return ((pc) >= text_end - CALL_DUMMY_LENGTH
&& (pc) <= text_end + DECR_PC_AFTER_BREAK);
}
int
pc_in_call_dummy_after_text_end (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return ((pc) >= text_end
&& (pc) <= text_end + CALL_DUMMY_LENGTH + DECR_PC_AFTER_BREAK);
}
/* Is the PC in a call dummy? SP and FRAME_ADDRESS are the bottom and
top of the stack frame which we are checking, where "bottom" and
"top" refer to some section of memory which contains the code for
the call dummy. Calls to this macro assume that the contents of
SP_REGNUM and FP_REGNUM (or the saved values thereof), respectively,
are the things to pass.
This won't work on the 29k, where SP_REGNUM and FP_REGNUM don't
have that meaning, but the 29k doesn't use ON_STACK. This could be
fixed by generalizing this scheme, perhaps by passing in a frame
and adding a few fields, at least on machines which need them for
PC_IN_CALL_DUMMY.
Something simpler, like checking for the stack segment, doesn't work,
since various programs (threads implementations, gcc nested function
stubs, etc) may either allocate stack frames in another segment, or
allocate other kinds of code on the stack. */
int
pc_in_call_dummy_on_stack (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return (INNER_THAN ((sp), (pc))
&& (frame_address != 0)
&& INNER_THAN ((pc), (frame_address)));
}
int
pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR frame_address;
{
return ((pc) >= CALL_DUMMY_ADDRESS ()
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
}
/*
* GENERIC DUMMY FRAMES
@@ -1051,7 +1104,23 @@ sigtramp_saved_pc (frame)
* zero, and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember
* to define PUSH_RETURN_ADDRESS, because no call instruction will be
* being executed by the target. Also FRAME_CHAIN_VALID as
* generic_frame_chain_valid. */
* generic_frame_chain_valid and FIX_CALL_DUMMY as
* generic_fix_call_dummy. */
/* Dummy frame. This saves the processor state just prior to setting
up the inferior function call. Older targets save the registers
target stack (but that really slows down function calls). */
struct dummy_frame
{
struct dummy_frame *next;
CORE_ADDR pc;
CORE_ADDR fp;
CORE_ADDR sp;
CORE_ADDR top;
char *registers;
};
static struct dummy_frame *dummy_frame_stack = NULL;
@@ -1059,21 +1128,23 @@ static struct dummy_frame *dummy_frame_stack = NULL;
Search the stack of dummy frames for one matching the given PC, FP and SP.
This is the work-horse for pc_in_call_dummy and read_register_dummy */
char *
char *
generic_find_dummy_frame (pc, fp)
CORE_ADDR pc;
CORE_ADDR fp;
{
struct dummy_frame * dummyframe;
struct dummy_frame *dummyframe;
if (pc != entry_point_address ())
return 0;
for (dummyframe = dummy_frame_stack; dummyframe != NULL;
dummyframe = dummyframe->next)
if (fp == dummyframe->fp || fp == dummyframe->sp)
if (fp == dummyframe->fp
|| fp == dummyframe->sp
|| fp == dummyframe->top)
/* The frame in question lies between the saved fp and sp, inclusive */
return dummyframe->regs;
return dummyframe->registers;
return 0;
}
@@ -1082,12 +1153,14 @@ generic_find_dummy_frame (pc, fp)
Return true if this is a dummy frame created by gdb for an inferior call */
int
generic_pc_in_call_dummy (pc, fp)
generic_pc_in_call_dummy (pc, sp, fp)
CORE_ADDR pc;
CORE_ADDR sp;
CORE_ADDR fp;
{
/* if find_dummy_frame succeeds, then PC is in a call dummy */
return (generic_find_dummy_frame (pc, fp) != 0);
/* Note: SP and not FP is passed on. */
return (generic_find_dummy_frame (pc, sp) != 0);
}
/* Function: read_register_dummy
@@ -1103,7 +1176,7 @@ generic_read_register_dummy (pc, fp, regno)
if (dummy_regs)
return extract_address (&dummy_regs[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE(regno));
REGISTER_RAW_SIZE (regno));
else
return 0;
}
@@ -1130,6 +1203,7 @@ generic_push_dummy_frame ()
if (INNER_THAN (dummy_frame->fp, fp)) /* stale -- destroy! */
{
dummy_frame_stack = dummy_frame->next;
free (dummy_frame->registers);
free (dummy_frame);
dummy_frame = dummy_frame_stack;
}
@@ -1137,24 +1211,34 @@ generic_push_dummy_frame ()
dummy_frame = dummy_frame->next;
dummy_frame = xmalloc (sizeof (struct dummy_frame));
dummy_frame->pc = read_register (PC_REGNUM);
dummy_frame->sp = read_register (SP_REGNUM);
dummy_frame->fp = fp;
read_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
dummy_frame->registers = xmalloc (REGISTER_BYTES);
dummy_frame->pc = read_register (PC_REGNUM);
dummy_frame->sp = read_register (SP_REGNUM);
dummy_frame->top = dummy_frame->sp;
dummy_frame->fp = fp;
read_register_bytes (0, dummy_frame->registers, REGISTER_BYTES);
dummy_frame->next = dummy_frame_stack;
dummy_frame_stack = dummy_frame;
}
void
generic_save_dummy_frame_tos (sp)
CORE_ADDR sp;
{
dummy_frame_stack->top = sp;
}
/* Function: pop_frame
Restore the machine state from either the saved dummy stack or a
real stack frame. */
void
generic_pop_current_frame (pop)
void (*pop) PARAMS ((struct frame_info *frame));
void (*pop) (struct frame_info * frame);
{
struct frame_info *frame = get_current_frame ();
if (PC_IN_CALL_DUMMY(frame->pc, frame->frame, frame->frame))
if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
generic_pop_dummy_frame ();
else
pop (frame);
@@ -1174,28 +1258,47 @@ generic_pop_dummy_frame ()
if (!dummy_frame)
error ("Can't pop dummy frame!");
dummy_frame_stack = dummy_frame->next;
write_register_bytes (0, dummy_frame->regs, REGISTER_BYTES);
write_register_bytes (0, dummy_frame->registers, REGISTER_BYTES);
flush_cached_frames ();
free (dummy_frame->registers);
free (dummy_frame);
}
/* Function: frame_chain_valid
Returns true for a user frame or a call_function_by_hand dummy frame,
and false for the CRT0 start-up frame. Purpose is to terminate backtrace */
int
generic_frame_chain_valid (fp, fi)
CORE_ADDR fp;
struct frame_info *fi;
{
if (PC_IN_CALL_DUMMY(FRAME_SAVED_PC(fi), fp, fp))
return 1; /* don't prune CALL_DUMMY frames */
else /* fall back to default algorithm (see frame.h) */
if (PC_IN_CALL_DUMMY (FRAME_SAVED_PC (fi), fp, fp))
return 1; /* don't prune CALL_DUMMY frames */
else /* fall back to default algorithm (see frame.h) */
return (fp != 0
&& (INNER_THAN (fi->frame, fp) || fi->frame == fp)
&& !inside_entry_file (FRAME_SAVED_PC(fi)));
&& !inside_entry_file (FRAME_SAVED_PC (fi)));
}
/* Function: fix_call_dummy
Stub function. Generic dumy frames typically do not need to fix
the frame being created */
void
generic_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
char *dummy;
CORE_ADDR pc;
CORE_ADDR fun;
int nargs;
struct value **args;
struct type *type;
int gcc_p;
{
return;
}
/* Function: get_saved_register
Find register number REGNUM relative to FRAME and put its (raw,
target format) contents in *RAW_BUFFER.
@@ -1236,7 +1339,7 @@ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
if (optimized != NULL)
*optimized = 0;
if (addrp) /* default assumption: not found in memory */
if (addrp) /* default assumption: not found in memory */
*addrp = 0;
/* Note: since the current frame's registers could only have been
@@ -1248,34 +1351,34 @@ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
{
if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
{
if (lval) /* found it in a CALL_DUMMY frame */
if (lval) /* found it in a CALL_DUMMY frame */
*lval = not_lval;
if (raw_buffer)
memcpy (raw_buffer,
generic_find_dummy_frame (frame->pc, frame->frame) +
memcpy (raw_buffer,
generic_find_dummy_frame (frame->pc, frame->frame) +
REGISTER_BYTE (regnum),
REGISTER_RAW_SIZE (regnum));
return;
return;
}
FRAME_INIT_SAVED_REGS (frame);
if (frame->saved_regs != NULL
&& frame->saved_regs[regnum] != 0)
{
if (lval) /* found it saved on the stack */
if (lval) /* found it saved on the stack */
*lval = lval_memory;
if (regnum == SP_REGNUM)
{
if (raw_buffer) /* SP register treated specially */
store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
if (raw_buffer) /* SP register treated specially */
store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
frame->saved_regs[regnum]);
}
else
{
if (addrp) /* any other register */
if (addrp) /* any other register */
*addrp = frame->saved_regs[regnum];
if (raw_buffer)
read_memory (frame->saved_regs[regnum], raw_buffer,
read_memory (frame->saved_regs[regnum], raw_buffer,
REGISTER_RAW_SIZE (regnum));
}
return;
@@ -1285,17 +1388,16 @@ generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* If we get thru the loop to this point, it means the register was
not saved in any frame. Return the actual live-register value. */
if (lval) /* found it in a live register */
if (lval) /* found it in a live register */
*lval = lval_register;
if (addrp)
*addrp = REGISTER_BYTE (regnum);
if (raw_buffer)
read_register_gen (regnum, raw_buffer);
}
#endif /* USE_GENERIC_DUMMY_FRAMES */
void
_initialize_blockframe ()
_initialize_blockframe (void)
{
obstack_init (&frame_cache_obstack);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,22 @@
/* Data structures associated with breakpoints in GDB.
Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (BREAKPOINT_H)
#define BREAKPOINT_H 1
@@ -23,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "frame.h"
#include "value.h"
#include "gdb-events.h"
/* This is the maximum number of bytes a breakpoint instruction can take.
Feel free to increase it. It's just used in a few places to size
arrays that should be independent of the target architecture. */
@@ -34,33 +37,34 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
here. This includes:
* single-step (for machines where we have to simulate single stepping)
(probably, though perhaps it is better for it to look as much as
possible like a single-step to wait_for_inferior). */
(probably, though perhaps it is better for it to look as much as
possible like a single-step to wait_for_inferior). */
enum bptype {
bp_none = 0, /* Eventpoint has been deleted. */
bp_breakpoint, /* Normal breakpoint */
bp_hardware_breakpoint, /* Hardware assisted breakpoint */
bp_until, /* used by until command */
bp_finish, /* used by finish command */
bp_watchpoint, /* Watchpoint */
bp_hardware_watchpoint, /* Hardware assisted watchpoint */
bp_read_watchpoint, /* read watchpoint, (hardware assisted) */
bp_access_watchpoint, /* access watchpoint, (hardware assisted) */
bp_longjmp, /* secret breakpoint to find longjmp() */
bp_longjmp_resume, /* secret breakpoint to escape longjmp() */
enum bptype
{
bp_none = 0, /* Eventpoint has been deleted. */
bp_breakpoint, /* Normal breakpoint */
bp_hardware_breakpoint, /* Hardware assisted breakpoint */
bp_until, /* used by until command */
bp_finish, /* used by finish command */
bp_watchpoint, /* Watchpoint */
bp_hardware_watchpoint, /* Hardware assisted watchpoint */
bp_read_watchpoint, /* read watchpoint, (hardware assisted) */
bp_access_watchpoint, /* access watchpoint, (hardware assisted) */
bp_longjmp, /* secret breakpoint to find longjmp() */
bp_longjmp_resume, /* secret breakpoint to escape longjmp() */
/* Used by wait_for_inferior for stepping over subroutine calls, for
stepping over signal handlers, and for skipping prologues. */
bp_step_resume,
/* Used by wait_for_inferior for stepping over subroutine calls, for
stepping over signal handlers, and for skipping prologues. */
bp_step_resume,
/* Used by wait_for_inferior for stepping over signal handlers. */
bp_through_sigtramp,
/* Used by wait_for_inferior for stepping over signal handlers. */
bp_through_sigtramp,
/* Used to detect when a watchpoint expression has gone out of
scope. These breakpoints are usually not visible to the user.
/* Used to detect when a watchpoint expression has gone out of
scope. These breakpoints are usually not visible to the user.
This breakpoint has some interesting properties:
This breakpoint has some interesting properties:
1) There's always a 1:1 mapping between watchpoints
on local variables and watchpoint_scope breakpoints.
@@ -69,77 +73,89 @@ enum bptype {
associated with when hit.
3) It can never be disabled. */
bp_watchpoint_scope,
bp_watchpoint_scope,
/* The breakpoint at the end of a call dummy. */
/* FIXME: What if the function we are calling longjmp()s out of the
call, or the user gets out with the "return" command? We currently
have no way of cleaning up the breakpoint in these (obscure) situations.
(Probably can solve this by noticing longjmp, "return", etc., it's
similar to noticing when a watchpoint on a local variable goes out
of scope (with hardware support for watchpoints)). */
bp_call_dummy,
/* The breakpoint at the end of a call dummy. */
/* FIXME: What if the function we are calling longjmp()s out of the
call, or the user gets out with the "return" command? We currently
have no way of cleaning up the breakpoint in these (obscure) situations.
(Probably can solve this by noticing longjmp, "return", etc., it's
similar to noticing when a watchpoint on a local variable goes out
of scope (with hardware support for watchpoints)). */
bp_call_dummy,
/* Some dynamic linkers (HP, maybe Solaris) can arrange for special
code in the inferior to run when significant events occur in the
dynamic linker (for example a library is loaded or unloaded).
/* Some dynamic linkers (HP, maybe Solaris) can arrange for special
code in the inferior to run when significant events occur in the
dynamic linker (for example a library is loaded or unloaded).
By placing a breakpoint in this magic code GDB will get control
when these significant events occur. GDB can then re-examine
the dynamic linker's data structures to discover any newly loaded
dynamic libraries. */
bp_shlib_event,
/* These breakpoints are used to implement the "catch load" command
on platforms whose dynamic linkers support such functionality. */
bp_catch_load,
/* These breakpoints are used to implement the "catch unload" command
on platforms whose dynamic linkers support such functionality. */
bp_catch_unload,
/* These are not really breakpoints, but are catchpoints that
implement the "catch fork", "catch vfork" and "catch exec" commands
on platforms whose kernel support such functionality. (I.e.,
kernels which can raise an event when a fork or exec occurs, as
opposed to the debugger setting breakpoints on functions named
"fork" or "exec".) */
bp_catch_fork,
bp_catch_vfork,
bp_catch_exec,
By placing a breakpoint in this magic code GDB will get control
when these significant events occur. GDB can then re-examine
the dynamic linker's data structures to discover any newly loaded
dynamic libraries. */
bp_shlib_event,
/* These are catchpoints to implement "catch catch" and "catch throw"
commands for C++ exception handling. */
bp_catch_catch,
bp_catch_throw
};
/* These breakpoints are used to implement the "catch load" command
on platforms whose dynamic linkers support such functionality. */
bp_catch_load,
/* These breakpoints are used to implement the "catch unload" command
on platforms whose dynamic linkers support such functionality. */
bp_catch_unload,
/* These are not really breakpoints, but are catchpoints that
implement the "catch fork", "catch vfork" and "catch exec" commands
on platforms whose kernel support such functionality. (I.e.,
kernels which can raise an event when a fork or exec occurs, as
opposed to the debugger setting breakpoints on functions named
"fork" or "exec".) */
bp_catch_fork,
bp_catch_vfork,
bp_catch_exec,
/* These are catchpoints to implement "catch catch" and "catch throw"
commands for C++ exception handling. */
bp_catch_catch,
bp_catch_throw
};
/* States of enablement of breakpoint. */
enum enable {
disabled, /* The eventpoint is inactive, and cannot trigger. */
enabled, /* The eventpoint is active, and can trigger. */
shlib_disabled, /* The eventpoint's address is within an unloaded solib.
The eventpoint will be automatically enabled & reset
when that solib is loaded. */
call_disabled /* The eventpoint has been disabled while a call into
the inferior is "in flight", because some eventpoints
interfere with the implementation of a call on some
targets. The eventpoint will be automatically enabled
& reset when the call "lands" (either completes, or
stops at another eventpoint). */
};
enum enable
{
disabled, /* The eventpoint is inactive, and cannot trigger. */
enabled, /* The eventpoint is active, and can trigger. */
shlib_disabled, /* The eventpoint's address is in an unloaded solib.
The eventpoint will be automatically enabled
and reset when that solib is loaded. */
call_disabled /* The eventpoint has been disabled while a call
into the inferior is "in flight", because some
eventpoints interfere with the implementation of
a call on some targets. The eventpoint will be
automatically enabled and reset when the call
"lands" (either completes, or stops at another
eventpoint). */
};
/* Disposition of breakpoint. Ie: what to do after hitting it. */
enum bpdisp {
del, /* Delete it */
del_at_next_stop, /* Delete at next stop, whether hit or not */
disable, /* Disable it */
donttouch /* Leave it alone */
};
enum bpdisp
{
del, /* Delete it */
del_at_next_stop, /* Delete at next stop, whether hit or not */
disable, /* Disable it */
donttouch /* Leave it alone */
};
enum target_hw_bp_type
{
hw_write = 0, /* Common HW watchpoint */
hw_read = 1, /* Read HW watchpoint */
hw_access = 2, /* Access HW watchpoint */
hw_execute = 3 /* Execute HW breakpoint */
};
/* Note that the ->silent field is not currently used by any commands
(though the code is in there if it was to be, and set_raw_breakpoint
@@ -150,122 +166,125 @@ enum bpdisp {
/* This is for a breakpoint or a watchpoint. */
struct breakpoint
{
struct breakpoint *next;
/* Type of breakpoint. */
enum bptype type;
/* Zero means disabled; remember the info but don't break here. */
enum enable enable;
/* What to do with this breakpoint after we hit it. */
enum bpdisp disposition;
/* Number assigned to distinguish breakpoints. */
int number;
{
struct breakpoint *next;
/* Type of breakpoint. */
enum bptype type;
/* Zero means disabled; remember the info but don't break here. */
enum enable enable;
/* What to do with this breakpoint after we hit it. */
enum bpdisp disposition;
/* Number assigned to distinguish breakpoints. */
int number;
/* Address to break at, or NULL if not a breakpoint. */
CORE_ADDR address;
/* Address to break at, or NULL if not a breakpoint. */
CORE_ADDR address;
/* Line number of this address. Only matters if address is
non-NULL. */
/* Line number of this address. Only matters if address is
non-NULL. */
int line_number;
int line_number;
/* Source file name of this address. Only matters if address is
non-NULL. */
/* Source file name of this address. Only matters if address is
non-NULL. */
char *source_file;
char *source_file;
/* Non-zero means a silent breakpoint (don't print frame info
if we stop here). */
unsigned char silent;
/* Number of stops at this breakpoint that should
be continued automatically before really stopping. */
int ignore_count;
/* "Real" contents of byte where breakpoint has been inserted.
Valid only when breakpoints are in the program. Under the complete
control of the target insert_breakpoint and remove_breakpoint routines.
No other code should assume anything about the value(s) here. */
char shadow_contents[BREAKPOINT_MAX];
/* Nonzero if this breakpoint is now inserted. Only matters if address
is non-NULL. */
char inserted;
/* Nonzero if this is not the first breakpoint in the list
for the given address. Only matters if address is non-NULL. */
char duplicate;
/* Chain of command lines to execute when this breakpoint is hit. */
struct command_line *commands;
/* Stack depth (address of frame). If nonzero, break only if fp
equals this. */
CORE_ADDR frame;
/* Conditional. Break only if this expression's value is nonzero. */
struct expression *cond;
/* Non-zero means a silent breakpoint (don't print frame info
if we stop here). */
unsigned char silent;
/* Number of stops at this breakpoint that should
be continued automatically before really stopping. */
int ignore_count;
/* "Real" contents of byte where breakpoint has been inserted.
Valid only when breakpoints are in the program. Under the complete
control of the target insert_breakpoint and remove_breakpoint routines.
No other code should assume anything about the value(s) here. */
char shadow_contents[BREAKPOINT_MAX];
/* Nonzero if this breakpoint is now inserted. Only matters if address
is non-NULL. */
char inserted;
/* Nonzero if this is not the first breakpoint in the list
for the given address. Only matters if address is non-NULL. */
char duplicate;
/* Chain of command lines to execute when this breakpoint is hit. */
struct command_line *commands;
/* Stack depth (address of frame). If nonzero, break only if fp
equals this. */
CORE_ADDR frame;
/* Conditional. Break only if this expression's value is nonzero. */
struct expression *cond;
/* String we used to set the breakpoint (malloc'd). Only matters if
address is non-NULL. */
char *addr_string;
/* Language we used to set the breakpoint. */
enum language language;
/* Input radix we used to set the breakpoint. */
int input_radix;
/* String form of the breakpoint condition (malloc'd), or NULL if there
is no condition. */
char *cond_string;
/* String form of exp (malloc'd), or NULL if none. */
char *exp_string;
/* String we used to set the breakpoint (malloc'd). Only matters if
address is non-NULL. */
char *addr_string;
/* Language we used to set the breakpoint. */
enum language language;
/* Input radix we used to set the breakpoint. */
int input_radix;
/* String form of the breakpoint condition (malloc'd), or NULL if there
is no condition. */
char *cond_string;
/* String form of exp (malloc'd), or NULL if none. */
char *exp_string;
/* The expression we are watching, or NULL if not a watchpoint. */
struct expression *exp;
/* The largest block within which it is valid, or NULL if it is
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
/* Value of the watchpoint the last time we checked it. */
value_ptr val;
/* The expression we are watching, or NULL if not a watchpoint. */
struct expression *exp;
/* The largest block within which it is valid, or NULL if it is
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
/* Value of the watchpoint the last time we checked it. */
value_ptr val;
/* Holds the value chain for a hardware watchpoint expression. */
value_ptr val_chain;
/* Holds the value chain for a hardware watchpoint expression. */
value_ptr val_chain;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
of a related breakpoint be useful elsewhere, if not just call
it the watchpoint_scope breakpoint or something like that. FIXME). */
struct breakpoint *related_breakpoint;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept
of a related breakpoint be useful elsewhere, if not just call
it the watchpoint_scope breakpoint or something like that. FIXME). */
struct breakpoint *related_breakpoint;
/* Holds the frame address which identifies the frame this watchpoint
should be evaluated in, or NULL if the watchpoint should be evaluated
on the outermost frame. */
CORE_ADDR watchpoint_frame;
/* Holds the frame address which identifies the frame this watchpoint
should be evaluated in, or NULL if the watchpoint should be evaluated
on the outermost frame. */
CORE_ADDR watchpoint_frame;
/* Thread number for thread-specific breakpoint, or -1 if don't care */
int thread;
/* Thread number for thread-specific breakpoint, or -1 if don't care */
int thread;
/* Count of the number of times this breakpoint was taken, dumped
with the info, but not used for anything else. Useful for
seeing how many times you hit a break prior to the program
aborting, so you can back up to just before the abort. */
int hit_count;
/* Count of the number of times this breakpoint was taken, dumped
with the info, but not used for anything else. Useful for
seeing how many times you hit a break prior to the program
aborting, so you can back up to just before the abort. */
int hit_count;
/* Filename of a dynamically-linked library (dll), used for bp_catch_load
and bp_catch_unload (malloc'd), or NULL if any library is significant. */
char * dll_pathname;
/* Filename of a dll whose state change (e.g., load or unload)
triggered this catchpoint. This field is only vaid immediately
after this catchpoint has triggered. */
char * triggered_dll_pathname;
/* Process id of a child process whose forking triggered this catchpoint.
This field is only vaid immediately after this catchpoint has triggered. */
int forked_inferior_pid;
/* Filename of a program whose exec triggered this catchpoint. This
field is only vaid immediately after this catchpoint has triggered. */
char * exec_pathname;
asection *section;
};
/* Filename of a dynamically-linked library (dll), used for
bp_catch_load and bp_catch_unload (malloc'd), or NULL if any
library is significant. */
char *dll_pathname;
/* Filename of a dll whose state change (e.g., load or unload)
triggered this catchpoint. This field is only vaid immediately
after this catchpoint has triggered. */
char *triggered_dll_pathname;
/* Process id of a child process whose forking triggered this
catchpoint. This field is only vaid immediately after this
catchpoint has triggered. */
int forked_inferior_pid;
/* Filename of a program whose exec triggered this catchpoint.
This field is only vaid immediately after this catchpoint has
triggered. */
char *exec_pathname;
asection *section;
};
/* The following stuff is an abstract data type "bpstat" ("breakpoint status").
This provides the ability to determine whether we have stopped at a
breakpoint, and what we should do about it. */
/* The following stuff is an abstract data type "bpstat" ("breakpoint
status"). This provides the ability to determine whether we have
stopped at a breakpoint, and what we should do about it. */
typedef struct bpstats *bpstat;
@@ -283,71 +302,73 @@ extern bpstat bpstat_stop_status PARAMS ((CORE_ADDR *, int));
/* This bpstat_what stuff tells wait_for_inferior what to do with a
breakpoint (a challenging task). */
enum bpstat_what_main_action {
/* Perform various other tests; that is, this bpstat does not
say to perform any action (e.g. failed watchpoint and nothing
else). */
BPSTAT_WHAT_KEEP_CHECKING,
enum bpstat_what_main_action
{
/* Perform various other tests; that is, this bpstat does not
say to perform any action (e.g. failed watchpoint and nothing
else). */
BPSTAT_WHAT_KEEP_CHECKING,
/* Rather than distinguish between noisy and silent stops here, it
might be cleaner to have bpstat_print make that decision (also
taking into account stop_print_frame and source_only). But the
implications are a bit scary (interaction with auto-displays, etc.),
so I won't try it. */
/* Stop silently. */
BPSTAT_WHAT_STOP_SILENT,
/* Rather than distinguish between noisy and silent stops here, it
might be cleaner to have bpstat_print make that decision (also
taking into account stop_print_frame and source_only). But the
implications are a bit scary (interaction with auto-displays, etc.),
so I won't try it. */
/* Stop and print. */
BPSTAT_WHAT_STOP_NOISY,
/* Stop silently. */
BPSTAT_WHAT_STOP_SILENT,
/* Remove breakpoints, single step once, then put them back in and
go back to what we were doing. It's possible that this should be
removed from the main_action and put into a separate field, to more
cleanly handle BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE. */
BPSTAT_WHAT_SINGLE,
/* Stop and print. */
BPSTAT_WHAT_STOP_NOISY,
/* Set longjmp_resume breakpoint, remove all other breakpoints,
and continue. The "remove all other breakpoints" part is required
if we are also stepping over another breakpoint as well as doing
the longjmp handling. */
BPSTAT_WHAT_SET_LONGJMP_RESUME,
/* Remove breakpoints, single step once, then put them back in and
go back to what we were doing. It's possible that this should be
removed from the main_action and put into a separate field, to more
cleanly handle BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE. */
BPSTAT_WHAT_SINGLE,
/* Clear longjmp_resume breakpoint, then handle as
BPSTAT_WHAT_KEEP_CHECKING. */
BPSTAT_WHAT_CLEAR_LONGJMP_RESUME,
/* Set longjmp_resume breakpoint, remove all other breakpoints,
and continue. The "remove all other breakpoints" part is required
if we are also stepping over another breakpoint as well as doing
the longjmp handling. */
BPSTAT_WHAT_SET_LONGJMP_RESUME,
/* Clear longjmp_resume breakpoint, then handle as BPSTAT_WHAT_SINGLE. */
BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE,
/* Clear longjmp_resume breakpoint, then handle as
BPSTAT_WHAT_KEEP_CHECKING. */
BPSTAT_WHAT_CLEAR_LONGJMP_RESUME,
/* Clear step resume breakpoint, and keep checking. */
BPSTAT_WHAT_STEP_RESUME,
/* Clear longjmp_resume breakpoint, then handle as BPSTAT_WHAT_SINGLE. */
BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE,
/* Clear through_sigtramp breakpoint, muck with trap_expected, and keep
checking. */
BPSTAT_WHAT_THROUGH_SIGTRAMP,
/* Clear step resume breakpoint, and keep checking. */
BPSTAT_WHAT_STEP_RESUME,
/* Check the dynamic linker's data structures for new libraries, then
keep checking. */
BPSTAT_WHAT_CHECK_SHLIBS,
/* Clear through_sigtramp breakpoint, muck with trap_expected, and keep
checking. */
BPSTAT_WHAT_THROUGH_SIGTRAMP,
/* Check the dynamic linker's data structures for new libraries, then
resume out of the dynamic linker's callback, stop and print. */
BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK,
/* Check the dynamic linker's data structures for new libraries, then
keep checking. */
BPSTAT_WHAT_CHECK_SHLIBS,
/* This is just used to keep track of how many enums there are. */
BPSTAT_WHAT_LAST
};
/* Check the dynamic linker's data structures for new libraries, then
resume out of the dynamic linker's callback, stop and print. */
BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK,
struct bpstat_what {
enum bpstat_what_main_action main_action;
/* This is just used to keep track of how many enums there are. */
BPSTAT_WHAT_LAST
};
/* Did we hit a call dummy breakpoint? This only goes with a main_action
of BPSTAT_WHAT_STOP_SILENT or BPSTAT_WHAT_STOP_NOISY (the concept of
continuing from a call dummy without popping the frame is not a
useful one). */
int call_dummy;
};
struct bpstat_what
{
enum bpstat_what_main_action main_action;
/* Did we hit a call dummy breakpoint? This only goes with a main_action
of BPSTAT_WHAT_STOP_SILENT or BPSTAT_WHAT_STOP_NOISY (the concept of
continuing from a call dummy without popping the frame is not a
useful one). */
int call_dummy;
};
/* Tell what to do about this bpstat. */
struct bpstat_what bpstat_what PARAMS ((bpstat));
@@ -363,9 +384,9 @@ bpstat bpstat_find_breakpoint PARAMS ((bpstat, struct breakpoint *));
step_resume breakpoint.
See wait_for_inferior's use of this function.
*/
*/
extern struct breakpoint *
bpstat_find_step_resume_breakpoint PARAMS ((bpstat));
bpstat_find_step_resume_breakpoint PARAMS ((bpstat));
/* Nonzero if a signal that we got in wait() was due to circumstances
explained by the BS. */
@@ -404,47 +425,46 @@ extern void bpstat_clear_actions PARAMS ((bpstat));
/* Given a bpstat that records zero or more triggered eventpoints, this
function returns another bpstat which contains only the catchpoints
on that first list, if any.
*/
*/
extern void bpstat_get_triggered_catchpoints PARAMS ((bpstat, bpstat *));
/* Implementation: */
struct bpstats
{
/* Linked list because there can be two breakpoints at the
same place, and a bpstat reflects the fact that both have been hit. */
bpstat next;
/* Breakpoint that we are at. */
struct breakpoint *breakpoint_at;
/* Commands left to be done. */
struct command_line *commands;
/* Old value associated with a watchpoint. */
value_ptr old_val;
{
/* Linked list because there can be two breakpoints at the same
place, and a bpstat reflects the fact that both have been hit. */
bpstat next;
/* Breakpoint that we are at. */
struct breakpoint *breakpoint_at;
/* Commands left to be done. */
struct command_line *commands;
/* Old value associated with a watchpoint. */
value_ptr old_val;
/* Nonzero if this breakpoint tells us to print the frame. */
char print;
/* Nonzero if this breakpoint tells us to print the frame. */
char print;
/* Nonzero if this breakpoint tells us to stop. */
char stop;
/* Nonzero if this breakpoint tells us to stop. */
char stop;
/* Function called by bpstat_print to print stuff associated with
this element of the bpstat chain. Returns 0 or 1 just like
bpstat_print, or -1 if it can't deal with it. */
int (*print_it) PARAMS((bpstat bs));
};
/* Function called by bpstat_print to print stuff associated with
this element of the bpstat chain. Returns 0 or 1 just like
bpstat_print, or -1 if it can't deal with it. */
int (*print_it) PARAMS ((bpstat bs));
};
enum inf_context
{
inf_starting,
inf_running,
inf_exited
};
{
inf_starting,
inf_running,
inf_exited
};
/* Prototypes for breakpoint-related functions. */
#ifdef __STDC__ /* Forward declarations for prototypes */
/* Forward declarations for prototypes */
struct frame_info;
#endif
extern int breakpoint_here_p PARAMS ((CORE_ADDR));
@@ -467,7 +487,8 @@ extern struct breakpoint *set_momentary_breakpoint
extern void set_ignore_count PARAMS ((int, int, int));
extern void set_default_breakpoint PARAMS ((int, CORE_ADDR, struct symtab *, int));
extern void set_default_breakpoint PARAMS ((int, CORE_ADDR,
struct symtab *, int));
extern void mark_breakpoints_out PARAMS ((void));
@@ -499,16 +520,16 @@ extern int reattach_breakpoints PARAMS ((int));
This function causes the following:
- All eventpoints are marked "not inserted".
- All eventpoints with a symbolic address are reset such that
the symbolic address must be reevaluated before the eventpoints
can be reinserted.
- The solib breakpoints are explicitly removed from the breakpoint
list.
- A step-resume breakpoint, if any, is explicitly removed from the
breakpoint list.
- All eventpoints without a symbolic address are removed from the
breakpoint list. */
- All eventpoints are marked "not inserted".
- All eventpoints with a symbolic address are reset such that
the symbolic address must be reevaluated before the eventpoints
can be reinserted.
- The solib breakpoints are explicitly removed from the breakpoint
list.
- A step-resume breakpoint, if any, is explicitly removed from the
breakpoint list.
- All eventpoints without a symbolic address are removed from the
breakpoint list. */
extern void update_breakpoints_after_exec PARAMS ((void));
/* This function can be used to physically remove hardware breakpoints
@@ -517,11 +538,11 @@ extern void update_breakpoints_after_exec PARAMS ((void));
those targets which support following the processes of a fork() or
vfork() system call, when one of the resulting two processes is to
be detached and allowed to run free.
It is an error to use this function on the process whose id is
inferior_pid. */
extern int detach_breakpoints PARAMS ((int));
extern void enable_longjmp_breakpoint PARAMS ((void));
extern void disable_longjmp_breakpoint PARAMS ((void));
@@ -555,7 +576,7 @@ disable_watchpoints_before_interactive_call_start PARAMS ((void));
extern void
enable_watchpoints_after_interactive_call_stop PARAMS ((void));
extern void clear_breakpoint_hit_counts PARAMS ((void));
/* The following are for displays, which aren't really breakpoints, but
@@ -581,24 +602,26 @@ extern void disable_breakpoints_in_shlibs PARAMS ((int silent));
extern void re_enable_breakpoints_in_shlibs PARAMS ((void));
extern void create_solib_load_event_breakpoint PARAMS ((char *, int, char *, char *));
extern void create_solib_unload_event_breakpoint PARAMS ((char *, int, char *, char *));
extern void create_solib_load_event_breakpoint PARAMS ((char *, int,
char *, char *));
extern void create_solib_unload_event_breakpoint PARAMS ((char *, int,
char *, char *));
extern void create_fork_event_catchpoint PARAMS ((int, char *));
extern void create_vfork_event_catchpoint PARAMS ((int, char *));
extern void create_exec_event_catchpoint PARAMS ((int, char *));
/* This function returns TRUE if ep is a catchpoint. */
extern int ep_is_catchpoint PARAMS ((struct breakpoint *));
/* This function returns TRUE if ep is a catchpoint of a
shared library (aka dynamically-linked library) event,
such as a library load or unload. */
extern int ep_is_shlib_catchpoint PARAMS ((struct breakpoint *));
extern struct breakpoint *set_breakpoint_sal PARAMS ((struct symtab_and_line));
#endif /* !defined (BREAKPOINT_H) */

View File

@@ -1,21 +1,22 @@
/* Support routines for building symbol tables in GDB's internal format.
Copyright 1986-1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* This module provides subroutines used for creating and adding to
the symbol table. These routines are called from various symbol-
@@ -35,7 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdb_string.h"
/* Ask buildsym.h to define the vars it normally declares `extern'. */
#define EXTERN /**/
#define EXTERN
/**/
#include "buildsym.h" /* Our own declarations */
#undef EXTERN
@@ -146,7 +148,7 @@ find_symbol_in_list (struct pending *list, char *name, int length)
/* ARGSUSED */
void
really_free_pendings (int foo)
really_free_pendings (PTR dummy)
{
struct pending *next, *next1;
@@ -220,7 +222,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
}
block = (struct block *) obstack_alloc (&objfile->symbol_obstack,
(sizeof (struct block) + ((i - 1) * sizeof (struct symbol *))));
(sizeof (struct block) + ((i - 1) * sizeof (struct symbol *))));
/* Copy the symbols into the block. */
@@ -382,7 +384,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
else
{
complain (&innerblock_anon_complaint, BLOCK_START (pblock->block),
BLOCK_END (pblock->block), BLOCK_START (block),
BLOCK_END (pblock->block), BLOCK_START (block),
BLOCK_END (block));
}
if (BLOCK_START (pblock->block) < BLOCK_START (block))
@@ -569,7 +571,7 @@ start_subfile (char *name, char *dirname)
program. But to demangle we need to set the language to C++. We
can distinguish cfront code by the fact that it has #line
directives which specify a file name ending in .C.
So if the filename of this subfile ends in .C, then change the
language of any pending subfiles from C to C++. We also accept
any other C++ suffixes accepted by deduce_language_from_filename
@@ -695,7 +697,7 @@ record_line (register struct subfile *subfile, int line, CORE_ADDR pc)
subfile->line_vector_length = INITIAL_LINE_VECTOR_LENGTH;
subfile->line_vector = (struct linetable *)
xmalloc (sizeof (struct linetable)
+ subfile->line_vector_length * sizeof (struct linetable_entry));
+ subfile->line_vector_length * sizeof (struct linetable_entry));
subfile->line_vector->nitems = 0;
have_line_numbers = 1;
}
@@ -855,7 +857,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
/* Cleanup any undefined types that have been left hanging around
(this needs to be done before the finish_blocks so that
file_symbols is still good).
Both cleanup_undefined_types and finish_global_stabs are stabs
specific, but harmless for other symbol readers, since on gdb
startup or when finished reading stabs, the state is set so these
@@ -921,7 +923,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
if (objfile->flags & OBJF_REORDERED)
qsort (subfile->line_vector->item,
subfile->line_vector->nitems,
sizeof (struct linetable_entry), compare_line_numbers);
sizeof (struct linetable_entry), compare_line_numbers);
}
/* Now, allocate a symbol table. */
@@ -968,8 +970,8 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
if (subfile->debugformat != NULL)
{
symtab->debugformat = obsavestring (subfile->debugformat,
strlen (subfile->debugformat),
&objfile->symbol_obstack);
strlen (subfile->debugformat),
&objfile->symbol_obstack);
}
/* All symtabs for the main file and the subfiles share a
@@ -1025,7 +1027,7 @@ push_context (int desc, CORE_ADDR valu)
context_stack_size *= 2;
context_stack = (struct context_stack *)
xrealloc ((char *) context_stack,
(context_stack_size * sizeof (struct context_stack)));
(context_stack_size * sizeof (struct context_stack)));
}
new = &context_stack[context_stack_depth++];

View File

@@ -1,21 +1,22 @@
/* Build symbol tables in GDB's internal format.
Copyright 1986-1993, 1996-1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (BUILDSYM_H)
#define BUILDSYM_H 1
@@ -242,7 +243,7 @@ extern void finish_block (struct symbol *symbol,
CORE_ADDR start, CORE_ADDR end,
struct objfile *objfile);
extern void really_free_pendings (int foo);
extern void really_free_pendings (PTR dummy);
extern void start_subfile (char *name, char *dirname);

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,22 @@
/* C language support routines for GDB, the GNU debugger.
Copyright 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "symtab.h"
@@ -25,7 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "language.h"
#include "c-lang.h"
static void c_emit_char PARAMS ((int c, GDB_FILE *stream, int quoter));
extern void _initialize_c_language PARAMS ((void));
static void c_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
/* Print the character C on STREAM as part of the contents of a literal
string whose delimiter is QUOTER. Note that that format for printing
@@ -116,7 +118,7 @@ c_printstr (stream, string, length, width, force_ellipses)
style. */
if (!force_ellipses
&& length > 0
&& extract_unsigned_integer (string + (length - 1) * width, width) == '\0')
&& extract_unsigned_integer (string + (length - 1) * width, width) == '\0')
length--;
if (length == 0)
@@ -128,7 +130,7 @@ c_printstr (stream, string, length, width, force_ellipses)
for (i = 0; i < length && things_printed < print_max; ++i)
{
/* Position of the character we are examining
to see whether it is repeated. */
to see whether it is repeated. */
unsigned int rep1;
/* Number of repetitions we have detected so far. */
unsigned int reps;
@@ -148,7 +150,7 @@ c_printstr (stream, string, length, width, force_ellipses)
reps = 1;
while (rep1 < length
&& extract_unsigned_integer (string + rep1 * width, width)
== current_char)
== current_char)
{
++rep1;
++reps;
@@ -230,191 +232,192 @@ c_create_fundamental_type (objfile, typeid)
switch (typeid)
{
default:
/* FIXME: For now, if we are asked to produce a type not in this
language, create the equivalent of a C integer type with the
name "<?type?>". When all the dust settles from the type
reconstruction work, this should probably become an error. */
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "<?type?>", objfile);
warning ("internal error: no C/C++ fundamental type %d", typeid);
break;
case FT_VOID:
type = init_type (TYPE_CODE_VOID,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "void", objfile);
break;
case FT_BOOLEAN:
type = init_type (TYPE_CODE_BOOL,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "bool", objfile);
break;
case FT_CHAR:
type = init_type (TYPE_CODE_INT,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "char", objfile);
TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
break;
case FT_SIGNED_CHAR:
type = init_type (TYPE_CODE_INT,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "signed char", objfile);
break;
case FT_UNSIGNED_CHAR:
type = init_type (TYPE_CODE_INT,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned char", objfile);
break;
case FT_SHORT:
type = init_type (TYPE_CODE_INT,
TARGET_SHORT_BIT / TARGET_CHAR_BIT,
0, "short", objfile);
break;
case FT_SIGNED_SHORT:
type = init_type (TYPE_CODE_INT,
TARGET_SHORT_BIT / TARGET_CHAR_BIT,
0, "short", objfile); /* FIXME-fnf */
break;
case FT_UNSIGNED_SHORT:
type = init_type (TYPE_CODE_INT,
TARGET_SHORT_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
break;
case FT_INTEGER:
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "int", objfile);
break;
case FT_SIGNED_INTEGER:
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "int", objfile); /* FIXME -fnf */
break;
case FT_UNSIGNED_INTEGER:
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
break;
case FT_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_BIT / TARGET_CHAR_BIT,
0, "long", objfile);
break;
case FT_SIGNED_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_BIT / TARGET_CHAR_BIT,
0, "long", objfile); /* FIXME -fnf */
break;
case FT_UNSIGNED_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
break;
case FT_LONG_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
0, "long long", objfile);
break;
case FT_SIGNED_LONG_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
0, "signed long long", objfile);
break;
case FT_UNSIGNED_LONG_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
break;
case FT_FLOAT:
type = init_type (TYPE_CODE_FLT,
TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
0, "float", objfile);
break;
case FT_DBL_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT,
TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
0, "double", objfile);
break;
case FT_EXT_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT,
TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
0, "long double", objfile);
break;
case FT_TEMPLATE_ARG:
type = init_type (TYPE_CODE_TEMPLATE_ARG,
0,
0, "<template arg>", objfile);
default:
/* FIXME: For now, if we are asked to produce a type not in this
language, create the equivalent of a C integer type with the
name "<?type?>". When all the dust settles from the type
reconstruction work, this should probably become an error. */
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "<?type?>", objfile);
warning ("internal error: no C/C++ fundamental type %d", typeid);
break;
case FT_VOID:
type = init_type (TYPE_CODE_VOID,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "void", objfile);
break;
case FT_BOOLEAN:
type = init_type (TYPE_CODE_BOOL,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "bool", objfile);
break;
}
break;
case FT_CHAR:
type = init_type (TYPE_CODE_INT,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "char", objfile);
TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
break;
case FT_SIGNED_CHAR:
type = init_type (TYPE_CODE_INT,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0, "signed char", objfile);
break;
case FT_UNSIGNED_CHAR:
type = init_type (TYPE_CODE_INT,
TARGET_CHAR_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned char", objfile);
break;
case FT_SHORT:
type = init_type (TYPE_CODE_INT,
TARGET_SHORT_BIT / TARGET_CHAR_BIT,
0, "short", objfile);
break;
case FT_SIGNED_SHORT:
type = init_type (TYPE_CODE_INT,
TARGET_SHORT_BIT / TARGET_CHAR_BIT,
0, "short", objfile); /* FIXME-fnf */
break;
case FT_UNSIGNED_SHORT:
type = init_type (TYPE_CODE_INT,
TARGET_SHORT_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
break;
case FT_INTEGER:
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "int", objfile);
break;
case FT_SIGNED_INTEGER:
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
0, "int", objfile); /* FIXME -fnf */
break;
case FT_UNSIGNED_INTEGER:
type = init_type (TYPE_CODE_INT,
TARGET_INT_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
break;
case FT_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_BIT / TARGET_CHAR_BIT,
0, "long", objfile);
break;
case FT_SIGNED_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_BIT / TARGET_CHAR_BIT,
0, "long", objfile); /* FIXME -fnf */
break;
case FT_UNSIGNED_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
break;
case FT_LONG_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
0, "long long", objfile);
break;
case FT_SIGNED_LONG_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
0, "signed long long", objfile);
break;
case FT_UNSIGNED_LONG_LONG:
type = init_type (TYPE_CODE_INT,
TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
break;
case FT_FLOAT:
type = init_type (TYPE_CODE_FLT,
TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
0, "float", objfile);
break;
case FT_DBL_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT,
TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
0, "double", objfile);
break;
case FT_EXT_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT,
TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
0, "long double", objfile);
break;
case FT_TEMPLATE_ARG:
type = init_type (TYPE_CODE_TEMPLATE_ARG,
0,
0, "<template arg>", objfile);
break;
}
return (type);
}
/* Table mapping opcodes into strings for printing operators
and precedences of the operators. */
const struct op_print c_op_print_tab[] =
{
{",", BINOP_COMMA, PREC_COMMA, 0},
{"=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{"||", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
{"&&", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
{"|", BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
{"^", BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
{"&", BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
{"==", BINOP_EQUAL, PREC_EQUAL, 0},
{"!=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{"<=", BINOP_LEQ, PREC_ORDER, 0},
{">=", BINOP_GEQ, PREC_ORDER, 0},
{">", BINOP_GTR, PREC_ORDER, 0},
{"<", BINOP_LESS, PREC_ORDER, 0},
{">>", BINOP_RSH, PREC_SHIFT, 0},
{"<<", BINOP_LSH, PREC_SHIFT, 0},
{"+", BINOP_ADD, PREC_ADD, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"%", BINOP_REM, PREC_MUL, 0},
{"@", BINOP_REPEAT, PREC_REPEAT, 0},
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"!", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"~", UNOP_COMPLEMENT, PREC_PREFIX, 0},
{"*", UNOP_IND, PREC_PREFIX, 0},
{"&", UNOP_ADDR, PREC_PREFIX, 0},
{"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
{
{",", BINOP_COMMA, PREC_COMMA, 0},
{"=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{"||", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
{"&&", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
{"|", BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
{"^", BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
{"&", BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
{"==", BINOP_EQUAL, PREC_EQUAL, 0},
{"!=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{"<=", BINOP_LEQ, PREC_ORDER, 0},
{">=", BINOP_GEQ, PREC_ORDER, 0},
{">", BINOP_GTR, PREC_ORDER, 0},
{"<", BINOP_LESS, PREC_ORDER, 0},
{">>", BINOP_RSH, PREC_SHIFT, 0},
{"<<", BINOP_LSH, PREC_SHIFT, 0},
{"+", BINOP_ADD, PREC_ADD, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"%", BINOP_REM, PREC_MUL, 0},
{"@", BINOP_REPEAT, PREC_REPEAT, 0},
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"!", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"~", UNOP_COMPLEMENT, PREC_PREFIX, 0},
{"*", UNOP_IND, PREC_PREFIX, 0},
{"&", UNOP_ADDR, PREC_PREFIX, 0},
{"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
/* C++ */
{"::", BINOP_SCOPE, PREC_PREFIX, 0},
{NULL, 0, 0, 0}
{"::", BINOP_SCOPE, PREC_PREFIX, 0},
{NULL, 0, 0, 0}
};
struct type ** CONST_PTR (c_builtin_types[]) =
struct type **CONST_PTR (c_builtin_types[]) =
{
&builtin_type_int,
&builtin_type_long,
&builtin_type_short,
&builtin_type_char,
&builtin_type_float,
&builtin_type_double,
&builtin_type_void,
&builtin_type_long_long,
&builtin_type_signed_char,
&builtin_type_unsigned_char,
&builtin_type_unsigned_short,
&builtin_type_unsigned_int,
&builtin_type_unsigned_long,
&builtin_type_unsigned_long_long,
&builtin_type_long_double,
&builtin_type_complex,
&builtin_type_double_complex,
0
&builtin_type_long,
&builtin_type_short,
&builtin_type_char,
&builtin_type_float,
&builtin_type_double,
&builtin_type_void,
&builtin_type_long_long,
&builtin_type_signed_char,
&builtin_type_unsigned_char,
&builtin_type_unsigned_short,
&builtin_type_unsigned_int,
&builtin_type_unsigned_long,
&builtin_type_unsigned_long_long,
&builtin_type_long_double,
&builtin_type_complex,
&builtin_type_double_complex,
0
};
const struct language_defn c_language_defn = {
const struct language_defn c_language_defn =
{
"c", /* Language name */
language_c,
c_builtin_types,
@@ -430,42 +433,43 @@ const struct language_defn c_language_defn = {
c_print_type, /* Print a type using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
&builtin_type_char, /* Type of string elements */
LANG_MAGIC
};
struct type ** const (cplus_builtin_types[]) =
struct type **const (cplus_builtin_types[]) =
{
&builtin_type_int,
&builtin_type_long,
&builtin_type_short,
&builtin_type_char,
&builtin_type_float,
&builtin_type_double,
&builtin_type_void,
&builtin_type_long_long,
&builtin_type_signed_char,
&builtin_type_unsigned_char,
&builtin_type_unsigned_short,
&builtin_type_unsigned_int,
&builtin_type_unsigned_long,
&builtin_type_unsigned_long_long,
&builtin_type_long_double,
&builtin_type_complex,
&builtin_type_double_complex,
&builtin_type_bool,
0
&builtin_type_long,
&builtin_type_short,
&builtin_type_char,
&builtin_type_float,
&builtin_type_double,
&builtin_type_void,
&builtin_type_long_long,
&builtin_type_signed_char,
&builtin_type_unsigned_char,
&builtin_type_unsigned_short,
&builtin_type_unsigned_int,
&builtin_type_unsigned_long,
&builtin_type_unsigned_long_long,
&builtin_type_long_double,
&builtin_type_complex,
&builtin_type_double_complex,
&builtin_type_bool,
0
};
const struct language_defn cplus_language_defn = {
"c++", /* Language name */
const struct language_defn cplus_language_defn =
{
"c++", /* Language name */
language_cplus,
cplus_builtin_types,
range_check_off,
@@ -480,18 +484,19 @@ const struct language_defn cplus_language_defn = {
c_print_type, /* Print a type using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
&builtin_type_char, /* Type of string elements */
LANG_MAGIC
};
const struct language_defn asm_language_defn = {
const struct language_defn asm_language_defn =
{
"asm", /* Language name */
language_asm,
c_builtin_types,
@@ -507,14 +512,14 @@ const struct language_defn asm_language_defn = {
c_print_type, /* Print a type using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
c_value_print, /* Print a top-level value */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
{"", "", "", ""}, /* Binary format info */
{"0%lo", "0", "o", ""}, /* Octal format info */
{"%ld", "", "d", ""}, /* Decimal format info */
{"0x%lx", "0x", "x", ""}, /* Hex format info */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
&builtin_type_char, /* Type of string elements */
LANG_MAGIC
};

View File

@@ -1,21 +1,22 @@
/* C language support definitions for GDB, the GNU debugger.
Copyright 1992, 1996 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (C_LANG_H)
@@ -42,15 +43,15 @@ c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
/* These are in c-lang.c: */
extern void c_printchar PARAMS ((int, GDB_FILE*));
extern void c_printchar PARAMS ((int, GDB_FILE *));
extern void c_printstr PARAMS ((GDB_FILE *stream, char *string,
extern void c_printstr PARAMS ((GDB_FILE * stream, char *string,
unsigned int length, int width,
int force_ellipses));
extern struct type * c_create_fundamental_type PARAMS ((struct objfile*, int));
extern struct type *c_create_fundamental_type PARAMS ((struct objfile *, int));
extern struct type ** CONST_PTR (c_builtin_types[]);
extern struct type **CONST_PTR (c_builtin_types[]);
/* These are in c-typeprint.c: */
@@ -75,7 +76,7 @@ cp_print_class_method PARAMS ((char *, struct type *, GDB_FILE *));
extern void
cp_print_value_fields PARAMS ((struct type *, struct type *, char *, int, CORE_ADDR,
GDB_FILE *, int, int, enum val_prettyprint,
struct type**, int));
struct type **, int));
extern int
cp_is_vtbl_ptr_type PARAMS ((struct type *));
@@ -84,4 +85,4 @@ extern int
cp_is_vtbl_member PARAMS ((struct type *));
#endif /* !defined (C_LANG_H) */
#endif /* !defined (C_LANG_H) */

View File

@@ -2,21 +2,22 @@
Copyright 1986, 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1998, 1999
Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "obstack.h"
@@ -41,6 +42,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Flag indicating target was compiled by HP compiler */
extern int hp_som_som_object_present;
static void cp_type_print_method_args PARAMS ((struct type ** args, char *prefix, char *varstring, int staticp, GDB_FILE * stream));
static void
c_type_print_args PARAMS ((struct type *, GDB_FILE *));
@@ -52,58 +55,58 @@ c_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *, int, int));
static void
c_type_print_cv_qualifier PARAMS ((struct type *, GDB_FILE *, int, int));
/* Print a description of a type in the format of a
typedef for the current language.
NEW is the new name for a type TYPE. */
void
c_typedef_print (type, new, stream)
struct type *type;
struct symbol *new;
GDB_FILE *stream;
struct type *type;
struct symbol *new;
GDB_FILE *stream;
{
CHECK_TYPEDEF (type);
switch (current_language->la_language)
{
switch (current_language->la_language)
{
#ifdef _LANG_c
case language_c:
case language_cplus:
fprintf_filtered(stream, "typedef ");
type_print(type,"",stream,0);
if(TYPE_NAME ((SYMBOL_TYPE (new))) == 0
|| !STREQ (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)))
fprintf_filtered(stream, " %s", SYMBOL_SOURCE_NAME(new));
case language_c:
case language_cplus:
fprintf_filtered (stream, "typedef ");
type_print (type, "", stream, 0);
if (TYPE_NAME ((SYMBOL_TYPE (new))) == 0
|| !STREQ (TYPE_NAME ((SYMBOL_TYPE (new))), SYMBOL_NAME (new)))
fprintf_filtered (stream, " %s", SYMBOL_SOURCE_NAME (new));
break;
#endif
#ifdef _LANG_m2
case language_m2:
fprintf_filtered(stream, "TYPE ");
if(!TYPE_NAME(SYMBOL_TYPE(new)) ||
!STREQ (TYPE_NAME(SYMBOL_TYPE(new)), SYMBOL_NAME(new)))
fprintf_filtered(stream, "%s = ", SYMBOL_SOURCE_NAME(new));
case language_m2:
fprintf_filtered (stream, "TYPE ");
if (!TYPE_NAME (SYMBOL_TYPE (new)) ||
!STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new)))
fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new));
else
fprintf_filtered(stream, "<builtin> = ");
type_print(type,"",stream,0);
fprintf_filtered (stream, "<builtin> = ");
type_print (type, "", stream, 0);
break;
#endif
#ifdef _LANG_chill
case language_chill:
fprintf_filtered(stream, "SYNMODE ");
if(!TYPE_NAME(SYMBOL_TYPE(new)) ||
!STREQ (TYPE_NAME(SYMBOL_TYPE(new)), SYMBOL_NAME(new)))
fprintf_filtered(stream, "%s = ", SYMBOL_SOURCE_NAME(new));
case language_chill:
fprintf_filtered (stream, "SYNMODE ");
if (!TYPE_NAME (SYMBOL_TYPE (new)) ||
!STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new)))
fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new));
else
fprintf_filtered(stream, "<builtin> = ");
type_print(type,"",stream,0);
fprintf_filtered (stream, "<builtin> = ");
type_print (type, "", stream, 0);
break;
#endif
default:
error("Language not supported.");
}
fprintf_filtered(stream, ";\n");
default:
error ("Language not supported.");
}
fprintf_filtered (stream, ";\n");
}
@@ -127,8 +130,8 @@ c_print_type (type, varstring, stream, show, level)
code = TYPE_CODE (type);
if ((varstring != NULL && *varstring != '\0')
||
/* Need a space if going to print stars or brackets;
but not if we will print just a type name. */
/* Need a space if going to print stars or brackets;
but not if we will print just a type name. */
((show > 0 || TYPE_NAME (type) == 0)
&&
(code == TYPE_CODE_PTR || code == TYPE_CODE_FUNC
@@ -144,33 +147,33 @@ c_print_type (type, varstring, stream, show, level)
fputs_filtered (varstring, stream);
/* For demangled function names, we have the arglist as part of the name,
so don't print an additional pair of ()'s */
so don't print an additional pair of ()'s */
demangled_args = strchr(varstring, '(') != NULL;
demangled_args = strchr (varstring, '(') != NULL;
c_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
}
}
/* If TYPE is a derived type, then print out derivation information.
Print only the actual base classes of this type, not the base classes
of the base classes. I.E. for the derivation hierarchy:
class A { int a; };
class B : public A {int b; };
class C : public B {int c; };
class A { int a; };
class B : public A {int b; };
class C : public B {int c; };
Print the type of class C as:
class C : public B {
int c;
}
class C : public B {
int c;
}
Not as the following (like gdb used to), which is not legal C++ syntax for
derived types and may be confused with the multiple inheritance form:
class C : public B : public A {
int c;
}
class C : public B : public A {
int c;
}
In general, gdb should try to print the types as closely as possible to
the form that they appear in the source code.
@@ -190,9 +193,9 @@ cp_type_print_derivation_info (stream, type)
{
fputs_filtered (i == 0 ? ": " : ", ", stream);
fprintf_filtered (stream, "%s%s ",
BASETYPE_VIA_PUBLIC (type, i) ? "public"
: (TYPE_FIELD_PROTECTED (type, i) ? "protected" : "private"),
BASETYPE_VIA_VIRTUAL(type, i) ? " virtual" : "");
BASETYPE_VIA_PUBLIC (type, i) ? "public"
: (TYPE_FIELD_PROTECTED (type, i) ? "protected" : "private"),
BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : "");
name = type_name_no_tag (TYPE_BASECLASS (type, i));
fprintf_filtered (stream, "%s", name ? name : "(null)");
}
@@ -202,8 +205,8 @@ cp_type_print_derivation_info (stream, type)
}
}
/* Print the C++ method arguments ARGS to the file STREAM. */
void
static void
cp_type_print_method_args (args, prefix, varstring, staticp, stream)
struct type **args;
char *prefix;
@@ -212,33 +215,34 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
GDB_FILE *stream;
{
int i;
fprintf_symbol_filtered (stream, prefix, language_cplus, DMGL_ANSI);
fprintf_symbol_filtered (stream, varstring, language_cplus, DMGL_ANSI);
fputs_filtered ("(", stream);
if (args && args[!staticp] && args[!staticp]->code != TYPE_CODE_VOID)
{
i = !staticp; /* skip the class variable */
i = !staticp; /* skip the class variable */
while (1)
{
type_print (args[i++], "", stream, 0);
if (!args[i])
{
fprintf_filtered (stream, " ...");
break;
}
else if (args[i]->code != TYPE_CODE_VOID)
{
fprintf_filtered (stream, ", ");
}
else break;
}
{
type_print (args[i++], "", stream, 0);
if (!args[i])
{
fprintf_filtered (stream, " ...");
break;
}
else if (args[i]->code != TYPE_CODE_VOID)
{
fprintf_filtered (stream, ", ");
}
else
break;
}
}
else if (current_language->la_language == language_cplus)
{
fprintf_filtered (stream, "void");
}
fprintf_filtered (stream, ")");
}
@@ -284,7 +288,7 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
if (name)
fputs_filtered (name, stream);
else
c_type_print_base (TYPE_DOMAIN_TYPE (type), stream, 0, passed_a_ptr);
c_type_print_base (TYPE_DOMAIN_TYPE (type), stream, 0, passed_a_ptr);
fprintf_filtered (stream, "::");
break;
@@ -335,7 +339,7 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
case TYPE_CODE_COMPLEX:
case TYPE_CODE_TYPEDEF:
/* These types need no prefix. They are listed here so that
gcc -Wall will reveal any types that haven't been handled. */
gcc -Wall will reveal any types that haven't been handled. */
break;
}
}
@@ -347,25 +351,25 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
static void
c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
struct type *type;
GDB_FILE *stream;
int need_pre_space;
int need_post_space;
struct type *type;
GDB_FILE *stream;
int need_pre_space;
int need_post_space;
{
int flag = 0;
if (TYPE_CONST (type))
{
if (need_pre_space)
fprintf_filtered (stream, " ");
fprintf_filtered (stream, " ");
fprintf_filtered (stream, "const");
flag = 1;
}
if (TYPE_VOLATILE (type))
{
if (flag || need_pre_space)
fprintf_filtered (stream, " ");
fprintf_filtered (stream, " ");
fprintf_filtered (stream, "volatile");
flag = 1;
}
@@ -394,10 +398,10 @@ c_type_print_args (type, stream)
fprintf_filtered (stream, "...");
}
else if ((args[1]->code == TYPE_CODE_VOID) &&
(current_language->la_language == language_cplus))
{
fprintf_filtered (stream, "void");
}
(current_language->la_language == language_cplus))
{
fprintf_filtered (stream, "void");
}
else
{
for (i = 1;
@@ -405,11 +409,11 @@ c_type_print_args (type, stream)
i++)
{
c_print_type (args[i], "", stream, -1, 0);
if (args[i+1] == NULL)
if (args[i + 1] == NULL)
{
fprintf_filtered (stream, "...");
}
else if (args[i+1]->code != TYPE_CODE_VOID)
else if (args[i + 1]->code != TYPE_CODE_VOID)
{
fprintf_filtered (stream, ",");
wrap_here (" ");
@@ -421,7 +425,7 @@ c_type_print_args (type, stream)
{
fprintf_filtered (stream, "void");
}
fprintf_filtered (stream, ")");
}
@@ -450,15 +454,15 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
case TYPE_CODE_ARRAY:
if (passed_a_ptr)
fprintf_filtered (stream, ")");
fprintf_filtered (stream, "[");
if (TYPE_LENGTH (type) >= 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
&& TYPE_ARRAY_UPPER_BOUND_TYPE(type) != BOUND_CANNOT_BE_DETERMINED)
&& TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
fprintf_filtered (stream, "%d",
(TYPE_LENGTH (type)
/ TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
fprintf_filtered (stream, "]");
c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
break;
@@ -487,22 +491,23 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
if (passed_a_ptr)
fprintf_filtered (stream, ")");
if (!demangled_args)
{ int i, len = TYPE_NFIELDS (type);
{
int i, len = TYPE_NFIELDS (type);
fprintf_filtered (stream, "(");
if ((len == 0) && (current_language->la_language == language_cplus))
{
fprintf_filtered (stream, "void");
}
else
for (i = 0; i < len; i++)
{
if (i > 0)
{
fputs_filtered (", ", stream);
wrap_here (" ");
}
c_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0);
}
if ((len == 0) && (current_language->la_language == language_cplus))
{
fprintf_filtered (stream, "void");
}
else
for (i = 0; i < len; i++)
{
if (i > 0)
{
fputs_filtered (", ", stream);
wrap_here (" ");
}
c_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0);
}
fprintf_filtered (stream, ")");
}
c_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
@@ -526,7 +531,7 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
case TYPE_CODE_COMPLEX:
case TYPE_CODE_TYPEDEF:
/* These types do not need a suffix. They are listed so that
gcc -Wall will report types that may not have been considered. */
gcc -Wall will report types that may not have been considered. */
break;
}
}
@@ -560,7 +565,11 @@ c_type_print_base (type, stream, show, level)
char *mangled_name;
char *demangled_name;
char *demangled_no_static;
enum {s_none, s_public, s_private, s_protected} section_type;
enum
{
s_none, s_public, s_private, s_protected
}
section_type;
int need_access_label = 0;
int j, len2;
@@ -588,7 +597,7 @@ c_type_print_base (type, stream, show, level)
}
CHECK_TYPEDEF (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_TYPEDEF:
@@ -606,28 +615,32 @@ c_type_print_base (type, stream, show, level)
/* Note TYPE_CODE_STRUCT and TYPE_CODE_CLASS have the same value,
* so we use another means for distinguishing them.
*/
if (HAVE_CPLUS_STRUCT (type)) {
switch (TYPE_DECLARED_TYPE(type)) {
case DECLARED_TYPE_CLASS:
fprintf_filtered (stream, "class ");
break;
case DECLARED_TYPE_UNION:
fprintf_filtered (stream, "union ");
break;
case DECLARED_TYPE_STRUCT:
fprintf_filtered (stream, "struct ");
break;
default:
/* If there is a CPLUS_STRUCT, assume class if not
* otherwise specified in the declared_type field.
*/
fprintf_filtered (stream, "class ");
break;
} /* switch */
} else {
/* If not CPLUS_STRUCT, then assume it's a C struct */
fprintf_filtered (stream, "struct ");
}
if (HAVE_CPLUS_STRUCT (type))
{
switch (TYPE_DECLARED_TYPE (type))
{
case DECLARED_TYPE_CLASS:
fprintf_filtered (stream, "class ");
break;
case DECLARED_TYPE_UNION:
fprintf_filtered (stream, "union ");
break;
case DECLARED_TYPE_STRUCT:
fprintf_filtered (stream, "struct ");
break;
default:
/* If there is a CPLUS_STRUCT, assume class if not
* otherwise specified in the declared_type field.
*/
fprintf_filtered (stream, "class ");
break;
} /* switch */
}
else
{
/* If not CPLUS_STRUCT, then assume it's a C struct */
fprintf_filtered (stream, "struct ");
}
goto struct_union;
case TYPE_CODE_UNION:
@@ -643,7 +656,7 @@ c_type_print_base (type, stream, show, level)
* want to print.
*/
if (TYPE_TAG_NAME (type) != NULL &&
strncmp(TYPE_TAG_NAME(type), "{unnamed", 8))
strncmp (TYPE_TAG_NAME (type), "{unnamed", 8))
{
fputs_filtered (TYPE_TAG_NAME (type), stream);
if (show > 0)
@@ -659,7 +672,7 @@ c_type_print_base (type, stream, show, level)
else if (show > 0 || TYPE_TAG_NAME (type) == NULL)
{
cp_type_print_derivation_info (stream, type);
fprintf_filtered (stream, "{\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
@@ -675,71 +688,71 @@ c_type_print_base (type, stream, show, level)
section_type = s_none;
/* For a class, if all members are private, there's no need
for a "private:" label; similarly, for a struct or union
masquerading as a class, if all members are public, there's
no need for a "public:" label. */
/* For a class, if all members are private, there's no need
for a "private:" label; similarly, for a struct or union
masquerading as a class, if all members are public, there's
no need for a "public:" label. */
if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_CLASS) ||
(TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_TEMPLATE))
{
QUIT;
len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
if (!TYPE_FIELD_PRIVATE (type, i))
{
need_access_label = 1;
break;
}
QUIT;
if (!need_access_label)
{
len2 = TYPE_NFN_FIELDS (type);
for (j = 0; j < len2; j++)
{
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
for (i = 0; i < len; i++)
if (!TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type, j), i))
{
need_access_label = 1;
break;
}
if (need_access_label)
break;
}
}
}
else if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_STRUCT) ||
(TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_UNION))
{
QUIT;
len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
if (TYPE_FIELD_PRIVATE (type, i) || TYPE_FIELD_PROTECTED (type, i))
{
need_access_label = 1;
break;
}
QUIT;
if (!need_access_label)
{
len2 = TYPE_NFN_FIELDS (type);
for (j = 0; j < len2; j++)
{
QUIT;
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
for (i = 0; i < len; i++)
if (TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type, j), i) ||
TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1 (type, j), i))
{
need_access_label = 1;
break;
}
if (need_access_label)
break;
}
}
}
if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_CLASS) ||
(TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_TEMPLATE))
{
QUIT;
len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
if (!TYPE_FIELD_PRIVATE (type, i))
{
need_access_label = 1;
break;
}
QUIT;
if (!need_access_label)
{
len2 = TYPE_NFN_FIELDS (type);
for (j = 0; j < len2; j++)
{
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
for (i = 0; i < len; i++)
if (!TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type, j), i))
{
need_access_label = 1;
break;
}
if (need_access_label)
break;
}
}
}
else if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_STRUCT) ||
(TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_UNION))
{
QUIT;
len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
if (TYPE_FIELD_PRIVATE (type, i) || TYPE_FIELD_PROTECTED (type, i))
{
need_access_label = 1;
break;
}
QUIT;
if (!need_access_label)
{
len2 = TYPE_NFN_FIELDS (type);
for (j = 0; j < len2; j++)
{
QUIT;
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
for (i = 0; i < len; i++)
if (TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type, j), i) ||
TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1 (type, j), i))
{
need_access_label = 1;
break;
}
if (need_access_label)
break;
}
}
}
/* If there is a base class for this type,
do not print the field that it occupies. */
@@ -749,17 +762,17 @@ c_type_print_base (type, stream, show, level)
{
QUIT;
/* Don't print out virtual function table. */
/* HP ANSI C++ case */
if (TYPE_HAS_VTABLE(type) && (STREQN (TYPE_FIELD_NAME (type, i), "__vfp", 5)))
continue;
/* Other compilers */
/* pai:: FIXME : check for has_vtable < 0 */
/* HP ANSI C++ case */
if (TYPE_HAS_VTABLE (type) && (STREQN (TYPE_FIELD_NAME (type, i), "__vfp", 5)))
continue;
/* Other compilers */
/* pai:: FIXME : check for has_vtable < 0 */
if (STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
&& is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
continue;
/* If this is a C++ class we can print the various C++ section
labels. */
labels. */
if (HAVE_CPLUS_STRUCT (type) && need_access_label)
{
@@ -815,7 +828,7 @@ c_type_print_base (type, stream, show, level)
/* If there are both fields and methods, put a space between. */
len = TYPE_NFN_FIELDS (type);
if (len && section_type != s_none)
fprintf_filtered (stream, "\n");
fprintf_filtered (stream, "\n");
/* C++: print out the methods */
for (i = 0; i < len; i++)
@@ -824,16 +837,16 @@ c_type_print_base (type, stream, show, level)
int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
char *name = type_name_no_tag (type);
int is_constructor = name && STREQ(method_name, name);
int is_constructor = name && STREQ (method_name, name);
for (j = 0; j < len2; j++)
{
char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
int is_full_physname_constructor =
((physname[0] == '_' && physname[1] == '_'
&& strchr ("0123456789Qt", physname[2]))
|| STREQN (physname, "__ct__", 6)
|| DESTRUCTOR_PREFIX_P (physname)
|| STREQN (physname, "__dt__", 6));
int is_full_physname_constructor =
((physname[0] == '_' && physname[1] == '_'
&& strchr ("0123456789Qt", physname[2]))
|| STREQN (physname, "__ct__", 6)
|| DESTRUCTOR_PREFIX_P (physname)
|| STREQN (physname, "__dt__", 6));
QUIT;
if (TYPE_FN_FIELD_PROTECTED (f, j))
@@ -871,13 +884,13 @@ c_type_print_base (type, stream, show, level)
{
/* Keep GDB from crashing here. */
fprintf_filtered (stream, "<undefined type> %s;\n",
TYPE_FN_FIELD_PHYSNAME (f, j));
TYPE_FN_FIELD_PHYSNAME (f, j));
break;
}
else if (!is_constructor && /* constructors don't have declared types */
!is_full_physname_constructor && /* " " */
!strstr (method_name, "operator ")) /* Not a type conversion operator */
/* (note space -- other operators don't have it) */
else if (!is_constructor && /* constructors don't have declared types */
!is_full_physname_constructor && /* " " */
!strstr (method_name, "operator ")) /* Not a type conversion operator */
/* (note space -- other operators don't have it) */
{
type_print (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)),
"", stream, -1);
@@ -895,14 +908,14 @@ c_type_print_base (type, stream, show, level)
if (demangled_name == NULL)
{
/* in some cases (for instance with the HP demangling),
if a function has more than 10 arguments,
the demangling will fail.
Let's try to reconstruct the function signature from
the symbol information */
if a function has more than 10 arguments,
the demangling will fail.
Let's try to reconstruct the function signature from
the symbol information */
if (!TYPE_FN_FIELD_STUB (f, j))
cp_type_print_method_args (TYPE_FN_FIELD_ARGS (f, j), "",
method_name,
TYPE_FN_FIELD_STATIC_P (f, j),
TYPE_FN_FIELD_STATIC_P (f, j),
stream);
else
fprintf_filtered (stream, "<badly mangled name '%s'>",
@@ -912,8 +925,8 @@ c_type_print_base (type, stream, show, level)
{
char *p;
char *demangled_no_class = demangled_name;
while (p = strchr (demangled_no_class, ':'))
while ((p = strchr (demangled_no_class, ':')))
{
demangled_no_class = p;
if (*++demangled_no_class == ':')
@@ -926,7 +939,7 @@ c_type_print_base (type, stream, show, level)
int length = p - demangled_no_class;
demangled_no_static = (char *) xmalloc (length + 1);
strncpy (demangled_no_static, demangled_no_class, length);
*(demangled_no_static + length) = '\0';
*(demangled_no_static + length) = '\0';
fputs_filtered (demangled_no_static, stream);
free (demangled_no_static);
}
@@ -942,40 +955,40 @@ c_type_print_base (type, stream, show, level)
}
}
if (TYPE_LOCALTYPE_PTR (type) && show >= 0)
fprintfi_filtered (level, stream, " (Local at %s:%d)\n",
TYPE_LOCALTYPE_FILE (type),
TYPE_LOCALTYPE_LINE (type));
if (TYPE_LOCALTYPE_PTR (type) && show >= 0)
fprintfi_filtered (level, stream, " (Local at %s:%d)\n",
TYPE_LOCALTYPE_FILE (type),
TYPE_LOCALTYPE_LINE (type));
fprintfi_filtered (level, stream, "}");
}
if (TYPE_CODE(type) == TYPE_CODE_TEMPLATE)
goto go_back;
if (TYPE_CODE (type) == TYPE_CODE_TEMPLATE)
goto go_back;
break;
case TYPE_CODE_ENUM:
c_type_print_cv_qualifier (type, stream, 0, 1);
/* HP C supports sized enums */
if (hp_som_som_object_present)
switch (TYPE_LENGTH (type))
{
case 1:
fputs_filtered ("char ", stream);
break;
case 2:
fputs_filtered ("short ", stream);
break;
default:
break;
}
fprintf_filtered (stream, "enum ");
switch (TYPE_LENGTH (type))
{
case 1:
fputs_filtered ("char ", stream);
break;
case 2:
fputs_filtered ("short ", stream);
break;
default:
break;
}
fprintf_filtered (stream, "enum ");
/* Print the tag name if it exists.
The aCC compiler emits a spurious
"{unnamed struct}"/"{unnamed union}"/"{unnamed enum}"
tag for unnamed struct/union/enum's, which we don't
want to print. */
if (TYPE_TAG_NAME (type) != NULL &&
strncmp(TYPE_TAG_NAME(type), "{unnamed", 8))
strncmp (TYPE_TAG_NAME (type), "{unnamed", 8))
{
fputs_filtered (TYPE_TAG_NAME (type), stream);
if (show > 0)
@@ -997,7 +1010,8 @@ c_type_print_base (type, stream, show, level)
for (i = 0; i < len; i++)
{
QUIT;
if (i) fprintf_filtered (stream, ", ");
if (i)
fprintf_filtered (stream, ", ");
wrap_here (" ");
fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
if (lastval != TYPE_FIELD_BITPOS (type, i))
@@ -1031,41 +1045,45 @@ c_type_print_base (type, stream, show, level)
case TYPE_CODE_TEMPLATE:
/* Called on "ptype t" where "t" is a template.
Prints the template header (with args), e.g.:
template <class T1, class T2> class "
template <class T1, class T2> class "
and then merges with the struct/union/class code to
print the rest of the definition. */
c_type_print_cv_qualifier (type, stream, 0, 1);
fprintf_filtered (stream, "template <");
for (i = 0; i < TYPE_NTEMPLATE_ARGS(type); i++) {
struct template_arg templ_arg;
templ_arg = TYPE_TEMPLATE_ARG(type, i);
fprintf_filtered (stream, "class %s", templ_arg.name);
if (i < TYPE_NTEMPLATE_ARGS(type)-1)
fprintf_filtered (stream, ", ");
}
for (i = 0; i < TYPE_NTEMPLATE_ARGS (type); i++)
{
struct template_arg templ_arg;
templ_arg = TYPE_TEMPLATE_ARG (type, i);
fprintf_filtered (stream, "class %s", templ_arg.name);
if (i < TYPE_NTEMPLATE_ARGS (type) - 1)
fprintf_filtered (stream, ", ");
}
fprintf_filtered (stream, "> class ");
/* Yuck, factor this out to a subroutine so we can call
it and return to the point marked with the "goback:" label... - RT */
goto struct_union;
go_back:
if (TYPE_NINSTANTIATIONS(type) > 0) {
fprintf_filtered (stream, "\ntemplate instantiations:\n");
for (i = 0; i < TYPE_NINSTANTIATIONS(type); i++) {
fprintf_filtered(stream, " ");
c_type_print_base (TYPE_INSTANTIATION(type, i), stream, 0, level);
if (i < TYPE_NINSTANTIATIONS(type)-1) fprintf_filtered(stream, "\n");
}
}
goto struct_union;
go_back:
if (TYPE_NINSTANTIATIONS (type) > 0)
{
fprintf_filtered (stream, "\ntemplate instantiations:\n");
for (i = 0; i < TYPE_NINSTANTIATIONS (type); i++)
{
fprintf_filtered (stream, " ");
c_type_print_base (TYPE_INSTANTIATION (type, i), stream, 0, level);
if (i < TYPE_NINSTANTIATIONS (type) - 1)
fprintf_filtered (stream, "\n");
}
}
break;
default:
/* Handle types not explicitly handled by the other cases,
such as fundamental types. For these, just print whatever
the type name is, as recorded in the type itself. If there
is no type name, then complain. */
such as fundamental types. For these, just print whatever
the type name is, as recorded in the type itself. If there
is no type name, then complain. */
if (TYPE_NAME (type) != NULL)
{
c_type_print_cv_qualifier (type, stream, 0, 1);
c_type_print_cv_qualifier (type, stream, 0, 1);
fputs_filtered (TYPE_NAME (type), stream);
}
else
@@ -1078,12 +1096,3 @@ go_back:
break;
}
}

View File

@@ -1,22 +1,23 @@
/* Support for printing C values for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997
Free Software Foundation, Inc.
Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "symtab.h"
@@ -27,8 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "valprint.h"
#include "language.h"
#include "c-lang.h"
/* Print data of type TYPE located at VALADDR (within GDB), which came from
the inferior at address ADDRESS, onto stdio stream STREAM according to
FORMAT (a letter or 0 for natural format). The data at VALADDR is in
@@ -55,7 +56,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
int recurse;
enum val_prettyprint pretty;
{
register unsigned int i = 0; /* Number of characters printed */
register unsigned int i = 0; /* Number of characters printed */
unsigned len;
struct type *elttype;
unsigned eltlen;
@@ -83,11 +84,11 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
&& (format == 0 || format == 's'))
{
/* If requested, look for the first null char and only print
elements up to it. */
elements up to it. */
if (stop_print_at_null)
{
int temp_len;
/* Look for a NULL char. */
for (temp_len = 0;
(valaddr + embedded_offset)[temp_len]
@@ -95,7 +96,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
temp_len++);
len = temp_len;
}
LA_PRINT_STRING (stream, valaddr + embedded_offset, len, eltlen, 0);
i = len;
}
@@ -103,7 +104,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
{
fprintf_filtered (stream, "{");
/* If this is a virtual function table, print the 0th
entry specially, and the rest of the members normally. */
entry specially, and the rest of the members normally. */
if (cp_is_vtbl_ptr_type (elttype))
{
i = 1;
@@ -114,7 +115,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
i = 0;
}
val_print_array_elements (type, valaddr + embedded_offset, address, stream,
format, deref_ref, recurse, pretty, i);
format, deref_ref, recurse, pretty, i);
fprintf_filtered (stream, "}");
}
break;
@@ -129,13 +130,13 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
break;
}
if (vtblprint && cp_is_vtbl_ptr_type(type))
if (vtblprint && cp_is_vtbl_ptr_type (type))
{
/* Print the unmangled name if desired. */
/* Print the unmangled name if desired. */
/* Print vtable entry - we only get here if we ARE using
-fvtable_thunks. (Otherwise, look under TYPE_CODE_STRUCT.) */
print_address_demangle(extract_address (valaddr + embedded_offset, TYPE_LENGTH (type)),
stream, demangle);
print_address_demangle (extract_address (valaddr + embedded_offset, TYPE_LENGTH (type)),
stream, demangle);
break;
}
elttype = check_typedef (TYPE_TARGET_TYPE (type));
@@ -153,7 +154,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
{
addr = unpack_pointer (type, valaddr + embedded_offset);
print_unpacked_pointer:
elttype = check_typedef (TYPE_TARGET_TYPE (type));
elttype = check_typedef (TYPE_TARGET_TYPE (type));
if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
{
@@ -179,13 +180,13 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
{
i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
}
else if (cp_is_vtbl_member(type))
{
else if (cp_is_vtbl_member (type))
{
/* print vtbl's nicely */
CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
struct minimal_symbol *msymbol =
lookup_minimal_symbol_by_pc (vt_address);
lookup_minimal_symbol_by_pc (vt_address);
if ((msymbol != NULL) &&
(vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
{
@@ -194,25 +195,25 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
fputs_filtered (">", stream);
}
if (vt_address && vtblprint)
{
{
value_ptr vt_val;
struct symbol *wsym = (struct symbol *)NULL;
struct type *wtype;
struct symbol *wsym = (struct symbol *) NULL;
struct type *wtype;
struct symtab *s;
struct block *block = (struct block *)NULL;
struct block *block = (struct block *) NULL;
int is_this_fld;
if (msymbol != NULL)
wsym = lookup_symbol (SYMBOL_NAME(msymbol), block,
VAR_NAMESPACE, &is_this_fld, &s);
wsym = lookup_symbol (SYMBOL_NAME (msymbol), block,
VAR_NAMESPACE, &is_this_fld, &s);
if (wsym)
{
wtype = SYMBOL_TYPE(wsym);
wtype = SYMBOL_TYPE (wsym);
}
else
{
wtype = TYPE_TARGET_TYPE(type);
wtype = TYPE_TARGET_TYPE (type);
}
vt_val = value_at (wtype, vt_address, NULL);
val_print (VALUE_TYPE (vt_val), VALUE_CONTENTS (vt_val), 0,
@@ -223,8 +224,8 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
fprintf_filtered (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
}
}
}
}
/* Return number of characters printed, including the terminating
'\0' if we reached the end. val_print_string takes care including
@@ -240,41 +241,41 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
case TYPE_CODE_REF:
elttype = check_typedef (TYPE_TARGET_TYPE (type));
if (TYPE_CODE (elttype) == TYPE_CODE_MEMBER)
{
{
cp_print_class_member (valaddr + embedded_offset,
TYPE_DOMAIN_TYPE (elttype),
stream, "");
break;
}
if (addressprint)
{
{
fprintf_filtered (stream, "@");
print_address_numeric
(extract_address (valaddr + embedded_offset,
TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
if (deref_ref)
fputs_filtered (": ", stream);
}
}
/* De-reference the reference. */
if (deref_ref)
{
if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
{
value_ptr deref_val =
value_at
(TYPE_TARGET_TYPE (type),
unpack_pointer (lookup_pointer_type (builtin_type_void),
valaddr + embedded_offset),
NULL);
value_at
(TYPE_TARGET_TYPE (type),
unpack_pointer (lookup_pointer_type (builtin_type_void),
valaddr + embedded_offset),
NULL);
val_print (VALUE_TYPE (deref_val),
VALUE_CONTENTS (deref_val),
0,
VALUE_ADDRESS (deref_val),
stream,
format,
deref_ref,
recurse,
pretty);
VALUE_CONTENTS (deref_val),
0,
VALUE_ADDRESS (deref_val),
stream,
format,
deref_ref,
recurse,
pretty);
}
else
fputs_filtered ("???", stream);
@@ -289,16 +290,16 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
}
/* Fall through. */
case TYPE_CODE_STRUCT:
if (vtblprint && cp_is_vtbl_ptr_type(type))
if (vtblprint && cp_is_vtbl_ptr_type (type))
{
/* Print the unmangled name if desired. */
/* Print the unmangled name if desired. */
/* Print vtable entry - we only get here if NOT using
-fvtable_thunks. (Otherwise, look under TYPE_CODE_PTR.) */
print_address_demangle (extract_address (
valaddr + embedded_offset +
TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
stream, demangle);
print_address_demangle (extract_address (
valaddr + embedded_offset +
TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
stream, demangle);
}
else
cp_print_value_fields (type, type, valaddr, embedded_offset, address, stream, format,
@@ -338,7 +339,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
break;
}
/* FIXME, we should consider, at least for ANSI C language, eliminating
the distinction made between FUNCs and POINTERs to FUNCs. */
the distinction made between FUNCs and POINTERs to FUNCs. */
fprintf_filtered (stream, "{");
type_print (type, "", stream, -1);
fprintf_filtered (stream, "} ");
@@ -364,12 +365,12 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
case TYPE_CODE_RANGE:
/* FIXME: create_range_type does not set the unsigned bit in a
range type (I think it probably should copy it from the target
type), so we won't print values which are too large to
fit in a signed integer correctly. */
range type (I think it probably should copy it from the target
type), so we won't print values which are too large to
fit in a signed integer correctly. */
/* FIXME: Doesn't handle ranges of enums correctly. (Can't just
print with the target type, though, because the size of our type
and the target type might differ). */
print with the target type, though, because the size of our type
and the target type might differ). */
/* FALLTHROUGH */
case TYPE_CODE_INT:
@@ -402,10 +403,13 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
}
else
{
fprintf_filtered (stream, TYPE_UNSIGNED (type) ? "%u" : "%d",
unpack_long (type, valaddr + embedded_offset));
val = unpack_long (type, valaddr + embedded_offset);
if (TYPE_UNSIGNED (type))
fprintf_filtered (stream, "%u", (unsigned int) val);
else
fprintf_filtered (stream, "%d", (int) val);
fputs_filtered (" ", stream);
LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr + embedded_offset), stream);
LA_PRINT_CHAR ((unsigned char) val, stream);
}
break;
@@ -434,8 +438,8 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
case TYPE_CODE_UNDEF:
/* This happens (without TYPE_FLAG_STUB set) on systems which don't use
dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
and no complete type for struct foo in that file. */
dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
and no complete type for struct foo in that file. */
fprintf_filtered (stream, "<incomplete type>");
break;
@@ -454,9 +458,9 @@ c_value_print (val, stream, format, pretty)
enum val_prettyprint pretty;
{
struct type *type = VALUE_TYPE (val);
struct type * real_type;
struct type *real_type;
int full, top, using_enc;
/* If it is a pointer, indicate what it points to.
Print type also if it is a reference.
@@ -467,7 +471,7 @@ c_value_print (val, stream, format, pretty)
TYPE_CODE (type) == TYPE_CODE_REF)
{
/* Hack: remove (char *) for char strings. Their
type is indicated by the quoted string anyway. */
type is indicated by the quoted string anyway. */
if (TYPE_CODE (type) == TYPE_CODE_PTR &&
TYPE_NAME (type) == NULL &&
TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
@@ -476,28 +480,28 @@ c_value_print (val, stream, format, pretty)
/* Print nothing */
}
else if (objectprint && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
{
/* Pointer to class, check real type of object */
{
/* Pointer to class, check real type of object */
fprintf_filtered (stream, "(");
type = value_rtti_target_type (val, &full, &top, &using_enc);
if (type)
{
/* RTTI entry found */
type = lookup_pointer_type (type);
type_print (type, "", stream, -1);
}
else
{
/* No RTTI fields, do whatever we can */
type = VALUE_ENCLOSING_TYPE (val);
type_print (type, "", stream, -1);
fprintf_filtered (stream, " ?");
}
type = value_rtti_target_type (val, &full, &top, &using_enc);
if (type)
{
/* RTTI entry found */
type = lookup_pointer_type (type);
type_print (type, "", stream, -1);
}
else
{
/* No RTTI fields, do whatever we can */
type = VALUE_ENCLOSING_TYPE (val);
type_print (type, "", stream, -1);
fprintf_filtered (stream, " ?");
}
fprintf_filtered (stream, ") ");
}
}
else
{
/* normal case */
/* normal case */
fprintf_filtered (stream, "(");
type_print (type, "", stream, -1);
fprintf_filtered (stream, ") ");
@@ -507,29 +511,29 @@ c_value_print (val, stream, format, pretty)
{
/* Attempt to determine real type of object */
real_type = value_rtti_type (val, &full, &top, &using_enc);
if (real_type)
{
/* We have RTTI information, so use it */
val = value_full_object (val, real_type, full, top, using_enc);
fprintf_filtered (stream, "(%s%s) ",
TYPE_NAME (real_type),
full ? "" : " [incomplete object]");
/* Print out object: enclosing type is same as real_type if full */
return val_print (VALUE_ENCLOSING_TYPE (val), VALUE_CONTENTS_ALL (val), 0,
VALUE_ADDRESS (val), stream, format, 1, 0, pretty);
}
if (real_type)
{
/* We have RTTI information, so use it */
val = value_full_object (val, real_type, full, top, using_enc);
fprintf_filtered (stream, "(%s%s) ",
TYPE_NAME (real_type),
full ? "" : " [incomplete object]");
/* Print out object: enclosing type is same as real_type if full */
return val_print (VALUE_ENCLOSING_TYPE (val), VALUE_CONTENTS_ALL (val), 0,
VALUE_ADDRESS (val), stream, format, 1, 0, pretty);
}
else if (type != VALUE_ENCLOSING_TYPE (val))
{
/* No RTTI information, so let's do our best */
fprintf_filtered (stream, "(%s ?) ",
TYPE_NAME (VALUE_ENCLOSING_TYPE (val)));
return val_print (VALUE_ENCLOSING_TYPE (val), VALUE_CONTENTS_ALL (val), 0,
VALUE_ADDRESS (val), stream, format, 1, 0, pretty);
}
{
/* No RTTI information, so let's do our best */
fprintf_filtered (stream, "(%s ?) ",
TYPE_NAME (VALUE_ENCLOSING_TYPE (val)));
return val_print (VALUE_ENCLOSING_TYPE (val), VALUE_CONTENTS_ALL (val), 0,
VALUE_ADDRESS (val), stream, format, 1, 0, pretty);
}
/* Otherwise, we end up at the return outside this "if" */
}
return val_print (type, VALUE_CONTENTS_ALL (val), VALUE_EMBEDDED_OFFSET (val),
return val_print (type, VALUE_CONTENTS_ALL (val), VALUE_EMBEDDED_OFFSET (val),
VALUE_ADDRESS (val),
stream, format, 1, 0, pretty);
}

View File

@@ -1,19 +1,20 @@
/* Prototypes for GDB commands that are called internally by other functions.
Copyright 1992 Free Software Foundation, Inc.
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 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.
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. */
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. */
extern void
initialize_all_files PARAMS ((void));

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,22 @@
/* Chill language support routines for GDB, the GNU debugger.
Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "symtab.h"
@@ -26,23 +27,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "language.h"
#include "ch-lang.h"
static value_ptr
evaluate_subexp_chill PARAMS ((struct type *, struct expression *, int *, enum noside));
extern void _initialize_chill_language PARAMS ((void));
static value_ptr
value_chill_max_min PARAMS ((enum exp_opcode, value_ptr));
evaluate_subexp_chill PARAMS ((struct type *, struct expression *, int *, enum noside));
static value_ptr
value_chill_card PARAMS ((value_ptr));
value_chill_max_min PARAMS ((enum exp_opcode, value_ptr));
static value_ptr
value_chill_length PARAMS ((value_ptr));
value_chill_card PARAMS ((value_ptr));
static value_ptr
value_chill_length PARAMS ((value_ptr));
static struct type *
chill_create_fundamental_type PARAMS ((struct objfile *, int));
chill_create_fundamental_type PARAMS ((struct objfile *, int));
static void
chill_printstr PARAMS ((GDB_FILE *stream, char *string, unsigned int length, int width, int force_ellipses));
chill_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
static void
chill_printchar PARAMS ((int, GDB_FILE *));
@@ -108,7 +111,7 @@ chill_printchar (c, stream)
an explicit null byte. So we always assume an implied null byte
until gdb is able to maintain non-null terminated strings as well
as null terminated strings (FIXME).
*/
*/
static void
chill_printstr (stream, string, length, width, force_ellipses)
@@ -136,7 +139,7 @@ chill_printstr (stream, string, length, width, force_ellipses)
for (i = 0; i < length && things_printed < print_max; ++i)
{
/* Position of the character we are examining
to see whether it is repeated. */
to see whether it is repeated. */
unsigned int rep1;
/* Number of repetitions we have detected so far. */
unsigned int reps;
@@ -175,7 +178,7 @@ chill_printstr (stream, string, length, width, force_ellipses)
}
else
{
if (! in_literal_form && ! in_control_form)
if (!in_literal_form && !in_control_form)
fputs_filtered ("\"", stream);
if (PRINT_LITERAL_FORM (c))
{
@@ -237,90 +240,91 @@ chill_create_fundamental_type (objfile, typeid)
switch (typeid)
{
default:
/* FIXME: For now, if we are asked to produce a type not in this
language, create the equivalent of a C integer type with the
name "<?type?>". When all the dust settles from the type
reconstruction work, this should probably become an error. */
type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
warning ("internal error: no chill fundamental type %d", typeid);
break;
case FT_VOID:
/* FIXME: Currently the GNU Chill compiler emits some DWARF entries for
typedefs, unrelated to anything directly in the code being compiled,
that have some FT_VOID types. Just fake it for now. */
type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
break;
case FT_BOOLEAN:
type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
break;
case FT_CHAR:
type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
break;
case FT_SIGNED_CHAR:
type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
break;
case FT_UNSIGNED_CHAR:
type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
break;
case FT_SHORT: /* Chill ints are 2 bytes */
type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
break;
case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
break;
case FT_INTEGER: /* FIXME? */
case FT_SIGNED_INTEGER: /* FIXME? */
case FT_LONG: /* Chill longs are 4 bytes */
case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
break;
case FT_UNSIGNED_INTEGER: /* FIXME? */
case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
break;
case FT_FLOAT:
type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
break;
case FT_DBL_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
break;
}
default:
/* FIXME: For now, if we are asked to produce a type not in this
language, create the equivalent of a C integer type with the
name "<?type?>". When all the dust settles from the type
reconstruction work, this should probably become an error. */
type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
warning ("internal error: no chill fundamental type %d", typeid);
break;
case FT_VOID:
/* FIXME: Currently the GNU Chill compiler emits some DWARF entries for
typedefs, unrelated to anything directly in the code being compiled,
that have some FT_VOID types. Just fake it for now. */
type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
break;
case FT_BOOLEAN:
type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
break;
case FT_CHAR:
type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
break;
case FT_SIGNED_CHAR:
type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
break;
case FT_UNSIGNED_CHAR:
type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
break;
case FT_SHORT: /* Chill ints are 2 bytes */
type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
break;
case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
break;
case FT_INTEGER: /* FIXME? */
case FT_SIGNED_INTEGER: /* FIXME? */
case FT_LONG: /* Chill longs are 4 bytes */
case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
break;
case FT_UNSIGNED_INTEGER: /* FIXME? */
case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
break;
case FT_FLOAT:
type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
break;
case FT_DBL_PREC_FLOAT:
type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
break;
}
return (type);
}
/* Table of operators and their precedences for printing expressions. */
static const struct op_print chill_op_print_tab[] = {
{"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
{"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
{"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"MOD", BINOP_MOD, PREC_MUL, 0},
{"REM", BINOP_REM, PREC_MUL, 0},
{"SIZE",UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
{"LOWER",UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
{"UPPER",UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
{"CARD",UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
{"MAX",UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
{"MIN",UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
{":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{"=", BINOP_EQUAL, PREC_EQUAL, 0},
{"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{"<=", BINOP_LEQ, PREC_ORDER, 0},
{">=", BINOP_GEQ, PREC_ORDER, 0},
{">", BINOP_GTR, PREC_ORDER, 0},
{"<", BINOP_LESS, PREC_ORDER, 0},
{"+", BINOP_ADD, PREC_ADD, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"//", BINOP_CONCAT, PREC_PREFIX, 0}, /* FIXME: precedence? */
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"->", UNOP_IND, PREC_SUFFIX, 1},
{"->", UNOP_ADDR, PREC_PREFIX, 0},
{":", BINOP_RANGE, PREC_ASSIGN, 0},
{NULL, 0, 0, 0}
static const struct op_print chill_op_print_tab[] =
{
{"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
{"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
{"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"MOD", BINOP_MOD, PREC_MUL, 0},
{"REM", BINOP_REM, PREC_MUL, 0},
{"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
{"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
{"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
{"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
{"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
{"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
{":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{"=", BINOP_EQUAL, PREC_EQUAL, 0},
{"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{"<=", BINOP_LEQ, PREC_ORDER, 0},
{">=", BINOP_GEQ, PREC_ORDER, 0},
{">", BINOP_GTR, PREC_ORDER, 0},
{"<", BINOP_LESS, PREC_ORDER, 0},
{"+", BINOP_ADD, PREC_ADD, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"//", BINOP_CONCAT, PREC_PREFIX, 0}, /* FIXME: precedence? */
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"->", UNOP_IND, PREC_SUFFIX, 1},
{"->", UNOP_ADDR, PREC_PREFIX, 0},
{":", BINOP_RANGE, PREC_ASSIGN, 0},
{NULL, 0, 0, 0}
};
/* The built-in types of Chill. */
@@ -331,14 +335,14 @@ struct type *builtin_type_chill_long;
struct type *builtin_type_chill_ulong;
struct type *builtin_type_chill_real;
struct type ** CONST_PTR (chill_builtin_types[]) =
struct type **CONST_PTR (chill_builtin_types[]) =
{
&builtin_type_chill_bool,
&builtin_type_chill_char,
&builtin_type_chill_long,
&builtin_type_chill_ulong,
&builtin_type_chill_real,
0
&builtin_type_chill_char,
&builtin_type_chill_long,
&builtin_type_chill_ulong,
&builtin_type_chill_real,
0
};
/* Calculate LOWER or UPPER of TYPE.
@@ -347,7 +351,7 @@ struct type ** CONST_PTR (chill_builtin_types[]) =
LONGEST
type_lower_upper (op, type, result_type)
enum exp_opcode op; /* Either UNOP_LOWER or UNOP_UPPER */
enum exp_opcode op; /* Either UNOP_LOWER or UNOP_UPPER */
struct type *type;
struct type **result_type;
{
@@ -364,7 +368,7 @@ type_lower_upper (op, type, result_type)
case TYPE_CODE_ARRAY:
case TYPE_CODE_BITSTRING:
case TYPE_CODE_STRING:
type = TYPE_FIELD_TYPE (type, 0); /* Get index type */
type = TYPE_FIELD_TYPE (type, 0); /* Get index type */
/* ... fall through ... */
case TYPE_CODE_RANGE:
@@ -503,8 +507,8 @@ value_chill_max_min (op, val)
error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
? TYPE_TARGET_TYPE (elttype)
: elttype,
? TYPE_TARGET_TYPE (elttype)
: elttype,
tmp);
}
@@ -558,12 +562,12 @@ evaluate_subexp_chill (expect_type, exp, pos, noside)
for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
{
argvec[tem]
= evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem-1),
= evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
exp, pos, noside);
}
for (; tem <= nargs; tem++)
argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
argvec[tem] = 0; /* signal end of arglist */
argvec[tem] = 0; /* signal end of arglist */
return call_function_by_hand (argvec[0], nargs, argvec + 1);
default:
@@ -614,11 +618,12 @@ evaluate_subexp_chill (expect_type, exp, pos, noside)
}
return evaluate_subexp_standard (expect_type, exp, pos, noside);
nosideret:
nosideret:
return value_from_longest (builtin_type_long, (LONGEST) 1);
}
const struct language_defn chill_language_defn = {
const struct language_defn chill_language_defn =
{
"chill",
language_chill,
chill_builtin_types,
@@ -630,18 +635,18 @@ const struct language_defn chill_language_defn = {
chill_printchar, /* print a character constant */
chill_printstr, /* function to print a string constant */
NULL, /* Function to print a single char */
chill_create_fundamental_type,/* Create fundamental type in this language */
chill_create_fundamental_type, /* Create fundamental type in this language */
chill_print_type, /* Print a type using appropriate syntax */
chill_val_print, /* Print a value using appropriate syntax */
chill_value_print, /* Print a top-levl value */
{"", "B'", "", ""}, /* Binary format info */
{"O'%lo", "O'", "o", ""}, /* Octal format info */
{"D'%ld", "D'", "d", ""}, /* Decimal format info */
{"H'%lx", "H'", "x", ""}, /* Hex format info */
{"", "B'", "", ""}, /* Binary format info */
{"O'%lo", "O'", "o", ""}, /* Octal format info */
{"D'%ld", "D'", "d", ""}, /* Decimal format info */
{"H'%lx", "H'", "x", ""}, /* Hex format info */
chill_op_print_tab, /* expression operators for printing */
0, /* arrays are first-class (not c-style) */
0, /* String lower bound */
&builtin_type_chill_char, /* Type of string elements */
&builtin_type_chill_char, /* Type of string elements */
LANG_MAGIC
};

View File

@@ -1,25 +1,25 @@
/* Chill language support definitions for GDB, the GNU debugger.
Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifdef __STDC__ /* Forward decls for prototypes */
/* Forward decls for prototypes */
struct value;
#endif
extern int
chill_parse PARAMS ((void)); /* Defined in ch-exp.y */
@@ -39,4 +39,4 @@ chill_value_print PARAMS ((struct value *, GDB_FILE *,
int, enum val_prettyprint));
extern LONGEST
type_lower_upper PARAMS ((enum exp_opcode, struct type *, struct type **));
type_lower_upper PARAMS ((enum exp_opcode, struct type *, struct type **));

View File

@@ -1,21 +1,22 @@
/* Support for printing Chill types for GDB, the GNU debugger.
Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "obstack.h"
@@ -104,243 +105,246 @@ chill_type_print_base (type, stream, show, level)
switch (TYPE_CODE (type))
{
case TYPE_CODE_TYPEDEF:
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
case TYPE_CODE_PTR:
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
{
fprintf_filtered (stream,
TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
break;
}
fprintf_filtered (stream, "REF ");
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
case TYPE_CODE_TYPEDEF:
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
case TYPE_CODE_PTR:
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
{
fprintf_filtered (stream,
TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
break;
}
fprintf_filtered (stream, "REF ");
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
case TYPE_CODE_BOOL:
/* FIXME: we should probably just print the TYPE_NAME, in case
anyone ever fixes the compiler to give us the real names
in the presence of the chill equivalent of typedef (assuming
there is one). */
fprintf_filtered (stream,
TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
break;
case TYPE_CODE_BOOL:
/* FIXME: we should probably just print the TYPE_NAME, in case
anyone ever fixes the compiler to give us the real names
in the presence of the chill equivalent of typedef (assuming
there is one). */
fprintf_filtered (stream,
TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
break;
case TYPE_CODE_ARRAY:
fputs_filtered ("ARRAY (", stream);
range_type = TYPE_FIELD_TYPE (type, 0);
if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
chill_print_type (range_type, "", stream, 0, level);
case TYPE_CODE_ARRAY:
fputs_filtered ("ARRAY (", stream);
range_type = TYPE_FIELD_TYPE (type, 0);
if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
chill_print_type (range_type, "", stream, 0, level);
else
{
index_type = TYPE_TARGET_TYPE (range_type);
low_bound = TYPE_FIELD_BITPOS (range_type, 0);
high_bound = TYPE_FIELD_BITPOS (range_type, 1);
print_type_scalar (index_type, low_bound, stream);
fputs_filtered (":", stream);
print_type_scalar (index_type, high_bound, stream);
}
fputs_filtered (") ", stream);
chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
break;
case TYPE_CODE_BITSTRING:
fprintf_filtered (stream, "BOOLS (%d)",
TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE (type, 0), 1) + 1);
break;
case TYPE_CODE_SET:
fputs_filtered ("POWERSET ", stream);
chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
show - 1, level);
break;
case TYPE_CODE_STRING:
range_type = TYPE_FIELD_TYPE (type, 0);
index_type = TYPE_TARGET_TYPE (range_type);
high_bound = TYPE_FIELD_BITPOS (range_type, 1);
fputs_filtered ("CHARS (", stream);
print_type_scalar (index_type, high_bound + 1, stream);
fputs_filtered (")", stream);
break;
case TYPE_CODE_MEMBER:
fprintf_filtered (stream, "MEMBER ");
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
case TYPE_CODE_REF:
fprintf_filtered (stream, "/*LOC*/ ");
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
break;
case TYPE_CODE_FUNC:
fprintf_filtered (stream, "PROC (");
len = TYPE_NFIELDS (type);
for (i = 0; i < len; i++)
{
struct type *param_type = TYPE_FIELD_TYPE (type, i);
if (i > 0)
{
fputs_filtered (", ", stream);
wrap_here (" ");
}
if (TYPE_CODE (param_type) == TYPE_CODE_REF)
{
chill_type_print_base (TYPE_TARGET_TYPE (param_type),
stream, 0, level);
fputs_filtered (" LOC", stream);
}
else
chill_type_print_base (param_type, stream, show, level);
}
fprintf_filtered (stream, ")");
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
{
fputs_filtered (" RETURNS (", stream);
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
fputs_filtered (")", stream);
}
break;
case TYPE_CODE_STRUCT:
if (chill_varying_type (type))
{
chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
stream, 0, level);
fputs_filtered (" VARYING", stream);
}
else
{
fprintf_filtered (stream, "STRUCT ");
fprintf_filtered (stream, "(\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
{
fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
}
else
{
fprintfi_filtered (level + 4, stream, "<no data fields>\n");
}
}
else
{
len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
{
struct type *field_type = TYPE_FIELD_TYPE (type, i);
QUIT;
print_spaces_filtered (level + 4, stream);
if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
{
int j; /* variant number */
fputs_filtered ("CASE OF\n", stream);
for (j = 0; j < TYPE_NFIELDS (field_type); j++)
{
int k; /* variant field index */
struct type *variant_type
= TYPE_FIELD_TYPE (field_type, j);
int var_len = TYPE_NFIELDS (variant_type);
print_spaces_filtered (level + 4, stream);
if (strcmp (TYPE_FIELD_NAME (field_type, j),
"else") == 0)
fputs_filtered ("ELSE\n", stream);
else
fputs_filtered (":\n", stream);
if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
error ("variant record confusion");
for (k = 0; k < var_len; k++)
{
print_spaces_filtered (level + 8, stream);
chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
TYPE_FIELD_NAME (variant_type, k),
stream, show - 1, level + 8);
if (k < (var_len - 1))
fputs_filtered (",", stream);
fputs_filtered ("\n", stream);
}
}
print_spaces_filtered (level + 4, stream);
fputs_filtered ("ESAC", stream);
}
else
chill_print_type (field_type,
TYPE_FIELD_NAME (type, i),
stream, show - 1, level + 4);
if (i < (len - 1))
{
fputs_filtered (",", stream);
}
fputs_filtered ("\n", stream);
}
}
fprintfi_filtered (level, stream, ")");
}
break;
case TYPE_CODE_RANGE:
{
struct type *target = TYPE_TARGET_TYPE (type);
if (target && TYPE_NAME (target))
fputs_filtered (TYPE_NAME (target), stream);
else
{
index_type = TYPE_TARGET_TYPE (range_type);
low_bound = TYPE_FIELD_BITPOS (range_type, 0);
high_bound = TYPE_FIELD_BITPOS (range_type, 1);
print_type_scalar (index_type, low_bound, stream);
fputs_filtered (":", stream);
print_type_scalar (index_type, high_bound, stream);
}
fputs_filtered (") ", stream);
chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
break;
case TYPE_CODE_BITSTRING:
fprintf_filtered (stream, "BOOLS (%d)",
TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE(type,0), 1) + 1);
break;
case TYPE_CODE_SET:
fputs_filtered ("POWERSET ", stream);
chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
show - 1, level);
break;
case TYPE_CODE_STRING:
range_type = TYPE_FIELD_TYPE (type, 0);
index_type = TYPE_TARGET_TYPE (range_type);
high_bound = TYPE_FIELD_BITPOS (range_type, 1);
fputs_filtered ("CHARS (", stream);
print_type_scalar (index_type, high_bound + 1, stream);
fputs_filtered ("RANGE", stream);
if (target == NULL)
target = builtin_type_long;
fputs_filtered (" (", stream);
print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
fputs_filtered (":", stream);
print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
fputs_filtered (")", stream);
break;
}
break;
case TYPE_CODE_MEMBER:
fprintf_filtered (stream, "MEMBER ");
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
case TYPE_CODE_REF:
fprintf_filtered (stream, "/*LOC*/ ");
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
break;
case TYPE_CODE_FUNC:
fprintf_filtered (stream, "PROC (");
case TYPE_CODE_ENUM:
{
register int lastval = 0;
fprintf_filtered (stream, "SET (");
len = TYPE_NFIELDS (type);
for (i = 0; i < len; i++)
{
struct type *param_type = TYPE_FIELD_TYPE (type, i);
if (i > 0)
QUIT;
if (i)
fprintf_filtered (stream, ", ");
wrap_here (" ");
fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
if (lastval != TYPE_FIELD_BITPOS (type, i))
{
fputs_filtered (", ", stream);
wrap_here (" ");
fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
lastval = TYPE_FIELD_BITPOS (type, i);
}
if (TYPE_CODE (param_type) == TYPE_CODE_REF)
{
chill_type_print_base (TYPE_TARGET_TYPE (param_type),
stream, 0, level);
fputs_filtered (" LOC", stream);
}
else
chill_type_print_base (param_type, stream, show, level);
lastval++;
}
fprintf_filtered (stream, ")");
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
{
fputs_filtered (" RETURNS (", stream);
chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
fputs_filtered (")", stream);
}
break;
case TYPE_CODE_STRUCT:
if (chill_varying_type (type))
{
chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
stream, 0, level);
fputs_filtered (" VARYING", stream);
}
else
{
fprintf_filtered (stream, "STRUCT ");
fprintf_filtered (stream, "(\n");
if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
{
if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
{
fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
}
else
{
fprintfi_filtered (level + 4, stream, "<no data fields>\n");
}
}
else
{
len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
{
struct type *field_type = TYPE_FIELD_TYPE (type, i);
QUIT;
print_spaces_filtered (level + 4, stream);
if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
{ int j; /* variant number */
fputs_filtered ("CASE OF\n", stream);
for (j = 0; j < TYPE_NFIELDS (field_type); j++)
{ int k; /* variant field index */
struct type *variant_type
= TYPE_FIELD_TYPE (field_type, j);
int var_len = TYPE_NFIELDS (variant_type);
print_spaces_filtered (level + 4, stream);
if (strcmp (TYPE_FIELD_NAME (field_type, j),
"else") == 0)
fputs_filtered ("ELSE\n", stream);
else
fputs_filtered (":\n", stream);
if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
error ("variant record confusion");
for (k = 0; k < var_len; k++)
{
print_spaces_filtered (level + 8, stream);
chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
TYPE_FIELD_NAME (variant_type, k),
stream, show - 1, level + 8);
if (k < (var_len - 1))
fputs_filtered (",", stream);
fputs_filtered ("\n", stream);
}
}
print_spaces_filtered (level + 4, stream);
fputs_filtered ("ESAC", stream);
}
else
chill_print_type (field_type,
TYPE_FIELD_NAME (type, i),
stream, show - 1, level + 4);
if (i < (len - 1))
{
fputs_filtered (",", stream);
}
fputs_filtered ("\n", stream);
}
}
fprintfi_filtered (level, stream, ")");
}
break;
case TYPE_CODE_RANGE:
{
struct type *target = TYPE_TARGET_TYPE (type);
if (target && TYPE_NAME (target))
fputs_filtered (TYPE_NAME (target), stream);
else
fputs_filtered ("RANGE", stream);
if (target == NULL)
target = builtin_type_long;
fputs_filtered (" (", stream);
print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
fputs_filtered (":", stream);
print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
fputs_filtered (")", stream);
}
break;
case TYPE_CODE_ENUM:
{
register int lastval = 0;
fprintf_filtered (stream, "SET (");
len = TYPE_NFIELDS (type);
for (i = 0; i < len; i++)
{
QUIT;
if (i) fprintf_filtered (stream, ", ");
wrap_here (" ");
fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
if (lastval != TYPE_FIELD_BITPOS (type, i))
{
fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
lastval = TYPE_FIELD_BITPOS (type, i);
}
lastval++;
}
fprintf_filtered (stream, ")");
}
break;
case TYPE_CODE_VOID:
case TYPE_CODE_UNDEF:
case TYPE_CODE_ERROR:
case TYPE_CODE_UNION:
case TYPE_CODE_METHOD:
error ("missing language support in chill_type_print_base");
break;
default:
/* Handle types not explicitly handled by the other cases,
such as fundamental types. For these, just print whatever
the type name is, as recorded in the type itself. If there
is no type name, then complain. */
if (TYPE_NAME (type) != NULL)
{
fputs_filtered (TYPE_NAME (type), stream);
}
else
{
error ("Unrecognized type code (%d) in symbol table.",
TYPE_CODE (type));
}
break;
}
break;
case TYPE_CODE_VOID:
case TYPE_CODE_UNDEF:
case TYPE_CODE_ERROR:
case TYPE_CODE_UNION:
case TYPE_CODE_METHOD:
error ("missing language support in chill_type_print_base");
break;
default:
/* Handle types not explicitly handled by the other cases,
such as fundamental types. For these, just print whatever
the type name is, as recorded in the type itself. If there
is no type name, then complain. */
if (TYPE_NAME (type) != NULL)
{
fputs_filtered (TYPE_NAME (type), stream);
}
else
{
error ("Unrecognized type code (%d) in symbol table.",
TYPE_CODE (type));
}
break;
}
}

View File

@@ -2,21 +2,22 @@
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994
Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "obstack.h"
@@ -27,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "value.h"
#include "language.h"
#include "demangle.h"
#include "c-lang.h" /* For c_val_print */
#include "c-lang.h" /* For c_val_print */
#include "typeprint.h"
#include "ch-lang.h"
#include "annotate.h"
@@ -41,9 +42,9 @@ chill_print_type_scalar PARAMS ((struct type *, LONGEST, GDB_FILE *));
static void
chill_val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
int, int, int, enum val_prettyprint));
int, int, int, enum val_prettyprint));
/* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
Used to print data from type structures in a specified type. For example,
array bounds may be characters or booleans in some languages, and this
@@ -120,8 +121,8 @@ chill_val_print_array_elements (type, valaddr, address, stream,
unsigned int rep1;
/* Number of repetitions we have detected so far. */
unsigned int reps;
LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
elttype = check_typedef (TYPE_TARGET_TYPE (type));
eltlen = TYPE_LENGTH (elttype);
len = TYPE_LENGTH (type) / eltlen;
@@ -146,7 +147,7 @@ chill_val_print_array_elements (type, valaddr, address, stream,
rep1 = i + 1;
reps = 1;
while ((rep1 < len) &&
while ((rep1 < len) &&
!memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
{
++reps;
@@ -198,7 +199,7 @@ chill_val_print_array_elements (type, valaddr, address, stream,
int
chill_val_print (type, valaddr, embedded_offset, address,
stream, format, deref_ref, recurse, pretty)
stream, format, deref_ref, recurse, pretty)
struct type *type;
char *valaddr;
int embedded_offset;
@@ -227,7 +228,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
}
fprintf_filtered (stream, "[");
chill_val_print_array_elements (type, valaddr, address, stream,
format, deref_ref, recurse, pretty);
format, deref_ref, recurse, pretty);
fprintf_filtered (stream, "]");
}
else
@@ -288,8 +289,8 @@ chill_val_print (type, valaddr, embedded_offset, address,
case TYPE_CODE_UNDEF:
/* This happens (without TYPE_FLAG_STUB set) on systems which don't use
dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
and no complete type for struct foo in that file. */
dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
and no complete type for struct foo in that file. */
fprintf_filtered (stream, "<incomplete type>");
break;
@@ -308,7 +309,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
fputs_filtered ("NULL", stream);
return 0;
}
if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
{
/* Try to print what function it points to. */
@@ -320,20 +321,20 @@ chill_val_print (type, valaddr, embedded_offset, address,
{
print_address_numeric (addr, 1, stream);
}
/* For a pointer to char or unsigned char, also print the string
pointed to, unless pointer is null. */
pointed to, unless pointer is null. */
if (TYPE_LENGTH (elttype) == 1
&& TYPE_CODE (elttype) == TYPE_CODE_CHAR
&& (format == 0 || format == 's')
&& addr != 0
&& /* If print_max is UINT_MAX, the alloca below will fail.
In that case don't try to print the string. */
&& /* If print_max is UINT_MAX, the alloca below will fail.
In that case don't try to print the string. */
print_max < UINT_MAX)
i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
/* Return number of characters printed, plus one for the
terminating null if we have "reached the end". */
terminating null if we have "reached the end". */
return (i + (print_max && i != print_max));
break;
@@ -341,7 +342,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
i = TYPE_LENGTH (type);
LA_PRINT_STRING (stream, valaddr, i, 1, 0);
/* Return number of characters printed, plus one for the terminating
null if we have "reached the end". */
null if we have "reached the end". */
return (i + (print_max && i != print_max));
break;
@@ -393,11 +394,11 @@ chill_val_print (type, valaddr, embedded_offset, address,
need_comma = 1;
/* Look for a continuous range of true elements. */
if (i+1 <= high_bound && value_bit_index (type, valaddr, ++i))
if (i + 1 <= high_bound && value_bit_index (type, valaddr, ++i))
{
int j = i; /* j is the upper bound so far of the range */
int j = i; /* j is the upper bound so far of the range */
fputs_filtered (":", stream);
while (i+1 <= high_bound
while (i + 1 <= high_bound
&& value_bit_index (type, valaddr, ++i))
j = i;
chill_print_type_scalar (range, (LONGEST) j, stream);
@@ -418,14 +419,14 @@ chill_val_print (type, valaddr, embedded_offset, address,
struct type *inner = check_typedef (TYPE_FIELD_TYPE (type, 1));
long length = unpack_long (TYPE_FIELD_TYPE (type, 0), valaddr);
char *data_addr = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
switch (TYPE_CODE (inner))
{
case TYPE_CODE_STRING:
if (length > TYPE_LENGTH (type) - 2)
{
fprintf_filtered (stream,
"<dynamic length %ld > static length %d> *invalid*",
"<dynamic length %ld > static length %d> *invalid*",
length, TYPE_LENGTH (type));
/* Don't print the string; doing so might produce a
@@ -444,7 +445,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
case TYPE_CODE_REF:
if (addressprint)
{
{
fprintf_filtered (stream, "LOC(");
print_address_numeric
(extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
@@ -453,21 +454,21 @@ chill_val_print (type, valaddr, embedded_offset, address,
fprintf_filtered (stream, ")");
if (deref_ref)
fputs_filtered (": ", stream);
}
}
/* De-reference the reference. */
if (deref_ref)
{
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
{
value_ptr deref_val =
value_at
(TYPE_TARGET_TYPE (type),
unpack_pointer (lookup_pointer_type (builtin_type_void),
valaddr),
NULL);
value_at
(TYPE_TARGET_TYPE (type),
unpack_pointer (lookup_pointer_type (builtin_type_void),
valaddr),
NULL);
val_print (VALUE_TYPE (deref_val),
VALUE_CONTENTS (deref_val),
0,
0,
VALUE_ADDRESS (deref_val), stream, format,
deref_ref, recurse + 1, pretty);
}
@@ -494,7 +495,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
case TYPE_CODE_ERROR:
default:
/* Let's defer printing to the C printer, rather than
print an error message. FIXME! */
print an error message. FIXME! */
c_val_print (type, valaddr, 0, address, stream, format,
deref_ref, recurse, pretty);
}
@@ -547,7 +548,7 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
fprintf_filtered (stream, "\n");
print_spaces_filtered (2 + 2 * recurse, stream);
}
else
else
{
wrap_here (n_spaces (2 + 2 * recurse));
}
@@ -560,16 +561,16 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
value_ptr v;
/* Bitfields require special handling, especially due to byte
order problems. */
order problems. */
v = value_from_longest (TYPE_FIELD_TYPE (type, i),
unpack_field_as_long (type, valaddr, i));
unpack_field_as_long (type, valaddr, i));
chill_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
stream, format, 0, recurse + 1, pretty);
}
else
{
chill_val_print (TYPE_FIELD_TYPE (type, i),
chill_val_print (TYPE_FIELD_TYPE (type, i),
valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
0, stream, format, 0, recurse + 1, pretty);
}
@@ -591,7 +592,7 @@ chill_value_print (val, stream, format, pretty)
enum val_prettyprint pretty;
{
struct type *type = VALUE_TYPE (val);
struct type *real_type = check_typedef (type);
struct type *real_type = check_typedef (type);
/* If it is a pointer, indicate what it points to.
@@ -626,5 +627,3 @@ chill_value_print (val, stream, format, pretty)
return (val_print (type, VALUE_CONTENTS (val), 0,
VALUE_ADDRESS (val), stream, format, 1, 0, pretty));
}

View File

@@ -1,21 +1,22 @@
/* Handle COFF SVR3 shared libraries for GDB, the GNU Debugger.
Copyright 1993 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This file is part of GDB.
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.
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.
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. */
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"
@@ -27,31 +28,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
GLOBAL FUNCTION
GLOBAL FUNCTION
coff_solib_add -- add a shared library files to the symtab list. We
examine the `.lib' section of the exec file and determine the names of
the shared libraries.
coff_solib_add -- add a shared library files to the symtab list. We
examine the `.lib' section of the exec file and determine the names of
the shared libraries.
This function is responsible for discovering those names and
addresses, and saving sufficient information about them to allow
their symbols to be read at a later time.
This function is responsible for discovering those names and
addresses, and saving sufficient information about them to allow
their symbols to be read at a later time.
SYNOPSIS
SYNOPSIS
void coff_solib_add (char *arg_string, int from_tty,
struct target_ops *target)
void coff_solib_add (char *arg_string, int from_tty,
struct target_ops *target)
DESCRIPTION
DESCRIPTION
*/
*/
void
coff_solib_add (arg_string, from_tty, target)
char *arg_string;
int from_tty;
struct target_ops *target;
{
{
asection *libsect;
libsect = bfd_get_section_by_name (exec_bfd, ".lib");
@@ -79,7 +80,7 @@ coff_solib_add (arg_string, from_tty, target)
int len, nameoffset;
char *filename;
ent = (struct libent *)lib;
ent = (struct libent *) lib;
len = bfd_get_32 (exec_bfd, ent->len);
@@ -88,47 +89,47 @@ coff_solib_add (arg_string, from_tty, target)
if (len <= 0)
break;
filename = (char *)ent + nameoffset * 4;
filename = (char *) ent + nameoffset * 4;
objfile = symbol_file_add (filename, from_tty,
0, /* addr */
0, /* not mainline */
0, /* not mapped */
0, /* Not readnow */
0, /* Not user loaded */
1); /* Is a solib */
0, /* addr */
0, /* not mainline */
0, /* not mapped */
0, /* Not readnow */
0, /* Not user loaded */
1); /* Is a solib */
libsize -= len * 4;
lib += len * 4;
}
/* Getting new symbols may change our opinion about what is
frameless. */
frameless. */
reinit_frame_cache ();
}
}
/*
GLOBAL FUNCTION
coff_solib_create_inferior_hook -- shared library startup support
SYNOPSIS
void coff_solib_create_inferior_hook()
DESCRIPTION
When gdb starts up the inferior, the kernel maps in the shared
libraries. We get here with the target stopped at it's first
instruction, and the libraries already mapped. At this point, this
function gets called via expansion of the macro
SOLIB_CREATE_INFERIOR_HOOK.
*/
void
coff_solib_create_inferior_hook()
GLOBAL FUNCTION
coff_solib_create_inferior_hook -- shared library startup support
SYNOPSIS
void coff_solib_create_inferior_hook()
DESCRIPTION
When gdb starts up the inferior, the kernel maps in the shared
libraries. We get here with the target stopped at it's first
instruction, and the libraries already mapped. At this point, this
function gets called via expansion of the macro
SOLIB_CREATE_INFERIOR_HOOK.
*/
void
coff_solib_create_inferior_hook ()
{
coff_solib_add ((char *) 0, 0, (struct target_ops *) 0);
}

View File

@@ -1,25 +1,25 @@
/* COFF (SVR3) Shared library declarations for GDB, the GNU Debugger.
Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifdef __STDC__ /* Forward decl's for prototypes */
/* Forward decl's for prototypes */
struct target_ops;
#endif
/* Called when we free all symtabs, to free the shared library information
as well. */
@@ -47,7 +47,7 @@ coff_solib_add PARAMS ((char *, int, struct target_ops *));
#define SOLIB_CREATE_INFERIOR_HOOK(PID) coff_solib_create_inferior_hook()
extern void
coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
coff_solib_create_inferior_hook PARAMS ((void)); /* solib.c */
/* Function to be called to remove the connection between debugger and
dynamic linker that was established by SOLIB_CREATE_INFERIOR_HOOK.
@@ -55,7 +55,7 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
the debugger, as CLEAR_SOLIB does.)
This functionality is presently not implemented for this target.
*/
*/
#define SOLIB_REMOVE_INFERIOR_HOOK(PID) (0)
/* This function is called by the "catch load" command. It allows
@@ -63,7 +63,7 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
library file (or any library file, if filename is NULL) is loaded.
Presently, this functionality is not implemented.
*/
*/
#define SOLIB_CREATE_CATCH_LOAD_HOOK(pid,tempflag,filename,cond_string) \
error("catch of library loads/unloads not yet implemented on this platform")
@@ -72,7 +72,7 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
library file (or any library file, if filename is NULL) is unloaded.
Presently, this functionality is not implemented.
*/
*/
#define SOLIB_CREATE_CATCH_UNLOAD_HOOK(pid,tempflag,filename,cond_string) \
error("catch of library loads/unloads not yet implemented on this platform")
@@ -83,11 +83,11 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
the dynamic linker hook, or undefined results are guaranteed.
Presently, this functionality is not implemented.
*/
*/
/*
#define SOLIB_HAVE_LOAD_EVENT(pid) \
#define SOLIB_HAVE_LOAD_EVENT(pid) \
error("catch of library loads/unloads not yet implemented on this platform")
*/
*/
#define SOLIB_HAVE_LOAD_EVENT(pid) \
(0)
@@ -104,12 +104,12 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
string if they wish to continue the inferior and then access the string.
Presently, this functionality is not implemented.
*/
*/
/*
#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
error("catch of library loads/unloads not yet implemented on this platform")
*/
*/
#define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
(0)
@@ -121,11 +121,11 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
the dynamic linker hook, or undefined results are guaranteed.
Presently, this functionality is not implemented.
*/
*/
/*
#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
error("catch of library loads/unloads not yet implemented on this platform")
*/
*/
#define SOLIB_HAVE_UNLOAD_EVENT(pid) \
(0)
@@ -142,11 +142,11 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
string if they wish to continue the inferior and then access the string.
Presently, this functionality is not implemented.
*/
*/
/*
#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
error("catch of library loads/unloads not yet implemented on this platform")
*/
*/
#define SOLIB_UNLOADED_LIBRARY_PATHNAME(pid) \
(0)
@@ -160,12 +160,12 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
results are guaranteed.
Presently, this functionality is not implemented.
*/
*/
/*
#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
error("catch of library loads/unloads not yet implemented on this platform")
*/
*/
#define SOLIB_IN_DYNAMIC_LINKER(pid,pc) \
(0)
@@ -175,7 +175,7 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
any symbol tables.
Presently, this functionality is not implemented.
*/
*/
#define SOLIB_RESTART() \
(0)
@@ -186,5 +186,5 @@ coff_solib_create_inferior_hook PARAMS((void)); /* solib.c */
#define DISABLE_UNSETTABLE_BREAK(addr) coff_solib_address(addr)
extern int
solib_address PARAMS ((CORE_ADDR)); /* solib.c */
solib_address PARAMS ((CORE_ADDR)); /* solib.c */
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +1,20 @@
/* Handle lists of commands, their decoding and documentation, for GDB.
Copyright 1986, 1989, 1990, 1991, 1998 Free Software Foundation, Inc.
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 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.
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. */
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 "gdbcmd.h"
@@ -21,20 +22,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "value.h"
#include <ctype.h>
#include "gdb_string.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_WAIT_H
# include <wait.h>
#include <wait.h>
#else
# ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
# endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#endif
#include "wait.h"
/* FIXME: this should be auto-configured! */
#ifdef __MSDOS__
# define CANT_FORK
#endif
/* Prototypes for local functions */
static void undef_cmd_error PARAMS ((char *, char *));
@@ -51,6 +54,12 @@ static int parse_binary_operation PARAMS ((char *));
static void print_doc_line PARAMS ((GDB_FILE *, char *));
static struct cmd_list_element *find_cmd PARAMS ((char *command,
int len,
struct cmd_list_element * clist,
int ignore_help_classes,
int *nfound));
void _initialize_command PARAMS ((void));
/* Add element named NAME.
@@ -79,7 +88,7 @@ add_cmd (name, class, fun, doc, list)
struct cmd_list_element **list;
{
register struct cmd_list_element *c
= (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
= (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
struct cmd_list_element *p;
delete_cmd (name, list);
@@ -93,9 +102,9 @@ add_cmd (name, class, fun, doc, list)
{
p = *list;
while (p->next && STRCMP (p->next->name, name) <= 0)
{
p = p->next;
}
{
p = p->next;
}
c->next = p->next;
p->next = c;
}
@@ -123,7 +132,7 @@ add_cmd (name, class, fun, doc, list)
/* Same as above, except that the abbrev_flag is set. */
#if 0 /* Currently unused */
#if 0 /* Currently unused */
struct cmd_list_element *
add_abbrev_cmd (name, class, fun, doc, list)
@@ -134,7 +143,7 @@ add_abbrev_cmd (name, class, fun, doc, list)
struct cmd_list_element **list;
{
register struct cmd_list_element *c
= add_cmd (name, class, fun, doc, list);
= add_cmd (name, class, fun, doc, list);
c->abbrev_flag = 1;
return c;
@@ -156,7 +165,7 @@ add_alias_cmd (name, oldname, class, abbrev_flag, list)
register struct cmd_list_element *c;
copied_name = (char *) alloca (strlen (oldname) + 1);
strcpy (copied_name, oldname);
old = lookup_cmd (&copied_name, *list, "", 1, 1);
old = lookup_cmd (&copied_name, *list, "", 1, 1);
if (old == 0)
{
@@ -198,7 +207,7 @@ add_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
}
/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
struct cmd_list_element *
add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
allow_unknown, list)
@@ -255,7 +264,7 @@ add_set_cmd (name, class, var_type, var, doc, list)
struct cmd_list_element **list;
{
struct cmd_list_element *c
= add_cmd (name, class, NO_FUNCTION, doc, list);
= add_cmd (name, class, NO_FUNCTION, doc, list);
c->type = set_cmd;
c->var_type = var_type;
@@ -271,7 +280,7 @@ add_set_cmd (name, class, var_type, var, doc, list)
CLASS is as in add_cmd.
ENUMLIST is a list of strings which may follow NAME.
VAR is address of the variable which will contain the matching string
(from ENUMLIST).
(from ENUMLIST).
DOC is the documentation string. */
struct cmd_list_element *
@@ -284,7 +293,7 @@ add_set_enum_cmd (name, class, enumlist, var, doc, list)
struct cmd_list_element **list;
{
struct cmd_list_element *c
= add_set_cmd (name, class, var_enum, var, doc, list);
= add_set_cmd (name, class, var_enum, var, doc, list);
c->enums = enumlist;
return c;
@@ -299,21 +308,21 @@ add_show_from_set (setcmd, list)
struct cmd_list_element **list;
{
struct cmd_list_element *showcmd =
(struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
(struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
struct cmd_list_element *p;
memcpy (showcmd, setcmd, sizeof (struct cmd_list_element));
delete_cmd (showcmd->name, list);
showcmd->type = show_cmd;
/* Replace "set " at start of docstring with "show ". */
if (setcmd->doc[0] == 'S' && setcmd->doc[1] == 'e'
&& setcmd->doc[2] == 't' && setcmd->doc[3] == ' ')
showcmd->doc = concat ("Show ", setcmd->doc + 4, NULL);
else
fprintf_unfiltered (gdb_stderr, "GDB internal error: Bad docstring for set command\n");
if (*list == NULL || STRCMP ((*list)->name, showcmd->name) >= 0)
if (*list == NULL || STRCMP ((*list)->name, showcmd->name) >= 0)
{
showcmd->next = *list;
*list = showcmd;
@@ -322,9 +331,9 @@ add_show_from_set (setcmd, list)
{
p = *list;
while (p->next && STRCMP (p->next->name, showcmd->name) <= 0)
{
p = p->next;
}
{
p = p->next;
}
showcmd->next = p->next;
p->next = showcmd;
}
@@ -347,7 +356,7 @@ delete_cmd (name, list)
if ((*list)->hookee)
(*list)->hookee->hook = 0; /* Hook slips out of its mouth */
p = (*list)->next;
free ((PTR)*list);
free ((PTR) * list);
*list = p;
}
@@ -357,9 +366,9 @@ delete_cmd (name, list)
if (STREQ (c->next->name, name))
{
if (c->next->hookee)
c->next->hookee->hook = 0; /* hooked cmd gets away. */
c->next->hookee->hook = 0; /* hooked cmd gets away. */
p = c->next->next;
free ((PTR)c->next);
free ((PTR) c->next);
c->next = p;
}
else
@@ -400,10 +409,10 @@ help_cmd (command, stream)
/* There are three cases here.
If c->prefixlist is nonzero, we have a prefix command.
Print its documentation, then list its subcommands.
If c->function is nonzero, we really have a command.
Print its documentation and return.
If c->function is zero, we have a class name.
Print its documentation (as if it were a command)
and then set class to the number of this class
@@ -450,7 +459,7 @@ help_list (list, cmdtype, class, stream)
{
int len;
char *cmdtype1, *cmdtype2;
/* If CMDTYPE is "foo ", CMDTYPE1 gets " foo" and CMDTYPE2 gets "foo sub" */
len = strlen (cmdtype);
cmdtype1 = (char *) alloca (len + 1);
@@ -471,19 +480,19 @@ help_list (list, cmdtype, class, stream)
else
fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2);
help_cmd_list (list, class, cmdtype, (int)class >= 0, stream);
help_cmd_list (list, class, cmdtype, (int) class >= 0, stream);
if (class == all_classes)
fprintf_filtered (stream, "\n\
Type \"help%s\" followed by a class name for a list of commands in that class.",
cmdtype1);
cmdtype1);
fprintf_filtered (stream, "\n\
Type \"help%s\" followed by %scommand name for full documentation.\n\
Command name abbreviations are allowed if unambiguous.\n",
cmdtype1, cmdtype2);
cmdtype1, cmdtype2);
}
/* Print only the first line of STR on STREAM. */
static void
print_doc_line (stream, str)
@@ -506,7 +515,7 @@ print_doc_line (stream, str)
if (p - str > line_size - 1)
{
line_size = p - str + 1;
free ((PTR)line_buffer);
free ((PTR) line_buffer);
line_buffer = (char *) xmalloc (line_size);
}
strncpy (line_buffer, str, p - str);
@@ -523,10 +532,10 @@ print_doc_line (stream, str)
* PREFIX is the prefix to print before each command name.
* STREAM is the stream upon which the output should be written.
* CLASS should be:
* A non-negative class number to list only commands in that
* A non-negative class number to list only commands in that
* class.
* ALL_COMMANDS to list all commands in list.
* ALL_CLASSES to list all classes in list.
* ALL_COMMANDS to list all commands in list.
* ALL_CLASSES to list all classes in list.
*
* Note that RECURSE will be active on *all* sublists, not just the
* ones selected by the criteria above (ie. the selection mechanism
@@ -546,8 +555,8 @@ help_cmd_list (list, class, prefix, recurse, stream)
{
if (c->abbrev_flag == 0 &&
(class == all_commands
|| (class == all_classes && c->function.cfunc == NULL)
|| (class == c->class && c->function.cfunc != NULL)))
|| (class == all_classes && c->function.cfunc == NULL)
|| (class == c->class && c->function.cfunc != NULL)))
{
fprintf_filtered (stream, "%s%s -- ", prefix, c->name);
print_doc_line (stream, c->doc);
@@ -559,34 +568,35 @@ help_cmd_list (list, class, prefix, recurse, stream)
help_cmd_list (*c->prefixlist, class, c->prefixname, 1, stream);
}
}
/* Search the input clist for 'command'. Return the command if
found (or NULL if not), and return the number of commands
found in nfound */
static struct cmd_list_element *
find_cmd(command, len, clist, ignore_help_classes, nfound)
find_cmd (command, len, clist, ignore_help_classes, nfound)
char *command;
int len;
struct cmd_list_element *clist;
int ignore_help_classes;
int *nfound;
{
struct cmd_list_element *found, *c;
found = (struct cmd_list_element *)NULL;
found = (struct cmd_list_element *) NULL;
*nfound = 0;
for (c = clist; c; c = c->next)
if (!strncmp (command, c->name, len)
&& (!ignore_help_classes || c->function.cfunc))
&& (!ignore_help_classes || c->function.cfunc))
{
found = c;
(*nfound)++;
if (c->name[len] == '\0')
{
*nfound = 1;
break;
}
found = c;
(*nfound)++;
if (c->name[len] == '\0')
{
*nfound = 1;
break;
}
}
return found;
}
@@ -622,7 +632,7 @@ find_cmd(command, len, clist, ignore_help_classes, nfound)
affect the operation).
This routine does *not* modify the text pointed to by TEXT.
If IGNORE_HELP_CLASSES is nonzero, ignore any command list elements which
are actually help classes rather than commands (i.e. the function field of
the struct cmd_list_element is NULL). */
@@ -644,7 +654,7 @@ lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
so that "set args_foo()" doesn't get interpreted as
"set args _foo()". */
for (p = *text;
*p && (isalnum(*p) || *p == '-' || *p == '_' ||
*p && (isalnum (*p) || *p == '-' || *p == '_' ||
(tui_version &&
(*p == '+' || *p == '<' || *p == '>' || *p == '$')) ||
(xdb_commands && (*p == '!' || *p == '/' || *p == '?')));
@@ -654,7 +664,7 @@ lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
/* If nothing but whitespace, return 0. */
if (p == *text)
return 0;
len = p - *text;
/* *text and p now bracket the first command word to lookup (and
@@ -672,20 +682,20 @@ lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
/* Look it up. */
found = 0;
nfound = 0;
found = find_cmd(command, len, clist, ignore_help_classes, &nfound);
found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
/*
** We didn't find the command in the entered case, so lower case it
** and search again.
*/
** We didn't find the command in the entered case, so lower case it
** and search again.
*/
if (!found || nfound == 0)
{
for (tmp = 0; tmp < len; tmp++)
{
char x = command[tmp];
command[tmp] = isupper(x) ? tolower(x) : x;
}
found = find_cmd(command, len, clist, ignore_help_classes, &nfound);
{
char x = command[tmp];
command[tmp] = isupper (x) ? tolower (x) : x;
}
found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
}
/* If nothing matches, we have a simple failure. */
@@ -697,8 +707,8 @@ lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
if (result_list != NULL)
/* Will be modified in calling routine
if we know what the prefix command is. */
*result_list = 0;
return (struct cmd_list_element *) -1; /* Ambiguous. */
*result_list = 0;
return (struct cmd_list_element *) -1; /* Ambiguous. */
}
/* We've matched something on this list. Move text pointer forward. */
@@ -731,9 +741,9 @@ lookup_cmd_1 (text, clist, result_list, ignore_help_classes)
if (result_list != NULL)
if (!*result_list)
/* This used to say *result_list = *found->prefixlist
If that was correct, need to modify the documentation
at the top of this function to clarify what is supposed
to be going on. */
If that was correct, need to modify the documentation
at the top of this function to clarify what is supposed
to be going on. */
*result_list = found;
return c;
}
@@ -758,11 +768,11 @@ undef_cmd_error (cmdtype, q)
char *cmdtype, *q;
{
error ("Undefined %scommand: \"%s\". Try \"help%s%.*s\".",
cmdtype,
q,
*cmdtype? " ": "",
strlen(cmdtype)-1,
cmdtype);
cmdtype,
q,
*cmdtype ? " " : "",
strlen (cmdtype) - 1,
cmdtype);
}
/* Look up the contents of *LINE as a command in the command list LIST.
@@ -789,7 +799,7 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
{
struct cmd_list_element *last_list = 0;
struct cmd_list_element *c =
lookup_cmd_1 (line, list, &last_list, ignore_help_classes);
lookup_cmd_1 (line, list, &last_list, ignore_help_classes);
#if 0
/* This is wrong for complete_command. */
char *ptr = (*line) + strlen (*line) - 1;
@@ -799,7 +809,7 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
ptr--;
*(ptr + 1) = '\0';
#endif
if (!c)
{
if (!allow_unknown)
@@ -810,7 +820,7 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
{
char *p = *line, *q;
while (isalnum(*p) || *p == '-')
while (isalnum (*p) || *p == '-')
p++;
q = (char *) alloca (p - *line + 1);
@@ -825,13 +835,13 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
else if (c == (struct cmd_list_element *) -1)
{
/* Ambigous. Local values should be off prefixlist or called
values. */
values. */
int local_allow_unknown = (last_list ? last_list->allow_unknown :
allow_unknown);
char *local_cmdtype = last_list ? last_list->prefixname : cmdtype;
struct cmd_list_element *local_list =
(last_list ? *(last_list->prefixlist) : list);
(last_list ? *(last_list->prefixlist) : list);
if (local_allow_unknown < 0)
{
if (last_list)
@@ -850,12 +860,12 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
&& (*line)[amb_len] != '\t');
amb_len++)
;
ambbuf[0] = 0;
for (c = local_list; c; c = c->next)
if (!strncmp (*line, c->name, amb_len))
{
if (strlen (ambbuf) + strlen (c->name) + 6 < (int)sizeof ambbuf)
if (strlen (ambbuf) + strlen (c->name) + 6 < (int) sizeof ambbuf)
{
if (strlen (ambbuf))
strcat (ambbuf, ", ");
@@ -887,7 +897,7 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
}
return 0;
}
#if 0
/* Look up the contents of *LINE as a command in the command list LIST.
LIST is a chain of struct cmd_list_element's.
@@ -928,7 +938,7 @@ lookup_cmd (line, list, cmdtype, allow_unknown)
/* Find end of command name. */
p = *line;
while (*p == '-' || isalnum(*p))
while (*p == '-' || isalnum (*p))
p++;
/* Look up the command name.
@@ -943,18 +953,18 @@ lookup_cmd (line, list, cmdtype, allow_unknown)
error ("Lack of needed %scommand", cmdtype);
return 0;
}
/* Copy over to a local buffer, converting to lowercase on the way.
This is in case the command being parsed is a subcommand which
doesn't match anything, and that's ok. We want the original
untouched for the routine of the original command. */
processed_cmd = (char *) alloca (p - *line + 1);
for (cmd_len = 0; cmd_len < p - *line; cmd_len++)
{
char x = (*line)[cmd_len];
if (isupper(x))
processed_cmd[cmd_len] = tolower(x);
if (isupper (x))
processed_cmd[cmd_len] = tolower (x);
else
processed_cmd[cmd_len] = x;
}
@@ -1009,7 +1019,8 @@ lookup_cmd (line, list, cmdtype, allow_unknown)
/* Skip whitespace before the argument. */
while (*p == ' ' || *p == '\t') p++;
while (*p == ' ' || *p == '\t')
p++;
*line = p;
if (found->prefixlist && *p)
@@ -1059,12 +1070,12 @@ complete_on_cmdlist (list, text, word)
if (matches == sizeof_matchlist)
{
sizeof_matchlist *= 2;
matchlist = (char **) xrealloc ((char *)matchlist,
matchlist = (char **) xrealloc ((char *) matchlist,
(sizeof_matchlist
* sizeof (char *)));
}
matchlist[matches] = (char *)
matchlist[matches] = (char *)
xmalloc (strlen (word) + strlen (ptr->name) + 1);
if (word == text)
strcpy (matchlist[matches], ptr->name);
@@ -1085,13 +1096,13 @@ complete_on_cmdlist (list, text, word)
if (matches == 0)
{
free ((PTR)matchlist);
free ((PTR) matchlist);
matchlist = 0;
}
else
{
matchlist = (char **) xrealloc ((char *)matchlist, ((matches + 1)
* sizeof (char *)));
matchlist = (char **) xrealloc ((char *) matchlist, ((matches + 1)
* sizeof (char *)));
matchlist[matches] = (char *) 0;
}
@@ -1131,12 +1142,12 @@ complete_on_enum (enumlist, text, word)
if (matches == sizeof_matchlist)
{
sizeof_matchlist *= 2;
matchlist = (char **) xrealloc ((char *)matchlist,
matchlist = (char **) xrealloc ((char *) matchlist,
(sizeof_matchlist
* sizeof (char *)));
}
matchlist[matches] = (char *)
matchlist[matches] = (char *)
xmalloc (strlen (word) + strlen (name) + 1);
if (word == text)
strcpy (matchlist[matches], name);
@@ -1157,13 +1168,13 @@ complete_on_enum (enumlist, text, word)
if (matches == 0)
{
free ((PTR)matchlist);
free ((PTR) matchlist);
matchlist = 0;
}
else
{
matchlist = (char **) xrealloc ((char *)matchlist, ((matches + 1)
* sizeof (char *)));
matchlist = (char **) xrealloc ((char *) matchlist, ((matches + 1)
* sizeof (char *)));
matchlist[matches] = (char *) 0;
}
@@ -1188,16 +1199,15 @@ parse_binary_operation (arg)
|| !strncmp (arg, "1", length)
|| !strncmp (arg, "yes", length))
return 1;
else if (!strncmp (arg, "off", length)
|| !strncmp (arg, "0", length)
|| !strncmp (arg, "no", length))
return 0;
else
if (!strncmp (arg, "off", length)
|| !strncmp (arg, "0", length)
|| !strncmp (arg, "no", length))
{
error ("\"on\" or \"off\" expected.");
return 0;
else
{
error ("\"on\" or \"off\" expected.");
return 0;
}
}
}
/* Do a "set" or "show" command. ARG is NULL if no argument, or the text
@@ -1220,11 +1230,12 @@ do_setshow_command (arg, from_tty, c)
char *p;
char *q;
int ch;
if (arg == NULL)
arg = "";
new = (char *) xmalloc (strlen (arg) + 2);
p = arg; q = new;
p = arg;
q = new;
while ((ch = *p++) != '\000')
{
if (ch == '\\')
@@ -1240,7 +1251,7 @@ do_setshow_command (arg, from_tty, c)
break;
ch = parse_escape (&p);
if (ch == 0)
break; /* C loses */
break; /* C loses */
else if (ch > 0)
*q++ = ch;
}
@@ -1253,24 +1264,24 @@ do_setshow_command (arg, from_tty, c)
#endif
*q++ = '\0';
new = (char *) xrealloc (new, q - new);
if (*(char **)c->var != NULL)
free (*(char **)c->var);
if (*(char **) c->var != NULL)
free (*(char **) c->var);
*(char **) c->var = new;
}
break;
case var_string_noescape:
if (arg == NULL)
arg = "";
if (*(char **)c->var != NULL)
free (*(char **)c->var);
if (*(char **) c->var != NULL)
free (*(char **) c->var);
*(char **) c->var = savestring (arg, strlen (arg));
break;
case var_filename:
if (arg == NULL)
error_no_arg ("filename to set it to.");
if (*(char **)c->var != NULL)
free (*(char **)c->var);
*(char **)c->var = tilde_expand (arg);
if (*(char **) c->var != NULL)
free (*(char **) c->var);
*(char **) c->var = tilde_expand (arg);
break;
case var_boolean:
*(int *) c->var = parse_binary_operation (arg);
@@ -1325,7 +1336,7 @@ do_setshow_command (arg, from_tty, c)
}
p = strchr (arg, ' ');
if (p)
len = p - arg;
else
@@ -1345,7 +1356,7 @@ do_setshow_command (arg, from_tty, c)
if (nmatches > 1)
error ("Ambiguous item \"%s\".", arg);
*(char **)c->var = match;
*(char **) c->var = match;
}
break;
default:
@@ -1356,59 +1367,59 @@ do_setshow_command (arg, from_tty, c)
{
/* Print doc minus "show" at start. */
print_doc_line (gdb_stdout, c->doc + 5);
fputs_filtered (" is ", gdb_stdout);
wrap_here (" ");
switch (c->var_type)
{
case var_string:
{
unsigned char *p;
fputs_filtered ("\"", gdb_stdout);
if (*(unsigned char **)c->var)
for (p = *(unsigned char **) c->var; *p != '\0'; p++)
gdb_printchar (*p, gdb_stdout, '"');
fputs_filtered ("\"", gdb_stdout);
}
break;
case var_string_noescape:
case var_filename:
case var_enum:
fputs_filtered ("\"", gdb_stdout);
if (*(char **)c->var)
fputs_filtered (*(char **) c->var, gdb_stdout);
fputs_filtered ("\"", gdb_stdout);
break;
case var_boolean:
fputs_filtered (*(int *) c->var ? "on" : "off", gdb_stdout);
break;
case var_uinteger:
if (*(unsigned int *) c->var == UINT_MAX) {
fputs_filtered ("unlimited", gdb_stdout);
break;
}
/* else fall through */
case var_zinteger:
fprintf_filtered (gdb_stdout, "%u", *(unsigned int *) c->var);
break;
case var_integer:
if (*(int *) c->var == INT_MAX)
case var_string:
{
fputs_filtered ("unlimited", gdb_stdout);
fputs_filtered ("\"", gdb_stdout);
if (*(unsigned char **) c->var)
fputstr_filtered (*(unsigned char **) c->var, '"', gdb_stdout);
fputs_filtered ("\"", gdb_stdout);
}
else
fprintf_filtered (gdb_stdout, "%d", *(int *) c->var);
break;
default:
error ("gdb internal error: bad var_type in do_setshow_command");
}
break;
case var_string_noescape:
case var_filename:
case var_enum:
fputs_filtered ("\"", gdb_stdout);
if (*(char **) c->var)
fputs_filtered (*(char **) c->var, gdb_stdout);
fputs_filtered ("\"", gdb_stdout);
break;
case var_boolean:
fputs_filtered (*(int *) c->var ? "on" : "off", gdb_stdout);
break;
case var_uinteger:
if (*(unsigned int *) c->var == UINT_MAX)
{
fputs_filtered ("unlimited", gdb_stdout);
break;
}
/* else fall through */
case var_zinteger:
fprintf_filtered (gdb_stdout, "%u", *(unsigned int *) c->var);
break;
case var_integer:
if (*(int *) c->var == INT_MAX)
{
fputs_filtered ("unlimited", gdb_stdout);
}
else
fprintf_filtered (gdb_stdout, "%d", *(int *) c->var);
break;
default:
error ("gdb internal error: bad var_type in do_setshow_command");
}
fputs_filtered (".\n", gdb_stdout);
}
else
error ("gdb internal error: bad cmd_type in do_setshow_command");
(*c->function.sfunc) (NULL, from_tty, c);
if (c->type == set_cmd && set_hook)
set_hook (c);
}
/* Show all the settings in a list of show commands. */
@@ -1419,19 +1430,20 @@ cmd_show_list (list, from_tty, prefix)
int from_tty;
char *prefix;
{
for (; list != NULL; list = list->next) {
/* If we find a prefix, run its list, prefixing our output by its
prefix (with "show " skipped). */
if (list->prefixlist && !list->abbrev_flag)
cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
if (list->type == show_cmd)
{
fputs_filtered (prefix, gdb_stdout);
fputs_filtered (list->name, gdb_stdout);
fputs_filtered (": ", gdb_stdout);
do_setshow_command ((char *)NULL, from_tty, list);
}
}
for (; list != NULL; list = list->next)
{
/* If we find a prefix, run its list, prefixing our output by its
prefix (with "show " skipped). */
if (list->prefixlist && !list->abbrev_flag)
cmd_show_list (*list->prefixlist, from_tty, list->prefixname + 5);
if (list->type == show_cmd)
{
fputs_filtered (prefix, gdb_stdout);
fputs_filtered (list->name, gdb_stdout);
fputs_filtered (": ", gdb_stdout);
do_setshow_command ((char *) NULL, from_tty, list);
}
}
}
/* ARGSUSED */
@@ -1441,9 +1453,29 @@ shell_escape (arg, from_tty)
int from_tty;
{
#ifdef CANT_FORK
/* FIXME: what about errors (I don't know how GO32 system() handles
them)? */
system (arg);
/* If ARG is NULL, they want an inferior shell, but `system' just
reports if the shell is available when passed a NULL arg. */
int rc = system (arg ? arg : "");
if (!arg)
arg = "inferior shell";
if (rc == -1)
{
fprintf_unfiltered (gdb_stderr, "Cannot execute %s: %s\n", arg,
safe_strerror (errno));
gdb_flush (gdb_stderr);
}
else if (rc)
{
fprintf_unfiltered (gdb_stderr, "%s exited with status %d\n", arg, rc);
gdb_flush (gdb_stderr);
}
#ifdef __DJGPP__
/* Make sure to return to the directory GDB thinks it is, in case the
shell command we just ran changed it. */
chdir (current_directory);
#endif
#else /* Can fork. */
int rc, status, pid;
char *p, *user_shell;
@@ -1457,7 +1489,7 @@ shell_escape (arg, from_tty)
else
p++; /* Get past '/' */
if ((pid = fork()) == 0)
if ((pid = fork ()) == 0)
{
if (!arg)
execl (user_shell, p, 0);
@@ -1489,11 +1521,11 @@ make_command (arg, from_tty)
p = "make";
else
{
p = xmalloc (sizeof("make ") + strlen(arg));
p = xmalloc (sizeof ("make ") + strlen (arg));
strcpy (p, "make ");
strcpy (p + sizeof("make ")-1, arg);
strcpy (p + sizeof ("make ") - 1, arg);
}
shell_escape (p, from_tty);
}
@@ -1513,7 +1545,7 @@ show_user_1 (c, stream)
while (cmdlines)
{
print_command_line (cmdlines, 4);
print_command_line (cmdlines, 4, stream);
cmdlines = cmdlines->next;
}
fputs_filtered ("\n", stream);
@@ -1553,11 +1585,11 @@ _initialize_command ()
With no arguments, run an inferior shell.");
if (xdb_commands)
add_com_alias("!", "shell", class_support, 0);
add_com_alias ("!", "shell", class_support, 0);
add_com ("make", class_support, make_command,
"Run the ``make'' program using the rest of the line as arguments.");
add_cmd ("user", no_class, show_user,
"Run the ``make'' program using the rest of the line as arguments.");
add_cmd ("user", no_class, show_user,
"Show definitions of user defined commands.\n\
Argument is the name of the user defined command.\n\
With no argument, show definitions of all user defined commands.", &showlist);

View File

@@ -1,19 +1,20 @@
/* Header file for command-reading library command.c.
Copyright (C) 1986, 1989, 1990 Free Software Foundation, Inc.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (COMMAND_H)
#define COMMAND_H 1
@@ -21,42 +22,46 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Not a set/show command. Note that some commands which begin with
"set" or "show" might be in this category, if their syntax does
not fall into one of the following categories. */
typedef enum cmd_types {
not_set_cmd,
set_cmd,
show_cmd
} cmd_types;
typedef enum cmd_types
{
not_set_cmd,
set_cmd,
show_cmd
}
cmd_types;
/* Types of "set" or "show" command. */
typedef enum var_types {
/* "on" or "off". *VAR is an integer which is nonzero for on,
zero for off. */
var_boolean,
/* Unsigned Integer. *VAR is an unsigned int. The user can type 0
to mean "unlimited", which is stored in *VAR as UINT_MAX. */
var_uinteger,
typedef enum var_types
{
/* "on" or "off". *VAR is an integer which is nonzero for on,
zero for off. */
var_boolean,
/* Unsigned Integer. *VAR is an unsigned int. The user can type 0
to mean "unlimited", which is stored in *VAR as UINT_MAX. */
var_uinteger,
/* Like var_uinteger but signed. *VAR is an int. The user can type 0
to mean "unlimited", which is stored in *VAR as INT_MAX. */
var_integer,
/* Like var_uinteger but signed. *VAR is an int. The user can type 0
to mean "unlimited", which is stored in *VAR as INT_MAX. */
var_integer,
/* String which the user enters with escapes (e.g. the user types \n and
it is a real newline in the stored string).
*VAR is a malloc'd string, or NULL if the string is empty. */
var_string,
/* String which stores what the user types verbatim.
*VAR is a malloc'd string, or NULL if the string is empty. */
var_string_noescape,
/* String which stores a filename.
*VAR is a malloc'd string, or NULL if the string is empty. */
var_filename,
/* ZeroableInteger. *VAR is an int. Like Unsigned Integer except
that zero really means zero. */
var_zinteger,
/* Enumerated type. Can only have one of the specified values. *VAR is a
char pointer to the name of the element that we find. */
var_enum
} var_types;
/* String which the user enters with escapes (e.g. the user types \n and
it is a real newline in the stored string).
*VAR is a malloc'd string, or NULL if the string is empty. */
var_string,
/* String which stores what the user types verbatim.
*VAR is a malloc'd string, or NULL if the string is empty. */
var_string_noescape,
/* String which stores a filename.
*VAR is a malloc'd string, or NULL if the string is empty. */
var_filename,
/* ZeroableInteger. *VAR is an int. Like Unsigned Integer except
that zero really means zero. */
var_zinteger,
/* Enumerated type. Can only have one of the specified values. *VAR is a
char pointer to the name of the element that we find. */
var_enum
}
var_types;
/* This structure records one command'd definition. */
@@ -82,9 +87,10 @@ struct cmd_list_element
/* If type is cmd_set or show_cmd, first set the variables, and
then call this. */
void (*sfunc) PARAMS ((char *args, int from_tty,
struct cmd_list_element *c));
} function;
# define NO_FUNCTION ((void (*) PARAMS((char *args, int from_tty))) 0)
struct cmd_list_element * c));
}
function;
#define NO_FUNCTION ((void (*) PARAMS((char *args, int from_tty))) 0)
/* Documentation of this command (or help topic).
First line is brief documentation; remaining lines form, with it,
@@ -129,7 +135,7 @@ struct cmd_list_element
returned relative to this position. For example, suppose TEXT is "foo"
and we want to complete to "foobar". If WORD is "oo", return
"oobar"; if WORD is "baz/foo", return "baz/foobar". */
char ** (*completer) PARAMS ((char *text, char *word));
char **(*completer) PARAMS ((char *text, char *word));
/* Type of "set" or "show" command (or SET_NOT_SET if not "set"
or "show"). */
@@ -160,33 +166,33 @@ struct cmd_list_element
/* Forward-declarations of the entry-points of command.c. */
extern struct cmd_list_element *
add_cmd PARAMS ((char *, enum command_class, void (*fun) (char *, int),
char *, struct cmd_list_element **));
add_cmd PARAMS ((char *, enum command_class, void (*fun) (char *, int),
char *, struct cmd_list_element **));
extern struct cmd_list_element *
add_alias_cmd PARAMS ((char *, char *, enum command_class, int,
struct cmd_list_element **));
add_alias_cmd PARAMS ((char *, char *, enum command_class, int,
struct cmd_list_element **));
extern struct cmd_list_element *
add_prefix_cmd PARAMS ((char *, enum command_class, void (*fun) (char *, int),
char *, struct cmd_list_element **, char *, int,
struct cmd_list_element **));
add_prefix_cmd PARAMS ((char *, enum command_class, void (*fun) (char *, int),
char *, struct cmd_list_element **, char *, int,
struct cmd_list_element **));
extern struct cmd_list_element *
add_abbrev_prefix_cmd PARAMS ((char *, enum command_class,
void (*fun) (char *, int), char *,
struct cmd_list_element **, char *, int,
struct cmd_list_element **));
add_abbrev_prefix_cmd PARAMS ((char *, enum command_class,
void (*fun) (char *, int), char *,
struct cmd_list_element **, char *, int,
struct cmd_list_element **));
extern struct cmd_list_element *
lookup_cmd PARAMS ((char **, struct cmd_list_element *, char *, int, int));
lookup_cmd PARAMS ((char **, struct cmd_list_element *, char *, int, int));
extern struct cmd_list_element *
lookup_cmd_1 PARAMS ((char **, struct cmd_list_element *,
struct cmd_list_element **, int));
lookup_cmd_1 PARAMS ((char **, struct cmd_list_element *,
struct cmd_list_element **, int));
extern void
add_com PARAMS ((char *, enum command_class, void (*fun)(char *, int),
add_com PARAMS ((char *, enum command_class, void (*fun) (char *, int),
char *));
extern void
@@ -199,10 +205,10 @@ extern void
add_info_alias PARAMS ((char *, char *, int));
extern char **
complete_on_cmdlist PARAMS ((struct cmd_list_element *, char *, char *));
complete_on_cmdlist PARAMS ((struct cmd_list_element *, char *, char *));
extern char **
complete_on_enum PARAMS ((char **enumlist, char *, char *));
complete_on_enum PARAMS ((char **enumlist, char *, char *));
extern void
delete_cmd PARAMS ((char *, struct cmd_list_element **));
@@ -219,16 +225,16 @@ help_cmd_list PARAMS ((struct cmd_list_element *, enum command_class, char *,
int, GDB_FILE *));
extern struct cmd_list_element *
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
struct cmd_list_element **));
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
struct cmd_list_element **));
extern struct cmd_list_element *
add_set_enum_cmd PARAMS ((char *name, enum command_class, char *list[],
char *var, char *doc, struct cmd_list_element **c));
add_set_enum_cmd PARAMS ((char *name, enum command_class, char *list[],
char *var, char *doc, struct cmd_list_element ** c));
extern struct cmd_list_element *
add_show_from_set PARAMS ((struct cmd_list_element *,
struct cmd_list_element **));
add_show_from_set PARAMS ((struct cmd_list_element *,
struct cmd_list_element **));
/* Do a "set" or "show" command. ARG is NULL if no argument, or the text
of the argument, and FROM_TTY is nonzero if this command is being entered

View File

@@ -1,33 +1,37 @@
/* Support for complaint handling during symbol reading in GDB.
Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "complaints.h"
#include "gdbcmd.h"
extern void _initialize_complaints PARAMS ((void));
/* Structure to manage complaints about symbol file contents. */
struct complaint complaint_root[1] = {
struct complaint complaint_root[1] =
{
{
(char *) NULL, /* Complaint message */
0, /* Complaint counter */
complaint_root /* Next complaint. */
(char *) NULL, /* Complaint message */
0, /* Complaint counter */
complaint_root /* Next complaint. */
}
};
@@ -42,46 +46,33 @@ static unsigned int stop_whining = 0;
case 0: self explanatory message.
case 1: First message of a series that must start off with explanation.
case 2: Subsequent message, when user already knows we are reading
symbols and we can just state our piece. */
symbols and we can just state our piece. */
static int complaint_series = 0;
/* External variables and functions referenced. */
extern int info_verbose;
/* Functions to handle complaints during symbol reading. */
/* Print a complaint about the input symbols, and link the complaint block
into a chain for later handling. */
/* VARARGS */
void
#ifdef ANSI_PROTOTYPES
complain (struct complaint *complaint, ...)
#else
complain (va_alist)
va_dcl
#endif
complain (struct complaint *complaint,...)
{
va_list args;
#ifdef ANSI_PROTOTYPES
va_start (args, complaint);
#else
struct complaint *complaint;
va_start (args);
complaint = va_arg (args, struct complaint *);
#endif
complaint -> counter++;
if (complaint -> next == NULL)
complaint->counter++;
if (complaint->next == NULL)
{
complaint -> next = complaint_root -> next;
complaint_root -> next = complaint;
complaint->next = complaint_root->next;
complaint_root->next = complaint;
}
if (complaint -> counter > stop_whining)
if (complaint->counter > stop_whining)
{
return;
}
@@ -91,31 +82,31 @@ complain (va_alist)
{
/* Isolated messages, must be self-explanatory. */
case 0:
begin_line ();
puts_filtered ("During symbol reading, ");
wrap_here ("");
vprintf_filtered (complaint -> message, args);
puts_filtered (".\n");
break;
case 0:
begin_line ();
puts_filtered ("During symbol reading, ");
wrap_here ("");
vprintf_filtered (complaint->message, args);
puts_filtered (".\n");
break;
/* First of a series, without `set verbose'. */
case 1:
begin_line ();
puts_filtered ("During symbol reading...");
vprintf_filtered (complaint -> message, args);
puts_filtered ("...");
wrap_here ("");
complaint_series++;
break;
case 1:
begin_line ();
puts_filtered ("During symbol reading...");
vprintf_filtered (complaint->message, args);
puts_filtered ("...");
wrap_here ("");
complaint_series++;
break;
/* Subsequent messages of a series, or messages under `set verbose'.
(We'll already have produced a "Reading in symbols for XXX..."
message and will clean up at the end with a newline.) */
default:
vprintf_filtered (complaint -> message, args);
puts_filtered ("...");
wrap_here ("");
(We'll already have produced a "Reading in symbols for XXX..."
message and will clean up at the end with a newline.) */
default:
vprintf_filtered (complaint->message, args);
puts_filtered ("...");
wrap_here ("");
}
/* If GDB dumps core, we'd like to see the complaints first. Presumably
GDB will not be sending so many complaints that this becomes a
@@ -139,9 +130,9 @@ clear_complaints (sym_reading, noisy)
{
struct complaint *p;
for (p = complaint_root -> next; p != complaint_root; p = p -> next)
for (p = complaint_root->next; p != complaint_root; p = p->next)
{
p -> counter = 0;
p->counter = 0;
}
if (!sym_reading && !noisy && complaint_series > 1)

View File

@@ -1,21 +1,22 @@
/* Definitions for complaint handling during symbol reading in GDB.
Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (COMPLAINTS_H)
@@ -30,11 +31,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
if verbose, we report how many of each problem we had. */
struct complaint
{
char *message;
unsigned counter;
struct complaint *next;
};
{
char *message;
unsigned counter;
struct complaint *next;
};
/* Root of the chain of complaints that have at some point been issued.
This is used to reset the counters, and/or report the total counts. */
@@ -44,10 +45,10 @@ extern struct complaint complaint_root[1];
/* Functions that handle complaints. (in complaints.c) */
extern void
complain PARAMS ((struct complaint *, ...));
complain PARAMS ((struct complaint *,...));
extern void
clear_complaints PARAMS ((int, int));
#endif /* !defined (COMPLAINTS_H) */
#endif /* !defined (COMPLAINTS_H) */

View File

@@ -1,17 +1,5 @@
/* config.in. Generated automatically from configure.in by autoheader. */
/* Whether malloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_MALLOC
/* Whether realloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_REALLOC
/* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE
/* Whether strerror must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRERROR
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
@@ -116,6 +104,13 @@
size_t, and assorted other type changes. */
#undef PROC_SERVICE_IS_OLD
/* If you want to specify a default CPU variant, define this to be its
name, as a C string. */
#undef TARGET_CPU_DEFAULT
/* Define if the simulator is being linked in. */
#undef WITH_SIM
/* Set to true if the save_state_t structure is present */
#define HAVE_STRUCT_SAVE_STATE_T 0
@@ -155,6 +150,9 @@
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the poll function. */
#undef HAVE_POLL
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -173,6 +171,9 @@
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
/* Define if you have the socketpair function. */
#undef HAVE_SOCKETPAIR
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
@@ -248,6 +249,9 @@
/* Define if you have the <sys/reg.h> header file. */
#undef HAVE_SYS_REG_H
/* Define if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
@@ -260,6 +264,9 @@
/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -281,6 +288,9 @@
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define if you have the w library (-lw). */
#undef HAVE_LIBW
@@ -311,6 +321,9 @@
/* Define if strdup is not declared in system header files. */
#undef NEED_DECLARATION_STRDUP
/* Define if strstr is not declared in system header files. */
#undef NEED_DECLARATION_STRSTR
/* Define if <sys/procfs.h> has pstatus_t. */
#undef HAVE_PSTATUS_T

View File

@@ -2,21 +2,22 @@
Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
Contributed by David Wood (wood@lab.ultra.nyu.edu).
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* If we ever *do* end up using the standard fetch_inferior_registers,
this is the right value for U_REGS_OFFSET. */

View File

@@ -2,21 +2,22 @@
Copyright 1990, 1991, 1993, 1994 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon.
This file is part of GDB.
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 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.
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. */
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. */
/* Parameters for an EB29K (a board which plugs into a PC and is
accessed through EBMON software running on the PC, which we
@@ -43,9 +44,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
#define SKIP_PROLOGUE(pc) \
{ pc = skip_prologue (pc); }
CORE_ADDR skip_prologue ();
#define SKIP_PROLOGUE(pc) (a29k_skip_prologue (pc))
CORE_ADDR a29k_skip_prologue ();
/* Immediately after a function call, return the saved pc.
Can't go through the frames for this because on some machines
@@ -136,7 +136,7 @@ CORE_ADDR skip_prologue ();
/*
* Converts an sdb register number to an internal gdb register number.
* Currently under epi, gr96->0...gr127->31...lr0->32...lr127->159, or...
* gr64->0...gr95->31, lr0->32...lr127->159.
* gr64->0...gr95->31, lr0->32...lr127->159.
*/
#define SDB_REG_TO_REGNUM(value) \
(((value) >= 96 && (value) <= 127) ? ((value) - 96) : \
@@ -149,8 +149,8 @@ CORE_ADDR skip_prologue ();
* register sets. Namely, gcc can compile (-mkernel-registers) so that
* it uses gr64-gr95 in stead of gr96-gr127.
*/
#define MSP_HW_REGNUM 125 /* gr125 */
#define RAB_HW_REGNUM 126 /* gr126 */
#define MSP_HW_REGNUM 125 /* gr125 */
#define RAB_HW_REGNUM 126 /* gr126 */
/* Convert Processor Special register #x to REGISTER_NAMES register # */
#define SR_REGNUM(x) \
@@ -171,7 +171,7 @@ CORE_ADDR skip_prologue ();
/* This needs to be the memory stack pointer, not the register stack pointer,
to make call_function work right. */
#define SP_REGNUM MSP_REGNUM
#define FP_REGNUM 33 /* lr1 */
#define FP_REGNUM 33 /* lr1 */
/* Return register for transparent calling convention (gr122). */
#define TPC_REGNUM (122 - 96 + GR96_REGNUM)
@@ -208,8 +208,8 @@ CORE_ADDR skip_prologue ();
#define RBP_REGNUM (VAB_REGNUM + 7)
#define TMC_REGNUM (VAB_REGNUM + 8)
#define TMR_REGNUM (VAB_REGNUM + 9)
#define NPC_REGNUM (VAB_REGNUM + 10) /* pc0 */
#define PC_REGNUM (VAB_REGNUM + 11) /* pc1 */
#define NPC_REGNUM (VAB_REGNUM + 10) /* pc0 */
#define PC_REGNUM (VAB_REGNUM + 11) /* pc1 */
#define PC2_REGNUM (VAB_REGNUM + 12)
#define MMU_REGNUM (VAB_REGNUM + 13)
#define LRU_REGNUM (VAB_REGNUM + 14)
@@ -224,7 +224,7 @@ CORE_ADDR skip_prologue ();
#define IPA_REGNUM (VAB_REGNUM + 22)
#define IPB_REGNUM (VAB_REGNUM + 23)
#endif /* !defined(REGISTER_NAMES) */
#endif /* !defined(REGISTER_NAMES) */
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
@@ -310,7 +310,7 @@ extern use_struct_convention_fn a29k_use_struct_convention;
write_register_bytes (REGISTER_BYTE (RETURN_REGNUM), (char *)(VALBUF), \
TYPE_LENGTH (TYPE)); \
}
/* *INDENT-OFF* */
/* The a29k user's guide documents well what the stacks look like.
But what isn't so clear there is how this interracts with the
symbols, or with GDB.
@@ -321,10 +321,10 @@ extern use_struct_convention_fn a29k_use_struct_convention;
alloca()), the result of the calculation msp + msize.
LOC_ARG, LOC_LOCAL - For GCC, these are relative to saved_msp.
For high C, these are relative to msp (making alloca impossible).
For high C, these are relative to msp (making alloca impossible).
LOC_REGISTER, LOC_REGPARM - The register number is the number at the
time the function is running (after the prologue), or in the case
of LOC_REGPARM, may be a register number in the range 160-175.
time the function is running (after the prologue), or in the case
of LOC_REGPARM, may be a register number in the range 160-175.
The compilers do things like store an argument into memory, and then put out
a LOC_ARG for it, or put it into global registers and put out a
@@ -349,73 +349,75 @@ extern use_struct_convention_fn a29k_use_struct_convention;
registers need to be filled in the function epilogue.
Consider the code:
< call bar>
loc1: . . .
bar: sub gr1,gr1,rsize_b
. . .
add mfp,msp,0
sub msp,msp,msize_b
. . .
< call foo >
loc2: . . .
foo: sub gr1,gr1,rsize_f
. . .
add mfp,msp,0
sub msp,msp,msize_f
. . .
loc3: < suppose the inferior stops here >
< call bar>
loc1: . . .
bar: sub gr1,gr1,rsize_b
. . .
add mfp,msp,0
sub msp,msp,msize_b
. . .
< call foo >
loc2: . . .
foo: sub gr1,gr1,rsize_f
. . .
add mfp,msp,0
sub msp,msp,msize_f
. . .
loc3: < suppose the inferior stops here >
memory stack register stack
| | |____________|
| | |____loc1____|
+------->|___________| | | ^
| | ^ | | locals_b | |
| | | | |____________| |
| | | | | | | rsize_b
| | | msize_b | | args_to_f | |
| | | | |____________| |
| | | | |____lr1_____| V
| | V | |____loc2____|<----------------+
| +--->|___________|<---------mfp | ^ |
| | | ^ | | locals_f | | |
| | | | msize_f | |____________| | |
| | | | | | | | rsize_f |
| | | V | | args | | |
| | |___________|<msp |____________| | |
| | |_____lr1____| V |
| | |___garbage__| <- gr1 <----+ |
| | | |
| | | |
| | pc=loc3 | |
| | | |
| | | |
| | frame cache | |
| | |_________________| | |
| | |rsize=rsize_b | | |
| | |msize=msize_b | | |
+---|--------saved_msp | | |
| |frame------------------------------------|---+
| |pc=loc2 | |
| |_________________| |
| |rsize=rsize_f | |
| |msize=msize_f | |
+--------saved_msp | |
|frame------------------------------------+
|pc=loc3 |
|_________________|
memory stack register stack
| | |____________|
| | |____loc1____|
+------->|___________| | | ^
| | ^ | | locals_b | |
| | | | |____________| |
| | | | | | | rsize_b
| | | msize_b | | args_to_f | |
| | | | |____________| |
| | | | |____lr1_____| V
| | V | |____loc2____|<----------------+
| +--->|___________|<---------mfp | ^ |
| | | ^ | | locals_f | | |
| | | | msize_f | |____________| | |
| | | | | | | | rsize_f |
| | | V | | args | | |
| | |___________|<msp |____________| | |
| | |_____lr1____| V |
| | |___garbage__| <- gr1 <----+ |
| | | |
| | | |
| | pc=loc3 | |
| | | |
| | | |
| | frame cache | |
| | |_________________| | |
| | |rsize=rsize_b | | |
| | |msize=msize_b | | |
+---|--------saved_msp | | |
| |frame------------------------------------|---+
| |pc=loc2 | |
| |_________________| |
| |rsize=rsize_f | |
| |msize=msize_f | |
+--------saved_msp | |
|frame------------------------------------+
|pc=loc3 |
|_________________|
So, is that sufficiently confusing? Welcome to the 29000.
Notes:
* The frame for foo uses a memory frame pointer but the frame for
bar does not. In the latter case the saved_msp is
computed by adding msize to the saved_msp of the
next frame.
bar does not. In the latter case the saved_msp is
computed by adding msize to the saved_msp of the
next frame.
* msize is in the frame cache only for high C's sake. */
/* *INDENT-ON* */
void read_register_stack ();
long read_register_stack_integer ();
#define FRAME_INIT_SAVED_REGS(fi) /*no-op*/
#define FRAME_INIT_SAVED_REGS(fi) /*no-op */
#define EXTRA_FRAME_INFO \
CORE_ADDR saved_msp; \
@@ -429,14 +431,14 @@ long read_register_stack_integer ();
/* Because INIT_FRAME_PC gets passed fromleaf, that's where we init
not only ->pc and ->frame, but all the extra stuff, when called from
get_prev_frame_info, that is. */
get_prev_frame, that is. */
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) init_extra_frame_info(fci)
void init_extra_frame_info ();
#define INIT_FRAME_PC(fromleaf, fci) init_frame_pc(fromleaf, fci)
void init_frame_pc ();
/* FRAME_CHAIN takes a FRAME
and produces the frame's chain-pointer.
@@ -472,11 +474,10 @@ void init_frame_pc ();
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_look_for_prologue(FI)
/* An expression that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. */
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
/* Saved pc (i.e. return address). */
#define FRAME_SAVED_PC(fraim) \
@@ -495,7 +496,7 @@ extern CORE_ADDR frame_locals_address ();
the argcount field from it, to support debugging assembler code.
Problem was, the "argcount" field never did hold the argument
count. */
#define FRAME_NUM_ARGS(numargs, fi) ((numargs) = -1)
#define FRAME_NUM_ARGS(fi) (-1)
#define FRAME_ARGS_ADDRESS(fi) FRAME_LOCALS_ADDRESS (fi)
@@ -506,10 +507,13 @@ extern CORE_ADDR frame_locals_address ();
/* Provide our own get_saved_register. HAVE_REGISTER_WINDOWS is insufficient
because registers get renumbered on the a29k without getting saved. */
#define GET_SAVED_REGISTER
struct frame_info;
void a29k_get_saved_register PARAMS ((char *raw_buffer, int *optimized, CORE_ADDR * addrp, struct frame_info * frame, int regnum, enum lval_type * lvalp));
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Call function stuff. */
/* *INDENT-OFF* */
/* The dummy frame looks like this (see also the general frame picture
above):
@@ -559,7 +563,10 @@ extern CORE_ADDR frame_locals_address ();
retaddr_sproc: Contains the PC at the time we call the function.
set by PUSH_DUMMY_FRAME and read by POP_FRAME.
retaddr_dummy: This points to a breakpoint instruction in the dummy. */
/* *INDENT-ON* */
/* Rsize for dummy frame, in bytes. */
/* Bytes for outgoing args, lr1, and retaddr. */
@@ -596,14 +603,14 @@ extern void pop_frame ();
mtsrim cr, 15
loadm 0, 0, lr2, msp ; load first 16 words of arguments into registers
add msp, msp, 16 * 4 ; point to the remaining arguments
CONST_INSN:
const lr0,inf ; (replaced by half of target addr)
consth lr0,inf ; (replaced by other half of target addr)
CONST_INSN:
const lr0,inf ; (replaced by half of target addr)
consth lr0,inf ; (replaced by other half of target addr)
calli lr0, lr0
aseq 0x40,gr1,gr1 ; nop
BREAKPT_INSN:
asneq 0x50,gr1,gr1 ; breakpoint (replaced by local breakpoint insn)
*/
BREAKPT_INSN:
asneq 0x50,gr1,gr1 ; breakpoint (replaced by local breakpoint insn)
*/
#if TARGET_BYTE_ORDER == HOST_BYTE_ORDER
#define BS(const) const
@@ -628,7 +635,7 @@ extern void pop_frame ();
BS(0x72500101)}
#define CALL_DUMMY_LENGTH (8 * 4)
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
/* Helper macro for FIX_CALL_DUMMY. WORDP is a long * which points to a
word in target byte order; bits 0-7 and 16-23 of *WORDP are replaced with
@@ -643,9 +650,9 @@ extern void pop_frame ();
#else /* Target is little endian. */
#define STUFF_I16(WORDP, DATA) \
{
*(char *)(WORDP) = ((DATA) & 0xff);
*((char *)(WORDP) + 2) = (((DATA) >> 8) & 0xff);
}
*(char *) (WORDP) = ((DATA) & 0xff);
*((char *) (WORDP) + 2) = (((DATA) >> 8) & 0xff);
}
#endif /* Target is little endian. */
/* Insert the specified number of args and function address
@@ -689,7 +696,8 @@ extern void pop_frame ();
(num), SYMBOL_SOURCE_NAME (sym)), (num) \
: (num))
extern enum a29k_processor_types {
extern enum a29k_processor_types
{
a29k_unknown,
/* Bit 0x400 of the CPS does *not* identify freeze mode, i.e. 29000,
@@ -698,7 +706,8 @@ extern enum a29k_processor_types {
/* Bit 0x400 of the CPS does identify freeze mode, i.e. 29050. */
a29k_freeze_mode
} processor_type;
}
processor_type;
/* We need three arguments for a general frame specification for the
"frame" or "info frame" command. */

View File

@@ -1,22 +1,23 @@
/* Parameters for NYU Ultracomputer 29000 target, for GDB, the GNU debugger.
Copyright 1990, 1991 Free Software Foundation, Inc.
Contributed by David Wood @ New York University (wood@nyu.edu).
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 file is part of GDB.
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.
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.
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. */
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. */
/* This file includes tm-a29k.h, but predefines REGISTER_NAMES and
related macros. The file supports a a29k running our flavor of
@@ -28,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer.
*/
#define NUM_REGS (EXO_REGNUM + 1)
#define NUM_REGS (EXO_REGNUM + 1)
#define REGISTER_NAMES { \
"gr1", \
@@ -62,14 +63,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef KERNEL_DEBUGGING
# define PADDR_U_REGNUM 22 /* gr86 */
# define RETURN_REGNUM GR64_REGNUM
#define PADDR_U_REGNUM 22 /* gr86 */
#define RETURN_REGNUM GR64_REGNUM
#else
# define RETURN_REGNUM GR96_REGNUM
#endif /* KERNEL_DEBUGGING */
#define RETURN_REGNUM GR96_REGNUM
#endif /* KERNEL_DEBUGGING */
/* Should rename all GR96_REGNUM to RETURN_REGNUM */
/* Should rename all GR96_REGNUM to RETURN_REGNUM */
#define GR1_REGNUM (0)
#define GR64_REGNUM 1
#define GR96_REGNUM (GR64_REGNUM + 32)
@@ -90,41 +91,41 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define RFB_REGNUM (127 - 96 + RETURN_REGNUM)
/* Register Stack Pointer. */
#define RSP_REGNUM GR1_REGNUM
#define LR0_REGNUM ( 32 + GR96_REGNUM)
#define LR0_REGNUM ( 32 + GR96_REGNUM)
/* Protected Special registers */
#define VAB_REGNUM (LR0_REGNUM + 128)
#define OPS_REGNUM (VAB_REGNUM + 1)
#define CPS_REGNUM (VAB_REGNUM + 2)
#define CFG_REGNUM (VAB_REGNUM + 3)
#define CHA_REGNUM (VAB_REGNUM + 4)
#define CHD_REGNUM (VAB_REGNUM + 5)
#define CHC_REGNUM (VAB_REGNUM + 6)
#define RBP_REGNUM (VAB_REGNUM + 7)
#define TMC_REGNUM (VAB_REGNUM + 8)
#define TMR_REGNUM (VAB_REGNUM + 9)
#define OPS_REGNUM (VAB_REGNUM + 1)
#define CPS_REGNUM (VAB_REGNUM + 2)
#define CFG_REGNUM (VAB_REGNUM + 3)
#define CHA_REGNUM (VAB_REGNUM + 4)
#define CHD_REGNUM (VAB_REGNUM + 5)
#define CHC_REGNUM (VAB_REGNUM + 6)
#define RBP_REGNUM (VAB_REGNUM + 7)
#define TMC_REGNUM (VAB_REGNUM + 8)
#define TMR_REGNUM (VAB_REGNUM + 9)
#define NPC_REGNUM (VAB_REGNUM + 10) /* pc0 */
#define PC_REGNUM (VAB_REGNUM + 11) /* pc1 */
#define PC2_REGNUM (VAB_REGNUM + 12) /* pc2 */
#define PC_REGNUM (VAB_REGNUM + 11) /* pc1 */
#define PC2_REGNUM (VAB_REGNUM + 12) /* pc2 */
#define MMU_REGNUM (VAB_REGNUM + 13)
#define LRU_REGNUM (VAB_REGNUM + 14)
/* Register sequence gap */
/* Unprotected Special registers */
#define IPC_REGNUM (LRU_REGNUM + 1)
#define IPA_REGNUM (IPC_REGNUM + 1)
#define IPB_REGNUM (IPC_REGNUM + 2)
#define Q_REGNUM (IPC_REGNUM + 3)
#define ALU_REGNUM (IPC_REGNUM + 4)
#define IPC_REGNUM (LRU_REGNUM + 1)
#define IPA_REGNUM (IPC_REGNUM + 1)
#define IPB_REGNUM (IPC_REGNUM + 2)
#define Q_REGNUM (IPC_REGNUM + 3)
#define ALU_REGNUM (IPC_REGNUM + 4)
#define PS_REGNUM ALU_REGNUM
#define BP_REGNUM (IPC_REGNUM + 5)
#define FC_REGNUM (IPC_REGNUM + 6)
#define CR_REGNUM (IPC_REGNUM + 7)
#define BP_REGNUM (IPC_REGNUM + 5)
#define FC_REGNUM (IPC_REGNUM + 6)
#define CR_REGNUM (IPC_REGNUM + 7)
/* Register sequence gap */
#define FPE_REGNUM (CR_REGNUM + 1)
#define INT_REGNUM (FPE_REGNUM + 1)
#define FPS_REGNUM (FPE_REGNUM + 2)
#define FPE_REGNUM (CR_REGNUM + 1)
#define INT_REGNUM (FPE_REGNUM + 1)
#define FPS_REGNUM (FPE_REGNUM + 2)
/* Register sequence gap */
#define EXO_REGNUM (FPS_REGNUM + 1)
#define EXO_REGNUM (FPS_REGNUM + 1)
/* Special register #x. */
#define SR_REGNUM(x) \
@@ -160,7 +161,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
* Converts an sdb register number to an internal gdb register number.
* Currently under gcc, gr96->0...gr128->31...lr0->32...lr127->159, or...
* gr64->0...gr95->31, lr0->32...lr127->159.
* gr64->0...gr95->31, lr0->32...lr127->159.
*/
#define SDB_REG_TO_REGNUM(value) (((value)<32) ? ((value)+RETURN_REGNUM) : \
((value)-32+LR0_REGNUM))
@@ -168,7 +169,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef KERNEL_DEBUGGING
/* ublock virtual address as defined in our sys/param.h */
/* FIXME: Should get this from sys/param.h */
# define UVADDR ((32*0x100000)-8192)
#define UVADDR ((32*0x100000)-8192)
#endif
/*
@@ -177,11 +178,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
*/
#if !defined(KERNEL_DEBUGGING)
#ifdef SYM1
# define IN_SIGTRAMP(pc, name) (name && STREQ ("sigtramp", name))
#define IN_SIGTRAMP(pc, name) (name && STREQ ("sigtramp", name))
#else
Need to define IN_SIGTRAMP() for sym2.
Need to define
IN_SIGTRAMP () for sym2.
#endif
#endif /* !KERNEL_DEBUGGING */
#endif /* !KERNEL_DEBUGGING */
#include "a29k/tm-a29k.h"
@@ -191,36 +193,35 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
mtsrim cr, 15
loadm 0, 0, lr2, msp ; load first 16 words of arguments into registers
add msp, msp, 16 * 4 ; point to the remaining arguments
CONST_INSN:
CONST_INSN:
const gr96,inf
consth gr96,inf
calli lr0, gr96
aseq 0x40,gr1,gr1 ; nop
asneq 0x50,gr1,gr1 ; breakpoint
When KERNEL_DEBUGGIN is defined, msp -> gr93, gr96 -> gr64,
7d -> 5d, 60 -> 40
*/
7d -> 5d, 60 -> 40
*/
/* Position of the "const" instruction within CALL_DUMMY in bytes. */
#undef CALL_DUMMY
#if TARGET_BYTE_ORDER == HOST_BYTE_ORDER
#ifdef KERNEL_DEBUGGING /* gr96 -> gr64 */
# define CALL_DUMMY {0x0400870f, 0x3600825d, 0x155d5d40, 0x03ff40ff, \
#ifdef KERNEL_DEBUGGING /* gr96 -> gr64 */
#define CALL_DUMMY {0x0400870f, 0x3600825d, 0x155d5d40, 0x03ff40ff, \
0x02ff40ff, 0xc8008040, 0x70400101, 0x72500101}
#else
# define CALL_DUMMY {0x0400870f, 0x3600827d, 0x157d7d40, 0x03ff60ff, \
#define CALL_DUMMY {0x0400870f, 0x3600827d, 0x157d7d40, 0x03ff60ff, \
0x02ff60ff, 0xc8008060, 0x70400101, 0x72500101}
#endif /* KERNEL_DEBUGGING */
#else /* Byte order differs. */
you lose
#endif /* Byte order differs. */
#endif /* KERNEL_DEBUGGING */
#else /* Byte order differs. */
you lose
#endif /* Byte order differs. */
#if !defined(KERNEL_DEBUGGING)
# ifdef SYM1
# undef DECR_PC_AFTER_BREAK
# define DECR_PC_AFTER_BREAK 0 /* Sym1 kernel does the decrement */
# else
->"ULTRA3 running other than sym1 OS"!;
# endif
#ifdef SYM1
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0 /* Sym1 kernel does the decrement */
#else
->"ULTRA3 running other than sym1 OS" !;
#endif
#endif /* !KERNEL_DEBUGGING */

View File

@@ -1,28 +1,26 @@
/* Target machine description for VxWorks on the 29k, for GDB, the GNU debugger.
Copyright 1994 Free Software Foundation, Inc.
Copyright 1994, 1999 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB.
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 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.
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. */
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 "a29k/tm-a29k.h"
#define GDBINIT_FILENAME ".vxgdbinit"
#define DEFAULT_PROMPT "(vxgdb) "
#include "tm-vxworks.h"
/* Number of registers in a ptrace_getregs call. */
@@ -71,9 +69,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
want the inferior to stop after the function call has completed.
call_function_by_hand () sets a breakpoint here (via CALL_DUMMY_BREAK_SET),
which POP_FRAME later deletes (via CALL_DUMMY_BREAK_DELETE). */
#define CALL_DUMMY_STOP_OFFSET (7 * 4)
/* The offset of the first instruction of the CALL_DUMMY code fragment
relative to the frame pointer for a dummy frame. This is equal to
the size of the CALL_DUMMY plus the arg_slop area size (see the diagram
@@ -121,12 +119,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
frame pointer in the dummy frame.
NOTE: in the both of the following definitions, we take advantage of
knowledge of the implementation of the target breakpoint operation,
in that we pass a null pointer as the second argument. It seems
reasonable to assume that any target requiring the use of
CALL_DUMMY_BREAK_{SET,DELETE} will not store the breakpoint
shadow contents in GDB; in any case, this assumption is vaild
for all VxWorks-related targets. */
knowledge of the implementation of the target breakpoint operation,
in that we pass a null pointer as the second argument. It seems
reasonable to assume that any target requiring the use of
CALL_DUMMY_BREAK_{SET,DELETE} will not store the breakpoint
shadow contents in GDB; in any case, this assumption is vaild
for all VxWorks-related targets. */
#define CALL_DUMMY_BREAK_SET(call_dummy_addr) \
target_insert_breakpoint ((call_dummy_addr) + CALL_DUMMY_STOP_OFFSET, \
@@ -149,7 +147,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
the CALL_DUMMY handling for all targets (at least, a clean solution
would probably require this). Arguably, this should go in "tm-29k.h"
rather than here. */
#define STRUCT_VAL_ARGS_UNSUPPORTED
#define BKPT_OFFSET (7 * 4)
@@ -162,16 +160,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
STUFF_I16((char *)dummyname + CONST_INSN + 4, fun >> 16);\
*(int *)((char *)dummyname + BKPT_OFFSET) = BKPT_INSTR;\
}
/* Offsets into jmp_buf. They are derived from VxWorks' REG_SET struct
(see VxWorks' setjmp.h). Note that Sun2, Sun3 and SunOS4 and VxWorks have
different REG_SET structs, hence different layouts for the jmp_buf struct.
Only JB_PC is needed for getting the saved PC value. */
#define JB_ELEMENT_SIZE 4 /* size of each element in jmp_buf */
#define JB_ELEMENT_SIZE 4 /* size of each element in jmp_buf */
#define JB_PC 3 /* offset of pc (pc1) in jmp_buf */
/* Figure out where the longjmp will land. We expect that we have just entered
longjmp and haven't yet setup the stack frame, so the args are still in the
output regs. lr2 (LR2_REGNUM) points at the jmp_buf structure from which we
@@ -182,14 +180,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern int get_longjmp_target PARAMS ((CORE_ADDR *));
/* VxWorks adjusts the PC after a breakpoint has been hit. */
#undef DECR_PC_AFTER_BREAK
#define DECR_PC_AFTER_BREAK 0
/* Do whatever promotions are appropriate on a value being returned
from a function. VAL is the user-supplied value, and FUNC_TYPE
is the return type of the function if known, else 0.
For the Am29k, as far as I understand, if the function return type is known,
cast the value to that type; otherwise, ensure that integer return values
fill all of gr96.
@@ -198,7 +196,7 @@ extern int get_longjmp_target PARAMS ((CORE_ADDR *));
to most Am29K-based systems; but once moved into that file, it might
need to be redefined for all Am29K-based targets that also redefine
STORE_RETURN_VALUE. For now, to be safe, we define it here. */
#define PROMOTE_RETURN_VALUE(val, func_type) \
do { \
if (func_type) \

View File

@@ -2,21 +2,22 @@
Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
Contributed by David Wood (wood@lab.ultra.nyu.edu).
This file is part of GDB.
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 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.
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. */
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. */
/* Here at NYU we have what we call an ULTRA3 PE board. So
ifdefs for ULTRA3 are my doing. At this point in time,
@@ -27,22 +28,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define HAVE_WAIT_STRUCT
#ifndef L_SET
# define L_SET 0 /* set the seek pointer */
# define L_INCR 1 /* increment the seek pointer */
# define L_XTND 2 /* extend the file size */
#define L_SET 0 /* set the seek pointer */
#define L_INCR 1 /* increment the seek pointer */
#define L_XTND 2 /* extend the file size */
#endif
#ifndef O_RDONLY
# define O_RDONLY 0
# define O_WRONLY 1
# define O_RDWR 2
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
#endif
#ifndef F_OK
# define R_OK 4
# define W_OK 2
# define X_OK 1
# define F_OK 0
#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0
#endif
/* System doesn't provide siginterrupt(). */

View File

@@ -1,21 +1,22 @@
/* Native definitions for alpha running Linux.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
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. */
/* Figure out where the longjmp will land. We expect that we have just entered
longjmp and haven't yet setup the stack frame, so the args are still in the

View File

@@ -1,21 +1,22 @@
/* Native definitions for alpha running OSF/1.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* Figure out where the longjmp will land. We expect that we have just entered
longjmp and haven't yet setup the stack frame, so the args are still in the

View File

@@ -1,21 +1,22 @@
/* Native definitions for alpha running OSF/1-2.x, using procfs.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* Get generic OSF/1 definitions. */
#include "alpha/nm-osf.h"

View File

@@ -1,21 +1,22 @@
/* Native definitions for alpha running OSF/1-3.x and higher, using procfs.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* OSF/1-3.x fixes some OSF/1-2.x procfs peculiarities and adds
a new one. */

View File

@@ -2,21 +2,22 @@
also used by the Alpha/Netware and Alpha/Linux targets.
Copyright 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef TM_ALPHA_H
#define TM_ALPHA_H
@@ -25,12 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/sym.h" /* Needed for PDR below. */
#include "coff/symconst.h"
#ifdef __STDC__
struct frame_info;
struct type;
struct value;
struct symbol;
#endif
#if !defined (TARGET_BYTE_ORDER)
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
@@ -59,7 +58,7 @@ struct symbol;
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
#define SKIP_PROLOGUE(pc) pc = alpha_skip_prologue(pc, 0)
#define SKIP_PROLOGUE(pc) (alpha_skip_prologue(pc, 0))
extern CORE_ADDR alpha_skip_prologue PARAMS ((CORE_ADDR addr, int lenient));
/* Immediately after a function call, return the saved pc.
@@ -69,7 +68,7 @@ extern CORE_ADDR alpha_skip_prologue PARAMS ((CORE_ADDR addr, int lenient));
#define SAVED_PC_AFTER_CALL(frame) alpha_saved_pc_after_call(frame)
extern CORE_ADDR
alpha_saved_pc_after_call PARAMS ((struct frame_info *));
alpha_saved_pc_after_call PARAMS ((struct frame_info *));
/* Are we currently handling a signal ? */
@@ -79,7 +78,7 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
#define BREAKPOINT {0x80, 0, 0, 0} /* call_pal bpt */
#define BREAKPOINT {0x80, 0, 0, 0} /* call_pal bpt */
/* Amount PC must be decremented by after a breakpoint.
This is often the number of bytes in BREAKPOINT
@@ -110,7 +109,7 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",\
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",\
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr",\
"pc", "vfp", \
}
@@ -130,8 +129,9 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
#define SP_REGNUM 30 /* Contains address of top of stack */
#define RA_REGNUM 26 /* Contains return address value */
#define ZERO_REGNUM 31 /* Read-only register, always 0 */
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPA0_REGNUM 48 /* First float arg during a subr call */
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPA0_REGNUM 48 /* First float arg during a subr call */
#define FPCR_REGNUM 63 /* Floating point control register */
#define PC_REGNUM 64 /* Contains program counter */
#define FP_REGNUM 65 /* Virtual frame pointer */
@@ -171,12 +171,12 @@ alpha_saved_pc_after_call PARAMS ((struct frame_info *));
from raw format to virtual format.
The alpha needs a conversion between register and memory format if
the register is a floating point register and
memory format is float, as the register format must be double
memory format is float, as the register format must be double
or
memory format is an integer with 4 bytes or less, as the representation
of integers in floating point registers is different. */
memory format is an integer with 4 bytes or less, as the representation
of integers in floating point registers is different. */
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM && (N) < FP0_REGNUM + 32)
#define REGISTER_CONVERTIBLE(N) ((N) >= FP0_REGNUM && (N) < FP0_REGNUM + 31)
/* Convert data from raw format for register REGNUM in buffer FROM
to virtual format with type TYPE in buffer TO. */
@@ -198,13 +198,14 @@ alpha_register_convert_to_raw PARAMS ((struct type *, int, char *, char *));
of data in register N. */
#define REGISTER_VIRTUAL_TYPE(N) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+31) \
? builtin_type_double : builtin_type_long) \
/* Store the address of the place in which to copy the structure the
subroutine will return. Handled by alpha_push_arguments. */
#define STORE_STRUCT_RETURN(addr, sp) /**/
#define STORE_STRUCT_RETURN(addr, sp)
/**/
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
@@ -237,8 +238,8 @@ alpha_store_return_value PARAMS ((struct type *, char *));
/* Structures are returned by ref in extra arg0 */
#define USE_STRUCT_CONVENTION(gcc_p, type) 1
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
@@ -251,18 +252,17 @@ extern CORE_ADDR alpha_frame_chain PARAMS ((struct frame_info *));
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
/* An expression that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. */
/* We handle this differently for alpha, and maybe we should not */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) {(FRAMELESS) = 0;}
#define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
/* Saved Pc. */
#define FRAME_SAVED_PC(FRAME) (alpha_frame_saved_pc(FRAME))
extern CORE_ADDR
alpha_frame_saved_pc PARAMS ((struct frame_info *));
alpha_frame_saved_pc PARAMS ((struct frame_info *));
/* The alpha has two different virtual pointers for arguments and locals.
@@ -286,7 +286,7 @@ alpha_frame_saved_pc PARAMS ((struct frame_info *));
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(num, fi) ((num) = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
@@ -306,14 +306,14 @@ extern void alpha_find_saved_regs PARAMS ((struct frame_info *));
alpha_find_saved_regs (frame_info); \
(frame_info)->saved_regs[SP_REGNUM] = (frame_info)->frame; \
} while (0)
/* Things needed for making the inferior call functions. */
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
(alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
extern CORE_ADDR
alpha_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
alpha_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
/* Push an empty stack frame, to record the current PC, etc. */
@@ -366,7 +366,7 @@ extern CORE_ADDR alpha_call_dummy_address PARAMS ((void));
/* There's a mess in stack frame creation. See comments in blockframe.c
near reference to INIT_FRAME_PC_FIRST. */
#define INIT_FRAME_PC(fromleaf, prev) /* nada */
#define INIT_FRAME_PC(fromleaf, prev) /* nada */
#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
(prev)->pc = ((fromleaf) ? SAVED_PC_AFTER_CALL ((prev)->next) : \
@@ -382,10 +382,12 @@ extern void ecoff_relocate_efi PARAMS ((struct symbol *, CORE_ADDR));
This overlays the ALPHA's PDR records,
alpharead.c (ab)uses this to save memory */
typedef struct alpha_extra_func_info {
long numargs; /* number of args to procedure (was iopt) */
PDR pdr; /* Procedure descriptor record */
} *alpha_extra_func_info_t;
typedef struct alpha_extra_func_info
{
long numargs; /* number of args to procedure (was iopt) */
PDR pdr; /* Procedure descriptor record */
}
*alpha_extra_func_info_t;
/* Define the extra_func_info that mipsread.c needs.
FIXME: We should define our own PDR interface, perhaps in a separate
@@ -406,7 +408,7 @@ init_extra_frame_info PARAMS ((struct frame_info *));
#define PRINT_EXTRA_FRAME_INFO(fi) \
{ \
if (fi && fi->proc_desc && fi->proc_desc->pdr.framereg < NUM_REGS) \
printf_filtered (" frame pointer is at %s+%d\n", \
printf_filtered (" frame pointer is at %s+%ld\n", \
REGISTER_NAME (fi->proc_desc->pdr.framereg), \
fi->proc_desc->pdr.frameoffset); \
}

View File

@@ -2,21 +2,22 @@
definitions here are used when the _target_ system is running Linux.
Copyright 1996 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef TM_LINUXALPHA_H
#define TM_LINUXALPHA_H

View File

@@ -1,21 +1,22 @@
/* Host definitions for GDB running on an Alpha under Linux
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (HOST_BYTE_ORDER)
#define HOST_BYTE_ORDER LITTLE_ENDIAN

View File

@@ -1,21 +1,22 @@
/* Host definitions for GDB running on an alpha under OSF/1
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if !defined (HOST_BYTE_ORDER)
#define HOST_BYTE_ORDER LITTLE_ENDIAN

View File

@@ -2,21 +2,22 @@
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB.
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 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.
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. */
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. */
/* Used by arc-tdep.c to set the default cpu type. */
#define DEFAULT_ARC_CPU_TYPE "base"
@@ -37,11 +38,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
knows that the function has a frame. Its result is equal
to its input PC if the function is frameless, unequal otherwise. */
#define SKIP_PROLOGUE(pc) \
{ pc = skip_prologue (pc, 0); }
#define SKIP_PROLOGUE_FRAMELESS_P(pc) \
{ pc = skip_prologue (pc, 1); }
extern CORE_ADDR skip_prologue PARAMS ((CORE_ADDR, int));
#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
#define SKIP_PROLOGUE_FRAMELESS_P(pc) (arc_skip_prologue (pc, 1))
extern CORE_ADDR arc_skip_prologue PARAMS ((CORE_ADDR, int));
/* Sequence of bytes for breakpoint instruction.
??? The current value is "sr -1,[-1]" and is for the simulator only.
@@ -118,15 +117,15 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
/* Register numbers of various important registers (used to index
into arrays of register names and register values). */
#define R0_REGNUM 0 /* First local register */
#define R59_REGNUM 59 /* Last local register */
#define FP_REGNUM 27 /* Contains address of executing stack frame */
#define SP_REGNUM 28 /* stack pointer */
#define BLINK_REGNUM 31 /* link register */
#define STA_REGNUM 61 /* processor status word */
#define PC_REGNUM 91 /* instruction pointer */
#define AUX_BEG_REGNUM 61 /* aux reg begins */
#define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */
#define R0_REGNUM 0 /* First local register */
#define R59_REGNUM 59 /* Last local register */
#define FP_REGNUM 27 /* Contains address of executing stack frame */
#define SP_REGNUM 28 /* stack pointer */
#define BLINK_REGNUM 31 /* link register */
#define STA_REGNUM 61 /* processor status word */
#define PC_REGNUM 91 /* instruction pointer */
#define AUX_BEG_REGNUM 61 /* aux reg begins */
#define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */
/* Fake registers used to mark immediate data. */
#define SHIMM_FLAG_REGNUM 61
@@ -160,8 +159,8 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
0 \
} \
}
#define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
#define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
@@ -186,8 +185,8 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
/* Return the GDB type object for the "standard" data type
of data in register N. */
#define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
/* Macros for understanding function return values... */
/* Does the specified function use the "struct returning" convention
@@ -209,7 +208,7 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. This is only called if USE_STRUCT_CONVENTION for this
type is 0.
*/
*/
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
@@ -230,8 +229,8 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
subroutine will return. This is called from call_function. */
#define STORE_STRUCT_RETURN(ADDR, SP) \
error ("Returning values from functions is not implemented in arc gdb")
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
@@ -267,23 +266,17 @@ extern void arc_software_single_step PARAMS ((unsigned int, int));
and has no caller. */
#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
/* An expression that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
do { \
if ((FI)->signal_handler_caller) \
(FRAMELESS) = 0; \
else \
(FRAMELESS) = frameless_look_for_prologue (FI); \
} while (0)
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
/* Where is the PC for a specific frame.
A leaf function may never save blink, so we have to check for that here. */
#define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame))
struct frame_info; /* in case frame.h not included yet */
struct frame_info; /* in case frame.h not included yet */
CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *));
/* If the argument is on the stack, it will be here.
@@ -302,7 +295,7 @@ CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *));
/* Set NUMARGS to the number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
@@ -312,26 +305,28 @@ CORE_ADDR arc_frame_saved_pc PARAMS ((struct frame_info *));
#define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
frame_find_saved_regs (frame_info_addr, &sr)
extern void frame_find_saved_regs(); /* See arc-tdep.c */
extern void frame_find_saved_regs (); /* See arc-tdep.c */
/* Things needed for making calls to functions in the inferior process */
void arc_push_dummy_frame (void);
#define PUSH_DUMMY_FRAME \
push_dummy_frame ()
arc_push_dummy_frame ()
/* Discard from the stack the innermost frame, restoring all registers. */
void arc_pop_frame (void);
#define POP_FRAME \
pop_frame ()
arc_pop_frame ()
/* This sequence of words is the instructions bl xxxx, flag 1 */
#define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
#define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
#define CALL_DUMMY_LENGTH 8
/* Start execution at beginning of dummy */
#define CALL_DUMMY_START_OFFSET 0
#define CALL_DUMMY_START_OFFSET 0
/* Insert the specified number of args and function address
into a call sequence of the above form stored at 'dummyname'.*/
into a call sequence of the above form stored at 'dummyname'. */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
{ \
int from, to, delta, loc; \
@@ -344,4 +339,3 @@ extern void frame_find_saved_regs(); /* See arc-tdep.c */
*((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \
*((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \
}

View File

@@ -1,5 +1,6 @@
# Target: Acorn RISC machine (ARM) with simulator
TDEPFILES= arm-tdep.o remote-rdp.o
TDEPFILES= arm-tdep.o remote-rdp.o remote-rdi.o
TDEPLIBS= rdi-share/libangsd.a
TM_FILE= tm-arm.h
SIM_OBS = remote-sim.o

View File

@@ -1,21 +1,22 @@
/* Definitions to make GDB run on an ARM under RISCiX (4.3bsd).
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* This is the amount to subtract from u.u_ar0
to get the offset in the core file of the register values. */

View File

@@ -1,26 +1,26 @@
/* Definitions to make GDB target for an ARM
Copyright 1986, 1987, 1989, 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
Copyright 1986-1989, 1991, 1993-1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifdef __STDC__ /* Forward decls for prototypes */
/* Forward decls for prototypes */
struct type;
struct value;
#endif
#define TARGET_BYTE_ORDER_SELECTABLE
@@ -56,7 +56,7 @@ CORE_ADDR arm_addr_bits_remove PARAMS ((CORE_ADDR));
extern CORE_ADDR arm_skip_prologue PARAMS ((CORE_ADDR pc));
#define SKIP_PROLOGUE(pc) { pc = arm_skip_prologue (pc); }
#define SKIP_PROLOGUE(pc) (arm_skip_prologue (pc))
/* Immediately after a function call, return the saved pc.
Can't always go through the frames for this because on some machines
@@ -104,6 +104,8 @@ extern breakpoint_from_pc_fn arm_breakpoint_from_pc;
* floating point processor (if any)
* No need to define if there is nothing to do.
*/
extern void arm_float_info (void);
#define FLOAT_INFO { arm_float_info (); }
/* Say how long (ordinary) registers are. This is a piece of bogosity
@@ -199,7 +201,7 @@ extern char **arm_register_names;
/* Largest value REGISTER_RAW_SIZE can have. */
#define MAX_REGISTER_RAW_SIZE 12
#define MAX_REGISTER_RAW_SIZE 12
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
@@ -212,6 +214,8 @@ extern char **arm_register_names;
/* Convert data from raw format for register REGNUM in buffer FROM
to virtual format with type TYPE in buffer TO. */
void convert_from_extended (void *ptr, /*double*/void *dbl);
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
{ \
double val; \
@@ -222,6 +226,8 @@ extern char **arm_register_names;
/* Convert data from virtual format with type TYPE in buffer FROM
to raw format for register REGNUM in buffer TO. */
extern void convert_to_extended (void *ptr, /*double*/void *dbl);
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
{ \
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
@@ -268,14 +274,15 @@ extern use_struct_convention_fn arm_use_struct_convention;
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(extract_address ((PTR) (REGBUF), REGISTER_RAW_SIZE(0)))
/* Specify that for the native compiler variables for a particular
lexical context are listed after the beginning LBRAC instead of
before in the executables list of symbols. */
#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (!(gcc_p))
/* Define other aspects of the stack frame.
We keep the offsets of all saved registers, 'cause we need 'em a lot!
We also keep the current size of the stack frame, and the offset of
@@ -288,8 +295,10 @@ extern use_struct_convention_fn arm_use_struct_convention;
int frameoffset; \
int framereg;
extern void arm_init_extra_frame_info PARAMS ((struct frame_info *fi));
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) arm_init_extra_frame_info (fi)
extern void arm_init_extra_frame_info PARAMS ((int fromleaf,
struct frame_info *fi));
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
arm_init_extra_frame_info (fromleaf, fi)
/* Return the frame address. On ARM, it is R11; on Thumb it is R7. */
CORE_ADDR arm_target_read_fp PARAMS ((void));
@@ -314,17 +323,24 @@ extern int arm_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
{ \
CORE_ADDR func_start, after_prologue; \
func_start = (get_pc_function_start ((FI)->pc) + \
FUNCTION_START_OFFSET); \
after_prologue = func_start; \
SKIP_PROLOGUE (after_prologue); \
(FRAMELESS) = (after_prologue == func_start); \
}
does not, FRAMELESS is set to 1, else 0.
Sometimes we have functions that do a little setup (like saving the vN
registers with the stmdb instruction, but DO NOT set up a frame.
The symbol table will report this as a prologue. However, it is
important not to try to parse these partial frames as frames, or we
will get really confused.
So I will demand 3 instructions between the start & end of the prologue
before I call it a real prologue, i.e. at least
mov ip, sp,
stmdb sp!, {}
sub sp, ip, #4. */
extern int arm_frameless_function_invocation (struct frame_info *fi);
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(arm_frameless_function_invocation (FI))
/* Saved Pc. */
#define FRAME_SAVED_PC(FRAME) arm_frame_saved_pc (FRAME)
@@ -337,7 +353,7 @@ extern CORE_ADDR arm_frame_saved_pc PARAMS ((struct frame_info *));
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
@@ -351,19 +367,18 @@ extern CORE_ADDR arm_frame_saved_pc PARAMS ((struct frame_info *));
struct frame_saved_regs;
struct frame_info;
void frame_find_saved_regs PARAMS((struct frame_info *fi,
struct frame_saved_regs *fsr));
void arm_frame_find_saved_regs (struct frame_info * fi,
struct frame_saved_regs * fsr);
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
arm_frame_find_saved_regs (frame_info, &(frame_saved_regs));
/* Things needed for making the inferior call functions. */
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = arm_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
extern CORE_ADDR
arm_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
(arm_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr)))
extern CORE_ADDR arm_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
/* Push an empty stack frame, to record the current PC, etc. */
@@ -379,15 +394,15 @@ void arm_pop_frame PARAMS ((void));
/* This sequence of words is the instructions
mov lr,pc
mov pc,r4
illegal
mov lr,pc
mov pc,r4
illegal
Note this is 12 bytes. */
#define CALL_DUMMY {0xe1a0e00f, 0xe1a0f004, 0xE7FFDEFE}
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
#define CALL_DUMMY_BREAKPOINT_OFFSET arm_call_dummy_breakpoint_offset()
extern int arm_call_dummy_breakpoint_offset PARAMS ((void));
@@ -399,15 +414,15 @@ extern int arm_call_dummy_breakpoint_offset PARAMS ((void));
arm_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
void arm_fix_call_dummy PARAMS ((char *dummy, CORE_ADDR pc, CORE_ADDR fun,
int nargs, struct value **args,
struct type *type, int gcc_p));
int nargs, struct value ** args,
struct type * type, int gcc_p));
CORE_ADDR arm_get_next_pc PARAMS ((CORE_ADDR));
/* Functions for dealing with Thumb call thunks. */
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) arm_in_call_stub (pc, name)
#define SKIP_TRAMPOLINE_CODE(pc) arm_skip_stub (pc)
extern int arm_in_call_stub PARAMS ((CORE_ADDR pc, char *name));
extern int arm_in_call_stub PARAMS ((CORE_ADDR pc, char *name));
extern CORE_ADDR arm_skip_stub PARAMS ((CORE_ADDR pc));
/* Function to determine whether MEMADDR is in a Thumb function. */
@@ -422,18 +437,18 @@ extern int arm_pc_is_thumb_dummy PARAMS ((bfd_vma memaddr));
"info" field is used for this purpose. This field is already
being used to store the symbol size, so the assumption is
that the symbol size cannot exceed 2^31.
COFF_MAKE_MSYMBOL_SPECIAL
ELF_MAKE_MSYMBOL_SPECIAL tests whether the COFF or ELF symbol corresponds
to a thumb function, and sets a "special" bit in a
minimal symbol to indicate that it does
MSYMBOL_SET_SPECIAL actually sets the "special" bit
ELF_MAKE_MSYMBOL_SPECIAL tests whether the COFF or ELF symbol corresponds
to a thumb function, and sets a "special" bit in a
minimal symbol to indicate that it does
MSYMBOL_SET_SPECIAL actually sets the "special" bit
MSYMBOL_IS_SPECIAL tests the "special" bit in a minimal symbol
MSYMBOL_SIZE returns the size of the minimal symbol, i.e.
the "info" field with the "special" bit masked out
*/
extern int coff_sym_is_thumb(int val);
the "info" field with the "special" bit masked out
*/
extern int coff_sym_is_thumb (int val);
#define MSYMBOL_SET_SPECIAL(msym) \
MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) | 0x80000000)
#define MSYMBOL_IS_SPECIAL(msym) \
@@ -445,7 +460,7 @@ extern int coff_sym_is_thumb(int val);
#define ELF_MAKE_MSYMBOL_SPECIAL(sym,msym) \
{ if(ELF_ST_TYPE(((elf_symbol_type *)(sym))->internal_elf_sym.st_info) == STT_LOPROC) \
MSYMBOL_SET_SPECIAL(msym); }
#define COFF_MAKE_MSYMBOL_SPECIAL(val,msym) \
{ if(coff_sym_is_thumb(val)) MSYMBOL_SET_SPECIAL(msym); }

View File

@@ -1,25 +1,26 @@
/* Definitions to make GDB run on an ARM under RISCiX (4.3bsd).
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#define HOST_BYTE_ORDER LITTLE_ENDIAN
#if 0
/* Interface definitions for kernel debugger KDB. */

View File

@@ -1,163 +1,164 @@
@c OBSOLETE
@c OBSOLETE @node Convex,,, Top
@c OBSOLETE @appendix Convex-specific info
@c OBSOLETE @cindex Convex notes
@c OBSOLETE
@c OBSOLETE Scalar registers are 64 bits long, which is a pain since
@c OBSOLETE left half of an S register frequently contains noise.
@c OBSOLETE Therefore there are two ways to obtain the value of an S register.
@c OBSOLETE
@c OBSOLETE @table @kbd
@c OBSOLETE @item $s0
@c OBSOLETE returns the low half of the register as an int
@c OBSOLETE
@c OBSOLETE @item $S0
@c OBSOLETE returns the whole register as a long long
@c OBSOLETE @end table
@c OBSOLETE
@c OBSOLETE You can print the value in floating point by using @samp{p/f $s0} or @samp{p/f $S0}
@c OBSOLETE to print a single or double precision value.
@c OBSOLETE
@c OBSOLETE @cindex vector registers
@c OBSOLETE Vector registers are handled similarly, with @samp{$V0} denoting the whole
@c OBSOLETE 64-bit register and @kbd{$v0} denoting the 32-bit low half; @samp{p/f $v0}
@c OBSOLETE or @samp{p/f $V0} can be used to examine the register in floating point.
@c OBSOLETE The length of the vector registers is taken from @samp{$vl}.
@c OBSOLETE
@c OBSOLETE Individual elements of a vector register are denoted in the obvious way;
@c OBSOLETE @samp{print $v3[9]} prints the tenth element of register @kbd{v3}, and
@c OBSOLETE @samp{set $v3[9] = 1234} alters it.
@c OBSOLETE
@c OBSOLETE @kbd{$vl} and @kbd{$vs} are int, and @kbd{$vm} is an int vector.
@c OBSOLETE Elements of @kbd{$vm} can't be assigned to.
@c OBSOLETE
@c OBSOLETE @cindex communication registers
@c OBSOLETE @kindex info comm-registers
@c OBSOLETE Communication registers have names @kbd{$C0 .. $C63}, with @kbd{$c0 .. $c63}
@c OBSOLETE denoting the low-order halves. @samp{info comm-registers} will print them
@c OBSOLETE all out, and tell which are locked. (A communication register is
@c OBSOLETE locked when a value is sent to it, and unlocked when the value is
@c OBSOLETE received.) Communication registers are, of course, global to all
@c OBSOLETE threads, so it does not matter what the currently selected thread is.
@c OBSOLETE @samp{info comm-reg @var{name}} prints just that one communication
@c OBSOLETE register; @samp{name} may also be a communication register number
@c OBSOLETE @samp{nn} or @samp{0xnn}.
@c OBSOLETE @samp{info comm-reg @var{address}} prints the contents of the resource
@c OBSOLETE structure at that address.
@c OBSOLETE
@c OBSOLETE @kindex info psw
@c OBSOLETE The command @samp{info psw} prints the processor status word @kbd{$ps}
@c OBSOLETE bit by bit.
@c OBSOLETE
@c OBSOLETE @kindex set base
@c OBSOLETE GDB normally prints all integers in base 10, but the leading
@c OBSOLETE @kbd{0x80000000} of pointers is intolerable in decimal, so the default
@c OBSOLETE output radix has been changed to try to print addresses appropriately.
@c OBSOLETE The @samp{set base} command can be used to change this.
@c OBSOLETE
@c OBSOLETE @table @code
@c OBSOLETE @item set base 10
@c OBSOLETE Integer values always print in decimal.
@c OBSOLETE
@c OBSOLETE @item set base 16
@c OBSOLETE Integer values always print in hex.
@c OBSOLETE
@c OBSOLETE @item set base
@c OBSOLETE Go back to the initial state, which prints integer values in hex if they
@c OBSOLETE look like pointers (specifically, if they start with 0x8 or 0xf in the
@c OBSOLETE stack), otherwise in decimal.
@c OBSOLETE @end table
@c OBSOLETE
@c OBSOLETE @kindex set pipeline
@c OBSOLETE When an exception such as a bus error or overflow happens, usually the PC
@c OBSOLETE is several instructions ahead by the time the exception is detected.
@c OBSOLETE The @samp{set pipe} command will disable this.
@c OBSOLETE
@c OBSOLETE @table @code
@c OBSOLETE @item set pipeline off
@c OBSOLETE Forces serial execution of instructions; no vector chaining and no
@c OBSOLETE scalar instruction overlap. With this, exceptions are detected with
@c OBSOLETE the PC pointing to the instruction after the one in error.
@c OBSOLETE
@c OBSOLETE @item set pipeline on
@c OBSOLETE Returns to normal, fast, execution. This is the default.
@c OBSOLETE @end table
@c OBSOLETE
@c OBSOLETE @cindex parallel
@c OBSOLETE In a parallel program, multiple threads may be executing, each
@c OBSOLETE with its own registers, stack, and local memory. When one of them
@c OBSOLETE hits a breakpoint, that thread is selected. Other threads do
@c OBSOLETE not run while the thread is in the breakpoint.
@c OBSOLETE
@c OBSOLETE @kindex 1cont
@c OBSOLETE The selected thread can be single-stepped, given signals, and so
@c OBSOLETE on. Any other threads remain stopped. When a @samp{cont} command is given,
@c OBSOLETE all threads are resumed. To resume just the selected thread, use
@c OBSOLETE the command @samp{1cont}.
@c OBSOLETE
@c OBSOLETE @kindex thread
@c OBSOLETE The @samp{thread} command will show the active threads and the
@c OBSOLETE instruction they are about to execute. The selected thread is marked
@c OBSOLETE with an asterisk. The command @samp{thread @var{n}} will select thread @var{n},
@c OBSOLETE shifting the debugger's attention to it for single-stepping,
@c OBSOLETE registers, local memory, and so on.
@c OBSOLETE
@c OBSOLETE @kindex info threads
@c OBSOLETE The @samp{info threads} command will show what threads, if any, have
@c OBSOLETE invisibly hit breakpoints or signals and are waiting to be noticed.
@c OBSOLETE
@c OBSOLETE @kindex set parallel
@c OBSOLETE The @samp{set parallel} command controls how many threads can be active.
@c OBSOLETE
@c OBSOLETE @table @code
@c OBSOLETE @item set parallel off
@c OBSOLETE One thread. Requests by the program that other threads join in
@c OBSOLETE (spawn and pfork instructions) do not cause other threads to start up.
@c OBSOLETE This does the same thing as the @samp{limit concurrency 1} command.
@c OBSOLETE
@c OBSOLETE @item set parallel fixed
@c OBSOLETE All CPUs are assigned to your program whenever it runs. When it
@c OBSOLETE executes a pfork or spawn instruction, it begins parallel execution
@c OBSOLETE immediately. This does the same thing as the @samp{mpa -f} command.
@c OBSOLETE
@c OBSOLETE @item set parallel on
@c OBSOLETE One or more threads. Spawn and pfork cause CPUs to join in when and if
@c OBSOLETE they are free. This is the default. It is very good for system
@c OBSOLETE throughput, but not very good for finding bugs in parallel code. If you
@c OBSOLETE suspect a bug in parallel code, you probably want @samp{set parallel fixed.}
@c OBSOLETE @end table
@c OBSOLETE
@c OBSOLETE @subsection Limitations
@c OBSOLETE
@c OBSOLETE WARNING: Convex GDB evaluates expressions in long long, because S
@c OBSOLETE registers are 64 bits long. However, GDB expression semantics are not
@c OBSOLETE exactly C semantics. This is a bug, strictly speaking, but it's not one I
@c OBSOLETE know how to fix. If @samp{x} is a program variable of type int, then it
@c OBSOLETE is also type int to GDB, but @samp{x + 1} is long long, as is @samp{x + y}
@c OBSOLETE or any other expression requiring computation. So is the expression
@c OBSOLETE @samp{1}, or any other constant. You only really have to watch out for
@c OBSOLETE calls. The innocuous expression @samp{list_node (0x80001234)} has an
@c OBSOLETE argument of type long long. You must explicitly cast it to int.
@c OBSOLETE
@c OBSOLETE It is not possible to continue after an uncaught fatal signal by using
@c OBSOLETE @samp{signal 0}, @samp{return}, @samp{jump}, or anything else. The difficulty is with
@c OBSOLETE Unix, not GDB.
@c OBSOLETE
@c OBSOLETE I have made no big effort to make such things as single-stepping a
@c OBSOLETE @kbd{join} instruction do something reasonable. If the program seems to
@c OBSOLETE hang when doing this, type @kbd{ctrl-c} and @samp{cont}, or use
@c OBSOLETE @samp{thread} to shift to a live thread. Single-stepping a @kbd{spawn}
@c OBSOLETE instruction apparently causes new threads to be born with their T bit set;
@c OBSOLETE this is not handled gracefully. When a thread has hit a breakpoint, other
@c OBSOLETE threads may have invisibly hit the breakpoint in the background; if you
@c OBSOLETE clear the breakpoint gdb will be surprised when threads seem to continue
@c OBSOLETE to stop at it. All of these situations produce spurious signal 5 traps;
@c OBSOLETE if this happens, just type @samp{cont}. If it becomes a nuisance, use
@c OBSOLETE @samp{handle 5 nostop}. (It will ask if you are sure. You are.)
@c OBSOLETE
@c OBSOLETE There is no way in GDB to store a float in a register, as with
@c OBSOLETE @kbd{set $s0 = 3.1416}. The identifier @kbd{$s0} denotes an integer,
@c OBSOLETE and like any C expression which assigns to an integer variable, the
@c OBSOLETE right-hand side is casted to type int. If you should need to do
@c OBSOLETE something like this, you can assign the value to @kbd{@{float@} ($sp-4)}
@c OBSOLETE and then do @kbd{set $s0 = $sp[-4]}. Same deal with @kbd{set $v0[69] = 6.9}.
@node Convex,,, Top
@appendix Convex-specific info
@cindex Convex notes
Scalar registers are 64 bits long, which is a pain since
left half of an S register frequently contains noise.
Therefore there are two ways to obtain the value of an S register.
@table @kbd
@item $s0
returns the low half of the register as an int
@item $S0
returns the whole register as a long long
@end table
You can print the value in floating point by using @samp{p/f $s0} or @samp{p/f $S0}
to print a single or double precision value.
@cindex vector registers
Vector registers are handled similarly, with @samp{$V0} denoting the whole
64-bit register and @kbd{$v0} denoting the 32-bit low half; @samp{p/f $v0}
or @samp{p/f $V0} can be used to examine the register in floating point.
The length of the vector registers is taken from @samp{$vl}.
Individual elements of a vector register are denoted in the obvious way;
@samp{print $v3[9]} prints the tenth element of register @kbd{v3}, and
@samp{set $v3[9] = 1234} alters it.
@kbd{$vl} and @kbd{$vs} are int, and @kbd{$vm} is an int vector.
Elements of @kbd{$vm} can't be assigned to.
@cindex communication registers
@kindex info comm-registers
Communication registers have names @kbd{$C0 .. $C63}, with @kbd{$c0 .. $c63}
denoting the low-order halves. @samp{info comm-registers} will print them
all out, and tell which are locked. (A communication register is
locked when a value is sent to it, and unlocked when the value is
received.) Communication registers are, of course, global to all
threads, so it does not matter what the currently selected thread is.
@samp{info comm-reg @var{name}} prints just that one communication
register; @samp{name} may also be a communication register number
@samp{nn} or @samp{0xnn}.
@samp{info comm-reg @var{address}} prints the contents of the resource
structure at that address.
@kindex info psw
The command @samp{info psw} prints the processor status word @kbd{$ps}
bit by bit.
@kindex set base
GDB normally prints all integers in base 10, but the leading
@kbd{0x80000000} of pointers is intolerable in decimal, so the default
output radix has been changed to try to print addresses appropriately.
The @samp{set base} command can be used to change this.
@table @code
@item set base 10
Integer values always print in decimal.
@item set base 16
Integer values always print in hex.
@item set base
Go back to the initial state, which prints integer values in hex if they
look like pointers (specifically, if they start with 0x8 or 0xf in the
stack), otherwise in decimal.
@end table
@kindex set pipeline
When an exception such as a bus error or overflow happens, usually the PC
is several instructions ahead by the time the exception is detected.
The @samp{set pipe} command will disable this.
@table @code
@item set pipeline off
Forces serial execution of instructions; no vector chaining and no
scalar instruction overlap. With this, exceptions are detected with
the PC pointing to the instruction after the one in error.
@item set pipeline on
Returns to normal, fast, execution. This is the default.
@end table
@cindex parallel
In a parallel program, multiple threads may be executing, each
with its own registers, stack, and local memory. When one of them
hits a breakpoint, that thread is selected. Other threads do
not run while the thread is in the breakpoint.
@kindex 1cont
The selected thread can be single-stepped, given signals, and so
on. Any other threads remain stopped. When a @samp{cont} command is given,
all threads are resumed. To resume just the selected thread, use
the command @samp{1cont}.
@kindex thread
The @samp{thread} command will show the active threads and the
instruction they are about to execute. The selected thread is marked
with an asterisk. The command @samp{thread @var{n}} will select thread @var{n},
shifting the debugger's attention to it for single-stepping,
registers, local memory, and so on.
@kindex info threads
The @samp{info threads} command will show what threads, if any, have
invisibly hit breakpoints or signals and are waiting to be noticed.
@kindex set parallel
The @samp{set parallel} command controls how many threads can be active.
@table @code
@item set parallel off
One thread. Requests by the program that other threads join in
(spawn and pfork instructions) do not cause other threads to start up.
This does the same thing as the @samp{limit concurrency 1} command.
@item set parallel fixed
All CPUs are assigned to your program whenever it runs. When it
executes a pfork or spawn instruction, it begins parallel execution
immediately. This does the same thing as the @samp{mpa -f} command.
@item set parallel on
One or more threads. Spawn and pfork cause CPUs to join in when and if
they are free. This is the default. It is very good for system
throughput, but not very good for finding bugs in parallel code. If you
suspect a bug in parallel code, you probably want @samp{set parallel fixed.}
@end table
@subsection Limitations
WARNING: Convex GDB evaluates expressions in long long, because S
registers are 64 bits long. However, GDB expression semantics are not
exactly C semantics. This is a bug, strictly speaking, but it's not one I
know how to fix. If @samp{x} is a program variable of type int, then it
is also type int to GDB, but @samp{x + 1} is long long, as is @samp{x + y}
or any other expression requiring computation. So is the expression
@samp{1}, or any other constant. You only really have to watch out for
calls. The innocuous expression @samp{list_node (0x80001234)} has an
argument of type long long. You must explicitly cast it to int.
It is not possible to continue after an uncaught fatal signal by using
@samp{signal 0}, @samp{return}, @samp{jump}, or anything else. The difficulty is with
Unix, not GDB.
I have made no big effort to make such things as single-stepping a
@kbd{join} instruction do something reasonable. If the program seems to
hang when doing this, type @kbd{ctrl-c} and @samp{cont}, or use
@samp{thread} to shift to a live thread. Single-stepping a @kbd{spawn}
instruction apparently causes new threads to be born with their T bit set;
this is not handled gracefully. When a thread has hit a breakpoint, other
threads may have invisibly hit the breakpoint in the background; if you
clear the breakpoint gdb will be surprised when threads seem to continue
to stop at it. All of these situations produce spurious signal 5 traps;
if this happens, just type @samp{cont}. If it becomes a nuisance, use
@samp{handle 5 nostop}. (It will ask if you are sure. You are.)
There is no way in GDB to store a float in a register, as with
@kbd{set $s0 = 3.1416}. The identifier @kbd{$s0} denotes an integer,
and like any C expression which assigns to an integer variable, the
right-hand side is casted to type int. If you should need to do
something like this, you can assign the value to @kbd{@{float@} ($sp-4)}
and then do @kbd{set $s0 = $sp[-4]}. Same deal with @kbd{set $v0[69] = 6.9}.

View File

@@ -1,3 +1,3 @@
# Host: Convex Unix (4bsd)
XDEPFILES= convex-xdep.o
XM_FILE= xm-convex.h
# OBSOLETE # Host: Convex Unix (4bsd)
# OBSOLETE XDEPFILES= convex-xdep.o
# OBSOLETE XM_FILE= xm-convex.h

View File

@@ -1,3 +1,3 @@
# Target: Convex Unix (4bsd)
TDEPFILES= convex-tdep.o
TM_FILE= tm-convex.h
# OBSOLETE # Target: Convex Unix (4bsd)
# OBSOLETE TDEPFILES= convex-tdep.o
# OBSOLETE TM_FILE= tm-convex.h

View File

@@ -1,511 +1,486 @@
/* Definitions to make GDB run on Convex Unix (4bsd)
Copyright 1989, 1991, 1993 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_BYTE_ORDER BIG_ENDIAN
/* There is come problem with the debugging symbols generated by the
compiler such that the debugging symbol for the first line of a
function overlap with the function prologue. */
#define PROLOGUE_FIRSTLINE_OVERLAP
/* When convex pcc says CHAR or SHORT, it provides the correct address. */
#define BELIEVE_PCC_PROMOTION 1
/* Symbol types to ignore. */
/* 0xc4 is N_MONPT. Use the numeric value for the benefit of people
with (rather) old OS's. */
#define IGNORE_SYMBOL(TYPE) \
(((TYPE) & ~N_EXT) == N_TBSS \
|| ((TYPE) & ~N_EXT) == N_TDATA \
|| ((TYPE) & ~N_EXT) == 0xc4)
/* Offset from address of function to start of its code.
Zero on most machines. */
#define FUNCTION_START_OFFSET 0
/* Advance PC across any function entry prologue instructions
to reach some "real" code.
Convex prolog is:
[sub.w #-,sp] in one of 3 possible sizes
[mov psw,- fc/vc main program prolog
and #-,- (skip it because the "mov psw" saves the
mov -,psw] T bit, so continue gets a surprise trap)
[and #-,sp] fc/vc O2 main program prolog
[ld.- -(ap),-] pcc/gcc register arg loads
*/
#define SKIP_PROLOGUE(pc) \
{ int op, ix; \
op = read_memory_integer (pc, 2); \
if ((op & 0xffc7) == 0x5ac0) pc += 2; \
else if (op == 0x1580) pc += 4; \
else if (op == 0x15c0) pc += 6; \
if ((read_memory_integer (pc, 2) & 0xfff8) == 0x7c40 \
&& (read_memory_integer (pc + 2, 2) & 0xfff8) == 0x1240 \
&& (read_memory_integer (pc + 8, 2) & 0xfff8) == 0x7c48) \
pc += 10; \
if (read_memory_integer (pc, 2) == 0x1240) pc += 6; \
for (;;) { \
op = read_memory_integer (pc, 2); \
ix = (op >> 3) & 7; \
if (ix != 6) break; \
if ((op & 0xfcc0) == 0x3000) pc += 4; \
else if ((op & 0xfcc0) == 0x3040) pc += 6; \
else if ((op & 0xfcc0) == 0x2800) pc += 4; \
else if ((op & 0xfcc0) == 0x2840) pc += 6; \
else break;}}
/* Immediately after a function call, return the saved pc.
(ignore frame and return *$sp so we can handle both calls and callq) */
#define SAVED_PC_AFTER_CALL(frame) \
read_memory_integer (read_register (SP_REGNUM), 4)
/* Address of end of stack space.
This is ((USRSTACK + 0xfff) & -0x1000)) from <convex/vmparam.h> but
that expression depends on the kernel version; instead, fetch a
page-zero pointer and get it from that. This will be invalid if
they ever change the way bkpt signals are delivered. */
#define STACK_END_ADDR (0xfffff000 & *(unsigned *) 0x80000050)
/* User-mode traps push an extended rtn block,
then fault with one of the following PCs */
#define is_trace_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000040)) <= 4)
#define is_arith_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000044)) <= 4)
#define is_break_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000050)) <= 4)
/* We need to manipulate trap bits in the psw */
#define PSW_TRAP_FLAGS 0x69670000
#define PSW_T_BIT 0x08000000
#define PSW_S_BIT 0x01000000
/* Stack grows downward. */
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/* Sequence of bytes for breakpoint instruction. (bkpt) */
#define BREAKPOINT {0x7d,0x50}
/* Amount PC must be decremented by after a breakpoint.
This is often the number of bytes in BREAKPOINT but not always.
(The break PC needs to be decremented by 2, but we do it when the
break frame is recognized and popped. That way gdb can tell breaks
from trace traps with certainty.) */
#define DECR_PC_AFTER_BREAK 0
/* Say how long (ordinary) registers are. This is a piece of bogosity
used in push_word and a few other places; REGISTER_RAW_SIZE is the
real way to know how big a register is. */
#define REGISTER_SIZE 8
/* Number of machine registers */
#define NUM_REGS 26
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer. */
#define REGISTER_NAMES {"pc","psw","fp","ap","a5","a4","a3","a2","a1","sp",\
"s7","s6","s5","s4","s3","s2","s1","s0",\
"S7","S6","S5","S4","S3","S2","S1","S0"}
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
and some are "phony" register numbers which are too large
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
#define S0_REGNUM 25 /* the real S regs */
#define S7_REGNUM 18
#define s0_REGNUM 17 /* low-order halves of S regs */
#define s7_REGNUM 10
#define SP_REGNUM 9 /* A regs */
#define A1_REGNUM 8
#define A5_REGNUM 4
#define AP_REGNUM 3
#define FP_REGNUM 2 /* Contains address of executing stack frame */
#define PS_REGNUM 1 /* Contains processor status */
#define PC_REGNUM 0 /* Contains program counter */
/* convert dbx stab register number (from `r' declaration) to a gdb REGNUM */
#define STAB_REG_TO_REGNUM(value) \
((value) < 8 ? S0_REGNUM - (value) : SP_REGNUM - ((value) - 8))
/* Vector register numbers, not handled as ordinary regs.
They are treated as convenience variables whose values are read
from the inferior when needed. */
#define V0_REGNUM 0
#define V7_REGNUM 7
#define VM_REGNUM 8
#define VS_REGNUM 9
#define VL_REGNUM 10
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */
#define REGISTER_BYTES (4*10 + 8*8)
/* Index within `registers' of the first byte of the space for
register N.
NB: must match structure of struct syscall_context for correct operation */
#define REGISTER_BYTE(N) ((N) < s7_REGNUM ? 4*(N) : \
(N) < S7_REGNUM ? 44 + 8 * ((N)-s7_REGNUM) : \
40 + 8 * ((N)-S7_REGNUM))
/* Number of bytes of storage in the actual machine representation
for register N. */
#define REGISTER_RAW_SIZE(N) ((N) < S7_REGNUM ? 4 : 8)
/* Number of bytes of storage in the program's representation
for register N. */
#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
/* Largest value REGISTER_RAW_SIZE can have. */
#define MAX_REGISTER_RAW_SIZE 8
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
#define MAX_REGISTER_VIRTUAL_SIZE 8
/* Return the GDB type object for the "standard" data type
of data in register N. */
#define REGISTER_VIRTUAL_TYPE(N) \
((N) < S7_REGNUM ? builtin_type_int : builtin_type_long_long)
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function. */
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ write_register (A1_REGNUM, (ADDR)); }
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
into VALBUF. */
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
memcpy (VALBUF, &((char *) REGBUF) [REGISTER_BYTE (S0_REGNUM) + \
8 - TYPE_LENGTH (TYPE)],\
TYPE_LENGTH (TYPE))
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
write_register_bytes (REGISTER_BYTE (S0_REGNUM), VALBUF, 8)
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(*(int *) & ((char *) REGBUF) [REGISTER_BYTE (s0_REGNUM)])
/* Define trapped internal variable hooks to read and write
vector and communication registers. */
#define IS_TRAPPED_INTERNALVAR is_trapped_internalvar
#define VALUE_OF_TRAPPED_INTERNALVAR value_of_trapped_internalvar
#define SET_TRAPPED_INTERNALVAR set_trapped_internalvar
extern struct value *value_of_trapped_internalvar ();
/* Hooks to read data from soff exec and core files,
and to describe the files. */
#define FILES_INFO_HOOK print_maps
/* Hook to call to print a typeless integer value, normally printed in decimal.
For convex, use hex instead if the number looks like an address. */
#define PRINT_TYPELESS_INTEGER decout
/* For the native compiler, variables for a particular lexical context
are listed after the beginning LBRAC instead of before in the
executables list of symbols. Using "gcc_compiled." to distinguish
between GCC and native compiler doesn't work on Convex because the
linker sorts the symbols to put "gcc_compiled." in the wrong place.
desc is nonzero for native, zero for gcc. */
#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (desc != 0)
/* Pcc occaisionally puts an SO where there should be an SOL. */
#define PCC_SOL_BROKEN
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
/* FRAME_CHAIN takes a frame_info with a frame's nominal address in fi->frame,
and produces the frame's chain-pointer. */
/* (caller fp is saved at 8(fp)) */
#define FRAME_CHAIN(fi) (read_memory_integer ((fi)->frame + 8, 4))
/* Define other aspects of the stack frame. */
/* We need the boundaries of the text in the exec file, as a kludge,
for FRAMELESS_FUNCTION_INVOCATION and CALL_DUMMY_LOCATION. */
#define NEED_TEXT_START_END 1
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0.
On convex, check at the return address for `callq' -- if so, frameless,
otherwise, not. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
{ \
extern CORE_ADDR text_start, text_end; \
CORE_ADDR call_addr = SAVED_PC_AFTER_CALL (FI); \
(FRAMELESS) = (call_addr >= text_start && call_addr < text_end \
&& read_memory_integer (call_addr - 6, 1) == 0x22); \
}
#define FRAME_SAVED_PC(fi) (read_memory_integer ((fi)->frame, 4))
#define FRAME_ARGS_ADDRESS(fi) (read_memory_integer ((fi)->frame + 12, 4))
#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(numargs, fi) \
{ numargs = read_memory_integer (FRAME_ARGS_ADDRESS (fi) - 4, 4); \
if (numargs < 0 || numargs >= 256) numargs = -1;}
/* Return number of bytes at start of arglist that are not really args. */
#define FRAME_ARGS_SKIP 0
/* Put here the code to store, into a struct frame_saved_regs,
the addresses of the saved registers of frame described by FRAME_INFO.
This includes special registers such as pc and fp saved in special
ways in the stack frame. sp is even more special:
the address we return for it IS the sp for the next frame. */
/* Normal (short) frames save only PC, FP, (callee's) AP. To reasonably
handle gcc and pcc register variables, scan the code following the
call for the instructions the compiler inserts to reload register
variables from stack slots and record the stack slots as the saved
locations of those registers. This will occasionally identify some
random load as a saved register; this is harmless. vc does not
declare its register allocation actions in the stabs. */
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
{ register int regnum; \
register int frame_length = /* 3 short, 2 long, 1 extended, 0 context */\
(read_memory_integer ((frame_info)->frame + 4, 4) >> 25) & 3; \
register CORE_ADDR frame_fp = \
read_memory_integer ((frame_info)->frame + 8, 4); \
register CORE_ADDR next_addr; \
memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \
(frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 0; \
(frame_saved_regs).regs[PS_REGNUM] = (frame_info)->frame + 4; \
(frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame + 8; \
(frame_saved_regs).regs[AP_REGNUM] = frame_fp + 12; \
next_addr = (frame_info)->frame + 12; \
if (frame_length < 3) \
for (regnum = A5_REGNUM; regnum < SP_REGNUM; ++regnum) \
(frame_saved_regs).regs[regnum] = (next_addr += 4); \
if (frame_length < 2) \
(frame_saved_regs).regs[SP_REGNUM] = (next_addr += 4); \
next_addr -= 4; \
if (frame_length < 3) \
for (regnum = S7_REGNUM; regnum < S0_REGNUM; ++regnum) \
(frame_saved_regs).regs[regnum] = (next_addr += 8); \
if (frame_length < 2) \
(frame_saved_regs).regs[S0_REGNUM] = (next_addr += 8); \
else \
(frame_saved_regs).regs[SP_REGNUM] = next_addr + 8; \
if (frame_length == 3) { \
CORE_ADDR pc = read_memory_integer ((frame_info)->frame, 4); \
int op, ix, disp; \
op = read_memory_integer (pc, 2); \
if ((op & 0xffc7) == 0x1480) pc += 4; /* add.w #-,sp */ \
else if ((op & 0xffc7) == 0x58c0) pc += 2; /* add.w #-,sp */ \
op = read_memory_integer (pc, 2); \
if ((op & 0xffc7) == 0x2a06) pc += 4; /* ld.w -,ap */ \
for (;;) { \
op = read_memory_integer (pc, 2); \
ix = (op >> 3) & 7; \
if ((op & 0xfcc0) == 0x2800) { /* ld.- -,ak */ \
regnum = SP_REGNUM - (op & 7); \
disp = read_memory_integer (pc + 2, 2); \
pc += 4;} \
else if ((op & 0xfcc0) == 0x2840) { /* ld.- -,ak */ \
regnum = SP_REGNUM - (op & 7); \
disp = read_memory_integer (pc + 2, 4); \
pc += 6;} \
if ((op & 0xfcc0) == 0x3000) { /* ld.- -,sk */ \
regnum = S0_REGNUM - (op & 7); \
disp = read_memory_integer (pc + 2, 2); \
pc += 4;} \
else if ((op & 0xfcc0) == 0x3040) { /* ld.- -,sk */ \
regnum = S0_REGNUM - (op & 7); \
disp = read_memory_integer (pc + 2, 4); \
pc += 6;} \
else if ((op & 0xff00) == 0x7100) { /* br crossjump */ \
pc += 2 * (char) op; \
continue;} \
else if (op == 0x0140) { /* jmp crossjump */ \
pc = read_memory_integer (pc + 2, 4); \
continue;} \
else break; \
if ((frame_saved_regs).regs[regnum]) \
break; \
if (ix == 7) disp += frame_fp; \
else if (ix == 6) disp += read_memory_integer (frame_fp + 12, 4); \
else if (ix != 0) break; \
(frame_saved_regs).regs[regnum] = \
disp - 8 + (1 << ((op >> 8) & 3)); \
if (regnum >= S7_REGNUM) \
(frame_saved_regs).regs[regnum - S0_REGNUM + s0_REGNUM] = \
disp - 4 + (1 << ((op >> 8) & 3)); \
} \
} \
}
/* Things needed for making the inferior call functions. */
#define CALL_DUMMY_LOCATION BEFORE_TEXT_END
/* Push an empty stack frame, to record the current PC, etc. */
#define PUSH_DUMMY_FRAME \
{ register CORE_ADDR sp = read_register (SP_REGNUM); \
register int regnum; \
char buf[8]; \
long word; \
for (regnum = S0_REGNUM; regnum >= S7_REGNUM; --regnum) { \
read_register_bytes (REGISTER_BYTE (regnum), buf, 8); \
sp = push_bytes (sp, buf, 8);} \
for (regnum = SP_REGNUM; regnum >= FP_REGNUM; --regnum) { \
word = read_register (regnum); \
sp = push_bytes (sp, &word, 4);} \
word = (read_register (PS_REGNUM) &~ (3<<25)) | (1<<25); \
sp = push_bytes (sp, &word, 4); \
word = read_register (PC_REGNUM); \
sp = push_bytes (sp, &word, 4); \
write_register (SP_REGNUM, sp); \
write_register (FP_REGNUM, sp); \
write_register (AP_REGNUM, sp);}
/* Discard from the stack the innermost frame, restoring all registers. */
#define POP_FRAME do {\
register CORE_ADDR fp = read_register (FP_REGNUM); \
register int regnum; \
register int frame_length = /* 3 short, 2 long, 1 extended, 0 context */ \
(read_memory_integer (fp + 4, 4) >> 25) & 3; \
char buf[8]; \
write_register (PC_REGNUM, read_memory_integer (fp, 4)); \
write_register (PS_REGNUM, read_memory_integer (fp += 4, 4)); \
write_register (FP_REGNUM, read_memory_integer (fp += 4, 4)); \
write_register (AP_REGNUM, read_memory_integer (fp += 4, 4)); \
if (frame_length < 3) \
for (regnum = A5_REGNUM; regnum < SP_REGNUM; ++regnum) \
write_register (regnum, read_memory_integer (fp += 4, 4)); \
if (frame_length < 2) \
write_register (SP_REGNUM, read_memory_integer (fp += 4, 4)); \
fp -= 4; \
if (frame_length < 3) \
for (regnum = S7_REGNUM; regnum < S0_REGNUM; ++regnum) { \
read_memory (fp += 8, buf, 8); \
write_register_bytes (REGISTER_BYTE (regnum), buf, 8);} \
if (frame_length < 2) { \
read_memory (fp += 8, buf, 8); \
write_register_bytes (REGISTER_BYTE (regnum), buf, 8);} \
else write_register (SP_REGNUM, fp + 8); \
flush_cached_frames (); \
} while (0)
/* This sequence of words is the instructions
mov sp,ap
pshea 69696969
calls 32323232
bkpt
Note this is 16 bytes. */
#define CALL_DUMMY {0x50860d4069696969LL,0x2140323232327d50LL}
#define CALL_DUMMY_LENGTH 16
#define CALL_DUMMY_START_OFFSET 0
/* Insert the specified number of args and function address
into a call sequence of the above form stored at DUMMYNAME. */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
{ *(int *)((char *) dummyname + 4) = nargs; \
*(int *)((char *) dummyname + 10) = fun; }
/* Defs to read soff symbol tables, see dbxread.c */
#define NUMBER_OF_SYMBOLS ((long) opthdr.o_nsyms)
#define STRING_TABLE_OFFSET ((long) filehdr.h_strptr)
#define SYMBOL_TABLE_OFFSET ((long) opthdr.o_symptr)
#define STRING_TABLE_SIZE ((long) filehdr.h_strsiz)
#define SIZE_OF_TEXT_SEGMENT ((long) txthdr.s_size)
#define ENTRY_POINT ((long) opthdr.o_entry)
#define READ_STRING_TABLE_SIZE(BUFFER) \
(BUFFER = STRING_TABLE_SIZE)
#define DECLARE_FILE_HEADERS \
FILEHDR filehdr; \
OPTHDR opthdr; \
SCNHDR txthdr
#define READ_FILE_HEADERS(DESC,NAME) \
{ \
int n; \
val = myread (DESC, &filehdr, sizeof filehdr); \
if (val < 0) \
perror_with_name (NAME); \
if (! IS_SOFF_MAGIC (filehdr.h_magic)) \
error ("%s: not an executable file.", NAME); \
lseek (DESC, 0L, 0); \
if (myread (DESC, &filehdr, sizeof filehdr) < 0) \
perror_with_name (NAME); \
if (myread (DESC, &opthdr, filehdr.h_opthdr) <= 0) \
perror_with_name (NAME); \
for (n = 0; n < filehdr.h_nscns; n++) \
{ \
if (myread (DESC, &txthdr, sizeof txthdr) < 0) \
perror_with_name (NAME); \
if ((txthdr.s_flags & S_TYPMASK) == S_TEXT) \
break; \
} \
}
/* OBSOLETE /* Definitions to make GDB run on Convex Unix (4bsd) */
/* OBSOLETE Copyright 1989, 1991, 1993 Free Software Foundation, Inc. */
/* OBSOLETE */
/* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
/* OBSOLETE it under the terms of the GNU General Public License as published by */
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
/* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
/* OBSOLETE This program is distributed in the hope that it will be useful, */
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
/* OBSOLETE You should have received a copy of the GNU General Public License */
/* OBSOLETE along with this program; if not, write to the Free Software */
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */
/* OBSOLETE */
/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */
/* OBSOLETE */
/* OBSOLETE /* There is come problem with the debugging symbols generated by the */
/* OBSOLETE compiler such that the debugging symbol for the first line of a */
/* OBSOLETE function overlap with the function prologue. *x/ */
/* OBSOLETE #define PROLOGUE_FIRSTLINE_OVERLAP */
/* OBSOLETE */
/* OBSOLETE /* When convex pcc says CHAR or SHORT, it provides the correct address. *x/ */
/* OBSOLETE */
/* OBSOLETE #define BELIEVE_PCC_PROMOTION 1 */
/* OBSOLETE */
/* OBSOLETE /* Symbol types to ignore. *x/ */
/* OBSOLETE /* 0xc4 is N_MONPT. Use the numeric value for the benefit of people */
/* OBSOLETE with (rather) old OS's. *x/ */
/* OBSOLETE #define IGNORE_SYMBOL(TYPE) \ */
/* OBSOLETE (((TYPE) & ~N_EXT) == N_TBSS \ */
/* OBSOLETE || ((TYPE) & ~N_EXT) == N_TDATA \ */
/* OBSOLETE || ((TYPE) & ~N_EXT) == 0xc4) */
/* OBSOLETE */
/* OBSOLETE /* Offset from address of function to start of its code. */
/* OBSOLETE Zero on most machines. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FUNCTION_START_OFFSET 0 */
/* OBSOLETE */
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
/* OBSOLETE to reach some "real" code. */
/* OBSOLETE Convex prolog is: */
/* OBSOLETE [sub.w #-,sp] in one of 3 possible sizes */
/* OBSOLETE [mov psw,- fc/vc main program prolog */
/* OBSOLETE and #-,- (skip it because the "mov psw" saves the */
/* OBSOLETE mov -,psw] T bit, so continue gets a surprise trap) */
/* OBSOLETE [and #-,sp] fc/vc O2 main program prolog */
/* OBSOLETE [ld.- -(ap),-] pcc/gcc register arg loads */
/* OBSOLETE *x/ */
/* OBSOLETE */
/* OBSOLETE extern CORE_ADDR convex_skip_prologue PARAMS ((CORE_ADDR pc)); */
/* OBSOLETE #define SKIP_PROLOGUE(pc) (convex_skip_prologue (pc)) */
/* OBSOLETE */
/* OBSOLETE /* Immediately after a function call, return the saved pc. */
/* OBSOLETE (ignore frame and return *$sp so we can handle both calls and callq) *x/ */
/* OBSOLETE */
/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \ */
/* OBSOLETE read_memory_integer (read_register (SP_REGNUM), 4) */
/* OBSOLETE */
/* OBSOLETE /* Address of end of stack space. */
/* OBSOLETE This is ((USRSTACK + 0xfff) & -0x1000)) from <convex/vmparam.h> but */
/* OBSOLETE that expression depends on the kernel version; instead, fetch a */
/* OBSOLETE page-zero pointer and get it from that. This will be invalid if */
/* OBSOLETE they ever change the way bkpt signals are delivered. *x/ */
/* OBSOLETE */
/* OBSOLETE #define STACK_END_ADDR (0xfffff000 & *(unsigned *) 0x80000050) */
/* OBSOLETE */
/* OBSOLETE /* User-mode traps push an extended rtn block, */
/* OBSOLETE then fault with one of the following PCs *x/ */
/* OBSOLETE */
/* OBSOLETE #define is_trace_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000040)) <= 4) */
/* OBSOLETE #define is_arith_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000044)) <= 4) */
/* OBSOLETE #define is_break_pc(pc) ((unsigned) ((pc) - (*(int *) 0x80000050)) <= 4) */
/* OBSOLETE */
/* OBSOLETE /* We need to manipulate trap bits in the psw *x/ */
/* OBSOLETE */
/* OBSOLETE #define PSW_TRAP_FLAGS 0x69670000 */
/* OBSOLETE #define PSW_T_BIT 0x08000000 */
/* OBSOLETE #define PSW_S_BIT 0x01000000 */
/* OBSOLETE */
/* OBSOLETE /* Stack grows downward. *x/ */
/* OBSOLETE */
/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
/* OBSOLETE */
/* OBSOLETE /* Sequence of bytes for breakpoint instruction. (bkpt) *x/ */
/* OBSOLETE */
/* OBSOLETE #define BREAKPOINT {0x7d,0x50} */
/* OBSOLETE */
/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */
/* OBSOLETE This is often the number of bytes in BREAKPOINT but not always. */
/* OBSOLETE (The break PC needs to be decremented by 2, but we do it when the */
/* OBSOLETE break frame is recognized and popped. That way gdb can tell breaks */
/* OBSOLETE from trace traps with certainty.) *x/ */
/* OBSOLETE */
/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */
/* OBSOLETE */
/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */
/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */
/* OBSOLETE real way to know how big a register is. *x/ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_SIZE 8 */
/* OBSOLETE */
/* OBSOLETE /* Number of machine registers *x/ */
/* OBSOLETE */
/* OBSOLETE #define NUM_REGS 26 */
/* OBSOLETE */
/* OBSOLETE /* Initializer for an array of names of registers. */
/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_NAMES {"pc","psw","fp","ap","a5","a4","a3","a2","a1","sp",\ */
/* OBSOLETE "s7","s6","s5","s4","s3","s2","s1","s0",\ */
/* OBSOLETE "S7","S6","S5","S4","S3","S2","S1","S0"} */
/* OBSOLETE */
/* OBSOLETE /* Register numbers of various important registers. */
/* OBSOLETE Note that some of these values are "real" register numbers, */
/* OBSOLETE and correspond to the general registers of the machine, */
/* OBSOLETE and some are "phony" register numbers which are too large */
/* OBSOLETE to be actual register numbers as far as the user is concerned */
/* OBSOLETE but do serve to get the desired values when passed to read_register. *x/ */
/* OBSOLETE */
/* OBSOLETE #define S0_REGNUM 25 /* the real S regs *x/ */
/* OBSOLETE #define S7_REGNUM 18 */
/* OBSOLETE #define s0_REGNUM 17 /* low-order halves of S regs *x/ */
/* OBSOLETE #define s7_REGNUM 10 */
/* OBSOLETE #define SP_REGNUM 9 /* A regs *x/ */
/* OBSOLETE #define A1_REGNUM 8 */
/* OBSOLETE #define A5_REGNUM 4 */
/* OBSOLETE #define AP_REGNUM 3 */
/* OBSOLETE #define FP_REGNUM 2 /* Contains address of executing stack frame *x/ */
/* OBSOLETE #define PS_REGNUM 1 /* Contains processor status *x/ */
/* OBSOLETE #define PC_REGNUM 0 /* Contains program counter *x/ */
/* OBSOLETE */
/* OBSOLETE /* convert dbx stab register number (from `r' declaration) to a gdb REGNUM *x/ */
/* OBSOLETE */
/* OBSOLETE #define STAB_REG_TO_REGNUM(value) \ */
/* OBSOLETE ((value) < 8 ? S0_REGNUM - (value) : SP_REGNUM - ((value) - 8)) */
/* OBSOLETE */
/* OBSOLETE /* Vector register numbers, not handled as ordinary regs. */
/* OBSOLETE They are treated as convenience variables whose values are read */
/* OBSOLETE from the inferior when needed. *x/ */
/* OBSOLETE */
/* OBSOLETE #define V0_REGNUM 0 */
/* OBSOLETE #define V7_REGNUM 7 */
/* OBSOLETE #define VM_REGNUM 8 */
/* OBSOLETE #define VS_REGNUM 9 */
/* OBSOLETE #define VL_REGNUM 10 */
/* OBSOLETE */
/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
/* OBSOLETE register state, the array `registers'. *x/ */
/* OBSOLETE #define REGISTER_BYTES (4*10 + 8*8) */
/* OBSOLETE */
/* OBSOLETE /* Index within `registers' of the first byte of the space for */
/* OBSOLETE register N. */
/* OBSOLETE NB: must match structure of struct syscall_context for correct operation *x/ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_BYTE(N) ((N) < s7_REGNUM ? 4*(N) : \ */
/* OBSOLETE (N) < S7_REGNUM ? 44 + 8 * ((N)-s7_REGNUM) : \ */
/* OBSOLETE 40 + 8 * ((N)-S7_REGNUM)) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
/* OBSOLETE for register N. *x/ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_RAW_SIZE(N) ((N) < S7_REGNUM ? 4 : 8) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the program's representation */
/* OBSOLETE for register N. *x/ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N) */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */
/* OBSOLETE */
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 8 */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */
/* OBSOLETE */
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8 */
/* OBSOLETE */
/* OBSOLETE /* Return the GDB type object for the "standard" data type */
/* OBSOLETE of data in register N. *x/ */
/* OBSOLETE */
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */
/* OBSOLETE ((N) < S7_REGNUM ? builtin_type_int : builtin_type_long_long) */
/* OBSOLETE */
/* OBSOLETE /* Store the address of the place in which to copy the structure the */
/* OBSOLETE subroutine will return. This is called from call_function. *x/ */
/* OBSOLETE */
/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */
/* OBSOLETE { write_register (A1_REGNUM, (ADDR)); } */
/* OBSOLETE */
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */
/* OBSOLETE into VALBUF. *x/ */
/* OBSOLETE */
/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
/* OBSOLETE memcpy (VALBUF, &((char *) REGBUF) [REGISTER_BYTE (S0_REGNUM) + \ */
/* OBSOLETE 8 - TYPE_LENGTH (TYPE)],\ */
/* OBSOLETE TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* OBSOLETE /* Write into appropriate registers a function return value */
/* OBSOLETE of type TYPE, given in virtual format. *x/ */
/* OBSOLETE */
/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
/* OBSOLETE write_register_bytes (REGISTER_BYTE (S0_REGNUM), VALBUF, 8) */
/* OBSOLETE */
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
/* OBSOLETE the address in which a function should return its structure value, */
/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). *x/ */
/* OBSOLETE */
/* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ */
/* OBSOLETE (*(int *) & ((char *) REGBUF) [REGISTER_BYTE (s0_REGNUM)]) */
/* OBSOLETE */
/* OBSOLETE /* Define trapped internal variable hooks to read and write */
/* OBSOLETE vector and communication registers. *x/ */
/* OBSOLETE */
/* OBSOLETE #define IS_TRAPPED_INTERNALVAR is_trapped_internalvar */
/* OBSOLETE #define VALUE_OF_TRAPPED_INTERNALVAR value_of_trapped_internalvar */
/* OBSOLETE #define SET_TRAPPED_INTERNALVAR set_trapped_internalvar */
/* OBSOLETE */
/* OBSOLETE extern struct value *value_of_trapped_internalvar (); */
/* OBSOLETE */
/* OBSOLETE /* Hooks to read data from soff exec and core files, */
/* OBSOLETE and to describe the files. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FILES_INFO_HOOK print_maps */
/* OBSOLETE */
/* OBSOLETE /* Hook to call to print a typeless integer value, normally printed in decimal. */
/* OBSOLETE For convex, use hex instead if the number looks like an address. *x/ */
/* OBSOLETE */
/* OBSOLETE #define PRINT_TYPELESS_INTEGER decout */
/* OBSOLETE */
/* OBSOLETE /* For the native compiler, variables for a particular lexical context */
/* OBSOLETE are listed after the beginning LBRAC instead of before in the */
/* OBSOLETE executables list of symbols. Using "gcc_compiled." to distinguish */
/* OBSOLETE between GCC and native compiler doesn't work on Convex because the */
/* OBSOLETE linker sorts the symbols to put "gcc_compiled." in the wrong place. */
/* OBSOLETE desc is nonzero for native, zero for gcc. *x/ */
/* OBSOLETE #define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (desc != 0) */
/* OBSOLETE */
/* OBSOLETE /* Pcc occaisionally puts an SO where there should be an SOL. *x/ */
/* OBSOLETE #define PCC_SOL_BROKEN */
/* OBSOLETE */
/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */
/* OBSOLETE (its caller). *x/ */
/* OBSOLETE */
/* OBSOLETE /* FRAME_CHAIN takes a frame_info with a frame's nominal address in fi->frame, */
/* OBSOLETE and produces the frame's chain-pointer. *x/ */
/* OBSOLETE */
/* OBSOLETE /* (caller fp is saved at 8(fp)) *x/ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_CHAIN(fi) (read_memory_integer ((fi)->frame + 8, 4)) */
/* OBSOLETE */
/* OBSOLETE /* Define other aspects of the stack frame. *x/ */
/* OBSOLETE */
/* OBSOLETE /* We need the boundaries of the text in the exec file, as a kludge, */
/* OBSOLETE for FRAMELESS_FUNCTION_INVOCATION and CALL_DUMMY_LOCATION. *x/ */
/* OBSOLETE */
/* OBSOLETE #define NEED_TEXT_START_END 1 */
/* OBSOLETE */
/* OBSOLETE /* An expression that tells us whether the function invocation represented */
/* OBSOLETE by FI does not have a frame on the stack associated with it. */
/* OBSOLETE On convex, check at the return address for `callq' -- if so, frameless, */
/* OBSOLETE otherwise, not. *x/ */
/* OBSOLETE */
/* OBSOLETE extern int convex_frameless_function_invocation PARAMS ((struct frame_info *fi)); */
/* OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) (convex_frameless_function_invocatio (FI)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_SAVED_PC(fi) (read_memory_integer ((fi)->frame, 4)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (read_memory_integer ((fi)->frame + 12, 4)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame */
/* OBSOLETE */
/* OBSOLETE /* Return number of args passed to a frame. */
/* OBSOLETE Can return -1, meaning no way to tell. *x/ */
/* OBSOLETE */
/* OBSOLETE extern int convex_frame_num_args PARAMS ((struct frame_info *fi)); */
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (convex_frame_num_args ((fi))) */
/* OBSOLETE */
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
/* OBSOLETE */
/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */
/* OBSOLETE This includes special registers such as pc and fp saved in special */
/* OBSOLETE ways in the stack frame. sp is even more special: */
/* OBSOLETE the address we return for it IS the sp for the next frame. *x/ */
/* OBSOLETE */
/* OBSOLETE /* Normal (short) frames save only PC, FP, (callee's) AP. To reasonably */
/* OBSOLETE handle gcc and pcc register variables, scan the code following the */
/* OBSOLETE call for the instructions the compiler inserts to reload register */
/* OBSOLETE variables from stack slots and record the stack slots as the saved */
/* OBSOLETE locations of those registers. This will occasionally identify some */
/* OBSOLETE random load as a saved register; this is harmless. vc does not */
/* OBSOLETE declare its register allocation actions in the stabs. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */
/* OBSOLETE { register int regnum; \ */
/* OBSOLETE register int frame_length = /* 3 short, 2 long, 1 extended, 0 context *x/\ */
/* OBSOLETE (read_memory_integer ((frame_info)->frame + 4, 4) >> 25) & 3; \ */
/* OBSOLETE register CORE_ADDR frame_fp = \ */
/* OBSOLETE read_memory_integer ((frame_info)->frame + 8, 4); \ */
/* OBSOLETE register CORE_ADDR next_addr; \ */
/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */
/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 0; \ */
/* OBSOLETE (frame_saved_regs).regs[PS_REGNUM] = (frame_info)->frame + 4; \ */
/* OBSOLETE (frame_saved_regs).regs[FP_REGNUM] = (frame_info)->frame + 8; \ */
/* OBSOLETE (frame_saved_regs).regs[AP_REGNUM] = frame_fp + 12; \ */
/* OBSOLETE next_addr = (frame_info)->frame + 12; \ */
/* OBSOLETE if (frame_length < 3) \ */
/* OBSOLETE for (regnum = A5_REGNUM; regnum < SP_REGNUM; ++regnum) \ */
/* OBSOLETE (frame_saved_regs).regs[regnum] = (next_addr += 4); \ */
/* OBSOLETE if (frame_length < 2) \ */
/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = (next_addr += 4); \ */
/* OBSOLETE next_addr -= 4; \ */
/* OBSOLETE if (frame_length < 3) \ */
/* OBSOLETE for (regnum = S7_REGNUM; regnum < S0_REGNUM; ++regnum) \ */
/* OBSOLETE (frame_saved_regs).regs[regnum] = (next_addr += 8); \ */
/* OBSOLETE if (frame_length < 2) \ */
/* OBSOLETE (frame_saved_regs).regs[S0_REGNUM] = (next_addr += 8); \ */
/* OBSOLETE else \ */
/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = next_addr + 8; \ */
/* OBSOLETE if (frame_length == 3) { \ */
/* OBSOLETE CORE_ADDR pc = read_memory_integer ((frame_info)->frame, 4); \ */
/* OBSOLETE int op, ix, disp; \ */
/* OBSOLETE op = read_memory_integer (pc, 2); \ */
/* OBSOLETE if ((op & 0xffc7) == 0x1480) pc += 4; /* add.w #-,sp *x/ \ */
/* OBSOLETE else if ((op & 0xffc7) == 0x58c0) pc += 2; /* add.w #-,sp *x/ \ */
/* OBSOLETE op = read_memory_integer (pc, 2); \ */
/* OBSOLETE if ((op & 0xffc7) == 0x2a06) pc += 4; /* ld.w -,ap *x/ \ */
/* OBSOLETE for (;;) { \ */
/* OBSOLETE op = read_memory_integer (pc, 2); \ */
/* OBSOLETE ix = (op >> 3) & 7; \ */
/* OBSOLETE if ((op & 0xfcc0) == 0x2800) { /* ld.- -,ak *x/ \ */
/* OBSOLETE regnum = SP_REGNUM - (op & 7); \ */
/* OBSOLETE disp = read_memory_integer (pc + 2, 2); \ */
/* OBSOLETE pc += 4;} \ */
/* OBSOLETE else if ((op & 0xfcc0) == 0x2840) { /* ld.- -,ak *x/ \ */
/* OBSOLETE regnum = SP_REGNUM - (op & 7); \ */
/* OBSOLETE disp = read_memory_integer (pc + 2, 4); \ */
/* OBSOLETE pc += 6;} \ */
/* OBSOLETE if ((op & 0xfcc0) == 0x3000) { /* ld.- -,sk *x/ \ */
/* OBSOLETE regnum = S0_REGNUM - (op & 7); \ */
/* OBSOLETE disp = read_memory_integer (pc + 2, 2); \ */
/* OBSOLETE pc += 4;} \ */
/* OBSOLETE else if ((op & 0xfcc0) == 0x3040) { /* ld.- -,sk *x/ \ */
/* OBSOLETE regnum = S0_REGNUM - (op & 7); \ */
/* OBSOLETE disp = read_memory_integer (pc + 2, 4); \ */
/* OBSOLETE pc += 6;} \ */
/* OBSOLETE else if ((op & 0xff00) == 0x7100) { /* br crossjump *x/ \ */
/* OBSOLETE pc += 2 * (char) op; \ */
/* OBSOLETE continue;} \ */
/* OBSOLETE else if (op == 0x0140) { /* jmp crossjump *x/ \ */
/* OBSOLETE pc = read_memory_integer (pc + 2, 4); \ */
/* OBSOLETE continue;} \ */
/* OBSOLETE else break; \ */
/* OBSOLETE if ((frame_saved_regs).regs[regnum]) \ */
/* OBSOLETE break; \ */
/* OBSOLETE if (ix == 7) disp += frame_fp; \ */
/* OBSOLETE else if (ix == 6) disp += read_memory_integer (frame_fp + 12, 4); \ */
/* OBSOLETE else if (ix != 0) break; \ */
/* OBSOLETE (frame_saved_regs).regs[regnum] = \ */
/* OBSOLETE disp - 8 + (1 << ((op >> 8) & 3)); \ */
/* OBSOLETE if (regnum >= S7_REGNUM) \ */
/* OBSOLETE (frame_saved_regs).regs[regnum - S0_REGNUM + s0_REGNUM] = \ */
/* OBSOLETE disp - 4 + (1 << ((op >> 8) & 3)); \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY_LOCATION BEFORE_TEXT_END */
/* OBSOLETE */
/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */
/* OBSOLETE */
/* OBSOLETE #define PUSH_DUMMY_FRAME \ */
/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM); \ */
/* OBSOLETE register int regnum; \ */
/* OBSOLETE char buf[8]; \ */
/* OBSOLETE long word; \ */
/* OBSOLETE for (regnum = S0_REGNUM; regnum >= S7_REGNUM; --regnum) { \ */
/* OBSOLETE read_register_bytes (REGISTER_BYTE (regnum), buf, 8); \ */
/* OBSOLETE sp = push_bytes (sp, buf, 8);} \ */
/* OBSOLETE for (regnum = SP_REGNUM; regnum >= FP_REGNUM; --regnum) { \ */
/* OBSOLETE word = read_register (regnum); \ */
/* OBSOLETE sp = push_bytes (sp, &word, 4);} \ */
/* OBSOLETE word = (read_register (PS_REGNUM) &~ (3<<25)) | (1<<25); \ */
/* OBSOLETE sp = push_bytes (sp, &word, 4); \ */
/* OBSOLETE word = read_register (PC_REGNUM); \ */
/* OBSOLETE sp = push_bytes (sp, &word, 4); \ */
/* OBSOLETE write_register (SP_REGNUM, sp); \ */
/* OBSOLETE write_register (FP_REGNUM, sp); \ */
/* OBSOLETE write_register (AP_REGNUM, sp);} */
/* OBSOLETE */
/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. *x/ */
/* OBSOLETE */
/* OBSOLETE #define POP_FRAME do {\ */
/* OBSOLETE register CORE_ADDR fp = read_register (FP_REGNUM); \ */
/* OBSOLETE register int regnum; \ */
/* OBSOLETE register int frame_length = /* 3 short, 2 long, 1 extended, 0 context *x/ \ */
/* OBSOLETE (read_memory_integer (fp + 4, 4) >> 25) & 3; \ */
/* OBSOLETE char buf[8]; \ */
/* OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp, 4)); \ */
/* OBSOLETE write_register (PS_REGNUM, read_memory_integer (fp += 4, 4)); \ */
/* OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp += 4, 4)); \ */
/* OBSOLETE write_register (AP_REGNUM, read_memory_integer (fp += 4, 4)); \ */
/* OBSOLETE if (frame_length < 3) \ */
/* OBSOLETE for (regnum = A5_REGNUM; regnum < SP_REGNUM; ++regnum) \ */
/* OBSOLETE write_register (regnum, read_memory_integer (fp += 4, 4)); \ */
/* OBSOLETE if (frame_length < 2) \ */
/* OBSOLETE write_register (SP_REGNUM, read_memory_integer (fp += 4, 4)); \ */
/* OBSOLETE fp -= 4; \ */
/* OBSOLETE if (frame_length < 3) \ */
/* OBSOLETE for (regnum = S7_REGNUM; regnum < S0_REGNUM; ++regnum) { \ */
/* OBSOLETE read_memory (fp += 8, buf, 8); \ */
/* OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), buf, 8);} \ */
/* OBSOLETE if (frame_length < 2) { \ */
/* OBSOLETE read_memory (fp += 8, buf, 8); \ */
/* OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), buf, 8);} \ */
/* OBSOLETE else write_register (SP_REGNUM, fp + 8); \ */
/* OBSOLETE flush_cached_frames (); \ */
/* OBSOLETE } while (0) */
/* OBSOLETE */
/* OBSOLETE /* This sequence of words is the instructions */
/* OBSOLETE mov sp,ap */
/* OBSOLETE pshea 69696969 */
/* OBSOLETE calls 32323232 */
/* OBSOLETE bkpt */
/* OBSOLETE Note this is 16 bytes. *x/ */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY {0x50860d4069696969LL,0x2140323232327d50LL} */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY_LENGTH 16 */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 */
/* OBSOLETE */
/* OBSOLETE /* Insert the specified number of args and function address */
/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */
/* OBSOLETE { *(int *)((char *) dummyname + 4) = nargs; \ */
/* OBSOLETE *(int *)((char *) dummyname + 10) = fun; } */
/* OBSOLETE */
/* OBSOLETE /* Defs to read soff symbol tables, see dbxread.c *x/ */
/* OBSOLETE */
/* OBSOLETE #define NUMBER_OF_SYMBOLS ((long) opthdr.o_nsyms) */
/* OBSOLETE #define STRING_TABLE_OFFSET ((long) filehdr.h_strptr) */
/* OBSOLETE #define SYMBOL_TABLE_OFFSET ((long) opthdr.o_symptr) */
/* OBSOLETE #define STRING_TABLE_SIZE ((long) filehdr.h_strsiz) */
/* OBSOLETE #define SIZE_OF_TEXT_SEGMENT ((long) txthdr.s_size) */
/* OBSOLETE #define ENTRY_POINT ((long) opthdr.o_entry) */
/* OBSOLETE */
/* OBSOLETE #define READ_STRING_TABLE_SIZE(BUFFER) \ */
/* OBSOLETE (BUFFER = STRING_TABLE_SIZE) */
/* OBSOLETE */
/* OBSOLETE #define DECLARE_FILE_HEADERS \ */
/* OBSOLETE FILEHDR filehdr; \ */
/* OBSOLETE OPTHDR opthdr; \ */
/* OBSOLETE SCNHDR txthdr */
/* OBSOLETE */
/* OBSOLETE #define READ_FILE_HEADERS(DESC,NAME) \ */
/* OBSOLETE { \ */
/* OBSOLETE int n; \ */
/* OBSOLETE val = myread (DESC, &filehdr, sizeof filehdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if (! IS_SOFF_MAGIC (filehdr.h_magic)) \ */
/* OBSOLETE error ("%s: not an executable file.", NAME); \ */
/* OBSOLETE lseek (DESC, 0L, 0); \ */
/* OBSOLETE if (myread (DESC, &filehdr, sizeof filehdr) < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if (myread (DESC, &opthdr, filehdr.h_opthdr) <= 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE for (n = 0; n < filehdr.h_nscns; n++) \ */
/* OBSOLETE { \ */
/* OBSOLETE if (myread (DESC, &txthdr, sizeof txthdr) < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if ((txthdr.s_flags & S_TYPMASK) == S_TEXT) \ */
/* OBSOLETE break; \ */
/* OBSOLETE } \ */
/* OBSOLETE } */

View File

@@ -1,35 +1,35 @@
/* Definitions to make GDB run on Convex Unix (4bsd)
Copyright 1989, 1991, 1992, 1996 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define HOST_BYTE_ORDER BIG_ENDIAN
#define ATTACH_DETACH
#define HAVE_WAIT_STRUCT
#define NO_SIGINTERRUPT
/* Use SIGCONT rather than SIGTSTP because convex Unix occasionally
turkeys SIGTSTP. I think. */
#define STOP_SIGNAL SIGCONT
/* Hook to call after creating inferior process. Now init_trace_fun
is in the same place. So re-write this to use the init_trace_fun
(making convex a debugging target). FIXME. */
#define CREATE_INFERIOR_HOOK create_inferior_hook
/* OBSOLETE /* Definitions to make GDB run on Convex Unix (4bsd) */
/* OBSOLETE Copyright 1989, 1991, 1992, 1996 Free Software Foundation, Inc. */
/* OBSOLETE */
/* OBSOLETE This file is part of GDB. */
/* OBSOLETE */
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
/* OBSOLETE it under the terms of the GNU General Public License as published by */
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
/* OBSOLETE (at your option) any later version. */
/* OBSOLETE */
/* OBSOLETE This program is distributed in the hope that it will be useful, */
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* OBSOLETE GNU General Public License for more details. */
/* OBSOLETE */
/* OBSOLETE You should have received a copy of the GNU General Public License */
/* OBSOLETE along with this program; if not, write to the Free Software */
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *x/ */
/* OBSOLETE */
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
/* OBSOLETE */
/* OBSOLETE #define ATTACH_DETACH */
/* OBSOLETE #define HAVE_WAIT_STRUCT */
/* OBSOLETE #define NO_SIGINTERRUPT */
/* OBSOLETE */
/* OBSOLETE /* Use SIGCONT rather than SIGTSTP because convex Unix occasionally */
/* OBSOLETE turkeys SIGTSTP. I think. *x/ */
/* OBSOLETE */
/* OBSOLETE #define STOP_SIGNAL SIGCONT */
/* OBSOLETE */
/* OBSOLETE /* Hook to call after creating inferior process. Now init_trace_fun */
/* OBSOLETE is in the same place. So re-write this to use the init_trace_fun */
/* OBSOLETE (making convex a debugging target). FIXME. *x/ */
/* OBSOLETE */
/* OBSOLETE #define CREATE_INFERIOR_HOOK create_inferior_hook */

View File

@@ -1,28 +1,33 @@
/* Target-specific definition for the Mitsubishi D10V
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996,1999 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* Contributed by Martin Hunt, hunt@cygnus.com */
#define GDB_TARGET_IS_D10V
#define GDB_MULTI_ARCH 1
/* #define GDB_TARGET_IS_D10V - moved to gdbarch.h */
/* Define the bit, byte, and word ordering of the machine. */
#if !GDB_MULTI_ARCH
#define TARGET_BYTE_ORDER BIG_ENDIAN
/* Offset from address of function to start of its code.
@@ -30,48 +35,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define FUNCTION_START_OFFSET 0
/* these are the addresses the D10V-EVA board maps data */
/* and instruction memory to. */
#define DMEM_START 0x0000000
#define IMEM_START 0x1000000
#define STACK_START 0x0007ffe
#ifdef __STDC__ /* Forward decls for prototypes */
struct frame_info;
struct frame_saved_regs;
struct type;
struct value;
#endif
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
extern CORE_ADDR d10v_skip_prologue ();
#define SKIP_PROLOGUE(ip) \
{(ip) = d10v_skip_prologue(ip);}
#define SKIP_PROLOGUE(ip) (d10v_skip_prologue (ip))
/* Stack grows downward. */
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
#define INNER_THAN(lhs,rhs) (core_addr_lessthan ((lhs), (rhs)))
/* for a breakpoint, use "dbt || nop" */
#define BREAKPOINT {0x2f, 0x90, 0x5e, 0x00}
extern breakpoint_from_pc_fn d10v_breakpoint_from_pc;
#define BREAKPOINT_FROM_PC(PCPTR,LENPTR) (d10v_breakpoint_from_pc ((PCPTR), (LENPTR)))
/* If your kernel resets the pc after the trap happens you may need to
define this before including this file. */
#define DECR_PC_AFTER_BREAK 4
#define REGISTER_NAMES \
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
"r8", "r9", "r10","r11","r12", "r13", "r14","r15",\
"psw","bpsw","pc","bpc", "cr4", "cr5", "cr6", "rpt_c",\
"rpt_s","rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "cr15",\
"imap0","imap1","dmap","a0", "a1"\
}
extern char *d10v_register_name PARAMS ((int reg_nr));
#define REGISTER_NAME(NR) (d10v_register_name (NR))
#define NUM_REGS 37
#endif /* GDB_MULTI_ARCH */
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
@@ -79,34 +66,43 @@ extern CORE_ADDR d10v_skip_prologue ();
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
/* Used by both d10v-tdep.c and remote-d10v.c */
#define R0_REGNUM 0
#define LR_REGNUM 13
#if !GDB_MULTI_ARCH
#define SP_REGNUM 15
#define FP_REGNUM 11
#define PC_REGNUM 18
#endif
#define PSW_REGNUM 16
#define IMAP0_REGNUM 32
#define IMAP1_REGNUM 33
#define DMAP_REGNUM 34
#define A0_REGNUM 35
#if !GDB_MULTI_ARCH
/* ??? */
#define REGISTER_SIZE 2
/* Say how much memory is needed to store a copy of the register set */
#define REGISTER_BYTES ((NUM_REGS-2)*2+16)
#define REGISTER_BYTES ((37/*NUM_REGS*/-2)*2+16)
/* Index within `registers' of the first byte of the space for
register N. */
#define REGISTER_BYTE(N) \
( ((N) > A0_REGNUM) ? ( ((N)-A0_REGNUM)*8 + A0_REGNUM*2 ) : ((N) * 2) )
extern int d10v_register_byte PARAMS ((int reg_nr));
#define REGISTER_BYTE(N) (d10v_register_byte (N))
/* Number of bytes of storage in the actual machine representation
for register N. */
#define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 2 )
extern int d10v_register_raw_size PARAMS ((int reg_nr));
#define REGISTER_RAW_SIZE(N) (d10v_register_raw_size (N))
/* Number of bytes of storage in the program's representation
for register N. */
#define REGISTER_VIRTUAL_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : ( ((N) == PC_REGNUM || (N) == SP_REGNUM) ? 4 : 2 ))
for register N. */
extern int d10v_register_virtual_size PARAMS ((int reg_nr));
#define REGISTER_VIRTUAL_SIZE(N) (d10v_register_virtual_size (N))
/* Largest value REGISTER_RAW_SIZE can have. */
@@ -119,39 +115,33 @@ extern CORE_ADDR d10v_skip_prologue ();
/* Return the GDB type object for the "standard" data type
of data in register N. */
#define REGISTER_VIRTUAL_TYPE(N) \
( ((N) < A0_REGNUM ) ? ((N) == PC_REGNUM || (N) == SP_REGNUM ? builtin_type_long : builtin_type_short) : builtin_type_long_long)
extern struct type *d10v_register_virtual_type PARAMS ((int reg_nr));
#define REGISTER_VIRTUAL_TYPE(N) (d10v_register_virtual_type (N))
/* convert $pc and $sp to/from virtual addresses */
#define REGISTER_CONVERTIBLE(N) ((N) == PC_REGNUM || (N) == SP_REGNUM)
extern int d10v_register_convertible PARAMS ((int nr));
extern void d10v_register_convert_to_virtual PARAMS ((int regnum, struct type * type, char *from, char *to));
extern void d10v_register_convert_to_raw PARAMS ((struct type * type, int regnum, char *from, char *to));
#define REGISTER_CONVERTIBLE(N) (d10v_register_convertible ((N)))
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
{ \
ULONGEST x = extract_unsigned_integer ((FROM), REGISTER_RAW_SIZE (REGNUM)); \
if (REGNUM == PC_REGNUM) x = (x << 2) | IMEM_START; \
else x |= DMEM_START; \
store_unsigned_integer ((TO), TYPE_LENGTH(TYPE), x); \
}
d10v_register_convert_to_virtual ((REGNUM), (TYPE), (FROM), (TO))
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
{ \
ULONGEST x = extract_unsigned_integer ((FROM), TYPE_LENGTH(TYPE)); \
x &= 0x3ffff; \
if (REGNUM == PC_REGNUM) x >>= 2; \
store_unsigned_integer ((TO), 2, x); \
}
d10v_register_convert_to_raw ((TYPE), (REGNUM), (FROM), (TO))
#define D10V_MAKE_DADDR(x) ((x) | DMEM_START)
#define D10V_MAKE_IADDR(x) (((x) << 2) | IMEM_START)
extern CORE_ADDR d10v_make_daddr PARAMS ((CORE_ADDR x));
#define D10V_MAKE_DADDR(x) (d10v_make_daddr (x))
extern CORE_ADDR d10v_make_iaddr PARAMS ((CORE_ADDR x));
#define D10V_MAKE_IADDR(x) (d10v_make_iaddr (x))
#define D10V_DADDR_P(X) (((X) & 0x3000000) == DMEM_START)
#define D10V_IADDR_P(X) (((X) & 0x3000000) == IMEM_START)
extern int d10v_daddr_p PARAMS ((CORE_ADDR x));
#define D10V_DADDR_P(X) (d10v_daddr_p (X))
extern int d10v_iaddr_p PARAMS ((CORE_ADDR x));
#define D10V_IADDR_P(X) (d10v_iaddr_p (X))
#define D10V_CONVERT_IADDR_TO_RAW(X) (((X) >> 2) & 0xffff)
#define D10V_CONVERT_DADDR_TO_RAW(X) ((X) & 0xffff)
#define ARG1_REGNUM R0_REGNUM
#define ARGN_REGNUM 3
#define RET1_REGNUM R0_REGNUM
extern CORE_ADDR d10v_convert_daddr_to_raw PARAMS ((CORE_ADDR x));
#define D10V_CONVERT_DADDR_TO_RAW(X) (d10v_convert_daddr_to_raw (X))
extern CORE_ADDR d10v_convert_iaddr_to_raw PARAMS ((CORE_ADDR x));
#define D10V_CONVERT_IADDR_TO_RAW(X) (d10v_convert_iaddr_to_raw (X))
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function.
@@ -159,8 +149,8 @@ extern CORE_ADDR d10v_skip_prologue ();
We store structs through a pointer passed in the first Argument
register. */
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ write_register (ARG1_REGNUM, (ADDR)); }
extern void d10v_store_struct_return PARAMS ((CORE_ADDR addr, CORE_ADDR sp));
#define STORE_STRUCT_RETURN(ADDR, SP) d10v_store_struct_return ((ADDR), (SP))
/* Write into appropriate registers a function return value
@@ -168,16 +158,16 @@ extern CORE_ADDR d10v_skip_prologue ();
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
write_register_bytes (REGISTER_BYTE(RET1_REGNUM), VALBUF, TYPE_LENGTH (TYPE))
extern void d10v_store_return_value PARAMS ((struct type * type, char *valbuf));
#define STORE_RETURN_VALUE(TYPE,VALBUF) d10v_store_return_value ((TYPE), (VALBUF))
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
(extract_address ((REGBUF) + REGISTER_BYTE (ARG1_REGNUM), REGISTER_RAW_SIZE (ARG1_REGNUM)) | DMEM_START)
extern CORE_ADDR d10v_extract_struct_value_address PARAMS ((char *regbuf));
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (d10v_extract_struct_value_address ((REGBUF)))
/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
@@ -188,67 +178,60 @@ extern CORE_ADDR d10v_skip_prologue ();
extern use_struct_convention_fn d10v_use_struct_convention;
#define USE_STRUCT_CONVENTION(gcc_p, type) d10v_use_struct_convention (gcc_p, type)
/* Define other aspects of the stack frame.
we keep a copy of the worked out return pc lying around, since it
is a useful bit of info */
#define EXTRA_FRAME_INFO \
CORE_ADDR return_pc; \
int frameless; \
int size;
extern void d10v_init_extra_frame_info PARAMS ((int fromleaf, struct frame_info * fi));
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
d10v_init_extra_frame_info(fromleaf, fi)
extern void d10v_init_extra_frame_info PARAMS (( int fromleaf, struct frame_info *fi ));
d10v_init_extra_frame_info(fromleaf, fi)
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_look_for_prologue(FI)
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
extern CORE_ADDR d10v_frame_chain PARAMS ((struct frame_info * frame));
#define FRAME_CHAIN(FRAME) d10v_frame_chain(FRAME)
extern int d10v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
#define FRAME_CHAIN_VALID(chain, thisframe) d10v_frame_chain_valid (chain, thisframe)
#define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc)
#define FRAME_ARGS_ADDRESS(fi) (fi)->frame
#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
extern CORE_ADDR d10v_frame_saved_pc PARAMS ((struct frame_info * fi));
#define FRAME_SAVED_PC(fi) (d10v_frame_saved_pc ((fi)))
extern CORE_ADDR d10v_frame_args_address PARAMS ((struct frame_info * fi));
#define FRAME_ARGS_ADDRESS(fi) (d10v_frame_args_address ((fi)))
extern CORE_ADDR d10v_frame_locals_address PARAMS ((struct frame_info * fi));
#define FRAME_LOCALS_ADDRESS(fi) (d10v_frame_locals_address ((fi)))
/* Immediately after a function call, return the saved pc. We can't */
/* use frame->return_pc beause that is determined by reading R13 off the */
/*stack and that may not be written yet. */
#define SAVED_PC_AFTER_CALL(frame) ((read_register(LR_REGNUM) << 2) | IMEM_START)
extern CORE_ADDR d10v_saved_pc_after_call PARAMS ((struct frame_info * frame));
#define SAVED_PC_AFTER_CALL(frame) (d10v_saved_pc_after_call ((frame)))
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
/* We can't tell how many args there are */
#define FRAME_NUM_ARGS(val,fi) (val = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
#define FRAME_ARGS_SKIP 0
/* Put here the code to store, into a struct frame_saved_regs,
the addresses of the saved registers of frame described by FRAME_INFO.
/* Put here the code to store, into frame_info->saved_regs, the
addresses of the saved registers of frame described by FRAME_INFO.
This includes special registers such as pc and fp saved in special
ways in the stack frame. sp is even more special:
the address we return for it IS the sp for the next frame. */
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
d10v_frame_find_saved_regs(frame_info, &(frame_saved_regs))
extern void d10v_frame_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
#define NAMES_HAVE_UNDERSCORE
ways in the stack frame. sp is even more special: the address we
return for it IS the sp for the next frame. */
extern void d10v_frame_init_saved_regs PARAMS ((struct frame_info *));
#define FRAME_INIT_SAVED_REGS(frame_info) \
d10v_frame_init_saved_regs(frame_info)
/* DUMMY FRAMES. Need these to support inferior function calls. They
work like this on D10V: First we set a breakpoint at 0 or __start.
@@ -259,10 +242,10 @@ extern void d10v_frame_find_saved_regs PARAMS ((struct frame_info *, struct fram
breakpoint, clear the break point and pop the old register contents
off the stack. */
extern void d10v_pop_frame PARAMS ((struct frame_info *frame));
#define POP_FRAME generic_pop_current_frame (d10v_pop_frame)
extern void d10v_pop_frame PARAMS ((void));
#define POP_FRAME d10v_pop_frame ()
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@@ -272,18 +255,18 @@ extern void d10v_pop_frame PARAMS ((struct frame_info *frame));
extern CORE_ADDR d10v_push_return_address PARAMS ((CORE_ADDR pc, CORE_ADDR sp));
#define PUSH_RETURN_ADDRESS(PC, SP) d10v_push_return_address (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
/* #define PC_IN_CALL_DUMMY(pc, sp, frame_address) ( pc == IMEM_START + 4 ) */
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
/* override the default get_saved_register function with one that
takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define get_saved_register generic_get_saved_register
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
(d10v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
extern CORE_ADDR d10v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
@@ -293,19 +276,9 @@ extern CORE_ADDR d10v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, i
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
d10v_extract_return_value(TYPE, REGBUF, VALBUF)
extern void
d10v_extract_return_value PARAMS ((struct type *, char *, char *));
extern void d10v_extract_return_value PARAMS ((struct type *, char *, char *));
#define REGISTER_SIZE 2
#ifdef CC_HAS_LONG_LONG
# define LONGEST long long
#else
# define LONGEST long
#endif
#define ULONGEST unsigned LONGEST
void d10v_write_pc PARAMS ((CORE_ADDR val, int pid));
CORE_ADDR d10v_read_pc PARAMS ((int pid));
void d10v_write_sp PARAMS ((CORE_ADDR val));
@@ -325,13 +298,14 @@ CORE_ADDR d10v_read_fp PARAMS ((void));
#define TARGET_PTR_BIT (4 * TARGET_CHAR_BIT)
#define TARGET_DOUBLE_BIT (4 * TARGET_CHAR_BIT)
#define TARGET_LONG_DOUBLE_BIT (8 * TARGET_CHAR_BIT)
/* For the d10v when talking to the remote d10v board, GDB addresses
need to be translated into a format that the d10v rom monitor
understands. */
int remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr));
extern void remote_d10v_translate_xfer_address PARAMS ((CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR * rem_addr, int *rem_len));
#define REMOTE_TRANSLATE_XFER_ADDRESS(GDB_ADDR, GDB_LEN, REM_ADDR, REM_LEN) \
(REM_LEN) = remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), &(REM_ADDR))
remote_d10v_translate_xfer_address ((GDB_ADDR), (GDB_LEN), (REM_ADDR), (REM_LEN))
#endif

View File

@@ -1,21 +1,22 @@
/* Target-specific definition for the Mitsubishi D30V
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef TM_D30V_H
#define TM_D30V_H
@@ -33,22 +34,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* and instruction memory to. */
#define DMEM_START 0x20000000
#define IMEM_START 0x00000000 /* was 0x10000000 */
#define IMEM_START 0x00000000 /* was 0x10000000 */
#define STACK_START 0x20007ffe
#ifdef __STDC__ /* Forward decls for prototypes */
/* Forward decls for prototypes */
struct frame_info;
struct frame_saved_regs;
struct frame_saved_regs;
struct type;
struct value;
#endif
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
extern CORE_ADDR d30v_skip_prologue ();
#define SKIP_PROLOGUE(ip) \
{(ip) = d30v_skip_prologue(ip);}
extern CORE_ADDR d30v_skip_prologue PARAMS ((CORE_ADDR));
#define SKIP_PROLOGUE(ip) (d30v_skip_prologue (ip))
/* Stack grows downward. */
@@ -94,9 +93,9 @@ extern CORE_ADDR d30v_skip_prologue ();
#define SPU_REGNUM 65 /* User stack pointer */
#define CREGS_START 66
#define PSW_REGNUM (CREGS_START + 0) /* psw, bpsw, or dpsw??? */
#define PSW_REGNUM (CREGS_START + 0) /* psw, bpsw, or dpsw??? */
#define PSW_SM (((unsigned long)0x80000000) >> 0) /* Stack mode: 0/SPI */
/* 1/SPU */
/* 1/SPU */
#define PSW_EA (((unsigned long)0x80000000) >> 2) /* Execution status */
#define PSW_DB (((unsigned long)0x80000000) >> 3) /* Debug mode */
#define PSW_DS (((unsigned long)0x80000000) >> 4) /* Debug EIT status */
@@ -112,25 +111,25 @@ extern CORE_ADDR d30v_skip_prologue ();
#define PSW_VA (((unsigned long)0x80000000) >> 29) /* Accum. overflow */
#define PSW_C (((unsigned long)0x80000000) >> 31) /* Carry/Borrow flag */
#define BPSW_REGNUM (CREGS_START + 1) /* Backup PSW (on interrupt) */
#define PC_REGNUM (CREGS_START + 2) /* pc, bpc, or dpc??? */
#define BPC_REGNUM (CREGS_START + 3) /* Backup PC (on interrupt) */
#define DPSW_REGNUM (CREGS_START + 4) /* Backup PSW (on debug trap) */
#define DPC_REGNUM (CREGS_START + 5) /* Backup PC (on debug trap) */
#define RPT_C_REGNUM (CREGS_START + 7) /* Loop count */
#define RPT_S_REGNUM (CREGS_START + 8) /* Loop start address*/
#define RPT_E_REGNUM (CREGS_START + 9) /* Loop end address */
#define BPSW_REGNUM (CREGS_START + 1) /* Backup PSW (on interrupt) */
#define PC_REGNUM (CREGS_START + 2) /* pc, bpc, or dpc??? */
#define BPC_REGNUM (CREGS_START + 3) /* Backup PC (on interrupt) */
#define DPSW_REGNUM (CREGS_START + 4) /* Backup PSW (on debug trap) */
#define DPC_REGNUM (CREGS_START + 5) /* Backup PC (on debug trap) */
#define RPT_C_REGNUM (CREGS_START + 7) /* Loop count */
#define RPT_S_REGNUM (CREGS_START + 8) /* Loop start address */
#define RPT_E_REGNUM (CREGS_START + 9) /* Loop end address */
#define MOD_S_REGNUM (CREGS_START + 10)
#define MOD_E_REGNUM (CREGS_START + 11)
#define IBA_REGNUM (CREGS_START + 14) /* Instruction break address */
#define EIT_VB_REGNUM (CREGS_START + 15) /* Vector base address */
#define INT_S_REGNUM (CREGS_START + 16) /* Interrupt status */
#define INT_M_REGNUM (CREGS_START + 17) /* Interrupt mask */
#define IBA_REGNUM (CREGS_START + 14) /* Instruction break address */
#define EIT_VB_REGNUM (CREGS_START + 15) /* Vector base address */
#define INT_S_REGNUM (CREGS_START + 16) /* Interrupt status */
#define INT_M_REGNUM (CREGS_START + 17) /* Interrupt mask */
#define A0_REGNUM 84
#define A1_REGNUM 85
/* Say how much memory is needed to store a copy of the register set */
#define REGISTER_BYTES ((NUM_REGS - 2) * 4 + 2 * 8)
#define REGISTER_BYTES ((NUM_REGS - 2) * 4 + 2 * 8)
/* Index within `registers' of the first byte of the space for
register N. */
@@ -144,7 +143,7 @@ extern CORE_ADDR d30v_skip_prologue ();
#define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 4 )
/* Number of bytes of storage in the program's representation
for register N. */
for register N. */
#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
/* Largest value REGISTER_RAW_SIZE can have. */
@@ -205,24 +204,26 @@ void d30v_do_registers_info PARAMS ((int regnum, int fpregs));
int size;
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
d30v_init_extra_frame_info(fromleaf, fi)
d30v_init_extra_frame_info(fromleaf, fi)
extern void d30v_init_extra_frame_info PARAMS (( int fromleaf, struct frame_info *fi ));
extern void d30v_init_extra_frame_info PARAMS ((int fromleaf, struct frame_info * fi));
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_look_for_prologue(FI)
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
CORE_ADDR d30v_frame_chain (struct frame_info *frame);
#define FRAME_CHAIN(FRAME) d30v_frame_chain(FRAME)
extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
#define FRAME_CHAIN_VALID(chain, thisframe) d30v_frame_chain_valid (chain, thisframe)
#define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc)
#define FRAME_SAVED_PC(FRAME) ((FRAME)->return_pc)
#define FRAME_ARGS_ADDRESS(fi) (fi)->frame
#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
void d30v_init_frame_pc (int fromleaf, struct frame_info *prev);
#define INIT_FRAME_PC_FIRST(fromleaf, prev) d30v_init_frame_pc(fromleaf, prev)
#define INIT_FRAME_PC(fromleaf, prev) /* nada */
@@ -231,12 +232,12 @@ extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
/* stack and that may not be written yet. */
#define SAVED_PC_AFTER_CALL(frame) (read_register(LR_REGNUM))
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
/* We can't tell how many args there are */
#define FRAME_NUM_ARGS(val,fi) (val = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
@@ -254,8 +255,6 @@ extern int d30v_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *));
extern void d30v_frame_find_saved_regs PARAMS ((struct frame_info *, struct frame_saved_regs *));
#define NAMES_HAVE_UNDERSCORE
/* DUMMY FRAMES. Need these to support inferior function calls.
They work like this on D30V:
First we set a breakpoint at 0 or __start.
@@ -266,9 +265,9 @@ extern void d30v_frame_find_saved_regs PARAMS ((struct frame_info *, struct fram
When it hits the breakpoint, clear the break point and pop the old
register contents off the stack. */
#define CALL_DUMMY { 0 }
#define CALL_DUMMY { 0 }
#define PUSH_DUMMY_FRAME
#define CALL_DUMMY_START_OFFSET 0
#define CALL_DUMMY_START_OFFSET 0
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@@ -281,10 +280,10 @@ sp = d30v_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
#define PC_IN_CALL_DUMMY(pc, sp, frame_address) ( pc == IMEM_START + 4 )
extern CORE_ADDR d30v_fix_call_dummy PARAMS ((char *, CORE_ADDR, CORE_ADDR,
int, struct value **,
struct type *, int));
int, struct value **,
struct type *, int));
#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
sp = d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))
(d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
extern CORE_ADDR d30v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));
@@ -294,14 +293,14 @@ extern CORE_ADDR d30v_push_arguments PARAMS ((int, struct value **, CORE_ADDR, i
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
d30v_extract_return_value(TYPE, REGBUF, VALBUF)
extern void
extern void
d30v_extract_return_value PARAMS ((struct type *, char *, char *));
/* Discard from the stack the innermost frame,
restoring all saved registers. */
#define POP_FRAME d30v_pop_frame();
extern void d30v_pop_frame PARAMS((void));
extern void d30v_pop_frame PARAMS ((void));
#define REGISTER_SIZE 4

View File

@@ -1,20 +1,22 @@
/* Parameters for execution on a Fujitsu FR30 processor.
Copyright 1999, Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#define FR30_GENREGS 16
#define FR30_DEDICATEDREGS 8
@@ -83,7 +85,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define REGISTER_RAW_SIZE(N) FR30_REGSIZE
/* Largest value REGISTER_RAW_SIZE can have. */
#define MAX_REGISTER_RAW_SIZE FR30_REGSIZE
#define MAX_REGISTER_RAW_SIZE FR30_REGSIZE
/* Number of bytes of storage in the program's representation
for register N. */
@@ -95,7 +97,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern void fr30_pop_frame PARAMS ((void));
#define POP_FRAME fr30_pop_frame()
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
@@ -129,19 +131,18 @@ extern void fr30_pop_frame PARAMS ((void));
#define STORE_STRUCT_RETURN(ADDR, SP) \
{ write_register (RETVAL_REG, (ADDR)); }
#define FRAME_ARGS_ADDRESS(fi) (fi->frame)
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
#define FRAME_NUM_ARGS(numargs, fi) (numargs = -1)
#define FRAME_NUM_ARGS(fi) (-1)
#ifdef __STDC__ /* Forward decls for prototypes */
/* Forward decls for prototypes */
struct frame_info;
struct frame_saved_regs;
struct type;
struct value;
#endif
#define EXTRA_FRAME_INFO \
struct frame_saved_regs fsr; \
@@ -149,22 +150,25 @@ struct value;
int frameoffset; \
int framereg;
extern CORE_ADDR fr30_frame_chain PARAMS ((struct frame_info *fi));
extern CORE_ADDR fr30_frame_chain PARAMS ((struct frame_info * fi));
#define FRAME_CHAIN(fi) fr30_frame_chain (fi)
extern CORE_ADDR fr30_frame_saved_pc PARAMS ((struct frame_info *));
extern CORE_ADDR fr30_frame_saved_pc PARAMS ((struct frame_info *));
#define FRAME_SAVED_PC(fi) (fr30_frame_saved_pc (fi))
#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
extern CORE_ADDR fr30_skip_prologue PARAMS ((CORE_ADDR pc));
#define SKIP_PROLOGUE(pc) pc = fr30_skip_prologue (pc)
#define SKIP_PROLOGUE(pc) (fr30_skip_prologue (pc))
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format. */
/* Write into appropriate registers a function return value of type
TYPE, given in virtual format. VALBUF is in the target byte order;
it's typically the VALUE_CONTENTS of some struct value, and those
are in the target's byte order. */
extern void fr30_store_return_value PARAMS ((struct type * type, char *valbuf));
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
(fr30_store_return_value ((TYPE), (VALBUF)))
/* Put here the code to store, into a struct frame_saved_regs,
the addresses of the saved registers of frame described by FRAME_INFO.
@@ -186,32 +190,24 @@ extern CORE_ADDR fr30_skip_prologue PARAMS ((CORE_ADDR pc));
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
{ \
CORE_ADDR func_start, after_prologue; \
func_start = (get_pc_function_start ((FI)->pc) + \
FUNCTION_START_OFFSET); \
after_prologue = func_start; \
SKIP_PROLOGUE (after_prologue); \
(FRAMELESS) = (after_prologue == func_start); \
}
/* An expression that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. */
extern int fr30_frameless_function_invocation PARAMS ((struct frame_info * frame));
#define FRAMELESS_FUNCTION_INVOCATION(FI) (fr30_frameless_function_invocation (FI));
extern void fr30_init_extra_frame_info PARAMS ((struct frame_info *fi));
extern void fr30_init_extra_frame_info PARAMS ((struct frame_info * fi));
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) fr30_init_extra_frame_info (fi)
#define FRAME_CHAIN_VALID(FP, FI) generic_frame_chain_valid (FP, FI)
extern CORE_ADDR
fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr));
fr30_push_arguments PARAMS ((int nargs, struct value ** args, CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr));
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
(fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
/* Fujitsu's ABI requires all structs to be passed using a pointer.
That is obviously not very efficient, so I am leaving the definitions
@@ -230,3 +226,12 @@ fr30_push_arguments PARAMS ((int nargs, struct value **args, CORE_ADDR sp,
#endif
/* alway return struct by value by input pointer */
#define USE_STRUCT_CONVENTION(GCC_P, TYPE) 1
/* The stack should always be aligned on a four-word boundary. */
#define STACK_ALIGN(len) (((len) + 3) & ~3)
/* I think the comment about this in value_arg_coerce is wrong; this
should be true on any system where you can rely on the prototyping
information. When this is true, value_arg_coerce will promote
floats to doubles iff the function is not prototyped. */
#define COERCE_FLOAT_TO_DOUBLE 1

View File

@@ -31,48 +31,48 @@
/* OBSOLETE #define NO_GNU_STABS */
/* OBSOLETE */
/* OBSOLETE /* Macro for text-offset and data info (in NPL a.out format). *x/ */
/* OBSOLETE #define TEXTINFO \ */
/* OBSOLETE text_offset = N_TXTOFF (exec_coffhdr, exec_aouthdr); \ */
/* OBSOLETE #define TEXTINFO \ */
/* OBSOLETE text_offset = N_TXTOFF (exec_coffhdr, exec_aouthdr); \ */
/* OBSOLETE exec_data_offset = N_TXTOFF (exec_coffhdr, exec_aouthdr)\ */
/* OBSOLETE + exec_aouthdr.a_text */
/* OBSOLETE */
/* OBSOLETE /* Macro for number of symbol table entries *x/ */
/* OBSOLETE #define NUMBER_OF_SYMBOLS \ */
/* OBSOLETE (coffhdr.f_nsyms) */
/* OBSOLETE #define NUMBER_OF_SYMBOLS \ */
/* OBSOLETE (coffhdr.f_nsyms) */
/* OBSOLETE */
/* OBSOLETE /* Macro for file-offset of symbol table (in NPL a.out format). *x/ */
/* OBSOLETE #define SYMBOL_TABLE_OFFSET \ */
/* OBSOLETE N_SYMOFF (coffhdr) */
/* OBSOLETE #define SYMBOL_TABLE_OFFSET \ */
/* OBSOLETE N_SYMOFF (coffhdr) */
/* OBSOLETE */
/* OBSOLETE /* Macro for file-offset of string table (in NPL a.out format). *x/ */
/* OBSOLETE #define STRING_TABLE_OFFSET \ */
/* OBSOLETE (N_STROFF (coffhdr)) */
/* OBSOLETE #define STRING_TABLE_OFFSET \ */
/* OBSOLETE (N_STROFF (coffhdr)) */
/* OBSOLETE */
/* OBSOLETE /* Macro to store the length of the string table data in INTO. *x/ */
/* OBSOLETE #define READ_STRING_TABLE_SIZE(INTO) \ */
/* OBSOLETE { INTO = hdr.a_stsize; } */
/* OBSOLETE #define READ_STRING_TABLE_SIZE(INTO) \ */
/* OBSOLETE { INTO = hdr.a_stsize; } */
/* OBSOLETE */
/* OBSOLETE /* Macro to declare variables to hold the file's header data. *x/ */
/* OBSOLETE #define DECLARE_FILE_HEADERS struct exec hdr; \ */
/* OBSOLETE FILHDR coffhdr */
/* OBSOLETE #define DECLARE_FILE_HEADERS struct exec hdr; \ */
/* OBSOLETE FILHDR coffhdr */
/* OBSOLETE */
/* OBSOLETE /* Macro to read the header data from descriptor DESC and validate it. */
/* OBSOLETE NAME is the file name, for error messages. *x/ */
/* OBSOLETE #define READ_FILE_HEADERS(DESC, NAME) \ */
/* OBSOLETE { val = myread (DESC, &coffhdr, sizeof coffhdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE val = myread (DESC, &hdr, sizeof hdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if (coffhdr.f_magic != GNP1MAGIC) \ */
/* OBSOLETE error ("File \"%s\" not in coff executable format.", NAME); \ */
/* OBSOLETE if (N_BADMAG (hdr)) \ */
/* OBSOLETE #define READ_FILE_HEADERS(DESC, NAME) \ */
/* OBSOLETE { val = myread (DESC, &coffhdr, sizeof coffhdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE val = myread (DESC, &hdr, sizeof hdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if (coffhdr.f_magic != GNP1MAGIC) \ */
/* OBSOLETE error ("File \"%s\" not in coff executable format.", NAME); \ */
/* OBSOLETE if (N_BADMAG (hdr)) \ */
/* OBSOLETE error ("File \"%s\" not in executable format.", NAME); } */
/* OBSOLETE */
/* OBSOLETE /* Define COFF and other symbolic names needed on NP1 *x/ */
/* OBSOLETE #define NS32GMAGIC GNP1MAGIC */
/* OBSOLETE #define NS32SMAGIC GPNMAGIC */
/* OBSOLETE #define NS32GMAGIC GNP1MAGIC */
/* OBSOLETE #define NS32SMAGIC GPNMAGIC */
/* OBSOLETE */
/* OBSOLETE /* Address of blocks in N_LBRAC and N_RBRAC symbols are absolute addresses, */
/* OBSOLETE not relative to start of source address. *x/ */
@@ -80,7 +80,7 @@
/* OBSOLETE */
/* OBSOLETE /* Offset from address of function to start of its code. */
/* OBSOLETE Zero on most machines. *x/ */
/* OBSOLETE #define FUNCTION_START_OFFSET 8 */
/* OBSOLETE #define FUNCTION_START_OFFSET 8 */
/* OBSOLETE */
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
/* OBSOLETE to reach some "real" code. One NPL we can have one two startup */
@@ -97,70 +97,70 @@
/* OBSOLETE or */
/* OBSOLETE Optional "stw r2,8(b3)" (Gould first argument register passing) */
/* OBSOLETE *x/ */
/* OBSOLETE #define SKIP_PROLOGUE(pc) { \ */
/* OBSOLETE register int op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0xFA0B0000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59400000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE #define SKIP_PROLOGUE(pc) { \ */
/* OBSOLETE register int op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0xFA0B0000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59400000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Immediately after a function call, return the saved pc. */
@@ -169,10 +169,10 @@
/* OBSOLETE some instructions. True on NPL! Return address is in R1. */
/* OBSOLETE The true return address is REALLY 4 past that location! *x/ */
/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \ */
/* OBSOLETE (read_register(R1_REGNUM) + 4) */
/* OBSOLETE (read_register(R1_REGNUM) + 4) */
/* OBSOLETE */
/* OBSOLETE /* Address of end of stack space. *x/ */
/* OBSOLETE #define STACK_END_ADDR 0x7fffc000 */
/* OBSOLETE #define STACK_END_ADDR 0x7fffc000 */
/* OBSOLETE */
/* OBSOLETE /* Stack grows downward. *x/ */
/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
@@ -181,15 +181,15 @@
/* OBSOLETE This is padded out to the size of a machine word. When it was just */
/* OBSOLETE {0x28, 0x09} it gave problems if hit breakpoint on returning from a */
/* OBSOLETE function call. *x/ */
/* OBSOLETE #define BREAKPOINT {0x28, 0x09, 0x0, 0x0} */
/* OBSOLETE #define BREAKPOINT {0x28, 0x09, 0x0, 0x0} */
/* OBSOLETE */
/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */
/* OBSOLETE This is often the number of bytes in BREAKPOINT */
/* OBSOLETE but not always. *x/ */
/* OBSOLETE #define DECR_PC_AFTER_BREAK 2 */
/* OBSOLETE #define DECR_PC_AFTER_BREAK 2 */
/* OBSOLETE */
/* OBSOLETE /* Return 1 if P points to an invalid floating point value. *x/ */
/* OBSOLETE #define INVALID_FLOAT(p, len) ((*(short *)p & 0xff80) == 0x8000) */
/* OBSOLETE #define INVALID_FLOAT(p, len) ((*(short *)p & 0xff80) == 0x8000) */
/* OBSOLETE */
/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */
/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */
@@ -198,13 +198,13 @@
/* OBSOLETE #define REGISTER_SIZE 4 */
/* OBSOLETE */
/* OBSOLETE /* Size of bytes of vector register (NP1 only), 32 elements * sizeof(int) *x/ */
/* OBSOLETE #define VR_SIZE 128 */
/* OBSOLETE #define VR_SIZE 128 */
/* OBSOLETE */
/* OBSOLETE /* Number of machine registers *x/ */
/* OBSOLETE #define NUM_REGS 27 */
/* OBSOLETE #define NUM_GEN_REGS 16 */
/* OBSOLETE #define NUM_CPU_REGS 4 */
/* OBSOLETE #define NUM_VECTOR_REGS 7 */
/* OBSOLETE #define NUM_REGS 27 */
/* OBSOLETE #define NUM_GEN_REGS 16 */
/* OBSOLETE #define NUM_CPU_REGS 4 */
/* OBSOLETE #define NUM_VECTOR_REGS 7 */
/* OBSOLETE */
/* OBSOLETE /* Initializer for an array of names of registers. */
/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */
@@ -221,52 +221,52 @@
/* OBSOLETE and some are "phony" register numbers which are too large */
/* OBSOLETE to be actual register numbers as far as the user is concerned */
/* OBSOLETE but do serve to get the desired values when passed to read_register. *x/ */
/* OBSOLETE #define R1_REGNUM 1 /* Gr1 => return address of caller *x/ */
/* OBSOLETE #define R2_REGNUM 2 /* Gr2 => return value from function *x/ */
/* OBSOLETE #define R4_REGNUM 4 /* Gr4 => register save area *x/ */
/* OBSOLETE #define R5_REGNUM 5 /* Gr5 => register save area *x/ */
/* OBSOLETE #define R6_REGNUM 6 /* Gr6 => register save area *x/ */
/* OBSOLETE #define R7_REGNUM 7 /* Gr7 => register save area *x/ */
/* OBSOLETE #define B1_REGNUM 9 /* Br1 => start of this code routine *x/ */
/* OBSOLETE #define SP_REGNUM 10 /* Br2 == (sp) *x/ */
/* OBSOLETE #define AP_REGNUM 11 /* Br3 == (ap) *x/ */
/* OBSOLETE #define FP_REGNUM 16 /* A copy of Br2 saved in trap *x/ */
/* OBSOLETE #define PS_REGNUM 17 /* Contains processor status *x/ */
/* OBSOLETE #define PC_REGNUM 18 /* Contains program counter *x/ */
/* OBSOLETE #define VE_REGNUM 19 /* Vector end (user setup) register *x/ */
/* OBSOLETE #define V1_REGNUM 20 /* First vector register *x/ */
/* OBSOLETE #define V7_REGNUM 26 /* First vector register *x/ */
/* OBSOLETE #define R1_REGNUM 1 /* Gr1 => return address of caller *x/ */
/* OBSOLETE #define R2_REGNUM 2 /* Gr2 => return value from function *x/ */
/* OBSOLETE #define R4_REGNUM 4 /* Gr4 => register save area *x/ */
/* OBSOLETE #define R5_REGNUM 5 /* Gr5 => register save area *x/ */
/* OBSOLETE #define R6_REGNUM 6 /* Gr6 => register save area *x/ */
/* OBSOLETE #define R7_REGNUM 7 /* Gr7 => register save area *x/ */
/* OBSOLETE #define B1_REGNUM 9 /* Br1 => start of this code routine *x/ */
/* OBSOLETE #define SP_REGNUM 10 /* Br2 == (sp) *x/ */
/* OBSOLETE #define AP_REGNUM 11 /* Br3 == (ap) *x/ */
/* OBSOLETE #define FP_REGNUM 16 /* A copy of Br2 saved in trap *x/ */
/* OBSOLETE #define PS_REGNUM 17 /* Contains processor status *x/ */
/* OBSOLETE #define PC_REGNUM 18 /* Contains program counter *x/ */
/* OBSOLETE #define VE_REGNUM 19 /* Vector end (user setup) register *x/ */
/* OBSOLETE #define V1_REGNUM 20 /* First vector register *x/ */
/* OBSOLETE #define V7_REGNUM 26 /* First vector register *x/ */
/* OBSOLETE */
/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
/* OBSOLETE register state, the array `registers'. *x/ */
/* OBSOLETE #define REGISTER_BYTES \ */
/* OBSOLETE (NUM_GEN_REGS*4 + NUM_VECTOR_REGS*VR_SIZE + NUM_CPU_REGS*4) */
/* OBSOLETE (NUM_GEN_REGS*4 + NUM_VECTOR_REGS*VR_SIZE + NUM_CPU_REGS*4) */
/* OBSOLETE */
/* OBSOLETE /* Index within `registers' of the first byte of the space for */
/* OBSOLETE register N. *x/ */
/* OBSOLETE #define REGISTER_BYTE(N) \ */
/* OBSOLETE (((N) < V1_REGNUM) ? ((N) * 4) : (((N) - V1_REGNUM) * VR_SIZE) + 80) */
/* OBSOLETE (((N) < V1_REGNUM) ? ((N) * 4) : (((N) - V1_REGNUM) * VR_SIZE) + 80) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
/* OBSOLETE for register N. On the NP1, all normal regs are 4 bytes, but */
/* OBSOLETE the vector registers are VR_SIZE*4 bytes long. *x/ */
/* OBSOLETE #define REGISTER_RAW_SIZE(N) \ */
/* OBSOLETE (((N) < V1_REGNUM) ? 4 : VR_SIZE) */
/* OBSOLETE (((N) < V1_REGNUM) ? 4 : VR_SIZE) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the program's representation */
/* OBSOLETE for register N. On the NP1, all regs are 4 bytes. *x/ */
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) \ */
/* OBSOLETE (((N) < V1_REGNUM) ? 4 : VR_SIZE) */
/* OBSOLETE (((N) < V1_REGNUM) ? 4 : VR_SIZE) */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE VR_SIZE */
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE VR_SIZE */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE VR_SIZE */
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE VR_SIZE */
/* OBSOLETE */
/* OBSOLETE /* Return the GDB type object for the "standard" data type */
/* OBSOLETE of data in register N. *x/ */
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */
/* OBSOLETE ((N) > VE_REGNUM ? builtin_type_np1_vector : builtin_type_int) */
/* OBSOLETE extern struct type *builtin_type_np1_vector; */
/* OBSOLETE */
@@ -283,14 +283,14 @@
/* OBSOLETE into VALBUF. *x/ */
/* OBSOLETE */
/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
/* OBSOLETE memcpy (VALBUF, ((int *)(REGBUF)) + 2, TYPE_LENGTH (TYPE)) */
/* OBSOLETE memcpy (VALBUF, ((int *)(REGBUF)) + 2, TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* OBSOLETE /* Write into appropriate registers a function return value */
/* OBSOLETE of type TYPE, given in virtual format. *x/ */
/* OBSOLETE */
/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
/* OBSOLETE write_register_bytes (REGISTER_BYTE (R2_REGNUM), VALBUF, \ */
/* OBSOLETE TYPE_LENGTH (TYPE)) */
/* OBSOLETE write_register_bytes (REGISTER_BYTE (R2_REGNUM), VALBUF, \ */
/* OBSOLETE TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
/* OBSOLETE the address in which a function should return its structure value, */
@@ -315,31 +315,31 @@
/* OBSOLETE /* In the case of the NPL, the frame's norminal address is Br2 and the */
/* OBSOLETE previous routines frame is up the stack X bytes, where X is the */
/* OBSOLETE value stored in the code function header xA(Br1). *x/ */
/* OBSOLETE #define FRAME_CHAIN(thisframe) (findframe(thisframe)) */
/* OBSOLETE #define FRAME_CHAIN(thisframe) (findframe(thisframe)) */
/* OBSOLETE */
/* OBSOLETE extern int gould_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *)); */
/* OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) gould_frame_chain_valid (chain, thisframe) */
/* OBSOLETE */
/* OBSOLETE /* Define other aspects of the stack frame on NPL. *x/ */
/* OBSOLETE #define FRAME_SAVED_PC(FRAME) \ */
/* OBSOLETE (read_memory_integer ((FRAME)->frame + 8, 4)) */
/* OBSOLETE (read_memory_integer ((FRAME)->frame + 8, 4)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \ */
/* OBSOLETE ((fi)->next ? \ */
/* OBSOLETE read_memory_integer ((fi)->frame + 12, 4) : \ */
/* OBSOLETE read_register (AP_REGNUM)) */
/* OBSOLETE ((fi)->next ? \ */
/* OBSOLETE read_memory_integer ((fi)->frame + 12, 4) : \ */
/* OBSOLETE read_register (AP_REGNUM)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) */
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) */
/* OBSOLETE */
/* OBSOLETE /* Set VAL to the number of args passed to frame described by FI. */
/* OBSOLETE Can set VAL to -1, meaning no way to tell. *x/ */
/* OBSOLETE */
/* OBSOLETE /* We can check the stab info to see how */
/* OBSOLETE many arg we have. No info in stack will tell us *x/ */
/* OBSOLETE #define FRAME_NUM_ARGS(val,fi) (val = findarg(fi)) */
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (findarg(fi)) */
/* OBSOLETE */
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
/* OBSOLETE #define FRAME_ARGS_SKIP 8 */
/* OBSOLETE #define FRAME_ARGS_SKIP 8 */
/* OBSOLETE */
/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */
@@ -347,21 +347,21 @@
/* OBSOLETE ways in the stack frame. sp is even more special: */
/* OBSOLETE the address we return for it IS the sp for the next frame. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */
/* OBSOLETE { \ */
/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */
/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */
/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = framechain (frame_info); \ */
/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 8; \ */
/* OBSOLETE (frame_saved_regs).regs[R4_REGNUM] = (frame_info)->frame + 0x30; \ */
/* OBSOLETE (frame_saved_regs).regs[R5_REGNUM] = (frame_info)->frame + 0x34; \ */
/* OBSOLETE (frame_saved_regs).regs[R6_REGNUM] = (frame_info)->frame + 0x38; \ */
/* OBSOLETE (frame_saved_regs).regs[R7_REGNUM] = (frame_info)->frame + 0x3C; \ */
/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 8; \ */
/* OBSOLETE (frame_saved_regs).regs[R4_REGNUM] = (frame_info)->frame + 0x30; \ */
/* OBSOLETE (frame_saved_regs).regs[R5_REGNUM] = (frame_info)->frame + 0x34; \ */
/* OBSOLETE (frame_saved_regs).regs[R6_REGNUM] = (frame_info)->frame + 0x38; \ */
/* OBSOLETE (frame_saved_regs).regs[R7_REGNUM] = (frame_info)->frame + 0x3C; \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY_LOCATION BEFORE_TEXT_END */
/* OBSOLETE #define NEED_TEXT_START_END 1 */
/* OBSOLETE #define CALL_DUMMY_LOCATION BEFORE_TEXT_END */
/* OBSOLETE #define NEED_TEXT_START_END 1 */
/* OBSOLETE */
/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */
/* OBSOLETE */
@@ -414,15 +414,15 @@
/* OBSOLETE *x/ */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY {0x00000000, \ */
/* OBSOLETE 0x00000000, \ */
/* OBSOLETE 0x59000000, \ */
/* OBSOLETE 0x598a0000, \ */
/* OBSOLETE 0xb5030008, \ */
/* OBSOLETE 0x5c820000, \ */
/* OBSOLETE 0x44810008, \ */
/* OBSOLETE 0x00000000, \ */
/* OBSOLETE 0x590a0000, \ */
/* OBSOLETE 0x28090000 } */
/* OBSOLETE 0x00000000, \ */
/* OBSOLETE 0x59000000, \ */
/* OBSOLETE 0x598a0000, \ */
/* OBSOLETE 0xb5030008, \ */
/* OBSOLETE 0x5c820000, \ */
/* OBSOLETE 0x44810008, \ */
/* OBSOLETE 0x00000000, \ */
/* OBSOLETE 0x590a0000, \ */
/* OBSOLETE 0x28090000 } */
/* OBSOLETE */
/* OBSOLETE #define CALL_DUMMY_LENGTH 40 */
/* OBSOLETE */
@@ -450,9 +450,9 @@
/* OBSOLETE int arg_len = 0, total_len;\ */
/* OBSOLETE old_sp = push_word(old_sp,fun);\ */
/* OBSOLETE for(i = nargs - 1;i >= 0;i--)\ */
/* OBSOLETE arg_len += TYPE_LENGTH (VALUE_TYPE (value_arg_coerce (args[i])));\ */
/* OBSOLETE arg_len += TYPE_LENGTH (VALUE_TYPE (value_arg_coerce (args[i])));\ */
/* OBSOLETE if(struct_return)\ */
/* OBSOLETE arg_len += TYPE_LENGTH(value_type);\ */
/* OBSOLETE arg_len += TYPE_LENGTH(value_type);\ */
/* OBSOLETE total_len = DUMMY_FRAME_SIZE+CALL_DUMMY_STACK_ADJUST+4+arg_len;\ */
/* OBSOLETE dummyname[0] += total_len;\ */
/* OBSOLETE dummyname[2] += total_len;\ */

View File

@@ -29,58 +29,58 @@
/* OBSOLETE #define NO_GNU_STABS */
/* OBSOLETE */
/* OBSOLETE /* Macro for text-offset and data info (in PN a.out format). *x/ */
/* OBSOLETE #define TEXTINFO \ */
/* OBSOLETE text_offset = N_TXTOFF (exec_coffhdr); \ */
/* OBSOLETE exec_data_offset = N_TXTOFF (exec_coffhdr) \ */
/* OBSOLETE + exec_aouthdr.a_text */
/* OBSOLETE #define TEXTINFO \ */
/* OBSOLETE text_offset = N_TXTOFF (exec_coffhdr); \ */
/* OBSOLETE exec_data_offset = N_TXTOFF (exec_coffhdr) \ */
/* OBSOLETE + exec_aouthdr.a_text */
/* OBSOLETE */
/* OBSOLETE /* Macro for number of symbol table entries (this used to be checked */
/* OBSOLETE in dbxread.c and caused the last psymtab to use this as the end of */
/* OBSOLETE text. I'm not sure whether it would still be necessary). *x/ */
/* OBSOLETE #define END_OF_TEXT_DEFAULT \ */
/* OBSOLETE (0xffffff) */
/* OBSOLETE #define END_OF_TEXT_DEFAULT \ */
/* OBSOLETE (0xffffff) */
/* OBSOLETE */
/* OBSOLETE /* Macro for number of symbol table entries *x/ */
/* OBSOLETE #define NUMBER_OF_SYMBOLS \ */
/* OBSOLETE (coffhdr.f_nsyms) */
/* OBSOLETE #define NUMBER_OF_SYMBOLS \ */
/* OBSOLETE (coffhdr.f_nsyms) */
/* OBSOLETE */
/* OBSOLETE /* Macro for file-offset of symbol table (in usual a.out format). *x/ */
/* OBSOLETE #define SYMBOL_TABLE_OFFSET \ */
/* OBSOLETE N_SYMOFF (coffhdr) */
/* OBSOLETE #define SYMBOL_TABLE_OFFSET \ */
/* OBSOLETE N_SYMOFF (coffhdr) */
/* OBSOLETE */
/* OBSOLETE /* Macro for file-offset of string table (in usual a.out format). *x/ */
/* OBSOLETE #define STRING_TABLE_OFFSET \ */
/* OBSOLETE (N_STROFF (coffhdr) + sizeof(int)) */
/* OBSOLETE #define STRING_TABLE_OFFSET \ */
/* OBSOLETE (N_STROFF (coffhdr) + sizeof(int)) */
/* OBSOLETE */
/* OBSOLETE /* Macro to store the length of the string table data in INTO. *x/ */
/* OBSOLETE #define READ_STRING_TABLE_SIZE(INTO) \ */
/* OBSOLETE { INTO = hdr.a_stsize; } */
/* OBSOLETE #define READ_STRING_TABLE_SIZE(INTO) \ */
/* OBSOLETE { INTO = hdr.a_stsize; } */
/* OBSOLETE */
/* OBSOLETE /* Macro to declare variables to hold the file's header data. *x/ */
/* OBSOLETE #define DECLARE_FILE_HEADERS struct old_exec hdr; \ */
/* OBSOLETE FILHDR coffhdr */
/* OBSOLETE #define DECLARE_FILE_HEADERS struct old_exec hdr; \ */
/* OBSOLETE FILHDR coffhdr */
/* OBSOLETE */
/* OBSOLETE /* Macro to read the header data from descriptor DESC and validate it. */
/* OBSOLETE NAME is the file name, for error messages. *x/ */
/* OBSOLETE #define READ_FILE_HEADERS(DESC, NAME) \ */
/* OBSOLETE { val = myread (DESC, &coffhdr, sizeof coffhdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE val = myread (DESC, &hdr, sizeof hdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if (coffhdr.f_magic != GNP1MAGIC) \ */
/* OBSOLETE error ("File \"%s\" not in coff executable format.", NAME); \ */
/* OBSOLETE if (N_BADMAG (hdr)) \ */
/* OBSOLETE #define READ_FILE_HEADERS(DESC, NAME) \ */
/* OBSOLETE { val = myread (DESC, &coffhdr, sizeof coffhdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE val = myread (DESC, &hdr, sizeof hdr); \ */
/* OBSOLETE if (val < 0) \ */
/* OBSOLETE perror_with_name (NAME); \ */
/* OBSOLETE if (coffhdr.f_magic != GNP1MAGIC) \ */
/* OBSOLETE error ("File \"%s\" not in coff executable format.", NAME); \ */
/* OBSOLETE if (N_BADMAG (hdr)) \ */
/* OBSOLETE error ("File \"%s\" not in executable format.", NAME); } */
/* OBSOLETE */
/* OBSOLETE /* Define COFF and other symbolic names needed on NP1 *x/ */
/* OBSOLETE #define NS32GMAGIC GDPMAGIC */
/* OBSOLETE #define NS32SMAGIC PN_MAGIC */
/* OBSOLETE #define NS32GMAGIC GDPMAGIC */
/* OBSOLETE #define NS32SMAGIC PN_MAGIC */
/* OBSOLETE */
/* OBSOLETE /* Offset from address of function to start of its code. */
/* OBSOLETE Zero on most machines. *x/ */
/* OBSOLETE #define FUNCTION_START_OFFSET 4 */
/* OBSOLETE #define FUNCTION_START_OFFSET 4 */
/* OBSOLETE */
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
/* OBSOLETE to reach some "real" code. One PN we can have one or two startup */
@@ -97,70 +97,70 @@
/* OBSOLETE or */
/* OBSOLETE Optional "stw r2,8(b3)" (Gould first argument register passing) */
/* OBSOLETE *x/ */
/* OBSOLETE #define SKIP_PROLOGUE(pc) { \ */
/* OBSOLETE register int op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x580B0000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59400000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE #define SKIP_PROLOGUE(pc) { \ */
/* OBSOLETE register int op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x580B0000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59400000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x59000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if ((op & 0xffff0000) == 0x5F000000) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xD4820008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0x5582000C) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 4); \ */
/* OBSOLETE if (op == 0xd5030008) { \ */
/* OBSOLETE pc += 4; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } else { \ */
/* OBSOLETE op = read_memory_integer ((pc), 2); \ */
/* OBSOLETE if (op == 0x2fa0) { \ */
/* OBSOLETE pc += 2; \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Immediately after a function call, return the saved pc. */
@@ -169,24 +169,24 @@
/* OBSOLETE some instructions. True on PN! Return address is in R1. */
/* OBSOLETE Note: true return location is 4 bytes past R1! *x/ */
/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \ */
/* OBSOLETE (read_register(R1_REGNUM) + 4) */
/* OBSOLETE (read_register(R1_REGNUM) + 4) */
/* OBSOLETE */
/* OBSOLETE /* Address of end of stack space. *x/ */
/* OBSOLETE #define STACK_END_ADDR 0x480000 */
/* OBSOLETE #define STACK_END_ADDR 0x480000 */
/* OBSOLETE */
/* OBSOLETE /* Stack grows downward. *x/ */
/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
/* OBSOLETE */
/* OBSOLETE /* Sequence of bytes for breakpoint instruction. *x/ */
/* OBSOLETE #define BREAKPOINT {0x28, 0x09} */
/* OBSOLETE #define BREAKPOINT {0x28, 0x09} */
/* OBSOLETE */
/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */
/* OBSOLETE This is often the number of bytes in BREAKPOINT */
/* OBSOLETE but not always. *x/ */
/* OBSOLETE #define DECR_PC_AFTER_BREAK 2 */
/* OBSOLETE #define DECR_PC_AFTER_BREAK 2 */
/* OBSOLETE */
/* OBSOLETE /* Return 1 if P points to an invalid floating point value. *x/ */
/* OBSOLETE #define INVALID_FLOAT(p, len) ((*(short *)p & 0xff80) == 0x8000) */
/* OBSOLETE #define INVALID_FLOAT(p, len) ((*(short *)p & 0xff80) == 0x8000) */
/* OBSOLETE */
/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */
/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */
@@ -195,9 +195,9 @@
/* OBSOLETE #define REGISTER_SIZE 4 */
/* OBSOLETE */
/* OBSOLETE /* Number of machine registers *x/ */
/* OBSOLETE #define NUM_REGS 19 */
/* OBSOLETE #define NUM_GEN_REGS 16 */
/* OBSOLETE #define NUM_CPU_REGS 3 */
/* OBSOLETE #define NUM_REGS 19 */
/* OBSOLETE #define NUM_GEN_REGS 16 */
/* OBSOLETE #define NUM_CPU_REGS 3 */
/* OBSOLETE */
/* OBSOLETE /* Initializer for an array of names of registers. */
/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */
@@ -213,43 +213,43 @@
/* OBSOLETE and some are "phony" register numbers which are too large */
/* OBSOLETE to be actual register numbers as far as the user is concerned */
/* OBSOLETE but do serve to get the desired values when passed to read_register. *x/ */
/* OBSOLETE #define R1_REGNUM 1 /* Gr1 => return address of caller *x/ */
/* OBSOLETE #define R4_REGNUM 4 /* Gr4 => register save area *x/ */
/* OBSOLETE #define R5_REGNUM 5 /* Gr5 => register save area *x/ */
/* OBSOLETE #define R6_REGNUM 6 /* Gr6 => register save area *x/ */
/* OBSOLETE #define R7_REGNUM 7 /* Gr7 => register save area *x/ */
/* OBSOLETE #define B1_REGNUM 9 /* Br1 => start of this code routine *x/ */
/* OBSOLETE #define FP_REGNUM 10 /* Br2 == (sp) *x/ */
/* OBSOLETE #define AP_REGNUM 11 /* Br3 == (ap) *x/ */
/* OBSOLETE #define SP_REGNUM 16 /* A copy of Br2 saved in trap *x/ */
/* OBSOLETE #define PS_REGNUM 17 /* Contains processor status *x/ */
/* OBSOLETE #define PC_REGNUM 18 /* Contains program counter *x/ */
/* OBSOLETE #define R1_REGNUM 1 /* Gr1 => return address of caller *x/ */
/* OBSOLETE #define R4_REGNUM 4 /* Gr4 => register save area *x/ */
/* OBSOLETE #define R5_REGNUM 5 /* Gr5 => register save area *x/ */
/* OBSOLETE #define R6_REGNUM 6 /* Gr6 => register save area *x/ */
/* OBSOLETE #define R7_REGNUM 7 /* Gr7 => register save area *x/ */
/* OBSOLETE #define B1_REGNUM 9 /* Br1 => start of this code routine *x/ */
/* OBSOLETE #define FP_REGNUM 10 /* Br2 == (sp) *x/ */
/* OBSOLETE #define AP_REGNUM 11 /* Br3 == (ap) *x/ */
/* OBSOLETE #define SP_REGNUM 16 /* A copy of Br2 saved in trap *x/ */
/* OBSOLETE #define PS_REGNUM 17 /* Contains processor status *x/ */
/* OBSOLETE #define PC_REGNUM 18 /* Contains program counter *x/ */
/* OBSOLETE */
/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
/* OBSOLETE register state, the array `registers'. *x/ */
/* OBSOLETE #define REGISTER_BYTES (NUM_GEN_REGS*4 + NUM_CPU_REGS*4) */
/* OBSOLETE #define REGISTER_BYTES (NUM_GEN_REGS*4 + NUM_CPU_REGS*4) */
/* OBSOLETE */
/* OBSOLETE /* Index within `registers' of the first byte of the space for */
/* OBSOLETE register N. *x/ */
/* OBSOLETE #define REGISTER_BYTE(N) ((N) * 4) */
/* OBSOLETE #define REGISTER_BYTE(N) ((N) * 4) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
/* OBSOLETE for register N. On the PN, all normal regs are 4 bytes. *x/ */
/* OBSOLETE #define REGISTER_RAW_SIZE(N) (4) */
/* OBSOLETE #define REGISTER_RAW_SIZE(N) (4) */
/* OBSOLETE */
/* OBSOLETE /* Number of bytes of storage in the program's representation */
/* OBSOLETE for register N. On the PN, all regs are 4 bytes. *x/ */
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) (4) */
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) (4) */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE (4) */
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE (4) */
/* OBSOLETE */
/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE (4) */
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE (4) */
/* OBSOLETE */
/* OBSOLETE /* Return the GDB type object for the "standard" data type */
/* OBSOLETE of data in register N. *x/ */
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int) */
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int) */
/* OBSOLETE */
/* OBSOLETE /* Store the address of the place in which to copy the structure the */
/* OBSOLETE subroutine will return. This is called from call_function. */
@@ -264,13 +264,13 @@
/* OBSOLETE into VALBUF. *x/ */
/* OBSOLETE */
/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
/* OBSOLETE memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE)) */
/* OBSOLETE memcpy (VALBUF, REGBUF, TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* OBSOLETE /* Write into appropriate registers a function return value */
/* OBSOLETE of type TYPE, given in virtual format. *x/ */
/* OBSOLETE */
/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
/* OBSOLETE write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)) */
/* OBSOLETE write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)) */
/* OBSOLETE */
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
/* OBSOLETE the address in which a function should return its structure value, */
@@ -291,31 +291,31 @@
/* OBSOLETE /* In the case of the NPL, the frame's norminal address is Br2 and the */
/* OBSOLETE previous routines frame is up the stack X bytes, where X is the */
/* OBSOLETE value stored in the code function header xA(Br1). *x/ */
/* OBSOLETE #define FRAME_CHAIN(thisframe) (findframe(thisframe)) */
/* OBSOLETE #define FRAME_CHAIN(thisframe) (findframe(thisframe)) */
/* OBSOLETE */
/* OBSOLETE extern int gould_frame_chain_valid PARAMS ((CORE_ADDR, struct frame_info *)); */
/* OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) gould_frame_chain_valid (chain, thisframe) */
/* OBSOLETE */
/* OBSOLETE /* Define other aspects of the stack frame on NPL. *x/ */
/* OBSOLETE #define FRAME_SAVED_PC(frame) \ */
/* OBSOLETE (read_memory_integer ((frame)->frame + 8, 4)) */
/* OBSOLETE (read_memory_integer ((frame)->frame + 8, 4)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \ */
/* OBSOLETE ((fi)->next ? \ */
/* OBSOLETE read_memory_integer ((fi)->frame + 12, 4) : \ */
/* OBSOLETE read_register (AP_REGNUM)) */
/* OBSOLETE ((fi)->next ? \ */
/* OBSOLETE read_memory_integer ((fi)->frame + 12, 4) : \ */
/* OBSOLETE read_register (AP_REGNUM)) */
/* OBSOLETE */
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame + 80) */
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame + 80) */
/* OBSOLETE */
/* OBSOLETE /* Set VAL to the number of args passed to frame described by FI. */
/* OBSOLETE Can set VAL to -1, meaning no way to tell. *x/ */
/* OBSOLETE */
/* OBSOLETE /* We can check the stab info to see how */
/* OBSOLETE many arg we have. No info in stack will tell us *x/ */
/* OBSOLETE #define FRAME_NUM_ARGS(val,fi) (val = findarg(fi)) */
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (findarg(fi)) */
/* OBSOLETE */
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
/* OBSOLETE #define FRAME_ARGS_SKIP 8 */
/* OBSOLETE #define FRAME_ARGS_SKIP 8 */
/* OBSOLETE */
/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */
@@ -323,14 +323,14 @@
/* OBSOLETE ways in the stack frame. sp is even more special: */
/* OBSOLETE the address we return for it IS the sp for the next frame. *x/ */
/* OBSOLETE */
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ */
/* OBSOLETE { \ */
/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */
/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 8; \ */
/* OBSOLETE (frame_saved_regs).regs[R4_REGNUM] = (frame_info)->frame + 0x30; \ */
/* OBSOLETE (frame_saved_regs).regs[R5_REGNUM] = (frame_info)->frame + 0x34; \ */
/* OBSOLETE (frame_saved_regs).regs[R6_REGNUM] = (frame_info)->frame + 0x38; \ */
/* OBSOLETE (frame_saved_regs).regs[R7_REGNUM] = (frame_info)->frame + 0x3C; \ */
/* OBSOLETE memset (&frame_saved_regs, '\0', sizeof frame_saved_regs); \ */
/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = (frame_info)->frame + 8; \ */
/* OBSOLETE (frame_saved_regs).regs[R4_REGNUM] = (frame_info)->frame + 0x30; \ */
/* OBSOLETE (frame_saved_regs).regs[R5_REGNUM] = (frame_info)->frame + 0x34; \ */
/* OBSOLETE (frame_saved_regs).regs[R6_REGNUM] = (frame_info)->frame + 0x38; \ */
/* OBSOLETE (frame_saved_regs).regs[R7_REGNUM] = (frame_info)->frame + 0x3C; \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */
@@ -338,36 +338,36 @@
/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */
/* OBSOLETE */
/* OBSOLETE #define PUSH_DUMMY_FRAME \ */
/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM); \ */
/* OBSOLETE register int regnum; \ */
/* OBSOLETE sp = push_word (sp, read_register (PC_REGNUM)); \ */
/* OBSOLETE sp = push_word (sp, read_register (FP_REGNUM)); \ */
/* OBSOLETE write_register (FP_REGNUM, sp); \ */
/* OBSOLETE for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) \ */
/* OBSOLETE sp = push_word (sp, read_register (regnum)); \ */
/* OBSOLETE sp = push_word (sp, read_register (PS_REGNUM)); \ */
/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM); \ */
/* OBSOLETE register int regnum; \ */
/* OBSOLETE sp = push_word (sp, read_register (PC_REGNUM)); \ */
/* OBSOLETE sp = push_word (sp, read_register (FP_REGNUM)); \ */
/* OBSOLETE write_register (FP_REGNUM, sp); \ */
/* OBSOLETE for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) \ */
/* OBSOLETE sp = push_word (sp, read_register (regnum)); \ */
/* OBSOLETE sp = push_word (sp, read_register (PS_REGNUM)); \ */
/* OBSOLETE write_register (SP_REGNUM, sp); } */
/* OBSOLETE */
/* OBSOLETE /* Discard from the stack the innermost frame, */
/* OBSOLETE restoring all saved registers. *x/ */
/* OBSOLETE */
/* OBSOLETE #define POP_FRAME \ */
/* OBSOLETE { register struct frame_info *frame = get_current_frame (); \ */
/* OBSOLETE register CORE_ADDR fp; \ */
/* OBSOLETE register int regnum; \ */
/* OBSOLETE struct frame_saved_regs fsr; \ */
/* OBSOLETE struct frame_info *fi; \ */
/* OBSOLETE fp = frame->frame; \ */
/* OBSOLETE get_frame_saved_regs (frame, &fsr); \ */
/* OBSOLETE for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) \ */
/* OBSOLETE if (fsr.regs[regnum]) \ */
/* OBSOLETE { register struct frame_info *frame = get_current_frame (); \ */
/* OBSOLETE register CORE_ADDR fp; \ */
/* OBSOLETE register int regnum; \ */
/* OBSOLETE struct frame_saved_regs fsr; \ */
/* OBSOLETE struct frame_info *fi; \ */
/* OBSOLETE fp = frame->frame; \ */
/* OBSOLETE get_frame_saved_regs (frame, &fsr); \ */
/* OBSOLETE for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--) \ */
/* OBSOLETE if (fsr.regs[regnum]) \ */
/* OBSOLETE write_register (regnum, read_memory_integer (fsr.regs[regnum], 4)); \ */
/* OBSOLETE if (fsr.regs[PS_REGNUM]) \ */
/* OBSOLETE if (fsr.regs[PS_REGNUM]) \ */
/* OBSOLETE write_register (PS_REGNUM, read_memory_integer (fsr.regs[PS_REGNUM], 4)); \ */
/* OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp, 4)); \ */
/* OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp, 4)); \ */
/* OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp + 4, 4)); \ */
/* OBSOLETE write_register (SP_REGNUM, fp + 8); \ */
/* OBSOLETE flush_cached_frames (); \ */
/* OBSOLETE write_register (SP_REGNUM, fp + 8); \ */
/* OBSOLETE flush_cached_frames (); \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* This sequence of words is the instructions: */
@@ -375,19 +375,19 @@
/* OBSOLETE halt */
/* OBSOLETE halt */
/* OBSOLETE halt */
/* OBSOLETE suabr b2, #<stacksize> */
/* OBSOLETE lwbr b6, #con */
/* OBSOLETE stw r1, 8(b2) - save caller address, do we care? */
/* OBSOLETE lw r2, 60(b2) - arg1 */
/* OBSOLETE labr b3, 50(b2) */
/* OBSOLETE std r4, 30(b2) - save r4-r7 */
/* OBSOLETE std r6, 38(b2) */
/* OBSOLETE lwbr b1, #<func> - load function call address */
/* OBSOLETE brlnk r1, 8(b1) - call function */
/* OBSOLETE suabr b2, #<stacksize> */
/* OBSOLETE lwbr b6, #con */
/* OBSOLETE stw r1, 8(b2) - save caller address, do we care? */
/* OBSOLETE lw r2, 60(b2) - arg1 */
/* OBSOLETE labr b3, 50(b2) */
/* OBSOLETE std r4, 30(b2) - save r4-r7 */
/* OBSOLETE std r6, 38(b2) */
/* OBSOLETE lwbr b1, #<func> - load function call address */
/* OBSOLETE brlnk r1, 8(b1) - call function */
/* OBSOLETE halt */
/* OBSOLETE halt */
/* OBSOLETE ld r4, 30(b2) - restore r4-r7 */
/* OBSOLETE ld r6, 38(b2) */
/* OBSOLETE ld r4, 30(b2) - restore r4-r7 */
/* OBSOLETE ld r6, 38(b2) */
/* OBSOLETE */
/* OBSOLETE Setup our stack frame, load argumemts, call and then restore registers. */
/* OBSOLETE *x/ */

View File

@@ -20,20 +20,20 @@
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
/* OBSOLETE */
/* OBSOLETE /* Address of U in kernel space *x/ */
/* OBSOLETE #define KERNEL_U_ADDR 0x7fffc000 */
/* OBSOLETE #define KERNEL_U_ADDR 0x7fffc000 */
/* OBSOLETE */
/* OBSOLETE /* This is a piece of magic that is given a register number REGNO */
/* OBSOLETE and as BLOCKEND the address in the system of the end of the user structure */
/* OBSOLETE and stores in ADDR the address in the kernel or core dump */
/* OBSOLETE of that register. *x/ */
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) { \ */
/* OBSOLETE addr = blockend + regno * 4; \ */
/* OBSOLETE if (regno == VE_REGNUM) addr = blockend - 9 * 4; \ */
/* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8 * 4; \ */
/* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 7 * 4; \ */
/* OBSOLETE if (regno == FP_REGNUM) addr = blockend - 6 * 4; \ */
/* OBSOLETE if (regno >= V1_REGNUM) \ */
/* OBSOLETE addr = blockend + 16 * 4 + (regno - V1_REGNUM) * VR_SIZE; \ */
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) { \ */
/* OBSOLETE addr = blockend + regno * 4; \ */
/* OBSOLETE if (regno == VE_REGNUM) addr = blockend - 9 * 4; \ */
/* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8 * 4; \ */
/* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 7 * 4; \ */
/* OBSOLETE if (regno == FP_REGNUM) addr = blockend - 6 * 4; \ */
/* OBSOLETE if (regno >= V1_REGNUM) \ */
/* OBSOLETE addr = blockend + 16 * 4 + (regno - V1_REGNUM) * VR_SIZE; \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* Don't try to write the frame pointer. *x/ */
@@ -80,8 +80,8 @@
/* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */
/* OBSOLETE */
/* OBSOLETE #define PUSH_REGISTERS \ */
/* OBSOLETE { asm ("clrw -(sp)"); \ */
/* OBSOLETE asm ("pea 10(sp)"); \ */
/* OBSOLETE { asm ("clrw -(sp)"); \ */
/* OBSOLETE asm ("pea 10(sp)"); \ */
/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */
/* OBSOLETE */
/* OBSOLETE /* Assuming the registers (including processor status) have been */

View File

@@ -20,17 +20,17 @@
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
/* OBSOLETE */
/* OBSOLETE /* Address of U in kernel space *x/ */
/* OBSOLETE #define KERNEL_U_ADDR 0x3fc000 */
/* OBSOLETE #define KERNEL_U_ADDR 0x3fc000 */
/* OBSOLETE */
/* OBSOLETE /* This is a piece of magic that is given a register number REGNO */
/* OBSOLETE and as BLOCKEND the address in the system of the end of the user structure */
/* OBSOLETE and stores in ADDR the address in the kernel or core dump */
/* OBSOLETE of that register. *x/ */
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) { \ */
/* OBSOLETE addr = blockend + regno * 4; \ */
/* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8 * 4; \ */
/* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 7 * 4; \ */
/* OBSOLETE if (regno == SP_REGNUM) addr = blockend - 6 * 4; \ */
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) { \ */
/* OBSOLETE addr = blockend + regno * 4; \ */
/* OBSOLETE if (regno == PC_REGNUM) addr = blockend - 8 * 4; \ */
/* OBSOLETE if (regno == PS_REGNUM) addr = blockend - 7 * 4; \ */
/* OBSOLETE if (regno == SP_REGNUM) addr = blockend - 6 * 4; \ */
/* OBSOLETE } */
/* OBSOLETE */
/* OBSOLETE /* No KDB support, Yet! *x/ */
@@ -73,8 +73,8 @@
/* OBSOLETE The fault code will be on the stack beyond the last register. *x/ */
/* OBSOLETE */
/* OBSOLETE #define PUSH_REGISTERS \ */
/* OBSOLETE { asm ("clrw -(sp)"); \ */
/* OBSOLETE asm ("pea 10(sp)"); \ */
/* OBSOLETE { asm ("clrw -(sp)"); \ */
/* OBSOLETE asm ("pea 10(sp)"); \ */
/* OBSOLETE asm ("movem $ 0xfffe,-(sp)"); } */
/* OBSOLETE */
/* OBSOLETE /* Assuming the registers (including processor status) have been */

View File

@@ -1,30 +1,29 @@
/* Parameters for execution on a H8/300 series machine.
Copyright 1992, 1993 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* Contributed by Steve Chamberlain sac@cygnus.com */
#ifdef __STDC__
struct frame_info;
struct frame_saved_regs;
struct value;
struct type;
#endif
/* 1 if debugging H8/300H application */
extern int h8300hmode;
@@ -69,7 +68,7 @@ extern void h8300_init_extra_frame_info ();
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
#define SKIP_PROLOGUE(ip) {(ip) = h8300_skip_prologue(ip);}
#define SKIP_PROLOGUE(ip) (h8300_skip_prologue(ip))
extern CORE_ADDR h8300_skip_prologue ();
/* Immediately after a function call, return the saved pc.
@@ -84,9 +83,9 @@ extern CORE_ADDR h8300_skip_prologue ();
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
/*#define BREAKPOINT {0x7A, 0xFF}*/
#define BREAKPOINT {0x01, 0x80} /* Sleep */
#define REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
/*#define BREAKPOINT {0x7A, 0xFF} */
#define BREAKPOINT {0x01, 0x80} /* Sleep */
#define REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
/* If your kernel resets the pc after the trap happens you may need to
define this before including this file. */
@@ -96,7 +95,7 @@ extern CORE_ADDR h8300_skip_prologue ();
#define REGISTER_SIZE 4
#define NUM_REGS 13
#define NUM_REGS 13
#define REGISTER_BYTES (NUM_REGS * 4)
@@ -160,7 +159,7 @@ extern char **h8300_register_names;
/* FIXME: Won't work with both h8/300's. */
extern void h8300_extract_return_value PARAMS((struct type *, char *, char *));
extern void h8300_extract_return_value PARAMS ((struct type *, char *, char *));
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
h8300_extract_return_value (TYPE, (char *)(REGBUF), (char *)(VALBUF))
@@ -169,7 +168,7 @@ extern void h8300_extract_return_value PARAMS((struct type *, char *, char *));
in d0/d1. */
/* FIXME: Won't work with both h8/300's. */
extern void h8300_store_return_value PARAMS((struct type *, char *));
extern void h8300_store_return_value PARAMS ((struct type *, char *));
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
h8300_store_return_value(TYPE, (char *) (VALBUF))
@@ -186,7 +185,7 @@ extern void h8300_store_return_value PARAMS((struct type *, char *));
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
extract_address (REGBUF + REGISTER_BYTE (0), \
REGISTER_RAW_SIZE (0))
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
@@ -213,8 +212,8 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_look_for_prologue(FI)
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
/* Any function with a frame looks like this
SECOND ARG
@@ -225,7 +224,7 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
SAVED FP <-FP POINTS HERE
LOCALS0
LOCALS1 <-SP POINTS HERE
*/
*/
#define FRAME_SAVED_PC(FRAME) h8300_frame_saved_pc(FRAME)
@@ -239,7 +238,7 @@ CORE_ADDR h8300_frame_chain PARAMS ((struct frame_info *));
/* We can't tell how many args there are
now that the C compiler delays popping them. */
#define FRAME_NUM_ARGS(val,fi) (val = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
@@ -263,7 +262,7 @@ typedef unsigned short INSN_WORD;
#define GDB_TARGET_IS_H8300
#define NUM_REALREGS 10
#define NOP { 0x01, 0x80} /* A sleep insn */
#define NOP { 0x01, 0x80} /* A sleep insn */
#define BELIEVE_PCC_PROMOTION 1
@@ -271,7 +270,7 @@ typedef unsigned short INSN_WORD;
* CALL_DUMMY stuff:
*/
#define USE_GENERIC_DUMMY_FRAMES
#define USE_GENERIC_DUMMY_FRAMES 1
#define CALL_DUMMY {0}
#define CALL_DUMMY_LENGTH (0)
#define CALL_DUMMY_ADDRESS() entry_point_address ()
@@ -279,17 +278,17 @@ typedef unsigned short INSN_WORD;
#define CALL_DUMMY_START_OFFSET (0)
#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
extern CORE_ADDR h8300_push_arguments PARAMS ((int nargs,
struct value **args,
extern CORE_ADDR h8300_push_arguments PARAMS ((int nargs,
struct value ** args,
CORE_ADDR sp,
unsigned char struct_return,
CORE_ADDR struct_addr));
extern CORE_ADDR h8300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP)
#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
#define FIX_CALL_DUMMY(DUMMY, START_SP, FUNADDR, NARGS, ARGS, TYPE, GCCP)
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
(SP) = h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
(h8300_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
/* Push an empty stack frame, to record the current PC, etc. */
#define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
/* Discard from the stack the innermost frame, restoring all registers. */
@@ -298,6 +297,5 @@ extern CORE_ADDR h8300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)

View File

@@ -1,21 +1,22 @@
/* Parameters for execution on a H8/500 series machine.
Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* Contributed by Steve Chamberlain sac@cygnus.com */
@@ -43,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
#define SKIP_PROLOGUE(ip) { (ip) = h8500_skip_prologue(ip); }
#define SKIP_PROLOGUE(ip) (h8500_skip_prologue (ip))
extern CORE_ADDR h8500_skip_prologue PARAMS ((CORE_ADDR));
/* Immediately after a function call, return the saved pc.
@@ -74,7 +75,7 @@ extern CORE_ADDR saved_pc_after_call PARAMS ((void));
/* Say how much memory is needed to store a copy of the register set */
#define REGISTER_BYTES (NUM_REGS * 4)
#define REGISTER_BYTES (NUM_REGS * 4)
/* Index within `registers' of the first byte of the space for
register N. */
@@ -148,8 +149,8 @@ extern struct type *h8500_register_virtual_type PARAMS ((int regno));
#define NUM_REGS 22
#define SP_REGNUM PR7_REGNUM /* Contains address of top of stack */
#define FP_REGNUM PR6_REGNUM /* Contains address of executing stack frame */
#define SP_REGNUM PR7_REGNUM /* Contains address of top of stack */
#define FP_REGNUM PR6_REGNUM /* Contains address of executing stack frame */
#define PTR_SIZE (minimum_mode ? 2 : 4)
#define PTR_MASK (minimum_mode ? 0x0000ffff : 0x00ffffff)
@@ -158,7 +159,7 @@ extern struct type *h8500_register_virtual_type PARAMS ((int regno));
subroutine will return. This is called from call_function. */
/*#define STORE_STRUCT_RETURN(ADDR, SP) \
{ write_register (0, (ADDR)); abort(); }*/
{ write_register (0, (ADDR)); abort(); } */
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
@@ -178,16 +179,16 @@ extern struct type *h8500_register_virtual_type PARAMS ((int regno));
as a CORE_ADDR (or an expression that can be used as one). */
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
/* Define other aspects of the stack frame. */
/* A macro that tells us whether the function invocation represented
by FI does not have a frame on the stack associated with it. If it
does not, FRAMELESS is set to 1, else 0. */
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_look_for_prologue(FI)
#define FRAMELESS_FUNCTION_INVOCATION(FI) \
(frameless_look_for_prologue (FI))
/* Any function with a frame looks like this
SECOND ARG
@@ -198,18 +199,18 @@ extern struct type *h8500_register_virtual_type PARAMS ((int regno));
SAVED FP <-FP POINTS HERE
LOCALS0
LOCALS1 <-SP POINTS HERE
*/
*/
#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) ;
/* (fci)->frame |= read_register(SEG_T_REGNUM) << 16;*/
/* (fci)->frame |= read_register(SEG_T_REGNUM) << 16; */
#define FRAME_CHAIN(FRAME) h8500_frame_chain(FRAME)
struct frame_info;
extern CORE_ADDR h8500_frame_chain PARAMS ((struct frame_info *));
#define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME)
extern CORE_ADDR frame_saved_pc PARAMS ((struct frame_info *frame));
extern CORE_ADDR frame_saved_pc PARAMS ((struct frame_info * frame));
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
@@ -221,7 +222,7 @@ extern CORE_ADDR frame_saved_pc PARAMS ((struct frame_info *frame));
/* We can't tell how many args there are
now that the C compiler delays popping them. */
#define FRAME_NUM_ARGS(val,fi) (val = -1)
#define FRAME_NUM_ARGS(fi) (-1)
/* Return number of bytes at start of arglist that are not really args. */
@@ -236,7 +237,7 @@ extern CORE_ADDR frame_saved_pc PARAMS ((struct frame_info *frame));
#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
frame_find_saved_regs(frame_info, &(frame_saved_regs))
struct frame_saved_regs;
extern void frame_find_saved_regs PARAMS ((struct frame_info *frame_info, struct frame_saved_regs *frame_saved_regs));
extern void frame_find_saved_regs PARAMS ((struct frame_info * frame_info, struct frame_saved_regs * frame_saved_regs));
/* Discard from the stack the innermost frame, restoring all registers. */
@@ -247,8 +248,6 @@ extern void h8500_pop_frame PARAMS ((void));
#define SHORT_INT_MAX 32767
#define SHORT_INT_MIN -32768
#define NAMES_HAVE_UNDERSCORE
typedef unsigned short INSN_WORD;
extern CORE_ADDR h8500_addr_bits_remove PARAMS ((CORE_ADDR));
@@ -269,10 +268,10 @@ extern int minimum_mode;
extern int h8500_is_trapped_internalvar PARAMS ((char *name));
#define VALUE_OF_TRAPPED_INTERNALVAR h8500_value_of_trapped_internalvar
extern struct value * h8500_value_of_trapped_internalvar (/* struct internalvar *var */);
extern struct value *h8500_value_of_trapped_internalvar ( /* struct internalvar *var */ );
#define SET_TRAPPED_INTERNALVAR h8500_set_trapped_internalvar
extern void h8500_set_trapped_internalvar (/* struct internalvar *var, value newval, int bitpos, int bitsize, int offset */);
extern void h8500_set_trapped_internalvar ( /* struct internalvar *var, value newval, int bitpos, int bitsize, int offset */ );
extern CORE_ADDR h8500_read_sp PARAMS ((void));
extern void h8500_write_sp PARAMS ((CORE_ADDR));

3
gdb/config/i386/embed.mt Normal file
View File

@@ -0,0 +1,3 @@
# Target: Embedded Intel 386
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-i386v.h

View File

@@ -1,8 +1,19 @@
MH_CFLAGS=-D__GO32__ -D__MSDOS__
XDEPFILES= go32-xdep.o
# Host: Intel x86 running DJGPP
# we don't need mmalloc on DJGPP
MH_CFLAGS= -DNO_MMALLOC
MMALLOC=
MMALLOC_CFLAGS=
XM_FILE= xm-go32.h
HOST_IPC=-DDOS_IPC
XDEPFILES=
NAT_FILE= nm-go32.h
NATDEPFILES= go32-nat.o
TERMCAP=
HOST_IPC=
SER_HARDWIRE= ser-go32.o
CC=i386-go32-gcc -O2 -fno-omit-frame-pointer
CC= gcc
XM_CLIBS= -ldbg

3
gdb/config/i386/go32.mt Normal file
View File

@@ -0,0 +1,3 @@
# Target: Intel 386 running DJGPP
TDEPFILES= i386-tdep.o i387-tdep.o
TM_FILE= tm-go32.h

View File

@@ -4,4 +4,5 @@ XM_FILE= xm-linux.h
XDEPFILES= ser-tcp.o
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o core-aout.o core-regset.o i386v-nat.o i386v4-nat.o
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o \
core-aout.o core-regset.o i386v-nat.o i386-linux-nat.o linux-thread.o

View File

@@ -1,21 +1,22 @@
/* Native-dependent definitions for Intel 386 running BSD Unix, for GDB.
Copyright 1986, 1987, 1989, 1992, 1996 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef NM_FREEBSD_H
#define NM_FREEBSD_H

View File

@@ -1,21 +1,22 @@
/* Native-dependent definitions for Intel 386 running the GNU Hurd
Copyright 1994, 1995 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 the generic hurd definitions. */

83
gdb/config/i386/nm-go32.h Normal file
View File

@@ -0,0 +1,83 @@
/* Native definitions for Intel x86 running DJGPP.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define NO_PTRACE_H
#include "i386/nm-i386v.h"
#define TARGET_HAS_HARDWARE_WATCHPOINTS
/* Returns the number of hardware watchpoints of type TYPE that we can
set. Value is positive if we can set CNT watchpoints, zero if
setting watchpoints of type TYPE is not supported, and negative if
CNT is more than the maximum number of watchpoints of type TYPE
that we can support. TYPE is one of bp_hardware_watchpoint,
bp_read_watchpoint, bp_write_watchpoint, or bp_hardware_breakpoint.
CNT is the number of such watchpoints used so far (including this
one). OTHERTYPE is non-zero if other types of watchpoints are
currently enabled.
We always return 1 here because we don't have enough information
about possible overlap of addresses that they want to watch. As
an extreme example, consider the case where all the watchpoints
watch the same address and the same region length: then we can
handle a virtually unlimited number of watchpoints, due to debug
register sharing implemented via reference counts in go32-nat.c. */
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
/* Returns non-zero if we can use hardware watchpoints to watch a region
whose address is ADDR and whose length is LEN. */
#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr,len) \
go32_region_ok_for_watchpoint(addr,len)
/* After a watchpoint trap, the PC points to the instruction after the
one that caused the trap. Therefore we don't need to step over it.
But we do need to reset the status register to avoid another trap. */
#define HAVE_CONTINUABLE_WATCHPOINT
#define STOPPED_BY_WATCHPOINT(W) \
go32_stopped_by_watchpoint (inferior_pid, 0)
#define target_stopped_data_address() \
go32_stopped_by_watchpoint (inferior_pid, 1)
/* Use these macros for watchpoint insertion/removal. */
#define target_insert_watchpoint(addr, len, type) \
go32_insert_watchpoint (inferior_pid, addr, len, type)
#define target_remove_watchpoint(addr, len, type) \
go32_remove_watchpoint (inferior_pid, addr, len, type)
#define target_insert_hw_breakpoint(addr, shadow) \
go32_insert_hw_breakpoint(addr, shadow)
#define target_remove_hw_breakpoint(addr, shadow) \
go32_remove_hw_breakpoint(addr, shadow)
#define DECR_PC_AFTER_HW_BREAK 0
#undef FLOAT_INFO
#define FLOAT_INFO { i386_go32_float_info (); }
extern void i386_go32_float_info (void);

View File

@@ -1,25 +1,26 @@
/* Native support for i386 aix ps/2.
Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/*
* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com)
* Revision: 5-May-93 00:11:35
* Revision: 5-May-93 00:11:35
*/
#ifndef NM_I386AIX_H

View File

@@ -1,21 +1,22 @@
/* Native-dependent definitions for Intel 386 running BSD Unix, for GDB.
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef NM_I386BSD_H
#define NM_I386BSD_H
@@ -26,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <machine/vmparam.h>
#define KERNEL_U_ADDR USRSTACK
#undef FLOAT_INFO /* No float info yet */
#undef FLOAT_INFO /* No float info yet */
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));

View File

@@ -1,21 +1,22 @@
/* Native-dependent definitions for Intel 386 running LynxOS.
Copyright 1993 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
#ifndef NM_I386LYNX_H
#define NM_I386LYNX_H

View File

@@ -1,24 +1,25 @@
/* Native definitions for Mach on an Intel 386
Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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. */
/* Do implement the attach and detach commands. */
/* #define ATTACH_DETACH 1 */
/* #define ATTACH_DETACH 1 */
/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
#define FETCH_INFERIOR_REGISTERS

View File

@@ -2,21 +2,22 @@
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if 0
/* code to execute to print interesting information about the
@@ -27,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
do this unless we *know* we aren't cross-debugging. FIXME.
*/
#define FLOAT_INFO { i386_float_info (); }
#endif /*0*/
#endif /*0 */
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));

View File

@@ -3,21 +3,22 @@
Contributed by Cygnus Support. By Ian Lance Taylor
<ian@cygnus.com> based on work by Martin Walker <maw@netcom.com>.
This file is part of GDB.
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 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.
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. */
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. */
/* SCO 3.2v4 is actually just like SCO 3.2v2, except that it
additionally supports attaching to a process. */

View File

@@ -5,28 +5,29 @@
work by Ian Lance Taylor <ian@cygnus.com> and
Martin Walker <maw@netcom.com>.
This file is part of GDB.
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 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.
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
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. */
/* Basically, its a lot like the older versions ... */
#include "i386/nm-i386sco.h"
/* ... but it can do a lot of SVR4 type stuff too. */
#define SVR4_SHARED_LIBS
#include "solib.h" /* Pick up shared library support */
#include "solib.h" /* Pick up shared library support */
#define ATTACH_DETACH
@@ -35,5 +36,3 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define PTRACE_ATTACH 10
#define PTRACE_DETACH 11

View File

@@ -1,35 +1,31 @@
/* Native support for i386 running Solaris 2.
Copyright 1998 Free Software Foundation, Inc.
This file is part of GDB.
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 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.
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. */
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 "nm-sysv4.h"
#ifdef HAVE_THREAD_DB_LIB
#ifdef __STDC__
struct objfile;
#endif
#define target_new_objfile(OBJFILE) sol_thread_new_objfile (OBJFILE)
void sol_thread_new_objfile PARAMS ((struct objfile *objfile));
#define FIND_NEW_THREADS sol_find_new_threads
void sol_find_new_threads PARAMS ((void));
void sol_thread_new_objfile PARAMS ((struct objfile * objfile));
#endif

View File

@@ -2,21 +2,22 @@
Copyright 1986, 1987, 1989, 1992 Free Software Foundation, Inc.
Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
This file is part of GDB.
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 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.
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. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if 0
/* code to execute to print interesting information about the
@@ -27,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
do this unless we *know* we aren't cross-debugging. FIXME.
*/
#define FLOAT_INFO { i386_float_info (); }
#endif /*0*/
#endif /*0 */
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = i386_register_u_addr ((blockend),(regno));

Some files were not shown because too many files have changed in this diff Show More