summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-06-13 23:03:59 +0000
committerJim Blandy <jimb@codesourcery.com>2003-06-13 23:03:59 +0000
commit830ba71c0b627f0db2a0a655d207e0984fbf21c5 (patch)
tree3c23d5ec74738c1f5cf08d133c86b23e844d09b6
parent02660e8c4bd2ee15517d33712a0cd632e521a066 (diff)
downloadgdb-830ba71c0b627f0db2a0a655d207e0984fbf21c5.tar.gz
* ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
(ppc64_standard_linkage_target): Use it.
-rw-r--r--COPYING.NEWLIB27
-rw-r--r--ChangeLog72
-rw-r--r--Makefile.def66
-rw-r--r--Makefile.in18530
-rw-r--r--Makefile.tpl294
-rw-r--r--README-maintainer-mode2
-rw-r--r--bfd/ChangeLog305
-rw-r--r--bfd/Makefile.am37
-rw-r--r--bfd/Makefile.in41
-rw-r--r--bfd/archures.c1
-rw-r--r--bfd/bfd-in2.h29
-rw-r--r--bfd/coff-a29k.c2
-rw-r--r--bfd/coff-apollo.c4
-rw-r--r--bfd/coff-arm.c4
-rw-r--r--bfd/coff-h8300.c2
-rw-r--r--bfd/coff-h8500.c2
-rw-r--r--bfd/coff-i960.c2
-rw-r--r--bfd/coff-m68k.c4
-rw-r--r--bfd/coff-m88k.c2
-rw-r--r--bfd/coff-mcore.c4
-rw-r--r--bfd/coff-sh.c6
-rw-r--r--bfd/coff-sparc.c2
-rw-r--r--bfd/coff-tic4x.c375
-rw-r--r--bfd/coff-tic54x.c112
-rw-r--r--bfd/coff-tic80.c2
-rw-r--r--bfd/coff-w65.c2
-rw-r--r--bfd/coff-we32k.c2
-rw-r--r--bfd/coff-z8k.c2
-rw-r--r--bfd/coffcode.h180
-rw-r--r--bfd/config.bfd45
-rw-r--r--bfd/config.in9
-rwxr-xr-xbfd/configure134
-rw-r--r--bfd/configure.in4
-rw-r--r--bfd/cpu-h8300.c26
-rw-r--r--bfd/ecoff.c6
-rw-r--r--bfd/elf-bfd.h3
-rw-r--r--bfd/elf.c53
-rw-r--r--bfd/elf32-h8300.c7
-rw-r--r--bfd/elf32-hppa.c11
-rw-r--r--bfd/elf32-i386.c4
-rw-r--r--bfd/elf32-mips.c239
-rw-r--r--bfd/elf32-ppc.c6
-rw-r--r--bfd/elf32-s390.c4
-rw-r--r--bfd/elf32-sh.c4
-rw-r--r--bfd/elf32-sparc.c4
-rw-r--r--bfd/elf32-v850.c36
-rw-r--r--bfd/elf64-alpha.c4
-rw-r--r--bfd/elf64-mips.c164
-rw-r--r--bfd/elf64-ppc.c622
-rw-r--r--bfd/elf64-ppc.h6
-rw-r--r--bfd/elf64-s390.c4
-rw-r--r--bfd/elf64-sh64.c4
-rw-r--r--bfd/elf64-sparc.c4
-rw-r--r--bfd/elf64-x86-64.c4
-rw-r--r--bfd/elfcode.h4
-rw-r--r--bfd/elflink.c10
-rw-r--r--bfd/elflink.h95
-rw-r--r--bfd/elfn32-mips.c98
-rw-r--r--bfd/elfxx-ia64.c4
-rw-r--r--bfd/elfxx-mips.c78
-rw-r--r--bfd/elfxx-mips.h7
-rw-r--r--bfd/opncls.c175
-rw-r--r--bfd/pef.c148
-rw-r--r--bfd/po/Make-in24
-rw-r--r--bfd/po/SRC-POTFILES.in5
-rw-r--r--bfd/po/bfd.pot1887
-rw-r--r--bfd/section.c11
-rw-r--r--bfd/simple.c2
-rw-r--r--bfd/syms.c3
-rw-r--r--bfd/version.h2
-rwxr-xr-xconfig.guess13
-rwxr-xr-xconfig.sub14
-rwxr-xr-xconfigure96
-rw-r--r--configure.in30
-rw-r--r--gdb/ChangeLog2099
-rw-r--r--gdb/MAINTAINERS2
-rw-r--r--gdb/Makefile.in162
-rw-r--r--gdb/abug-rom.c2
-rw-r--r--gdb/acconfig.h3
-rw-r--r--gdb/acinclude.m453
-rw-r--r--gdb/aclocal.m453
-rw-r--r--gdb/ada-lang.c103
-rw-r--r--gdb/alpha-linux-tdep.c143
-rw-r--r--gdb/alpha-mdebug-tdep.c384
-rw-r--r--gdb/alpha-nat.c98
-rw-r--r--gdb/alpha-osf1-tdep.c55
-rw-r--r--gdb/alpha-tdep.c2411
-rw-r--r--gdb/alpha-tdep.h38
-rw-r--r--gdb/alphabsd-nat.c6
-rw-r--r--gdb/alphabsd-tdep.c63
-rw-r--r--gdb/alphafbsd-tdep.c6
-rw-r--r--gdb/alphanbsd-tdep.c24
-rw-r--r--gdb/arch-utils.c23
-rw-r--r--gdb/arch-utils.h15
-rw-r--r--gdb/arm-linux-tdep.c51
-rw-r--r--gdb/arm-tdep.c98
-rw-r--r--gdb/avr-tdep.c33
-rw-r--r--gdb/block.c21
-rw-r--r--gdb/block.h70
-rw-r--r--gdb/breakpoint.c8
-rw-r--r--gdb/buildsym.c70
-rw-r--r--gdb/c-valprint.c3
-rw-r--r--gdb/charset.c1
-rw-r--r--gdb/cli/cli-cmds.c12
-rw-r--r--gdb/cli/cli-decode.c14
-rw-r--r--gdb/cli/cli-dump.c2
-rw-r--r--gdb/cli/cli-interp.c2
-rw-r--r--gdb/cli/cli-script.c10
-rw-r--r--gdb/coffread.c14
-rw-r--r--gdb/config.in9
-rw-r--r--gdb/config/alpha/alpha-linux.mt3
-rw-r--r--gdb/config/alpha/alpha-osf1.mt2
-rw-r--r--gdb/config/alpha/fbsd.mt2
-rw-r--r--gdb/config/alpha/nbsd.mt4
-rw-r--r--gdb/config/alpha/nm-linux.h3
-rw-r--r--gdb/config/alpha/tm-alpha.h5
-rw-r--r--gdb/config/alpha/tm-alphalinux.h11
-rw-r--r--gdb/config/arm/tm-linux.h4
-rw-r--r--gdb/config/h8300/tm-h8300.h3
-rw-r--r--gdb/config/i386/i386sol2.mt2
-rw-r--r--gdb/config/i386/nm-x86-64linux.h54
-rw-r--r--gdb/config/i386/tm-x86-64linux.h10
-rw-r--r--gdb/config/i386/x86-64linux.mh7
-rw-r--r--gdb/config/i386/x86-64linux.mt4
-rw-r--r--gdb/config/m68k/tm-delta68.h4
-rw-r--r--gdb/config/m68k/tm-m68klynx.h2
-rw-r--r--gdb/config/m68k/tm-sun3.h2
-rw-r--r--gdb/config/mips/embed64.mt2
-rw-r--r--gdb/config/mips/embedl.mt2
-rw-r--r--gdb/config/mips/embedl64.mt2
-rw-r--r--gdb/config/mips/mips.mt5
-rw-r--r--gdb/config/mips/mips64.mt5
-rw-r--r--gdb/config/mips/tm-embed.h2
-rw-r--r--gdb/config/mips/tm-irix3.h2
-rw-r--r--gdb/config/mips/tm-irix5.h3
-rw-r--r--gdb/config/mips/tm-irix6.h9
-rw-r--r--gdb/config/mips/tm-mips.h31
-rw-r--r--gdb/config/mips/tm-mipsv4.h2
-rw-r--r--gdb/config/mips/tm-tx39.h2
-rw-r--r--gdb/config/mips/tx39l.mt2
-rw-r--r--gdb/config/pa/nm-hppah.h4
-rw-r--r--gdb/config/pa/tm-hppa.h66
-rw-r--r--gdb/config/pa/tm-hppa64.h16
-rw-r--r--gdb/config/pa/tm-hppah.h5
-rw-r--r--gdb/config/sh/tm-sh.h4
-rw-r--r--gdb/config/sparc/tm-sparc.h6
-rw-r--r--gdb/config/vax/tm-vax.h4
-rwxr-xr-xgdb/configure663
-rw-r--r--gdb/configure.host52
-rw-r--r--gdb/configure.in25
-rw-r--r--gdb/configure.tgt66
-rw-r--r--gdb/cp-abi.c2
-rw-r--r--gdb/cp-namespace.c10
-rw-r--r--gdb/cp-support.c215
-rw-r--r--gdb/cp-support.h4
-rw-r--r--gdb/cpu32bug-rom.c2
-rw-r--r--gdb/cris-tdep.c186
-rw-r--r--gdb/d10v-tdep.c181
-rw-r--r--gdb/dbug-rom.c2
-rw-r--r--gdb/dbxread.c3
-rw-r--r--gdb/defs.h9
-rw-r--r--gdb/dictionary.c836
-rw-r--r--gdb/dictionary.h156
-rw-r--r--gdb/dink32-rom.c2
-rw-r--r--gdb/doc/ChangeLog29
-rw-r--r--gdb/doc/gdb.texinfo128
-rw-r--r--gdb/doc/gdbint.texinfo76
-rw-r--r--gdb/doublest.c12
-rw-r--r--gdb/dummy-frame.c4
-rw-r--r--gdb/dwarf2-frame.c1336
-rw-r--r--gdb/dwarf2-frame.h43
-rw-r--r--gdb/dwarf2expr.h2
-rw-r--r--gdb/dwarf2read.c3
-rw-r--r--gdb/dwarfread.c44
-rw-r--r--gdb/elfread.c91
-rw-r--r--gdb/event-top.c10
-rw-r--r--gdb/findvar.c30
-rw-r--r--gdb/frame-base.c12
-rw-r--r--gdb/frame-unwind.c2
-rw-r--r--gdb/frame.c91
-rw-r--r--gdb/frame.h58
-rw-r--r--gdb/frv-tdep.c25
-rw-r--r--gdb/gdb-stabs.h5
-rw-r--r--gdb/gdb_assert.h11
-rw-r--r--gdb/gdbarch.c807
-rw-r--r--gdb/gdbarch.h838
-rwxr-xr-xgdb/gdbarch.sh115
-rw-r--r--gdb/gdbserver/ChangeLog24
-rw-r--r--gdb/gdbserver/Makefile.in6
-rw-r--r--gdb/gdbserver/configure.srv9
-rw-r--r--gdb/gdbserver/linux-low.c25
-rw-r--r--gdb/gdbserver/remote-utils.c6
-rw-r--r--gdb/gdbserver/target.h3
-rw-r--r--gdb/gdbtypes.c4
-rw-r--r--gdb/gnu-v2-abi.c4
-rw-r--r--gdb/gnu-v3-abi.c3
-rw-r--r--gdb/h8300-tdep.c471
-rw-r--r--gdb/hpacc-abi.c1
-rw-r--r--gdb/hppa-hpux-tdep.c7
-rw-r--r--gdb/hppa-tdep.c130
-rw-r--r--gdb/hpux-thread.c4
-rw-r--r--gdb/i386-cygwin-tdep.c63
-rw-r--r--gdb/i386-interix-tdep.c2
-rw-r--r--gdb/i386-linux-nat.c20
-rw-r--r--gdb/i386-linux-tdep.c127
-rw-r--r--gdb/i386-nto-tdep.c16
-rw-r--r--gdb/i386-sol2-tdep.c6
-rw-r--r--gdb/i386-tdep.c1230
-rw-r--r--gdb/i386-tdep.h30
-rw-r--r--gdb/i386bsd-nat.c71
-rw-r--r--gdb/i386bsd-tdep.c100
-rw-r--r--gdb/i386nbsd-tdep.c25
-rw-r--r--gdb/i386obsd-tdep.c25
-rw-r--r--gdb/ia64-tdep.c82
-rw-r--r--gdb/infcall.c75
-rw-r--r--gdb/infcmd.c4
-rw-r--r--gdb/inferior.h6
-rw-r--r--gdb/interps.c4
-rw-r--r--gdb/interps.h2
-rw-r--r--gdb/irix4-nat.c2
-rw-r--r--gdb/irix5-nat.c2
-rw-r--r--gdb/jv-exp.y8
-rw-r--r--gdb/jv-lang.c51
-rw-r--r--gdb/lin-lwp.c176
-rw-r--r--gdb/linespec.c198
-rw-r--r--gdb/m68hc11-tdep.c24
-rw-r--r--gdb/m68k-tdep.c22
-rw-r--r--gdb/m68klinux-tdep.c8
-rw-r--r--gdb/macrocmd.c2
-rw-r--r--gdb/macrotab.c2
-rw-r--r--gdb/main.c15
-rw-r--r--gdb/maint.c2
-rw-r--r--gdb/mcore-tdep.c92
-rw-r--r--gdb/mdebugread.c150
-rw-r--r--gdb/memattr.c2
-rw-r--r--gdb/mi/ChangeLog20
-rw-r--r--gdb/mi/mi-cmd-stack.c16
-rw-r--r--gdb/mi/mi-interp.c2
-rw-r--r--gdb/mi/mi-main.c5
-rw-r--r--gdb/mi/mi-parse.c5
-rw-r--r--gdb/mips-linux-tdep.c4
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mips-tdep.c626
-rw-r--r--gdb/mips-tdep.h3
-rw-r--r--gdb/mipsnbsd-tdep.c6
-rw-r--r--gdb/mipsv4-nat.c2
-rw-r--r--gdb/mn10300-tdep.c26
-rw-r--r--gdb/monitor.c7
-rwxr-xr-xgdb/nlm/configure43
-rw-r--r--gdb/nlm/configure.in2
-rw-r--r--gdb/ns32k-tdep.c23
-rw-r--r--gdb/ns32knbsd-tdep.c2
-rw-r--r--gdb/objc-exp.y1
-rw-r--r--gdb/objc-lang.c97
-rw-r--r--gdb/objc-lang.h3
-rw-r--r--gdb/objfiles.c8
-rw-r--r--gdb/ocd.c2
-rw-r--r--gdb/osabi.c4
-rw-r--r--gdb/p-exp.y10
-rw-r--r--gdb/p-valprint.c4
-rw-r--r--gdb/pa64solib.c14
-rw-r--r--gdb/ppc-bdm.c2
-rw-r--r--gdb/ppc-linux-tdep.c56
-rw-r--r--gdb/ppcbug-rom.c2
-rw-r--r--gdb/printcmd.c225
-rw-r--r--gdb/regcache.c97
-rw-r--r--gdb/reggroups.c2
-rw-r--r--gdb/remote-e7000.c6
-rw-r--r--gdb/remote-est.c2
-rw-r--r--gdb/remote-fileio.c1379
-rw-r--r--gdb/remote-fileio.h36
-rw-r--r--gdb/remote-hms.c2
-rw-r--r--gdb/remote-mips.c14
-rw-r--r--gdb/remote-rdi.c4
-rw-r--r--gdb/remote-rdp.c4
-rw-r--r--gdb/remote-vxsparc.c8
-rw-r--r--gdb/remote.c99
-rw-r--r--gdb/remote.h4
-rw-r--r--gdb/rom68k-rom.c2
-rw-r--r--gdb/rs6000-nat.c3
-rw-r--r--gdb/rs6000-tdep.c39
-rw-r--r--gdb/s390-nat.c44
-rw-r--r--gdb/s390-tdep.c92
-rw-r--r--gdb/sentinel-frame.c4
-rw-r--r--gdb/ser-e7kpc.c4
-rw-r--r--gdb/sh-tdep.c111
-rw-r--r--gdb/sh3-rom.c2
-rw-r--r--gdb/shnbsd-nat.c3
-rw-r--r--gdb/signals/signals.c2
-rw-r--r--gdb/solib-irix.c8
-rw-r--r--gdb/solib-legacy.c2
-rw-r--r--gdb/solib-sunos.c22
-rw-r--r--gdb/solib-svr4.c94
-rw-r--r--gdb/solib.c5
-rw-r--r--gdb/somread.c7
-rw-r--r--gdb/sparc-tdep.c101
-rw-r--r--gdb/sparcnbsd-tdep.c4
-rw-r--r--gdb/stack.c283
-rw-r--r--gdb/stack.h27
-rw-r--r--gdb/std-regs.c2
-rw-r--r--gdb/symfile.c182
-rw-r--r--gdb/symfile.h270
-rw-r--r--gdb/symmisc.c43
-rw-r--r--gdb/symtab.c441
-rw-r--r--gdb/symtab.h18
-rw-r--r--gdb/target.h6
-rw-r--r--gdb/testsuite/ChangeLog86
-rw-r--r--gdb/testsuite/gdb.asm/alpha.inc62
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp23
-rw-r--r--gdb/testsuite/gdb.base/attach.exp57
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp32
-rw-r--r--gdb/testsuite/gdb.base/dump.exp9
-rw-r--r--gdb/testsuite/gdb.base/fileio.c468
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp272
-rw-r--r--gdb/testsuite/gdb.base/float.exp8
-rw-r--r--gdb/testsuite/gdb.base/gdb_history256
-rw-r--r--gdb/testsuite/gdb.base/readline.exp34
-rw-r--r--gdb/testsuite/gdb.base/selftest.exp4
-rw-r--r--gdb/testsuite/gdb.base/shreloc.c18
-rw-r--r--gdb/testsuite/gdb.base/shreloc.exp257
-rw-r--r--gdb/testsuite/gdb.base/shreloc1.c10
-rw-r--r--gdb/testsuite/gdb.base/shreloc2.c10
-rw-r--r--gdb/testsuite/gdb.base/signals.exp1
-rw-r--r--gdb/thread-db.c99
-rw-r--r--gdb/top.c16
-rw-r--r--gdb/top.h11
-rw-r--r--gdb/tracepoint.c11
-rw-r--r--gdb/trad-frame.c96
-rw-r--r--gdb/trad-frame.h68
-rw-r--r--gdb/tui/ChangeLog11
-rw-r--r--gdb/tui/tui-hooks.c2
-rw-r--r--gdb/tui/tuiDisassem.c3
-rw-r--r--gdb/tui/tuiSource.c2
-rw-r--r--gdb/tui/tuiSourceWin.c2
-rw-r--r--gdb/tui/tuiStack.c9
-rw-r--r--gdb/tui/tuiWin.c2
-rw-r--r--gdb/typeprint.c2
-rw-r--r--gdb/ui-file.c38
-rw-r--r--gdb/ui-file.h5
-rw-r--r--gdb/ui-out.c9
-rw-r--r--gdb/v850-tdep.c40
-rw-r--r--gdb/valops.c11
-rw-r--r--gdb/value.h15
-rw-r--r--gdb/values.c4
-rw-r--r--gdb/vax-tdep.c62
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c11
-rw-r--r--gdb/wince.c3
-rw-r--r--gdb/x86-64-linux-nat.c342
-rw-r--r--gdb/x86-64-linux-tdep.c210
-rw-r--r--gdb/x86-64-tdep.c1079
-rw-r--r--gdb/x86-64-tdep.h33
-rw-r--r--gdb/xcoffread.c5
-rw-r--r--gdb/xstormy16-tdep.c29
-rw-r--r--include/ChangeLog15
-rw-r--r--include/bfdlink.h17
-rw-r--r--include/elf/ChangeLog14
-rw-r--r--include/elf/common.h3
-rw-r--r--include/elf/h8.h1
-rw-r--r--include/elf/v850.h3
-rw-r--r--include/gdb/ChangeLog4
-rw-r--r--include/gdb/fileio.h146
-rw-r--r--include/opcode/ChangeLog246
-rw-r--r--include/opcode/h8300.h2371
-rw-r--r--include/opcode/ppc.h5
-rw-r--r--libiberty/ChangeLog22
-rw-r--r--libiberty/asprintf.c4
-rw-r--r--libiberty/config.in6
-rwxr-xr-xlibiberty/configure136
-rw-r--r--libiberty/configure.in14
-rw-r--r--libiberty/functions.texi4
-rw-r--r--libiberty/physmem.c2
-rw-r--r--libiberty/testsuite/test-demangle.c2
-rw-r--r--libiberty/vasprintf.c6
-rwxr-xr-xltconfig12
-rw-r--r--opcodes/ChangeLog148
-rw-r--r--opcodes/Makefile.am8
-rw-r--r--opcodes/Makefile.in12
-rw-r--r--opcodes/aclocal.m418
-rw-r--r--opcodes/cgen-asm.in4
-rw-r--r--opcodes/config.in9
-rwxr-xr-xopcodes/configure760
-rw-r--r--opcodes/fr30-asm.c4
-rw-r--r--opcodes/fr30-desc.c2
-rw-r--r--opcodes/fr30-desc.h2
-rw-r--r--opcodes/frv-asm.c35
-rw-r--r--opcodes/frv-desc.c88
-rw-r--r--opcodes/frv-desc.h15
-rw-r--r--opcodes/frv-dis.c9
-rw-r--r--opcodes/frv-ibld.c54
-rw-r--r--opcodes/frv-opc.c280
-rw-r--r--opcodes/frv-opc.h7
-rw-r--r--opcodes/h8300-dis.c722
-rw-r--r--opcodes/ip2k-asm.c4
-rw-r--r--opcodes/ip2k-desc.c2
-rw-r--r--opcodes/ip2k-desc.h2
-rw-r--r--opcodes/iq2000-asm.c13
-rw-r--r--opcodes/iq2000-desc.c164
-rw-r--r--opcodes/iq2000-desc.h8
-rw-r--r--opcodes/iq2000-dis.c10
-rw-r--r--opcodes/iq2000-ibld.c40
-rw-r--r--opcodes/iq2000-opc.c60
-rw-r--r--opcodes/iq2000-opc.h2
-rw-r--r--opcodes/m32r-asm.c4
-rw-r--r--opcodes/m32r-desc.c2
-rw-r--r--opcodes/m32r-desc.h2
-rw-r--r--opcodes/m32r-opc.c12
-rw-r--r--opcodes/openrisc-asm.c4
-rw-r--r--opcodes/openrisc-desc.c2
-rw-r--r--opcodes/openrisc-desc.h2
-rw-r--r--opcodes/po/Make-in24
-rw-r--r--opcodes/po/POTFILES.in1
-rw-r--r--opcodes/po/opcodes.pot447
-rw-r--r--opcodes/ppc-opc.c120
-rw-r--r--opcodes/xstormy16-asm.c4
-rw-r--r--opcodes/xstormy16-desc.c2
-rw-r--r--opcodes/xstormy16-desc.h2
-rw-r--r--sim/common/ChangeLog8
-rw-r--r--sim/common/run.c22
-rw-r--r--sim/common/sim-options.c17
-rw-r--r--sim/h8300/ChangeLog14
-rw-r--r--sim/h8300/Makefile.in18
-rw-r--r--sim/h8300/compile.c4230
-rw-r--r--sim/h8300/sim-main.h170
424 files changed, 44690 insertions, 14681 deletions
diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB
index 145e2f026bf..08a9b3a50eb 100644
--- a/COPYING.NEWLIB
+++ b/COPYING.NEWLIB
@@ -542,7 +542,7 @@ duplicated in all such forms.
This file is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-(21) Free Software Foundation LGPL License (i[3456]86-*-linux* targets only)
+(21) Free Software Foundation LGPL License (*-linux* targets only)
Copyright (C) 1990-1999, 2000, 2001
Free Software Foundation, Inc.
@@ -621,7 +621,30 @@ of the software without specific, written prior permission.
Hewlett-Packard Company makes no representations about the
suitability of this software for any purpose.
-(25) Red Hat Incorporated
+(25) Henry Spencer (only *-linux targets)
+
+Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
+This software is not subject to any license of the American Telephone
+and Telegraph Company or of the Regents of the University of California.
+
+Permission is granted to anyone to use this software for any purpose on
+any computer system, and to alter it and redistribute it, subject
+to the following restrictions:
+
+1. The author is not responsible for the consequences of use of this
+ software, no matter how awful, even if they arise from flaws in it.
+
+2. The origin of this software must not be misrepresented, either by
+ explicit claim or by omission. Since few users ever read sources,
+ credits must appear in the documentation.
+
+3. Altered versions must be plainly marked as such, and must not be
+ misrepresented as being the original software. Since few users
+ ever read sources, credits must appear in the documentation.
+
+4. This notice may not be removed or altered.
+
+(26) Red Hat Incorporated
Unless otherwise stated in each remaining newlib file, the remaining
files in the newlib subdirectory default to the following copyright.
diff --git a/ChangeLog b/ChangeLog
index 6f0b06e6458..c882a50f497 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,75 @@
+2003-06-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * MAINTAINERS: Add myself as MIPS co-maintainer.
+
+2003-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.guess: Update to 2003-06-06 version.
+ * config.sub: Update to 2003-06-06 version.
+
+2003-06-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in: Don't pass --with-stabs for mips*-sgi-irix6*o32.
+ * configure. Regenerate.
+
+2003-06-10 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Disable serial configure by default.
+ * configure: Regenerate.
+ * Makefile.tpl: Abolish .NOTPARALLEL.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl: Replace {build,host,target}_canonical by
+ {build,host,target}.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl: Fix stupid pasto.
+ * Makefile.in: Regenerate.
+
+2003-06-09 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Remove bogus conditional.
+ * Makefile.in: Regenerate.
+
+2003-06-03 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Make 'recursive targets' using autogen rather
+ than shell loop. Remove duplicate 'clean' targets and false
+ comments.
+ * Makefile.def: Add systematic dependencies to 'recursive' targets.
+ Add systematic method of specifying missing targets in subdirs.
+ Add copyright boilerplate.
+ * Makefile.in: Regenerate.
+ * configure.in: Add 'recursive targets' to maybe list.
+ * configure: Regenerate.
+
+ * Makefile.tpl: Rename [+target+] to [+make_target+].
+ * Makefile.def: Rename 'target' to 'make_target'.
+
+2003-05-30 Nick Clifton <nickc@redhat.com>
+
+ * README-maintainer-mode: Update URL for locating blessed config
+ tools.
+
+2003-05-29 Robert Millan <rmh@debian.org>
+
+ * ltconfig: Import this patch and modify for use with current
+ version of ltconfig:
+
+ 2003-05-21 Bruno Haible <bruno@clisp.org>
+
+ * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Add support for
+ GNU/FreeBSD.
+
+2003-05-28 DJ Delorie <dj@redhat.com>
+
+ * Makefile.tpl: Make maybe-check-gcc .PHONY.
+ * Makefile.in: Regenerate.
+
+2003-05-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib.
+
2003-05-21 DJ Delorie <dj@redhat.com>
* Makefile.tpl (configure-target-libiberty): Depend only on gcc, not
diff --git a/Makefile.def b/Makefile.def
index eab03306ff3..62444418388 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -1,6 +1,29 @@
#! /usr/bin/autogen
AutoGen definitions Makefile.tpl;
+// Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
+// This file was originally written by Nathanael Nerode.
+//
+// Copyright 2002, 2003 Free Software Foundation
+//
+// This file 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.
+
+
+// "missing" indicates that that module doesn't supply
+// that recursive target in its Makefile.
+
build_modules= { module= libiberty; };
host_modules= { module= ash; };
@@ -31,7 +54,8 @@ host_modules= { module= gzip; };
host_modules= { module= hello; };
host_modules= { module= indent; };
host_modules= { module= intl; };
-host_modules= { module= tcl; };
+host_modules= { module= tcl;
+ missing=mostlyclean; };
host_modules= { module= itcl; };
host_modules= { module= ld; };
host_modules= { module= libgui; };
@@ -65,14 +89,22 @@ host_modules= { module= expect; with_x=true; };
host_modules= { module= guile; with_x=true; };
host_modules= { module= tk; with_x=true; };
host_modules= { module= tix; with_x=true; };
-host_modules= { module= libtermcap; no_check=true; no_clean=true; };
+host_modules= { module= libtermcap; no_check=true;
+ missing=mostlyclean;
+ missing=clean;
+ missing=distclean;
+ missing=maintainer-clean; };
host_modules= { module= utils; no_check=true; };
target_modules = { module= libstdc++-v3; raw_cxx=true; };
target_modules = { module= newlib; };
target_modules = { module= libf2c; };
target_modules = { module= libobjc; };
-target_modules = { module= libtermcap; no_check=true; no_clean=true; };
+target_modules = { module= libtermcap; no_check=true;
+ missing=mostlyclean;
+ missing=clean;
+ missing=distclean;
+ missing=maintainer-clean; };
target_modules = { module= winsup; };
target_modules = { module= libgloss; no_check=true; };
target_modules = { module= libiberty; };
@@ -85,14 +117,22 @@ target_modules = { module= boehm-gc; };
target_modules = { module= qthreads; };
target_modules = { module= rda; };
-// These are (some of) the targets to be done in each subdirectory.
+// These are (some of) the make targets to be done in each subdirectory.
// Not all; these are the ones which don't have special options.
-recursive_targets = { target= clean; };
-recursive_targets = { target= distclean; };
-recursive_targets = { target= dvi; };
-recursive_targets = { target= info; };
-recursive_targets = { target= install-info; };
-recursive_targets = { target= installcheck; };
-recursive_targets = { target= mostlyclean; };
-recursive_targets = { target= maintainer-clean; };
-recursive_targets = { target= TAGS; };
+// "depend" indicates that a target depends on another target uniformly
+// for each subdirectory. There can be several such lines per target.
+recursive_targets = { make_target= info;
+ depend=configure; };
+recursive_targets = { make_target= dvi;
+ depend=configure; };
+recursive_targets = { make_target= TAGS;
+ depend=configure; };
+recursive_targets = { make_target= install-info;
+ depend=configure;
+ depend=info; };
+recursive_targets = { make_target= installcheck;
+ depend=configure; };
+recursive_targets = { make_target= mostlyclean; };
+recursive_targets = { make_target= clean; };
+recursive_targets = { make_target= distclean; };
+recursive_targets = { make_target= maintainer-clean; };
diff --git a/Makefile.in b/Makefile.in
index 7511bc057af..82f67cf06c7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -26,20 +26,11 @@
VPATH=@srcdir@
build_alias=@build_alias@
-build_cpu=@build_cpu@
-build_vendor=@build_vendor@
-build_os=@build_os@
-build_canonical=@build_cpu@-@build_vendor@-@build_os@
+build=@build@
host_alias=@host_alias@
-host_cpu=@host_cpu@
-host_vendor=@host_vendor@
-host_os=@host_os@
-host_canonical=@host_cpu@-@host_vendor@-@host_os@
+host=@host@
target_alias=@target_alias@
-target_cpu=@target_cpu@
-target_vendor=@target_vendor@
-target_os=@target_os@
-target_canonical=@target_cpu@-@target_vendor@-@target_os@
+target=@target@
program_transform_name = @program_transform_name@
@@ -263,7 +254,7 @@ USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \
else \
echo ar | sed '$(program_transform_name)' ; \
@@ -277,7 +268,7 @@ USUAL_AS_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=as ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \
else \
echo as | sed '$(program_transform_name)' ; \
@@ -310,7 +301,7 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \
else \
echo dlltool | sed '$(program_transform_name)' ; \
@@ -326,7 +317,7 @@ USUAL_LD_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=ld ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \
else \
echo ld | sed '$(program_transform_name)' ; \
@@ -342,7 +333,7 @@ USUAL_NM_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=nm ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \
else \
echo nm | sed '$(program_transform_name)' ; \
@@ -354,7 +345,7 @@ USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
if [ x'$(RANLIB)' != x ]; then \
echo $(RANLIB); \
else \
@@ -370,7 +361,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \
else \
echo windres | sed '$(program_transform_name)' ; \
@@ -472,7 +463,6 @@ RECURSE_FLAGS = \
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_HOST_FLAGS = \
'AR=$(AR)' \
'AS=$(AS)' \
@@ -501,7 +491,6 @@ X11_FLAGS_TO_PASS = \
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; the variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$$(AS_FOR_TARGET)' \
@@ -523,7 +512,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# unfortunately needs the native compiler and the target ar and
# ranlib.
# If any variables are added here, they must be added to do-*, below.
-# The HOST_* variables are a special case, which are used for the gcc
+# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
'AR=$(AR)' \
@@ -636,93 +625,6 @@ configure-target: \
maybe-configure-target-qthreads \
maybe-configure-target-rda
-# This is a list of the targets for which we can do a clean-{target}.
-CLEAN_MODULES = \
- clean-ash \
- clean-autoconf \
- clean-automake \
- clean-bash \
- clean-bfd \
- clean-opcodes \
- clean-binutils \
- clean-bison \
- clean-byacc \
- clean-bzip2 \
- clean-dejagnu \
- clean-diff \
- clean-dosutils \
- clean-etc \
- clean-fastjar \
- clean-fileutils \
- clean-findutils \
- clean-find \
- clean-flex \
- clean-gas \
- clean-gawk \
- clean-gettext \
- clean-gnuserv \
- clean-gprof \
- clean-gzip \
- clean-hello \
- clean-indent \
- clean-intl \
- clean-tcl \
- clean-itcl \
- clean-ld \
- clean-libgui \
- clean-libiberty \
- clean-libtool \
- clean-m4 \
- clean-make \
- clean-mmalloc \
- clean-patch \
- clean-perl \
- clean-prms \
- clean-rcs \
- clean-readline \
- clean-release \
- clean-recode \
- clean-sed \
- clean-send-pr \
- clean-shellutils \
- clean-sid \
- clean-sim \
- clean-tar \
- clean-texinfo \
- clean-textutils \
- clean-time \
- clean-uudecode \
- clean-wdiff \
- clean-zip \
- clean-zlib \
- clean-utils
-
-# All of the target modules that can be cleaned
-CLEAN_TARGET_MODULES = \
- clean-target-libstdc++-v3 \
- clean-target-newlib \
- clean-target-libf2c \
- clean-target-libobjc \
- clean-target-winsup \
- clean-target-libgloss \
- clean-target-libiberty \
- clean-target-gperf \
- clean-target-examples \
- clean-target-libffi \
- clean-target-libjava \
- clean-target-zlib \
- clean-target-boehm-gc \
- clean-target-qthreads \
- clean-target-rda
-
-# All of the x11 modules that can be cleaned
-CLEAN_X11_MODULES = \
- clean-gdb \
- clean-expect \
- clean-guile \
- clean-tk \
- clean-tix
-
# The target built for a native build.
.PHONY: all.normal
all.normal: @all_build_modules@ all-host all-target
@@ -816,432 +718,16520 @@ all-target: \
# ``make X'' in all subdirectories (because, in general, there is a
# dependency (below) of X upon do-X, a ``make X'' will also do this,
# but it may do additional work as well).
-# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
-# because it is so large that it can easily overflow the command line
-# length limit on some systems.
-.PHONY: do-clean
-do-clean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
- || exit 1; \
- else true; fi; \
- done
+.PHONY: do-info
+do-info: info-host info-target
+
+.PHONY: info-host
+info-host: maybe-info-gcc \
+ maybe-info-ash \
+ maybe-info-autoconf \
+ maybe-info-automake \
+ maybe-info-bash \
+ maybe-info-bfd \
+ maybe-info-opcodes \
+ maybe-info-binutils \
+ maybe-info-bison \
+ maybe-info-byacc \
+ maybe-info-bzip2 \
+ maybe-info-dejagnu \
+ maybe-info-diff \
+ maybe-info-dosutils \
+ maybe-info-etc \
+ maybe-info-fastjar \
+ maybe-info-fileutils \
+ maybe-info-findutils \
+ maybe-info-find \
+ maybe-info-flex \
+ maybe-info-gas \
+ maybe-info-gawk \
+ maybe-info-gettext \
+ maybe-info-gnuserv \
+ maybe-info-gprof \
+ maybe-info-gzip \
+ maybe-info-hello \
+ maybe-info-indent \
+ maybe-info-intl \
+ maybe-info-tcl \
+ maybe-info-itcl \
+ maybe-info-ld \
+ maybe-info-libgui \
+ maybe-info-libiberty \
+ maybe-info-libtool \
+ maybe-info-m4 \
+ maybe-info-make \
+ maybe-info-mmalloc \
+ maybe-info-patch \
+ maybe-info-perl \
+ maybe-info-prms \
+ maybe-info-rcs \
+ maybe-info-readline \
+ maybe-info-release \
+ maybe-info-recode \
+ maybe-info-sed \
+ maybe-info-send-pr \
+ maybe-info-shellutils \
+ maybe-info-sid \
+ maybe-info-sim \
+ maybe-info-tar \
+ maybe-info-texinfo \
+ maybe-info-textutils \
+ maybe-info-time \
+ maybe-info-uudecode \
+ maybe-info-wdiff \
+ maybe-info-zip \
+ maybe-info-zlib \
+ maybe-info-gdb \
+ maybe-info-expect \
+ maybe-info-guile \
+ maybe-info-tk \
+ maybe-info-tix \
+ maybe-info-libtermcap \
+ maybe-info-utils
+
+.PHONY: info-target
+info-target: \
+ maybe-info-target-libstdc++-v3 \
+ maybe-info-target-newlib \
+ maybe-info-target-libf2c \
+ maybe-info-target-libobjc \
+ maybe-info-target-libtermcap \
+ maybe-info-target-winsup \
+ maybe-info-target-libgloss \
+ maybe-info-target-libiberty \
+ maybe-info-target-gperf \
+ maybe-info-target-examples \
+ maybe-info-target-libffi \
+ maybe-info-target-libjava \
+ maybe-info-target-zlib \
+ maybe-info-target-boehm-gc \
+ maybe-info-target-qthreads \
+ maybe-info-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-info-gcc info-gcc
+maybe-info-gcc:
+info-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-info-ash info-ash
+maybe-info-ash:
+
+info-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-autoconf info-autoconf
+maybe-info-autoconf:
+
+info-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-automake info-automake
+maybe-info-automake:
+
+info-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bash info-bash
+maybe-info-bash:
+
+info-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bfd info-bfd
+maybe-info-bfd:
+
+info-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-opcodes info-opcodes
+maybe-info-opcodes:
+
+info-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-binutils info-binutils
+maybe-info-binutils:
+
+info-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bison info-bison
+maybe-info-bison:
+
+info-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-byacc info-byacc
+maybe-info-byacc:
+
+info-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bzip2 info-bzip2
+maybe-info-bzip2:
+
+info-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-dejagnu info-dejagnu
+maybe-info-dejagnu:
+
+info-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-diff info-diff
+maybe-info-diff:
+
+info-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-dosutils info-dosutils
+maybe-info-dosutils:
+
+info-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-etc info-etc
+maybe-info-etc:
+
+info-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-fastjar info-fastjar
+maybe-info-fastjar:
+
+info-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-fileutils info-fileutils
+maybe-info-fileutils:
+
+info-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-findutils info-findutils
+maybe-info-findutils:
+
+info-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-find info-find
+maybe-info-find:
+
+info-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-flex info-flex
+maybe-info-flex:
+
+info-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gas info-gas
+maybe-info-gas:
+
+info-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gawk info-gawk
+maybe-info-gawk:
+
+info-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gettext info-gettext
+maybe-info-gettext:
+
+info-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gnuserv info-gnuserv
+maybe-info-gnuserv:
+
+info-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gprof info-gprof
+maybe-info-gprof:
+
+info-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gzip info-gzip
+maybe-info-gzip:
+
+info-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-hello info-hello
+maybe-info-hello:
+
+info-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-indent info-indent
+maybe-info-indent:
+
+info-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-intl info-intl
+maybe-info-intl:
+
+info-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tcl info-tcl
+maybe-info-tcl:
+
+info-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-itcl info-itcl
+maybe-info-itcl:
+
+info-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-ld info-ld
+maybe-info-ld:
+
+info-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libgui info-libgui
+maybe-info-libgui:
+
+info-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libiberty info-libiberty
+maybe-info-libiberty:
+
+info-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libtool info-libtool
+maybe-info-libtool:
+
+info-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-m4 info-m4
+maybe-info-m4:
+
+info-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-make info-make
+maybe-info-make:
+
+info-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-mmalloc info-mmalloc
+maybe-info-mmalloc:
+
+info-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-patch info-patch
+maybe-info-patch:
+
+info-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-perl info-perl
+maybe-info-perl:
+
+info-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-prms info-prms
+maybe-info-prms:
+
+info-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-rcs info-rcs
+maybe-info-rcs:
+
+info-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-readline info-readline
+maybe-info-readline:
+
+info-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-release info-release
+maybe-info-release:
+
+info-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-recode info-recode
+maybe-info-recode:
+
+info-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-sed info-sed
+maybe-info-sed:
+
+info-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-send-pr info-send-pr
+maybe-info-send-pr:
+
+info-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-shellutils info-shellutils
+maybe-info-shellutils:
+
+info-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-sid info-sid
+maybe-info-sid:
+
+info-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-sim info-sim
+maybe-info-sim:
+
+info-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tar info-tar
+maybe-info-tar:
+
+info-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-texinfo info-texinfo
+maybe-info-texinfo:
+
+info-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-textutils info-textutils
+maybe-info-textutils:
+
+info-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-time info-time
+maybe-info-time:
+
+info-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-uudecode info-uudecode
+maybe-info-uudecode:
+
+info-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-wdiff info-wdiff
+maybe-info-wdiff:
+
+info-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-zip info-zip
+maybe-info-zip:
+
+info-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-zlib info-zlib
+maybe-info-zlib:
+
+info-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gdb info-gdb
+maybe-info-gdb:
+
+info-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-expect info-expect
+maybe-info-expect:
+
+info-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-guile info-guile
+maybe-info-guile:
+
+info-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tk info-tk
+maybe-info-tk:
+
+info-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tix info-tix
+maybe-info-tix:
+
+info-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libtermcap info-libtermcap
+maybe-info-libtermcap:
+
+info-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-utils info-utils
+maybe-info-utils:
+
+info-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
+maybe-info-target-libstdc++-v3:
+
+info-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-newlib info-target-newlib
+maybe-info-target-newlib:
+
+info-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libf2c info-target-libf2c
+maybe-info-target-libf2c:
+
+info-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libobjc info-target-libobjc
+maybe-info-target-libobjc:
+
+info-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libtermcap info-target-libtermcap
+maybe-info-target-libtermcap:
+
+info-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-winsup info-target-winsup
+maybe-info-target-winsup:
+
+info-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libgloss info-target-libgloss
+maybe-info-target-libgloss:
+
+info-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libiberty info-target-libiberty
+maybe-info-target-libiberty:
+
+info-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-gperf info-target-gperf
+maybe-info-target-gperf:
+
+info-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-examples info-target-examples
+maybe-info-target-examples:
+
+info-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libffi info-target-libffi
+maybe-info-target-libffi:
+
+info-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libjava info-target-libjava
+maybe-info-target-libjava:
+
+info-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-zlib info-target-zlib
+maybe-info-target-zlib:
+
+info-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
+maybe-info-target-boehm-gc:
+
+info-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-qthreads info-target-qthreads
+maybe-info-target-qthreads:
+
+info-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-rda info-target-rda
+maybe-info-target-rda:
+
+info-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
-.PHONY: do-distclean
-do-distclean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
- || exit 1; \
- else true; fi; \
- done
.PHONY: do-dvi
-do-dvi:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
- || exit 1; \
- else true; fi; \
- done
+do-dvi: dvi-host dvi-target
+
+.PHONY: dvi-host
+dvi-host: maybe-dvi-gcc \
+ maybe-dvi-ash \
+ maybe-dvi-autoconf \
+ maybe-dvi-automake \
+ maybe-dvi-bash \
+ maybe-dvi-bfd \
+ maybe-dvi-opcodes \
+ maybe-dvi-binutils \
+ maybe-dvi-bison \
+ maybe-dvi-byacc \
+ maybe-dvi-bzip2 \
+ maybe-dvi-dejagnu \
+ maybe-dvi-diff \
+ maybe-dvi-dosutils \
+ maybe-dvi-etc \
+ maybe-dvi-fastjar \
+ maybe-dvi-fileutils \
+ maybe-dvi-findutils \
+ maybe-dvi-find \
+ maybe-dvi-flex \
+ maybe-dvi-gas \
+ maybe-dvi-gawk \
+ maybe-dvi-gettext \
+ maybe-dvi-gnuserv \
+ maybe-dvi-gprof \
+ maybe-dvi-gzip \
+ maybe-dvi-hello \
+ maybe-dvi-indent \
+ maybe-dvi-intl \
+ maybe-dvi-tcl \
+ maybe-dvi-itcl \
+ maybe-dvi-ld \
+ maybe-dvi-libgui \
+ maybe-dvi-libiberty \
+ maybe-dvi-libtool \
+ maybe-dvi-m4 \
+ maybe-dvi-make \
+ maybe-dvi-mmalloc \
+ maybe-dvi-patch \
+ maybe-dvi-perl \
+ maybe-dvi-prms \
+ maybe-dvi-rcs \
+ maybe-dvi-readline \
+ maybe-dvi-release \
+ maybe-dvi-recode \
+ maybe-dvi-sed \
+ maybe-dvi-send-pr \
+ maybe-dvi-shellutils \
+ maybe-dvi-sid \
+ maybe-dvi-sim \
+ maybe-dvi-tar \
+ maybe-dvi-texinfo \
+ maybe-dvi-textutils \
+ maybe-dvi-time \
+ maybe-dvi-uudecode \
+ maybe-dvi-wdiff \
+ maybe-dvi-zip \
+ maybe-dvi-zlib \
+ maybe-dvi-gdb \
+ maybe-dvi-expect \
+ maybe-dvi-guile \
+ maybe-dvi-tk \
+ maybe-dvi-tix \
+ maybe-dvi-libtermcap \
+ maybe-dvi-utils
+
+.PHONY: dvi-target
+dvi-target: \
+ maybe-dvi-target-libstdc++-v3 \
+ maybe-dvi-target-newlib \
+ maybe-dvi-target-libf2c \
+ maybe-dvi-target-libobjc \
+ maybe-dvi-target-libtermcap \
+ maybe-dvi-target-winsup \
+ maybe-dvi-target-libgloss \
+ maybe-dvi-target-libiberty \
+ maybe-dvi-target-gperf \
+ maybe-dvi-target-examples \
+ maybe-dvi-target-libffi \
+ maybe-dvi-target-libjava \
+ maybe-dvi-target-zlib \
+ maybe-dvi-target-boehm-gc \
+ maybe-dvi-target-qthreads \
+ maybe-dvi-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-dvi-gcc dvi-gcc
+maybe-dvi-gcc:
+dvi-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-dvi-ash dvi-ash
+maybe-dvi-ash:
+
+dvi-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-autoconf dvi-autoconf
+maybe-dvi-autoconf:
+
+dvi-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-automake dvi-automake
+maybe-dvi-automake:
+
+dvi-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bash dvi-bash
+maybe-dvi-bash:
+
+dvi-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bfd dvi-bfd
+maybe-dvi-bfd:
+
+dvi-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-opcodes dvi-opcodes
+maybe-dvi-opcodes:
+
+dvi-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-binutils dvi-binutils
+maybe-dvi-binutils:
+
+dvi-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bison dvi-bison
+maybe-dvi-bison:
+
+dvi-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-byacc dvi-byacc
+maybe-dvi-byacc:
+
+dvi-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bzip2 dvi-bzip2
+maybe-dvi-bzip2:
+
+dvi-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-dejagnu dvi-dejagnu
+maybe-dvi-dejagnu:
+
+dvi-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-diff dvi-diff
+maybe-dvi-diff:
+
+dvi-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-dosutils dvi-dosutils
+maybe-dvi-dosutils:
+
+dvi-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-etc dvi-etc
+maybe-dvi-etc:
+
+dvi-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-fastjar dvi-fastjar
+maybe-dvi-fastjar:
+
+dvi-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-fileutils dvi-fileutils
+maybe-dvi-fileutils:
+
+dvi-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-findutils dvi-findutils
+maybe-dvi-findutils:
+
+dvi-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-find dvi-find
+maybe-dvi-find:
+
+dvi-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-flex dvi-flex
+maybe-dvi-flex:
+
+dvi-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gas dvi-gas
+maybe-dvi-gas:
+
+dvi-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gawk dvi-gawk
+maybe-dvi-gawk:
+
+dvi-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gettext dvi-gettext
+maybe-dvi-gettext:
+
+dvi-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gnuserv dvi-gnuserv
+maybe-dvi-gnuserv:
+
+dvi-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gprof dvi-gprof
+maybe-dvi-gprof:
+
+dvi-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gzip dvi-gzip
+maybe-dvi-gzip:
+
+dvi-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-hello dvi-hello
+maybe-dvi-hello:
+
+dvi-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-indent dvi-indent
+maybe-dvi-indent:
+
+dvi-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-intl dvi-intl
+maybe-dvi-intl:
+
+dvi-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tcl dvi-tcl
+maybe-dvi-tcl:
+
+dvi-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-itcl dvi-itcl
+maybe-dvi-itcl:
+
+dvi-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-ld dvi-ld
+maybe-dvi-ld:
+
+dvi-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libgui dvi-libgui
+maybe-dvi-libgui:
+
+dvi-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libiberty dvi-libiberty
+maybe-dvi-libiberty:
+
+dvi-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libtool dvi-libtool
+maybe-dvi-libtool:
+
+dvi-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-m4 dvi-m4
+maybe-dvi-m4:
+
+dvi-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-make dvi-make
+maybe-dvi-make:
+
+dvi-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-mmalloc dvi-mmalloc
+maybe-dvi-mmalloc:
+
+dvi-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-patch dvi-patch
+maybe-dvi-patch:
+
+dvi-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-perl dvi-perl
+maybe-dvi-perl:
+
+dvi-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-prms dvi-prms
+maybe-dvi-prms:
+
+dvi-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-rcs dvi-rcs
+maybe-dvi-rcs:
+
+dvi-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-readline dvi-readline
+maybe-dvi-readline:
+
+dvi-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-release dvi-release
+maybe-dvi-release:
+
+dvi-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-recode dvi-recode
+maybe-dvi-recode:
+
+dvi-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-sed dvi-sed
+maybe-dvi-sed:
+
+dvi-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-send-pr dvi-send-pr
+maybe-dvi-send-pr:
+
+dvi-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-shellutils dvi-shellutils
+maybe-dvi-shellutils:
+
+dvi-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-sid dvi-sid
+maybe-dvi-sid:
+
+dvi-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-sim dvi-sim
+maybe-dvi-sim:
+
+dvi-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tar dvi-tar
+maybe-dvi-tar:
+
+dvi-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-texinfo dvi-texinfo
+maybe-dvi-texinfo:
+
+dvi-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-textutils dvi-textutils
+maybe-dvi-textutils:
+
+dvi-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-time dvi-time
+maybe-dvi-time:
+
+dvi-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-uudecode dvi-uudecode
+maybe-dvi-uudecode:
+
+dvi-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-wdiff dvi-wdiff
+maybe-dvi-wdiff:
+
+dvi-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-zip dvi-zip
+maybe-dvi-zip:
+
+dvi-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-zlib dvi-zlib
+maybe-dvi-zlib:
+
+dvi-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gdb dvi-gdb
+maybe-dvi-gdb:
+
+dvi-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-expect dvi-expect
+maybe-dvi-expect:
+
+dvi-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-guile dvi-guile
+maybe-dvi-guile:
+
+dvi-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tk dvi-tk
+maybe-dvi-tk:
+
+dvi-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tix dvi-tix
+maybe-dvi-tix:
+
+dvi-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libtermcap dvi-libtermcap
+maybe-dvi-libtermcap:
+
+dvi-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-utils dvi-utils
+maybe-dvi-utils:
+
+dvi-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3
+maybe-dvi-target-libstdc++-v3:
+
+dvi-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-newlib dvi-target-newlib
+maybe-dvi-target-newlib:
+
+dvi-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c
+maybe-dvi-target-libf2c:
+
+dvi-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
+maybe-dvi-target-libobjc:
+
+dvi-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap
+maybe-dvi-target-libtermcap:
+
+dvi-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-winsup dvi-target-winsup
+maybe-dvi-target-winsup:
+
+dvi-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss
+maybe-dvi-target-libgloss:
+
+dvi-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
+maybe-dvi-target-libiberty:
+
+dvi-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-gperf dvi-target-gperf
+maybe-dvi-target-gperf:
+
+dvi-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-examples dvi-target-examples
+maybe-dvi-target-examples:
+
+dvi-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libffi dvi-target-libffi
+maybe-dvi-target-libffi:
+
+dvi-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libjava dvi-target-libjava
+maybe-dvi-target-libjava:
+
+dvi-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-zlib dvi-target-zlib
+maybe-dvi-target-zlib:
+
+dvi-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc
+maybe-dvi-target-boehm-gc:
+
+dvi-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads
+maybe-dvi-target-qthreads:
+
+dvi-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-rda dvi-target-rda
+maybe-dvi-target-rda:
+
+dvi-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+
+.PHONY: do-TAGS
+do-TAGS: TAGS-host TAGS-target
+
+.PHONY: TAGS-host
+TAGS-host: maybe-TAGS-gcc \
+ maybe-TAGS-ash \
+ maybe-TAGS-autoconf \
+ maybe-TAGS-automake \
+ maybe-TAGS-bash \
+ maybe-TAGS-bfd \
+ maybe-TAGS-opcodes \
+ maybe-TAGS-binutils \
+ maybe-TAGS-bison \
+ maybe-TAGS-byacc \
+ maybe-TAGS-bzip2 \
+ maybe-TAGS-dejagnu \
+ maybe-TAGS-diff \
+ maybe-TAGS-dosutils \
+ maybe-TAGS-etc \
+ maybe-TAGS-fastjar \
+ maybe-TAGS-fileutils \
+ maybe-TAGS-findutils \
+ maybe-TAGS-find \
+ maybe-TAGS-flex \
+ maybe-TAGS-gas \
+ maybe-TAGS-gawk \
+ maybe-TAGS-gettext \
+ maybe-TAGS-gnuserv \
+ maybe-TAGS-gprof \
+ maybe-TAGS-gzip \
+ maybe-TAGS-hello \
+ maybe-TAGS-indent \
+ maybe-TAGS-intl \
+ maybe-TAGS-tcl \
+ maybe-TAGS-itcl \
+ maybe-TAGS-ld \
+ maybe-TAGS-libgui \
+ maybe-TAGS-libiberty \
+ maybe-TAGS-libtool \
+ maybe-TAGS-m4 \
+ maybe-TAGS-make \
+ maybe-TAGS-mmalloc \
+ maybe-TAGS-patch \
+ maybe-TAGS-perl \
+ maybe-TAGS-prms \
+ maybe-TAGS-rcs \
+ maybe-TAGS-readline \
+ maybe-TAGS-release \
+ maybe-TAGS-recode \
+ maybe-TAGS-sed \
+ maybe-TAGS-send-pr \
+ maybe-TAGS-shellutils \
+ maybe-TAGS-sid \
+ maybe-TAGS-sim \
+ maybe-TAGS-tar \
+ maybe-TAGS-texinfo \
+ maybe-TAGS-textutils \
+ maybe-TAGS-time \
+ maybe-TAGS-uudecode \
+ maybe-TAGS-wdiff \
+ maybe-TAGS-zip \
+ maybe-TAGS-zlib \
+ maybe-TAGS-gdb \
+ maybe-TAGS-expect \
+ maybe-TAGS-guile \
+ maybe-TAGS-tk \
+ maybe-TAGS-tix \
+ maybe-TAGS-libtermcap \
+ maybe-TAGS-utils
+
+.PHONY: TAGS-target
+TAGS-target: \
+ maybe-TAGS-target-libstdc++-v3 \
+ maybe-TAGS-target-newlib \
+ maybe-TAGS-target-libf2c \
+ maybe-TAGS-target-libobjc \
+ maybe-TAGS-target-libtermcap \
+ maybe-TAGS-target-winsup \
+ maybe-TAGS-target-libgloss \
+ maybe-TAGS-target-libiberty \
+ maybe-TAGS-target-gperf \
+ maybe-TAGS-target-examples \
+ maybe-TAGS-target-libffi \
+ maybe-TAGS-target-libjava \
+ maybe-TAGS-target-zlib \
+ maybe-TAGS-target-boehm-gc \
+ maybe-TAGS-target-qthreads \
+ maybe-TAGS-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-TAGS-gcc TAGS-gcc
+maybe-TAGS-gcc:
+TAGS-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-TAGS-ash TAGS-ash
+maybe-TAGS-ash:
+
+TAGS-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-autoconf TAGS-autoconf
+maybe-TAGS-autoconf:
+
+TAGS-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-automake TAGS-automake
+maybe-TAGS-automake:
+
+TAGS-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bash TAGS-bash
+maybe-TAGS-bash:
+
+TAGS-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bfd TAGS-bfd
+maybe-TAGS-bfd:
+
+TAGS-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-opcodes TAGS-opcodes
+maybe-TAGS-opcodes:
+
+TAGS-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-binutils TAGS-binutils
+maybe-TAGS-binutils:
+
+TAGS-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bison TAGS-bison
+maybe-TAGS-bison:
+
+TAGS-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-byacc TAGS-byacc
+maybe-TAGS-byacc:
+
+TAGS-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bzip2 TAGS-bzip2
+maybe-TAGS-bzip2:
+
+TAGS-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu
+maybe-TAGS-dejagnu:
+
+TAGS-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-diff TAGS-diff
+maybe-TAGS-diff:
+
+TAGS-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-dosutils TAGS-dosutils
+maybe-TAGS-dosutils:
+
+TAGS-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-etc TAGS-etc
+maybe-TAGS-etc:
+
+TAGS-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-fastjar TAGS-fastjar
+maybe-TAGS-fastjar:
+
+TAGS-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-fileutils TAGS-fileutils
+maybe-TAGS-fileutils:
+
+TAGS-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-findutils TAGS-findutils
+maybe-TAGS-findutils:
+
+TAGS-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-find TAGS-find
+maybe-TAGS-find:
+
+TAGS-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-flex TAGS-flex
+maybe-TAGS-flex:
+
+TAGS-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gas TAGS-gas
+maybe-TAGS-gas:
+
+TAGS-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gawk TAGS-gawk
+maybe-TAGS-gawk:
+
+TAGS-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gettext TAGS-gettext
+maybe-TAGS-gettext:
+
+TAGS-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
+maybe-TAGS-gnuserv:
+
+TAGS-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gprof TAGS-gprof
+maybe-TAGS-gprof:
+
+TAGS-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gzip TAGS-gzip
+maybe-TAGS-gzip:
+
+TAGS-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-hello TAGS-hello
+maybe-TAGS-hello:
+
+TAGS-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-indent TAGS-indent
+maybe-TAGS-indent:
+
+TAGS-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-intl TAGS-intl
+maybe-TAGS-intl:
+
+TAGS-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tcl TAGS-tcl
+maybe-TAGS-tcl:
+
+TAGS-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-itcl TAGS-itcl
+maybe-TAGS-itcl:
+
+TAGS-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-ld TAGS-ld
+maybe-TAGS-ld:
+
+TAGS-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libgui TAGS-libgui
+maybe-TAGS-libgui:
+
+TAGS-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libiberty TAGS-libiberty
+maybe-TAGS-libiberty:
+
+TAGS-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libtool TAGS-libtool
+maybe-TAGS-libtool:
+
+TAGS-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-m4 TAGS-m4
+maybe-TAGS-m4:
+
+TAGS-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-make TAGS-make
+maybe-TAGS-make:
+
+TAGS-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
+maybe-TAGS-mmalloc:
+
+TAGS-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-patch TAGS-patch
+maybe-TAGS-patch:
+
+TAGS-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-perl TAGS-perl
+maybe-TAGS-perl:
+
+TAGS-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-prms TAGS-prms
+maybe-TAGS-prms:
+
+TAGS-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-rcs TAGS-rcs
+maybe-TAGS-rcs:
+
+TAGS-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-readline TAGS-readline
+maybe-TAGS-readline:
+
+TAGS-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-release TAGS-release
+maybe-TAGS-release:
+
+TAGS-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-recode TAGS-recode
+maybe-TAGS-recode:
+
+TAGS-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-sed TAGS-sed
+maybe-TAGS-sed:
+
+TAGS-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-send-pr TAGS-send-pr
+maybe-TAGS-send-pr:
+
+TAGS-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-shellutils TAGS-shellutils
+maybe-TAGS-shellutils:
+
+TAGS-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-sid TAGS-sid
+maybe-TAGS-sid:
+
+TAGS-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-sim TAGS-sim
+maybe-TAGS-sim:
+
+TAGS-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tar TAGS-tar
+maybe-TAGS-tar:
+
+TAGS-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-texinfo TAGS-texinfo
+maybe-TAGS-texinfo:
+
+TAGS-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-textutils TAGS-textutils
+maybe-TAGS-textutils:
+
+TAGS-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-time TAGS-time
+maybe-TAGS-time:
+
+TAGS-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-uudecode TAGS-uudecode
+maybe-TAGS-uudecode:
+
+TAGS-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-wdiff TAGS-wdiff
+maybe-TAGS-wdiff:
+
+TAGS-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-zip TAGS-zip
+maybe-TAGS-zip:
+
+TAGS-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-zlib TAGS-zlib
+maybe-TAGS-zlib:
+
+TAGS-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gdb TAGS-gdb
+maybe-TAGS-gdb:
+
+TAGS-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-expect TAGS-expect
+maybe-TAGS-expect:
+
+TAGS-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-guile TAGS-guile
+maybe-TAGS-guile:
+
+TAGS-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tk TAGS-tk
+maybe-TAGS-tk:
+
+TAGS-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tix TAGS-tix
+maybe-TAGS-tix:
+
+TAGS-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap
+maybe-TAGS-libtermcap:
+
+TAGS-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-utils TAGS-utils
+maybe-TAGS-utils:
+
+TAGS-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3
+maybe-TAGS-target-libstdc++-v3:
+
+TAGS-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
+maybe-TAGS-target-newlib:
+
+TAGS-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c
+maybe-TAGS-target-libf2c:
+
+TAGS-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc
+maybe-TAGS-target-libobjc:
+
+TAGS-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap
+maybe-TAGS-target-libtermcap:
+
+TAGS-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup
+maybe-TAGS-target-winsup:
+
+TAGS-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss
+maybe-TAGS-target-libgloss:
+
+TAGS-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
+maybe-TAGS-target-libiberty:
+
+TAGS-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
+maybe-TAGS-target-gperf:
+
+TAGS-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-examples TAGS-target-examples
+maybe-TAGS-target-examples:
+
+TAGS-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi
+maybe-TAGS-target-libffi:
+
+TAGS-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
+maybe-TAGS-target-libjava:
+
+TAGS-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib
+maybe-TAGS-target-zlib:
+
+TAGS-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc
+maybe-TAGS-target-boehm-gc:
+
+TAGS-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
+maybe-TAGS-target-qthreads:
+
+TAGS-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-rda TAGS-target-rda
+maybe-TAGS-target-rda:
+
+TAGS-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
-.PHONY: do-info
-do-info:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
- || exit 1; \
- else true; fi; \
- done
.PHONY: do-install-info
-do-install-info:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
- || exit 1; \
- else true; fi; \
- done
+do-install-info: install-info-host install-info-target
+
+.PHONY: install-info-host
+install-info-host: maybe-install-info-gcc \
+ maybe-install-info-ash \
+ maybe-install-info-autoconf \
+ maybe-install-info-automake \
+ maybe-install-info-bash \
+ maybe-install-info-bfd \
+ maybe-install-info-opcodes \
+ maybe-install-info-binutils \
+ maybe-install-info-bison \
+ maybe-install-info-byacc \
+ maybe-install-info-bzip2 \
+ maybe-install-info-dejagnu \
+ maybe-install-info-diff \
+ maybe-install-info-dosutils \
+ maybe-install-info-etc \
+ maybe-install-info-fastjar \
+ maybe-install-info-fileutils \
+ maybe-install-info-findutils \
+ maybe-install-info-find \
+ maybe-install-info-flex \
+ maybe-install-info-gas \
+ maybe-install-info-gawk \
+ maybe-install-info-gettext \
+ maybe-install-info-gnuserv \
+ maybe-install-info-gprof \
+ maybe-install-info-gzip \
+ maybe-install-info-hello \
+ maybe-install-info-indent \
+ maybe-install-info-intl \
+ maybe-install-info-tcl \
+ maybe-install-info-itcl \
+ maybe-install-info-ld \
+ maybe-install-info-libgui \
+ maybe-install-info-libiberty \
+ maybe-install-info-libtool \
+ maybe-install-info-m4 \
+ maybe-install-info-make \
+ maybe-install-info-mmalloc \
+ maybe-install-info-patch \
+ maybe-install-info-perl \
+ maybe-install-info-prms \
+ maybe-install-info-rcs \
+ maybe-install-info-readline \
+ maybe-install-info-release \
+ maybe-install-info-recode \
+ maybe-install-info-sed \
+ maybe-install-info-send-pr \
+ maybe-install-info-shellutils \
+ maybe-install-info-sid \
+ maybe-install-info-sim \
+ maybe-install-info-tar \
+ maybe-install-info-texinfo \
+ maybe-install-info-textutils \
+ maybe-install-info-time \
+ maybe-install-info-uudecode \
+ maybe-install-info-wdiff \
+ maybe-install-info-zip \
+ maybe-install-info-zlib \
+ maybe-install-info-gdb \
+ maybe-install-info-expect \
+ maybe-install-info-guile \
+ maybe-install-info-tk \
+ maybe-install-info-tix \
+ maybe-install-info-libtermcap \
+ maybe-install-info-utils
+
+.PHONY: install-info-target
+install-info-target: \
+ maybe-install-info-target-libstdc++-v3 \
+ maybe-install-info-target-newlib \
+ maybe-install-info-target-libf2c \
+ maybe-install-info-target-libobjc \
+ maybe-install-info-target-libtermcap \
+ maybe-install-info-target-winsup \
+ maybe-install-info-target-libgloss \
+ maybe-install-info-target-libiberty \
+ maybe-install-info-target-gperf \
+ maybe-install-info-target-examples \
+ maybe-install-info-target-libffi \
+ maybe-install-info-target-libjava \
+ maybe-install-info-target-zlib \
+ maybe-install-info-target-boehm-gc \
+ maybe-install-info-target-qthreads \
+ maybe-install-info-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-install-info-gcc install-info-gcc
+maybe-install-info-gcc:
+install-info-gcc: \
+ configure-gcc \
+ info-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-install-info-ash install-info-ash
+maybe-install-info-ash:
+
+install-info-ash: \
+ configure-ash \
+ info-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-autoconf install-info-autoconf
+maybe-install-info-autoconf:
+
+install-info-autoconf: \
+ configure-autoconf \
+ info-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-automake install-info-automake
+maybe-install-info-automake:
+
+install-info-automake: \
+ configure-automake \
+ info-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bash install-info-bash
+maybe-install-info-bash:
+
+install-info-bash: \
+ configure-bash \
+ info-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bfd install-info-bfd
+maybe-install-info-bfd:
+
+install-info-bfd: \
+ configure-bfd \
+ info-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-opcodes install-info-opcodes
+maybe-install-info-opcodes:
+
+install-info-opcodes: \
+ configure-opcodes \
+ info-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-binutils install-info-binutils
+maybe-install-info-binutils:
+
+install-info-binutils: \
+ configure-binutils \
+ info-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bison install-info-bison
+maybe-install-info-bison:
+
+install-info-bison: \
+ configure-bison \
+ info-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-byacc install-info-byacc
+maybe-install-info-byacc:
+
+install-info-byacc: \
+ configure-byacc \
+ info-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bzip2 install-info-bzip2
+maybe-install-info-bzip2:
+
+install-info-bzip2: \
+ configure-bzip2 \
+ info-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-dejagnu install-info-dejagnu
+maybe-install-info-dejagnu:
+
+install-info-dejagnu: \
+ configure-dejagnu \
+ info-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-diff install-info-diff
+maybe-install-info-diff:
+
+install-info-diff: \
+ configure-diff \
+ info-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-dosutils install-info-dosutils
+maybe-install-info-dosutils:
+
+install-info-dosutils: \
+ configure-dosutils \
+ info-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-etc install-info-etc
+maybe-install-info-etc:
+
+install-info-etc: \
+ configure-etc \
+ info-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-fastjar install-info-fastjar
+maybe-install-info-fastjar:
+
+install-info-fastjar: \
+ configure-fastjar \
+ info-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-fileutils install-info-fileutils
+maybe-install-info-fileutils:
+
+install-info-fileutils: \
+ configure-fileutils \
+ info-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-findutils install-info-findutils
+maybe-install-info-findutils:
+
+install-info-findutils: \
+ configure-findutils \
+ info-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-find install-info-find
+maybe-install-info-find:
+
+install-info-find: \
+ configure-find \
+ info-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-flex install-info-flex
+maybe-install-info-flex:
+
+install-info-flex: \
+ configure-flex \
+ info-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gas install-info-gas
+maybe-install-info-gas:
+
+install-info-gas: \
+ configure-gas \
+ info-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gawk install-info-gawk
+maybe-install-info-gawk:
+
+install-info-gawk: \
+ configure-gawk \
+ info-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gettext install-info-gettext
+maybe-install-info-gettext:
+
+install-info-gettext: \
+ configure-gettext \
+ info-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gnuserv install-info-gnuserv
+maybe-install-info-gnuserv:
+
+install-info-gnuserv: \
+ configure-gnuserv \
+ info-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gprof install-info-gprof
+maybe-install-info-gprof:
+
+install-info-gprof: \
+ configure-gprof \
+ info-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gzip install-info-gzip
+maybe-install-info-gzip:
+
+install-info-gzip: \
+ configure-gzip \
+ info-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-hello install-info-hello
+maybe-install-info-hello:
+
+install-info-hello: \
+ configure-hello \
+ info-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-indent install-info-indent
+maybe-install-info-indent:
+
+install-info-indent: \
+ configure-indent \
+ info-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-intl install-info-intl
+maybe-install-info-intl:
+
+install-info-intl: \
+ configure-intl \
+ info-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tcl install-info-tcl
+maybe-install-info-tcl:
+
+install-info-tcl: \
+ configure-tcl \
+ info-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-itcl install-info-itcl
+maybe-install-info-itcl:
+
+install-info-itcl: \
+ configure-itcl \
+ info-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-ld install-info-ld
+maybe-install-info-ld:
+
+install-info-ld: \
+ configure-ld \
+ info-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libgui install-info-libgui
+maybe-install-info-libgui:
+
+install-info-libgui: \
+ configure-libgui \
+ info-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libiberty install-info-libiberty
+maybe-install-info-libiberty:
+
+install-info-libiberty: \
+ configure-libiberty \
+ info-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libtool install-info-libtool
+maybe-install-info-libtool:
+
+install-info-libtool: \
+ configure-libtool \
+ info-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-m4 install-info-m4
+maybe-install-info-m4:
+
+install-info-m4: \
+ configure-m4 \
+ info-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-make install-info-make
+maybe-install-info-make:
+
+install-info-make: \
+ configure-make \
+ info-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-mmalloc install-info-mmalloc
+maybe-install-info-mmalloc:
+
+install-info-mmalloc: \
+ configure-mmalloc \
+ info-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-patch install-info-patch
+maybe-install-info-patch:
+
+install-info-patch: \
+ configure-patch \
+ info-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-perl install-info-perl
+maybe-install-info-perl:
+
+install-info-perl: \
+ configure-perl \
+ info-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-prms install-info-prms
+maybe-install-info-prms:
+
+install-info-prms: \
+ configure-prms \
+ info-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-rcs install-info-rcs
+maybe-install-info-rcs:
+
+install-info-rcs: \
+ configure-rcs \
+ info-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-readline install-info-readline
+maybe-install-info-readline:
+
+install-info-readline: \
+ configure-readline \
+ info-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-release install-info-release
+maybe-install-info-release:
+
+install-info-release: \
+ configure-release \
+ info-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-recode install-info-recode
+maybe-install-info-recode:
+
+install-info-recode: \
+ configure-recode \
+ info-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-sed install-info-sed
+maybe-install-info-sed:
+
+install-info-sed: \
+ configure-sed \
+ info-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-send-pr install-info-send-pr
+maybe-install-info-send-pr:
+
+install-info-send-pr: \
+ configure-send-pr \
+ info-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-shellutils install-info-shellutils
+maybe-install-info-shellutils:
+
+install-info-shellutils: \
+ configure-shellutils \
+ info-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-sid install-info-sid
+maybe-install-info-sid:
+
+install-info-sid: \
+ configure-sid \
+ info-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-sim install-info-sim
+maybe-install-info-sim:
+
+install-info-sim: \
+ configure-sim \
+ info-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tar install-info-tar
+maybe-install-info-tar:
+
+install-info-tar: \
+ configure-tar \
+ info-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-texinfo install-info-texinfo
+maybe-install-info-texinfo:
+
+install-info-texinfo: \
+ configure-texinfo \
+ info-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-textutils install-info-textutils
+maybe-install-info-textutils:
+
+install-info-textutils: \
+ configure-textutils \
+ info-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-time install-info-time
+maybe-install-info-time:
+
+install-info-time: \
+ configure-time \
+ info-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-uudecode install-info-uudecode
+maybe-install-info-uudecode:
+
+install-info-uudecode: \
+ configure-uudecode \
+ info-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-wdiff install-info-wdiff
+maybe-install-info-wdiff:
+
+install-info-wdiff: \
+ configure-wdiff \
+ info-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-zip install-info-zip
+maybe-install-info-zip:
+
+install-info-zip: \
+ configure-zip \
+ info-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-zlib install-info-zlib
+maybe-install-info-zlib:
+
+install-info-zlib: \
+ configure-zlib \
+ info-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gdb install-info-gdb
+maybe-install-info-gdb:
+
+install-info-gdb: \
+ configure-gdb \
+ info-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-expect install-info-expect
+maybe-install-info-expect:
+
+install-info-expect: \
+ configure-expect \
+ info-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-guile install-info-guile
+maybe-install-info-guile:
+
+install-info-guile: \
+ configure-guile \
+ info-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tk install-info-tk
+maybe-install-info-tk:
+
+install-info-tk: \
+ configure-tk \
+ info-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tix install-info-tix
+maybe-install-info-tix:
+
+install-info-tix: \
+ configure-tix \
+ info-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libtermcap install-info-libtermcap
+maybe-install-info-libtermcap:
+
+install-info-libtermcap: \
+ configure-libtermcap \
+ info-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-utils install-info-utils
+maybe-install-info-utils:
+
+install-info-utils: \
+ configure-utils \
+ info-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3
+maybe-install-info-target-libstdc++-v3:
+
+install-info-target-libstdc++-v3: \
+ configure-target-libstdc++-v3 \
+ info-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-newlib install-info-target-newlib
+maybe-install-info-target-newlib:
+
+install-info-target-newlib: \
+ configure-target-newlib \
+ info-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c
+maybe-install-info-target-libf2c:
+
+install-info-target-libf2c: \
+ configure-target-libf2c \
+ info-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc
+maybe-install-info-target-libobjc:
+
+install-info-target-libobjc: \
+ configure-target-libobjc \
+ info-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap
+maybe-install-info-target-libtermcap:
+
+install-info-target-libtermcap: \
+ configure-target-libtermcap \
+ info-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-winsup install-info-target-winsup
+maybe-install-info-target-winsup:
+
+install-info-target-winsup: \
+ configure-target-winsup \
+ info-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss
+maybe-install-info-target-libgloss:
+
+install-info-target-libgloss: \
+ configure-target-libgloss \
+ info-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
+maybe-install-info-target-libiberty:
+
+install-info-target-libiberty: \
+ configure-target-libiberty \
+ info-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-gperf install-info-target-gperf
+maybe-install-info-target-gperf:
+
+install-info-target-gperf: \
+ configure-target-gperf \
+ info-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-examples install-info-target-examples
+maybe-install-info-target-examples:
+
+install-info-target-examples: \
+ configure-target-examples \
+ info-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libffi install-info-target-libffi
+maybe-install-info-target-libffi:
+
+install-info-target-libffi: \
+ configure-target-libffi \
+ info-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libjava install-info-target-libjava
+maybe-install-info-target-libjava:
+
+install-info-target-libjava: \
+ configure-target-libjava \
+ info-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-zlib install-info-target-zlib
+maybe-install-info-target-zlib:
+
+install-info-target-zlib: \
+ configure-target-zlib \
+ info-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc
+maybe-install-info-target-boehm-gc:
+
+install-info-target-boehm-gc: \
+ configure-target-boehm-gc \
+ info-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads
+maybe-install-info-target-qthreads:
+
+install-info-target-qthreads: \
+ configure-target-qthreads \
+ info-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-rda install-info-target-rda
+maybe-install-info-target-rda:
+
+install-info-target-rda: \
+ configure-target-rda \
+ info-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
.PHONY: do-installcheck
-do-installcheck:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
- || exit 1; \
- else true; fi; \
- done
+do-installcheck: installcheck-host installcheck-target
+
+.PHONY: installcheck-host
+installcheck-host: maybe-installcheck-gcc \
+ maybe-installcheck-ash \
+ maybe-installcheck-autoconf \
+ maybe-installcheck-automake \
+ maybe-installcheck-bash \
+ maybe-installcheck-bfd \
+ maybe-installcheck-opcodes \
+ maybe-installcheck-binutils \
+ maybe-installcheck-bison \
+ maybe-installcheck-byacc \
+ maybe-installcheck-bzip2 \
+ maybe-installcheck-dejagnu \
+ maybe-installcheck-diff \
+ maybe-installcheck-dosutils \
+ maybe-installcheck-etc \
+ maybe-installcheck-fastjar \
+ maybe-installcheck-fileutils \
+ maybe-installcheck-findutils \
+ maybe-installcheck-find \
+ maybe-installcheck-flex \
+ maybe-installcheck-gas \
+ maybe-installcheck-gawk \
+ maybe-installcheck-gettext \
+ maybe-installcheck-gnuserv \
+ maybe-installcheck-gprof \
+ maybe-installcheck-gzip \
+ maybe-installcheck-hello \
+ maybe-installcheck-indent \
+ maybe-installcheck-intl \
+ maybe-installcheck-tcl \
+ maybe-installcheck-itcl \
+ maybe-installcheck-ld \
+ maybe-installcheck-libgui \
+ maybe-installcheck-libiberty \
+ maybe-installcheck-libtool \
+ maybe-installcheck-m4 \
+ maybe-installcheck-make \
+ maybe-installcheck-mmalloc \
+ maybe-installcheck-patch \
+ maybe-installcheck-perl \
+ maybe-installcheck-prms \
+ maybe-installcheck-rcs \
+ maybe-installcheck-readline \
+ maybe-installcheck-release \
+ maybe-installcheck-recode \
+ maybe-installcheck-sed \
+ maybe-installcheck-send-pr \
+ maybe-installcheck-shellutils \
+ maybe-installcheck-sid \
+ maybe-installcheck-sim \
+ maybe-installcheck-tar \
+ maybe-installcheck-texinfo \
+ maybe-installcheck-textutils \
+ maybe-installcheck-time \
+ maybe-installcheck-uudecode \
+ maybe-installcheck-wdiff \
+ maybe-installcheck-zip \
+ maybe-installcheck-zlib \
+ maybe-installcheck-gdb \
+ maybe-installcheck-expect \
+ maybe-installcheck-guile \
+ maybe-installcheck-tk \
+ maybe-installcheck-tix \
+ maybe-installcheck-libtermcap \
+ maybe-installcheck-utils
+
+.PHONY: installcheck-target
+installcheck-target: \
+ maybe-installcheck-target-libstdc++-v3 \
+ maybe-installcheck-target-newlib \
+ maybe-installcheck-target-libf2c \
+ maybe-installcheck-target-libobjc \
+ maybe-installcheck-target-libtermcap \
+ maybe-installcheck-target-winsup \
+ maybe-installcheck-target-libgloss \
+ maybe-installcheck-target-libiberty \
+ maybe-installcheck-target-gperf \
+ maybe-installcheck-target-examples \
+ maybe-installcheck-target-libffi \
+ maybe-installcheck-target-libjava \
+ maybe-installcheck-target-zlib \
+ maybe-installcheck-target-boehm-gc \
+ maybe-installcheck-target-qthreads \
+ maybe-installcheck-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-installcheck-gcc installcheck-gcc
+maybe-installcheck-gcc:
+installcheck-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-installcheck-ash installcheck-ash
+maybe-installcheck-ash:
+
+installcheck-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-autoconf installcheck-autoconf
+maybe-installcheck-autoconf:
+
+installcheck-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-automake installcheck-automake
+maybe-installcheck-automake:
+
+installcheck-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bash installcheck-bash
+maybe-installcheck-bash:
+
+installcheck-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bfd installcheck-bfd
+maybe-installcheck-bfd:
+
+installcheck-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-opcodes installcheck-opcodes
+maybe-installcheck-opcodes:
+
+installcheck-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-binutils installcheck-binutils
+maybe-installcheck-binutils:
+
+installcheck-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bison installcheck-bison
+maybe-installcheck-bison:
+
+installcheck-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-byacc installcheck-byacc
+maybe-installcheck-byacc:
+
+installcheck-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bzip2 installcheck-bzip2
+maybe-installcheck-bzip2:
+
+installcheck-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu
+maybe-installcheck-dejagnu:
+
+installcheck-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-diff installcheck-diff
+maybe-installcheck-diff:
+
+installcheck-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-dosutils installcheck-dosutils
+maybe-installcheck-dosutils:
+
+installcheck-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-etc installcheck-etc
+maybe-installcheck-etc:
+
+installcheck-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-fastjar installcheck-fastjar
+maybe-installcheck-fastjar:
+
+installcheck-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-fileutils installcheck-fileutils
+maybe-installcheck-fileutils:
+
+installcheck-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-findutils installcheck-findutils
+maybe-installcheck-findutils:
+
+installcheck-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-find installcheck-find
+maybe-installcheck-find:
+
+installcheck-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-flex installcheck-flex
+maybe-installcheck-flex:
+
+installcheck-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gas installcheck-gas
+maybe-installcheck-gas:
+
+installcheck-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gawk installcheck-gawk
+maybe-installcheck-gawk:
+
+installcheck-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gettext installcheck-gettext
+maybe-installcheck-gettext:
+
+installcheck-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv
+maybe-installcheck-gnuserv:
+
+installcheck-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gprof installcheck-gprof
+maybe-installcheck-gprof:
+
+installcheck-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gzip installcheck-gzip
+maybe-installcheck-gzip:
+
+installcheck-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-hello installcheck-hello
+maybe-installcheck-hello:
+
+installcheck-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-indent installcheck-indent
+maybe-installcheck-indent:
+
+installcheck-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-intl installcheck-intl
+maybe-installcheck-intl:
+
+installcheck-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tcl installcheck-tcl
+maybe-installcheck-tcl:
+
+installcheck-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-itcl installcheck-itcl
+maybe-installcheck-itcl:
+
+installcheck-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-ld installcheck-ld
+maybe-installcheck-ld:
+
+installcheck-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libgui installcheck-libgui
+maybe-installcheck-libgui:
+
+installcheck-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libiberty installcheck-libiberty
+maybe-installcheck-libiberty:
+
+installcheck-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libtool installcheck-libtool
+maybe-installcheck-libtool:
+
+installcheck-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-m4 installcheck-m4
+maybe-installcheck-m4:
+
+installcheck-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-make installcheck-make
+maybe-installcheck-make:
+
+installcheck-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc
+maybe-installcheck-mmalloc:
+
+installcheck-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-patch installcheck-patch
+maybe-installcheck-patch:
+
+installcheck-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-perl installcheck-perl
+maybe-installcheck-perl:
+
+installcheck-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-prms installcheck-prms
+maybe-installcheck-prms:
+
+installcheck-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-rcs installcheck-rcs
+maybe-installcheck-rcs:
+
+installcheck-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-readline installcheck-readline
+maybe-installcheck-readline:
+
+installcheck-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-release installcheck-release
+maybe-installcheck-release:
+
+installcheck-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-recode installcheck-recode
+maybe-installcheck-recode:
+
+installcheck-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-sed installcheck-sed
+maybe-installcheck-sed:
+
+installcheck-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-send-pr installcheck-send-pr
+maybe-installcheck-send-pr:
+
+installcheck-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-shellutils installcheck-shellutils
+maybe-installcheck-shellutils:
+
+installcheck-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-sid installcheck-sid
+maybe-installcheck-sid:
+
+installcheck-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-sim installcheck-sim
+maybe-installcheck-sim:
+
+installcheck-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tar installcheck-tar
+maybe-installcheck-tar:
+
+installcheck-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-texinfo installcheck-texinfo
+maybe-installcheck-texinfo:
+
+installcheck-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-textutils installcheck-textutils
+maybe-installcheck-textutils:
+
+installcheck-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-time installcheck-time
+maybe-installcheck-time:
+
+installcheck-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-uudecode installcheck-uudecode
+maybe-installcheck-uudecode:
+
+installcheck-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-wdiff installcheck-wdiff
+maybe-installcheck-wdiff:
+
+installcheck-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-zip installcheck-zip
+maybe-installcheck-zip:
+
+installcheck-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-zlib installcheck-zlib
+maybe-installcheck-zlib:
+
+installcheck-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gdb installcheck-gdb
+maybe-installcheck-gdb:
+
+installcheck-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-expect installcheck-expect
+maybe-installcheck-expect:
+
+installcheck-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-guile installcheck-guile
+maybe-installcheck-guile:
+
+installcheck-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tk installcheck-tk
+maybe-installcheck-tk:
+
+installcheck-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tix installcheck-tix
+maybe-installcheck-tix:
+
+installcheck-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap
+maybe-installcheck-libtermcap:
+
+installcheck-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-utils installcheck-utils
+maybe-installcheck-utils:
+
+installcheck-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3
+maybe-installcheck-target-libstdc++-v3:
+
+installcheck-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
+maybe-installcheck-target-newlib:
+
+installcheck-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c
+maybe-installcheck-target-libf2c:
+
+installcheck-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc
+maybe-installcheck-target-libobjc:
+
+installcheck-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap
+maybe-installcheck-target-libtermcap:
+
+installcheck-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup
+maybe-installcheck-target-winsup:
+
+installcheck-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss
+maybe-installcheck-target-libgloss:
+
+installcheck-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
+maybe-installcheck-target-libiberty:
+
+installcheck-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf
+maybe-installcheck-target-gperf:
+
+installcheck-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-examples installcheck-target-examples
+maybe-installcheck-target-examples:
+
+installcheck-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi
+maybe-installcheck-target-libffi:
+
+installcheck-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava
+maybe-installcheck-target-libjava:
+
+installcheck-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib
+maybe-installcheck-target-zlib:
+
+installcheck-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc
+maybe-installcheck-target-boehm-gc:
+
+installcheck-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads
+maybe-installcheck-target-qthreads:
+
+installcheck-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-rda installcheck-target-rda
+maybe-installcheck-target-rda:
+
+installcheck-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
.PHONY: do-mostlyclean
-do-mostlyclean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
- || exit 1; \
- else true; fi; \
- done
+do-mostlyclean: mostlyclean-host mostlyclean-target
+
+.PHONY: mostlyclean-host
+mostlyclean-host: maybe-mostlyclean-gcc \
+ maybe-mostlyclean-ash \
+ maybe-mostlyclean-autoconf \
+ maybe-mostlyclean-automake \
+ maybe-mostlyclean-bash \
+ maybe-mostlyclean-bfd \
+ maybe-mostlyclean-opcodes \
+ maybe-mostlyclean-binutils \
+ maybe-mostlyclean-bison \
+ maybe-mostlyclean-byacc \
+ maybe-mostlyclean-bzip2 \
+ maybe-mostlyclean-dejagnu \
+ maybe-mostlyclean-diff \
+ maybe-mostlyclean-dosutils \
+ maybe-mostlyclean-etc \
+ maybe-mostlyclean-fastjar \
+ maybe-mostlyclean-fileutils \
+ maybe-mostlyclean-findutils \
+ maybe-mostlyclean-find \
+ maybe-mostlyclean-flex \
+ maybe-mostlyclean-gas \
+ maybe-mostlyclean-gawk \
+ maybe-mostlyclean-gettext \
+ maybe-mostlyclean-gnuserv \
+ maybe-mostlyclean-gprof \
+ maybe-mostlyclean-gzip \
+ maybe-mostlyclean-hello \
+ maybe-mostlyclean-indent \
+ maybe-mostlyclean-intl \
+ maybe-mostlyclean-tcl \
+ maybe-mostlyclean-itcl \
+ maybe-mostlyclean-ld \
+ maybe-mostlyclean-libgui \
+ maybe-mostlyclean-libiberty \
+ maybe-mostlyclean-libtool \
+ maybe-mostlyclean-m4 \
+ maybe-mostlyclean-make \
+ maybe-mostlyclean-mmalloc \
+ maybe-mostlyclean-patch \
+ maybe-mostlyclean-perl \
+ maybe-mostlyclean-prms \
+ maybe-mostlyclean-rcs \
+ maybe-mostlyclean-readline \
+ maybe-mostlyclean-release \
+ maybe-mostlyclean-recode \
+ maybe-mostlyclean-sed \
+ maybe-mostlyclean-send-pr \
+ maybe-mostlyclean-shellutils \
+ maybe-mostlyclean-sid \
+ maybe-mostlyclean-sim \
+ maybe-mostlyclean-tar \
+ maybe-mostlyclean-texinfo \
+ maybe-mostlyclean-textutils \
+ maybe-mostlyclean-time \
+ maybe-mostlyclean-uudecode \
+ maybe-mostlyclean-wdiff \
+ maybe-mostlyclean-zip \
+ maybe-mostlyclean-zlib \
+ maybe-mostlyclean-gdb \
+ maybe-mostlyclean-expect \
+ maybe-mostlyclean-guile \
+ maybe-mostlyclean-tk \
+ maybe-mostlyclean-tix \
+ maybe-mostlyclean-libtermcap \
+ maybe-mostlyclean-utils
+
+.PHONY: mostlyclean-target
+mostlyclean-target: \
+ maybe-mostlyclean-target-libstdc++-v3 \
+ maybe-mostlyclean-target-newlib \
+ maybe-mostlyclean-target-libf2c \
+ maybe-mostlyclean-target-libobjc \
+ maybe-mostlyclean-target-libtermcap \
+ maybe-mostlyclean-target-winsup \
+ maybe-mostlyclean-target-libgloss \
+ maybe-mostlyclean-target-libiberty \
+ maybe-mostlyclean-target-gperf \
+ maybe-mostlyclean-target-examples \
+ maybe-mostlyclean-target-libffi \
+ maybe-mostlyclean-target-libjava \
+ maybe-mostlyclean-target-zlib \
+ maybe-mostlyclean-target-boehm-gc \
+ maybe-mostlyclean-target-qthreads \
+ maybe-mostlyclean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
+maybe-mostlyclean-gcc:
+mostlyclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-mostlyclean-ash mostlyclean-ash
+maybe-mostlyclean-ash:
+
+mostlyclean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf
+maybe-mostlyclean-autoconf:
+
+mostlyclean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-automake mostlyclean-automake
+maybe-mostlyclean-automake:
+
+mostlyclean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bash mostlyclean-bash
+maybe-mostlyclean-bash:
+
+mostlyclean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd
+maybe-mostlyclean-bfd:
+
+mostlyclean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes
+maybe-mostlyclean-opcodes:
+
+mostlyclean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils
+maybe-mostlyclean-binutils:
+
+mostlyclean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bison mostlyclean-bison
+maybe-mostlyclean-bison:
+
+mostlyclean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc
+maybe-mostlyclean-byacc:
+
+mostlyclean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2
+maybe-mostlyclean-bzip2:
+
+mostlyclean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu
+maybe-mostlyclean-dejagnu:
+
+mostlyclean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-diff mostlyclean-diff
+maybe-mostlyclean-diff:
+
+mostlyclean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils
+maybe-mostlyclean-dosutils:
+
+mostlyclean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-etc mostlyclean-etc
+maybe-mostlyclean-etc:
+
+mostlyclean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar
+maybe-mostlyclean-fastjar:
+
+mostlyclean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils
+maybe-mostlyclean-fileutils:
+
+mostlyclean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils
+maybe-mostlyclean-findutils:
+
+mostlyclean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-find mostlyclean-find
+maybe-mostlyclean-find:
+
+mostlyclean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-flex mostlyclean-flex
+maybe-mostlyclean-flex:
+
+mostlyclean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gas mostlyclean-gas
+maybe-mostlyclean-gas:
+
+mostlyclean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk
+maybe-mostlyclean-gawk:
+
+mostlyclean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext
+maybe-mostlyclean-gettext:
+
+mostlyclean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv
+maybe-mostlyclean-gnuserv:
+
+mostlyclean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof
+maybe-mostlyclean-gprof:
+
+mostlyclean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip
+maybe-mostlyclean-gzip:
+
+mostlyclean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-hello mostlyclean-hello
+maybe-mostlyclean-hello:
+
+mostlyclean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-indent mostlyclean-indent
+maybe-mostlyclean-indent:
+
+mostlyclean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-intl mostlyclean-intl
+maybe-mostlyclean-intl:
+
+mostlyclean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl
+maybe-mostlyclean-tcl:
+
+# tcl doesn't support mostlyclean.
+mostlyclean-tcl:
+
+
+.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl
+maybe-mostlyclean-itcl:
+
+mostlyclean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-ld mostlyclean-ld
+maybe-mostlyclean-ld:
+
+mostlyclean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui
+maybe-mostlyclean-libgui:
+
+mostlyclean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty
+maybe-mostlyclean-libiberty:
+
+mostlyclean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool
+maybe-mostlyclean-libtool:
+
+mostlyclean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-m4 mostlyclean-m4
+maybe-mostlyclean-m4:
+
+mostlyclean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-make mostlyclean-make
+maybe-mostlyclean-make:
+
+mostlyclean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc
+maybe-mostlyclean-mmalloc:
+
+mostlyclean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-patch mostlyclean-patch
+maybe-mostlyclean-patch:
+
+mostlyclean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-perl mostlyclean-perl
+maybe-mostlyclean-perl:
+
+mostlyclean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-prms mostlyclean-prms
+maybe-mostlyclean-prms:
+
+mostlyclean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs
+maybe-mostlyclean-rcs:
+
+mostlyclean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-readline mostlyclean-readline
+maybe-mostlyclean-readline:
+
+mostlyclean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-release mostlyclean-release
+maybe-mostlyclean-release:
+
+mostlyclean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-recode mostlyclean-recode
+maybe-mostlyclean-recode:
+
+mostlyclean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-sed mostlyclean-sed
+maybe-mostlyclean-sed:
+
+mostlyclean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr
+maybe-mostlyclean-send-pr:
+
+mostlyclean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils
+maybe-mostlyclean-shellutils:
+
+mostlyclean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-sid mostlyclean-sid
+maybe-mostlyclean-sid:
+
+mostlyclean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-sim mostlyclean-sim
+maybe-mostlyclean-sim:
+
+mostlyclean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tar mostlyclean-tar
+maybe-mostlyclean-tar:
+
+mostlyclean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo
+maybe-mostlyclean-texinfo:
+
+mostlyclean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils
+maybe-mostlyclean-textutils:
+
+mostlyclean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-time mostlyclean-time
+maybe-mostlyclean-time:
+
+mostlyclean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode
+maybe-mostlyclean-uudecode:
+
+mostlyclean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff
+maybe-mostlyclean-wdiff:
+
+mostlyclean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-zip mostlyclean-zip
+maybe-mostlyclean-zip:
+
+mostlyclean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib
+maybe-mostlyclean-zlib:
+
+mostlyclean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb
+maybe-mostlyclean-gdb:
+
+mostlyclean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-expect mostlyclean-expect
+maybe-mostlyclean-expect:
+
+mostlyclean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-guile mostlyclean-guile
+maybe-mostlyclean-guile:
+
+mostlyclean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tk mostlyclean-tk
+maybe-mostlyclean-tk:
+
+mostlyclean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tix mostlyclean-tix
+maybe-mostlyclean-tix:
+
+mostlyclean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap
+maybe-mostlyclean-libtermcap:
+
+# libtermcap doesn't support mostlyclean.
+mostlyclean-libtermcap:
+
+
+.PHONY: maybe-mostlyclean-utils mostlyclean-utils
+maybe-mostlyclean-utils:
+
+mostlyclean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3
+maybe-mostlyclean-target-libstdc++-v3:
+
+mostlyclean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
+maybe-mostlyclean-target-newlib:
+
+mostlyclean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c
+maybe-mostlyclean-target-libf2c:
+
+mostlyclean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc
+maybe-mostlyclean-target-libobjc:
+
+mostlyclean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap
+maybe-mostlyclean-target-libtermcap:
+
+# libtermcap doesn't support mostlyclean.
+mostlyclean-target-libtermcap:
+
+
+.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup
+maybe-mostlyclean-target-winsup:
+
+mostlyclean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss
+maybe-mostlyclean-target-libgloss:
+
+mostlyclean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
+maybe-mostlyclean-target-libiberty:
+
+mostlyclean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf
+maybe-mostlyclean-target-gperf:
+
+mostlyclean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples
+maybe-mostlyclean-target-examples:
+
+mostlyclean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi
+maybe-mostlyclean-target-libffi:
+
+mostlyclean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava
+maybe-mostlyclean-target-libjava:
+
+mostlyclean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib
+maybe-mostlyclean-target-zlib:
+
+mostlyclean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc
+maybe-mostlyclean-target-boehm-gc:
+
+mostlyclean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads
+maybe-mostlyclean-target-qthreads:
+
+mostlyclean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda
+maybe-mostlyclean-target-rda:
+
+mostlyclean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+
+.PHONY: do-clean
+do-clean: clean-host clean-target
+
+.PHONY: clean-host
+clean-host: maybe-clean-gcc \
+ maybe-clean-ash \
+ maybe-clean-autoconf \
+ maybe-clean-automake \
+ maybe-clean-bash \
+ maybe-clean-bfd \
+ maybe-clean-opcodes \
+ maybe-clean-binutils \
+ maybe-clean-bison \
+ maybe-clean-byacc \
+ maybe-clean-bzip2 \
+ maybe-clean-dejagnu \
+ maybe-clean-diff \
+ maybe-clean-dosutils \
+ maybe-clean-etc \
+ maybe-clean-fastjar \
+ maybe-clean-fileutils \
+ maybe-clean-findutils \
+ maybe-clean-find \
+ maybe-clean-flex \
+ maybe-clean-gas \
+ maybe-clean-gawk \
+ maybe-clean-gettext \
+ maybe-clean-gnuserv \
+ maybe-clean-gprof \
+ maybe-clean-gzip \
+ maybe-clean-hello \
+ maybe-clean-indent \
+ maybe-clean-intl \
+ maybe-clean-tcl \
+ maybe-clean-itcl \
+ maybe-clean-ld \
+ maybe-clean-libgui \
+ maybe-clean-libiberty \
+ maybe-clean-libtool \
+ maybe-clean-m4 \
+ maybe-clean-make \
+ maybe-clean-mmalloc \
+ maybe-clean-patch \
+ maybe-clean-perl \
+ maybe-clean-prms \
+ maybe-clean-rcs \
+ maybe-clean-readline \
+ maybe-clean-release \
+ maybe-clean-recode \
+ maybe-clean-sed \
+ maybe-clean-send-pr \
+ maybe-clean-shellutils \
+ maybe-clean-sid \
+ maybe-clean-sim \
+ maybe-clean-tar \
+ maybe-clean-texinfo \
+ maybe-clean-textutils \
+ maybe-clean-time \
+ maybe-clean-uudecode \
+ maybe-clean-wdiff \
+ maybe-clean-zip \
+ maybe-clean-zlib \
+ maybe-clean-gdb \
+ maybe-clean-expect \
+ maybe-clean-guile \
+ maybe-clean-tk \
+ maybe-clean-tix \
+ maybe-clean-libtermcap \
+ maybe-clean-utils
+
+.PHONY: clean-target
+clean-target: \
+ maybe-clean-target-libstdc++-v3 \
+ maybe-clean-target-newlib \
+ maybe-clean-target-libf2c \
+ maybe-clean-target-libobjc \
+ maybe-clean-target-libtermcap \
+ maybe-clean-target-winsup \
+ maybe-clean-target-libgloss \
+ maybe-clean-target-libiberty \
+ maybe-clean-target-gperf \
+ maybe-clean-target-examples \
+ maybe-clean-target-libffi \
+ maybe-clean-target-libjava \
+ maybe-clean-target-zlib \
+ maybe-clean-target-boehm-gc \
+ maybe-clean-target-qthreads \
+ maybe-clean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-clean-gcc clean-gcc
+maybe-clean-gcc:
+clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-clean-ash clean-ash
+maybe-clean-ash:
+
+clean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-autoconf clean-autoconf
+maybe-clean-autoconf:
+
+clean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-automake clean-automake
+maybe-clean-automake:
+
+clean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bash clean-bash
+maybe-clean-bash:
+
+clean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bfd clean-bfd
+maybe-clean-bfd:
+
+clean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-opcodes clean-opcodes
+maybe-clean-opcodes:
+
+clean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-binutils clean-binutils
+maybe-clean-binutils:
+
+clean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bison clean-bison
+maybe-clean-bison:
+
+clean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-byacc clean-byacc
+maybe-clean-byacc:
+
+clean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bzip2 clean-bzip2
+maybe-clean-bzip2:
+
+clean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-dejagnu clean-dejagnu
+maybe-clean-dejagnu:
+
+clean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-diff clean-diff
+maybe-clean-diff:
+
+clean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-dosutils clean-dosutils
+maybe-clean-dosutils:
+
+clean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-etc clean-etc
+maybe-clean-etc:
+
+clean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-fastjar clean-fastjar
+maybe-clean-fastjar:
+
+clean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-fileutils clean-fileutils
+maybe-clean-fileutils:
+
+clean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-findutils clean-findutils
+maybe-clean-findutils:
+
+clean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-find clean-find
+maybe-clean-find:
+
+clean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-flex clean-flex
+maybe-clean-flex:
+
+clean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gas clean-gas
+maybe-clean-gas:
+
+clean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gawk clean-gawk
+maybe-clean-gawk:
+
+clean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gettext clean-gettext
+maybe-clean-gettext:
+
+clean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gnuserv clean-gnuserv
+maybe-clean-gnuserv:
+
+clean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gprof clean-gprof
+maybe-clean-gprof:
+
+clean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gzip clean-gzip
+maybe-clean-gzip:
+
+clean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-hello clean-hello
+maybe-clean-hello:
+
+clean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-indent clean-indent
+maybe-clean-indent:
+
+clean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-intl clean-intl
+maybe-clean-intl:
+
+clean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tcl clean-tcl
+maybe-clean-tcl:
+
+clean-tcl:
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-itcl clean-itcl
+maybe-clean-itcl:
+
+clean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-ld clean-ld
+maybe-clean-ld:
+
+clean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libgui clean-libgui
+maybe-clean-libgui:
+
+clean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libiberty clean-libiberty
+maybe-clean-libiberty:
+
+clean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libtool clean-libtool
+maybe-clean-libtool:
+
+clean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-m4 clean-m4
+maybe-clean-m4:
+
+clean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-make clean-make
+maybe-clean-make:
+
+clean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-mmalloc clean-mmalloc
+maybe-clean-mmalloc:
+
+clean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-patch clean-patch
+maybe-clean-patch:
+
+clean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-perl clean-perl
+maybe-clean-perl:
+
+clean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-prms clean-prms
+maybe-clean-prms:
+
+clean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-rcs clean-rcs
+maybe-clean-rcs:
+
+clean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-readline clean-readline
+maybe-clean-readline:
+
+clean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-release clean-release
+maybe-clean-release:
+
+clean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-recode clean-recode
+maybe-clean-recode:
+
+clean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-sed clean-sed
+maybe-clean-sed:
+
+clean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-send-pr clean-send-pr
+maybe-clean-send-pr:
+
+clean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-shellutils clean-shellutils
+maybe-clean-shellutils:
+
+clean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-sid clean-sid
+maybe-clean-sid:
+
+clean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-sim clean-sim
+maybe-clean-sim:
+
+clean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tar clean-tar
+maybe-clean-tar:
+
+clean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-texinfo clean-texinfo
+maybe-clean-texinfo:
+
+clean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-textutils clean-textutils
+maybe-clean-textutils:
+
+clean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-time clean-time
+maybe-clean-time:
+
+clean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-uudecode clean-uudecode
+maybe-clean-uudecode:
+
+clean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-wdiff clean-wdiff
+maybe-clean-wdiff:
+
+clean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-zip clean-zip
+maybe-clean-zip:
+
+clean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-zlib clean-zlib
+maybe-clean-zlib:
+
+clean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gdb clean-gdb
+maybe-clean-gdb:
+
+clean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-expect clean-expect
+maybe-clean-expect:
+
+clean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-guile clean-guile
+maybe-clean-guile:
+
+clean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tk clean-tk
+maybe-clean-tk:
+
+clean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tix clean-tix
+maybe-clean-tix:
+
+clean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libtermcap clean-libtermcap
+maybe-clean-libtermcap:
+
+# libtermcap doesn't support clean.
+clean-libtermcap:
+
+
+.PHONY: maybe-clean-utils clean-utils
+maybe-clean-utils:
+
+clean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3
+maybe-clean-target-libstdc++-v3:
+
+clean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-newlib clean-target-newlib
+maybe-clean-target-newlib:
+
+clean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libf2c clean-target-libf2c
+maybe-clean-target-libf2c:
+
+clean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libobjc clean-target-libobjc
+maybe-clean-target-libobjc:
+
+clean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap
+maybe-clean-target-libtermcap:
+
+# libtermcap doesn't support clean.
+clean-target-libtermcap:
+
+
+.PHONY: maybe-clean-target-winsup clean-target-winsup
+maybe-clean-target-winsup:
+
+clean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libgloss clean-target-libgloss
+maybe-clean-target-libgloss:
+
+clean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libiberty clean-target-libiberty
+maybe-clean-target-libiberty:
+
+clean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-gperf clean-target-gperf
+maybe-clean-target-gperf:
+
+clean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-examples clean-target-examples
+maybe-clean-target-examples:
+
+clean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libffi clean-target-libffi
+maybe-clean-target-libffi:
+
+clean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libjava clean-target-libjava
+maybe-clean-target-libjava:
+
+clean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-zlib clean-target-zlib
+maybe-clean-target-zlib:
+
+clean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc
+maybe-clean-target-boehm-gc:
+
+clean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-qthreads clean-target-qthreads
+maybe-clean-target-qthreads:
+
+clean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-rda clean-target-rda
+maybe-clean-target-rda:
+
+clean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+
+.PHONY: do-distclean
+do-distclean: distclean-host distclean-target
+
+.PHONY: distclean-host
+distclean-host: maybe-distclean-gcc \
+ maybe-distclean-ash \
+ maybe-distclean-autoconf \
+ maybe-distclean-automake \
+ maybe-distclean-bash \
+ maybe-distclean-bfd \
+ maybe-distclean-opcodes \
+ maybe-distclean-binutils \
+ maybe-distclean-bison \
+ maybe-distclean-byacc \
+ maybe-distclean-bzip2 \
+ maybe-distclean-dejagnu \
+ maybe-distclean-diff \
+ maybe-distclean-dosutils \
+ maybe-distclean-etc \
+ maybe-distclean-fastjar \
+ maybe-distclean-fileutils \
+ maybe-distclean-findutils \
+ maybe-distclean-find \
+ maybe-distclean-flex \
+ maybe-distclean-gas \
+ maybe-distclean-gawk \
+ maybe-distclean-gettext \
+ maybe-distclean-gnuserv \
+ maybe-distclean-gprof \
+ maybe-distclean-gzip \
+ maybe-distclean-hello \
+ maybe-distclean-indent \
+ maybe-distclean-intl \
+ maybe-distclean-tcl \
+ maybe-distclean-itcl \
+ maybe-distclean-ld \
+ maybe-distclean-libgui \
+ maybe-distclean-libiberty \
+ maybe-distclean-libtool \
+ maybe-distclean-m4 \
+ maybe-distclean-make \
+ maybe-distclean-mmalloc \
+ maybe-distclean-patch \
+ maybe-distclean-perl \
+ maybe-distclean-prms \
+ maybe-distclean-rcs \
+ maybe-distclean-readline \
+ maybe-distclean-release \
+ maybe-distclean-recode \
+ maybe-distclean-sed \
+ maybe-distclean-send-pr \
+ maybe-distclean-shellutils \
+ maybe-distclean-sid \
+ maybe-distclean-sim \
+ maybe-distclean-tar \
+ maybe-distclean-texinfo \
+ maybe-distclean-textutils \
+ maybe-distclean-time \
+ maybe-distclean-uudecode \
+ maybe-distclean-wdiff \
+ maybe-distclean-zip \
+ maybe-distclean-zlib \
+ maybe-distclean-gdb \
+ maybe-distclean-expect \
+ maybe-distclean-guile \
+ maybe-distclean-tk \
+ maybe-distclean-tix \
+ maybe-distclean-libtermcap \
+ maybe-distclean-utils
+
+.PHONY: distclean-target
+distclean-target: \
+ maybe-distclean-target-libstdc++-v3 \
+ maybe-distclean-target-newlib \
+ maybe-distclean-target-libf2c \
+ maybe-distclean-target-libobjc \
+ maybe-distclean-target-libtermcap \
+ maybe-distclean-target-winsup \
+ maybe-distclean-target-libgloss \
+ maybe-distclean-target-libiberty \
+ maybe-distclean-target-gperf \
+ maybe-distclean-target-examples \
+ maybe-distclean-target-libffi \
+ maybe-distclean-target-libjava \
+ maybe-distclean-target-zlib \
+ maybe-distclean-target-boehm-gc \
+ maybe-distclean-target-qthreads \
+ maybe-distclean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-distclean-gcc distclean-gcc
+maybe-distclean-gcc:
+distclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-distclean-ash distclean-ash
+maybe-distclean-ash:
+
+distclean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-autoconf distclean-autoconf
+maybe-distclean-autoconf:
+
+distclean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-automake distclean-automake
+maybe-distclean-automake:
+
+distclean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bash distclean-bash
+maybe-distclean-bash:
+
+distclean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bfd distclean-bfd
+maybe-distclean-bfd:
+
+distclean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-opcodes distclean-opcodes
+maybe-distclean-opcodes:
+
+distclean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-binutils distclean-binutils
+maybe-distclean-binutils:
+
+distclean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bison distclean-bison
+maybe-distclean-bison:
+
+distclean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-byacc distclean-byacc
+maybe-distclean-byacc:
+
+distclean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bzip2 distclean-bzip2
+maybe-distclean-bzip2:
+
+distclean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-dejagnu distclean-dejagnu
+maybe-distclean-dejagnu:
+
+distclean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-diff distclean-diff
+maybe-distclean-diff:
+
+distclean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-dosutils distclean-dosutils
+maybe-distclean-dosutils:
+
+distclean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-etc distclean-etc
+maybe-distclean-etc:
+
+distclean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-fastjar distclean-fastjar
+maybe-distclean-fastjar:
+
+distclean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-fileutils distclean-fileutils
+maybe-distclean-fileutils:
+
+distclean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-findutils distclean-findutils
+maybe-distclean-findutils:
+
+distclean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-find distclean-find
+maybe-distclean-find:
+
+distclean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-flex distclean-flex
+maybe-distclean-flex:
+
+distclean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gas distclean-gas
+maybe-distclean-gas:
+
+distclean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gawk distclean-gawk
+maybe-distclean-gawk:
+
+distclean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gettext distclean-gettext
+maybe-distclean-gettext:
+
+distclean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gnuserv distclean-gnuserv
+maybe-distclean-gnuserv:
+
+distclean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gprof distclean-gprof
+maybe-distclean-gprof:
+
+distclean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gzip distclean-gzip
+maybe-distclean-gzip:
+
+distclean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-hello distclean-hello
+maybe-distclean-hello:
+
+distclean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-indent distclean-indent
+maybe-distclean-indent:
+
+distclean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-intl distclean-intl
+maybe-distclean-intl:
+
+distclean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tcl distclean-tcl
+maybe-distclean-tcl:
+
+distclean-tcl:
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-itcl distclean-itcl
+maybe-distclean-itcl:
+
+distclean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-ld distclean-ld
+maybe-distclean-ld:
+
+distclean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libgui distclean-libgui
+maybe-distclean-libgui:
+
+distclean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libiberty distclean-libiberty
+maybe-distclean-libiberty:
+
+distclean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libtool distclean-libtool
+maybe-distclean-libtool:
+
+distclean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-m4 distclean-m4
+maybe-distclean-m4:
+
+distclean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-make distclean-make
+maybe-distclean-make:
+
+distclean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-mmalloc distclean-mmalloc
+maybe-distclean-mmalloc:
+
+distclean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-patch distclean-patch
+maybe-distclean-patch:
+
+distclean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-perl distclean-perl
+maybe-distclean-perl:
+
+distclean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-prms distclean-prms
+maybe-distclean-prms:
+
+distclean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-rcs distclean-rcs
+maybe-distclean-rcs:
+
+distclean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-readline distclean-readline
+maybe-distclean-readline:
+
+distclean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-release distclean-release
+maybe-distclean-release:
+
+distclean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-recode distclean-recode
+maybe-distclean-recode:
+
+distclean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-sed distclean-sed
+maybe-distclean-sed:
+
+distclean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-send-pr distclean-send-pr
+maybe-distclean-send-pr:
+
+distclean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-shellutils distclean-shellutils
+maybe-distclean-shellutils:
+
+distclean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-sid distclean-sid
+maybe-distclean-sid:
+
+distclean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-sim distclean-sim
+maybe-distclean-sim:
+
+distclean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tar distclean-tar
+maybe-distclean-tar:
+
+distclean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-texinfo distclean-texinfo
+maybe-distclean-texinfo:
+
+distclean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-textutils distclean-textutils
+maybe-distclean-textutils:
+
+distclean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-time distclean-time
+maybe-distclean-time:
+
+distclean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-uudecode distclean-uudecode
+maybe-distclean-uudecode:
+
+distclean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-wdiff distclean-wdiff
+maybe-distclean-wdiff:
+
+distclean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-zip distclean-zip
+maybe-distclean-zip:
+
+distclean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-zlib distclean-zlib
+maybe-distclean-zlib:
+
+distclean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gdb distclean-gdb
+maybe-distclean-gdb:
+
+distclean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-expect distclean-expect
+maybe-distclean-expect:
+
+distclean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-guile distclean-guile
+maybe-distclean-guile:
+
+distclean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tk distclean-tk
+maybe-distclean-tk:
+
+distclean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tix distclean-tix
+maybe-distclean-tix:
+
+distclean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libtermcap distclean-libtermcap
+maybe-distclean-libtermcap:
+
+# libtermcap doesn't support distclean.
+distclean-libtermcap:
+
+
+.PHONY: maybe-distclean-utils distclean-utils
+maybe-distclean-utils:
+
+distclean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3
+maybe-distclean-target-libstdc++-v3:
+
+distclean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-newlib distclean-target-newlib
+maybe-distclean-target-newlib:
+
+distclean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c
+maybe-distclean-target-libf2c:
+
+distclean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc
+maybe-distclean-target-libobjc:
+
+distclean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap
+maybe-distclean-target-libtermcap:
+
+# libtermcap doesn't support distclean.
+distclean-target-libtermcap:
+
+
+.PHONY: maybe-distclean-target-winsup distclean-target-winsup
+maybe-distclean-target-winsup:
+
+distclean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss
+maybe-distclean-target-libgloss:
+
+distclean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
+maybe-distclean-target-libiberty:
+
+distclean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-gperf distclean-target-gperf
+maybe-distclean-target-gperf:
+
+distclean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-examples distclean-target-examples
+maybe-distclean-target-examples:
+
+distclean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libffi distclean-target-libffi
+maybe-distclean-target-libffi:
+
+distclean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libjava distclean-target-libjava
+maybe-distclean-target-libjava:
+
+distclean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-zlib distclean-target-zlib
+maybe-distclean-target-zlib:
+
+distclean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc
+maybe-distclean-target-boehm-gc:
+
+distclean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads
+maybe-distclean-target-qthreads:
+
+distclean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-rda distclean-target-rda
+maybe-distclean-target-rda:
+
+distclean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
.PHONY: do-maintainer-clean
-do-maintainer-clean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
- || exit 1; \
- else true; fi; \
- done
+do-maintainer-clean: maintainer-clean-host maintainer-clean-target
+
+.PHONY: maintainer-clean-host
+maintainer-clean-host: maybe-maintainer-clean-gcc \
+ maybe-maintainer-clean-ash \
+ maybe-maintainer-clean-autoconf \
+ maybe-maintainer-clean-automake \
+ maybe-maintainer-clean-bash \
+ maybe-maintainer-clean-bfd \
+ maybe-maintainer-clean-opcodes \
+ maybe-maintainer-clean-binutils \
+ maybe-maintainer-clean-bison \
+ maybe-maintainer-clean-byacc \
+ maybe-maintainer-clean-bzip2 \
+ maybe-maintainer-clean-dejagnu \
+ maybe-maintainer-clean-diff \
+ maybe-maintainer-clean-dosutils \
+ maybe-maintainer-clean-etc \
+ maybe-maintainer-clean-fastjar \
+ maybe-maintainer-clean-fileutils \
+ maybe-maintainer-clean-findutils \
+ maybe-maintainer-clean-find \
+ maybe-maintainer-clean-flex \
+ maybe-maintainer-clean-gas \
+ maybe-maintainer-clean-gawk \
+ maybe-maintainer-clean-gettext \
+ maybe-maintainer-clean-gnuserv \
+ maybe-maintainer-clean-gprof \
+ maybe-maintainer-clean-gzip \
+ maybe-maintainer-clean-hello \
+ maybe-maintainer-clean-indent \
+ maybe-maintainer-clean-intl \
+ maybe-maintainer-clean-tcl \
+ maybe-maintainer-clean-itcl \
+ maybe-maintainer-clean-ld \
+ maybe-maintainer-clean-libgui \
+ maybe-maintainer-clean-libiberty \
+ maybe-maintainer-clean-libtool \
+ maybe-maintainer-clean-m4 \
+ maybe-maintainer-clean-make \
+ maybe-maintainer-clean-mmalloc \
+ maybe-maintainer-clean-patch \
+ maybe-maintainer-clean-perl \
+ maybe-maintainer-clean-prms \
+ maybe-maintainer-clean-rcs \
+ maybe-maintainer-clean-readline \
+ maybe-maintainer-clean-release \
+ maybe-maintainer-clean-recode \
+ maybe-maintainer-clean-sed \
+ maybe-maintainer-clean-send-pr \
+ maybe-maintainer-clean-shellutils \
+ maybe-maintainer-clean-sid \
+ maybe-maintainer-clean-sim \
+ maybe-maintainer-clean-tar \
+ maybe-maintainer-clean-texinfo \
+ maybe-maintainer-clean-textutils \
+ maybe-maintainer-clean-time \
+ maybe-maintainer-clean-uudecode \
+ maybe-maintainer-clean-wdiff \
+ maybe-maintainer-clean-zip \
+ maybe-maintainer-clean-zlib \
+ maybe-maintainer-clean-gdb \
+ maybe-maintainer-clean-expect \
+ maybe-maintainer-clean-guile \
+ maybe-maintainer-clean-tk \
+ maybe-maintainer-clean-tix \
+ maybe-maintainer-clean-libtermcap \
+ maybe-maintainer-clean-utils
+
+.PHONY: maintainer-clean-target
+maintainer-clean-target: \
+ maybe-maintainer-clean-target-libstdc++-v3 \
+ maybe-maintainer-clean-target-newlib \
+ maybe-maintainer-clean-target-libf2c \
+ maybe-maintainer-clean-target-libobjc \
+ maybe-maintainer-clean-target-libtermcap \
+ maybe-maintainer-clean-target-winsup \
+ maybe-maintainer-clean-target-libgloss \
+ maybe-maintainer-clean-target-libiberty \
+ maybe-maintainer-clean-target-gperf \
+ maybe-maintainer-clean-target-examples \
+ maybe-maintainer-clean-target-libffi \
+ maybe-maintainer-clean-target-libjava \
+ maybe-maintainer-clean-target-zlib \
+ maybe-maintainer-clean-target-boehm-gc \
+ maybe-maintainer-clean-target-qthreads \
+ maybe-maintainer-clean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
+maybe-maintainer-clean-gcc:
+maintainer-clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash
+maybe-maintainer-clean-ash:
+
+maintainer-clean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf
+maybe-maintainer-clean-autoconf:
+
+maintainer-clean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake
+maybe-maintainer-clean-automake:
+
+maintainer-clean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash
+maybe-maintainer-clean-bash:
+
+maintainer-clean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd
+maybe-maintainer-clean-bfd:
+
+maintainer-clean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes
+maybe-maintainer-clean-opcodes:
+
+maintainer-clean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils
+maybe-maintainer-clean-binutils:
+
+maintainer-clean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison
+maybe-maintainer-clean-bison:
+
+maintainer-clean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc
+maybe-maintainer-clean-byacc:
+
+maintainer-clean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2
+maybe-maintainer-clean-bzip2:
+
+maintainer-clean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu
+maybe-maintainer-clean-dejagnu:
+
+maintainer-clean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff
+maybe-maintainer-clean-diff:
+
+maintainer-clean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils
+maybe-maintainer-clean-dosutils:
+
+maintainer-clean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc
+maybe-maintainer-clean-etc:
+
+maintainer-clean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar
+maybe-maintainer-clean-fastjar:
+
+maintainer-clean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils
+maybe-maintainer-clean-fileutils:
+
+maintainer-clean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils
+maybe-maintainer-clean-findutils:
+
+maintainer-clean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-find maintainer-clean-find
+maybe-maintainer-clean-find:
+
+maintainer-clean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex
+maybe-maintainer-clean-flex:
+
+maintainer-clean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas
+maybe-maintainer-clean-gas:
+
+maintainer-clean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk
+maybe-maintainer-clean-gawk:
+
+maintainer-clean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext
+maybe-maintainer-clean-gettext:
+
+maintainer-clean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv
+maybe-maintainer-clean-gnuserv:
+
+maintainer-clean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof
+maybe-maintainer-clean-gprof:
+
+maintainer-clean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip
+maybe-maintainer-clean-gzip:
+
+maintainer-clean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello
+maybe-maintainer-clean-hello:
+
+maintainer-clean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent
+maybe-maintainer-clean-indent:
+
+maintainer-clean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl
+maybe-maintainer-clean-intl:
+
+maintainer-clean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl
+maybe-maintainer-clean-tcl:
+
+maintainer-clean-tcl:
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl
+maybe-maintainer-clean-itcl:
+
+maintainer-clean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld
+maybe-maintainer-clean-ld:
+
+maintainer-clean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui
+maybe-maintainer-clean-libgui:
+
+maintainer-clean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty
+maybe-maintainer-clean-libiberty:
+
+maintainer-clean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool
+maybe-maintainer-clean-libtool:
+
+maintainer-clean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4
+maybe-maintainer-clean-m4:
+
+maintainer-clean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-make maintainer-clean-make
+maybe-maintainer-clean-make:
+
+maintainer-clean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc
+maybe-maintainer-clean-mmalloc:
+
+maintainer-clean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch
+maybe-maintainer-clean-patch:
+
+maintainer-clean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl
+maybe-maintainer-clean-perl:
+
+maintainer-clean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms
+maybe-maintainer-clean-prms:
+
+maintainer-clean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs
+maybe-maintainer-clean-rcs:
+
+maintainer-clean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline
+maybe-maintainer-clean-readline:
+
+maintainer-clean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-release maintainer-clean-release
+maybe-maintainer-clean-release:
+
+maintainer-clean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode
+maybe-maintainer-clean-recode:
+
+maintainer-clean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed
+maybe-maintainer-clean-sed:
+
+maintainer-clean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr
+maybe-maintainer-clean-send-pr:
+
+maintainer-clean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils
+maybe-maintainer-clean-shellutils:
+
+maintainer-clean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid
+maybe-maintainer-clean-sid:
+
+maintainer-clean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim
+maybe-maintainer-clean-sim:
+
+maintainer-clean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar
+maybe-maintainer-clean-tar:
+
+maintainer-clean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo
+maybe-maintainer-clean-texinfo:
+
+maintainer-clean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils
+maybe-maintainer-clean-textutils:
+
+maintainer-clean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-time maintainer-clean-time
+maybe-maintainer-clean-time:
+
+maintainer-clean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode
+maybe-maintainer-clean-uudecode:
+
+maintainer-clean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff
+maybe-maintainer-clean-wdiff:
+
+maintainer-clean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip
+maybe-maintainer-clean-zip:
+
+maintainer-clean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib
+maybe-maintainer-clean-zlib:
+
+maintainer-clean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb
+maybe-maintainer-clean-gdb:
+
+maintainer-clean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect
+maybe-maintainer-clean-expect:
+
+maintainer-clean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile
+maybe-maintainer-clean-guile:
+
+maintainer-clean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk
+maybe-maintainer-clean-tk:
+
+maintainer-clean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix
+maybe-maintainer-clean-tix:
+
+maintainer-clean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
+maybe-maintainer-clean-libtermcap:
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-libtermcap:
+
+
+.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils
+maybe-maintainer-clean-utils:
+
+maintainer-clean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3
+maybe-maintainer-clean-target-libstdc++-v3:
+
+maintainer-clean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib
+maybe-maintainer-clean-target-newlib:
+
+maintainer-clean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c
+maybe-maintainer-clean-target-libf2c:
+
+maintainer-clean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc
+maybe-maintainer-clean-target-libobjc:
+
+maintainer-clean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap
+maybe-maintainer-clean-target-libtermcap:
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-target-libtermcap:
+
+
+.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup
+maybe-maintainer-clean-target-winsup:
+
+maintainer-clean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss
+maybe-maintainer-clean-target-libgloss:
+
+maintainer-clean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
+maybe-maintainer-clean-target-libiberty:
+
+maintainer-clean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf
+maybe-maintainer-clean-target-gperf:
+
+maintainer-clean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples
+maybe-maintainer-clean-target-examples:
+
+maintainer-clean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi
+maybe-maintainer-clean-target-libffi:
+
+maintainer-clean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava
+maybe-maintainer-clean-target-libjava:
+
+maintainer-clean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib
+maybe-maintainer-clean-target-zlib:
+
+maintainer-clean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc
+maybe-maintainer-clean-target-boehm-gc:
+
+maintainer-clean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads
+maybe-maintainer-clean-target-qthreads:
+
+maintainer-clean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda
+maybe-maintainer-clean-target-rda:
+
+maintainer-clean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
-.PHONY: do-TAGS
-do-TAGS:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
- || exit 1; \
- else true; fi; \
- done
@@ -1291,33 +17281,8 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
maintainer-clean: local-distclean
realclean: maintainer-clean
-# This rule is used to clean specific modules.
-.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
-$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
- @dir=`echo $@ | sed -e 's/clean-//'`; \
- if [ -f ./$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-.PHONY: $(CLEAN_TARGET_MODULES)
-$(CLEAN_TARGET_MODULES):
- @dir=`echo $@ | sed -e 's/clean-target-//'`; \
- rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
- if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
+# Extra dependency for clean-target, owing to the mixed nature of gcc
+clean-target: clean-target-libgcc
clean-target-libgcc:
test ! -d gcc/libgcc || \
(cd gcc/libgcc && find . -type d -print) | \
@@ -1328,7 +17293,7 @@ clean-target-libgcc:
.PHONY: check do-check
check:
- $(MAKE) do-check NOTPARALLEL=parallel-ok
+ $(MAKE) do-check
# Only include modules actually being configured and built.
do-check: maybe-check-gcc \
@@ -1731,18 +17696,16 @@ configure-ash:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in ash; \
cd ash || exit 1; \
case $(srcdir) in \
@@ -1799,18 +17762,16 @@ configure-autoconf:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in autoconf; \
cd autoconf || exit 1; \
case $(srcdir) in \
@@ -1867,18 +17828,16 @@ configure-automake:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in automake; \
cd automake || exit 1; \
case $(srcdir) in \
@@ -1935,18 +17894,16 @@ configure-bash:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bash; \
cd bash || exit 1; \
case $(srcdir) in \
@@ -2003,18 +17960,16 @@ configure-bfd:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bfd; \
cd bfd || exit 1; \
case $(srcdir) in \
@@ -2071,18 +18026,16 @@ configure-opcodes:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in opcodes; \
cd opcodes || exit 1; \
case $(srcdir) in \
@@ -2139,18 +18092,16 @@ configure-binutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in binutils; \
cd binutils || exit 1; \
case $(srcdir) in \
@@ -2207,18 +18158,16 @@ configure-bison:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bison; \
cd bison || exit 1; \
case $(srcdir) in \
@@ -2249,7 +18198,7 @@ maybe-check-bison:
# This module is only tested in a native toolchain.
check-bison:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -2278,18 +18227,16 @@ configure-byacc:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in byacc; \
cd byacc || exit 1; \
case $(srcdir) in \
@@ -2320,7 +18267,7 @@ maybe-check-byacc:
# This module is only tested in a native toolchain.
check-byacc:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -2349,18 +18296,16 @@ configure-bzip2:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bzip2; \
cd bzip2 || exit 1; \
case $(srcdir) in \
@@ -2417,18 +18362,16 @@ configure-dejagnu:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in dejagnu; \
cd dejagnu || exit 1; \
case $(srcdir) in \
@@ -2485,18 +18428,16 @@ configure-diff:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in diff; \
cd diff || exit 1; \
case $(srcdir) in \
@@ -2553,18 +18494,16 @@ configure-dosutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in dosutils; \
cd dosutils || exit 1; \
case $(srcdir) in \
@@ -2617,18 +18556,16 @@ configure-etc:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in etc; \
cd etc || exit 1; \
case $(srcdir) in \
@@ -2685,18 +18622,16 @@ configure-fastjar:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in fastjar; \
cd fastjar || exit 1; \
case $(srcdir) in \
@@ -2727,7 +18662,7 @@ maybe-check-fastjar:
# This module is only tested in a native toolchain.
check-fastjar:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -2756,18 +18691,16 @@ configure-fileutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in fileutils; \
cd fileutils || exit 1; \
case $(srcdir) in \
@@ -2824,18 +18757,16 @@ configure-findutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in findutils; \
cd findutils || exit 1; \
case $(srcdir) in \
@@ -2892,18 +18823,16 @@ configure-find:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in find; \
cd find || exit 1; \
case $(srcdir) in \
@@ -2960,18 +18889,16 @@ configure-flex:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in flex; \
cd flex || exit 1; \
case $(srcdir) in \
@@ -3002,7 +18929,7 @@ maybe-check-flex:
# This module is only tested in a native toolchain.
check-flex:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -3031,18 +18958,16 @@ configure-gas:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gas; \
cd gas || exit 1; \
case $(srcdir) in \
@@ -3099,18 +19024,16 @@ configure-gawk:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gawk; \
cd gawk || exit 1; \
case $(srcdir) in \
@@ -3167,18 +19090,16 @@ configure-gettext:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gettext; \
cd gettext || exit 1; \
case $(srcdir) in \
@@ -3235,18 +19156,16 @@ configure-gnuserv:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gnuserv; \
cd gnuserv || exit 1; \
case $(srcdir) in \
@@ -3303,18 +19222,16 @@ configure-gprof:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gprof; \
cd gprof || exit 1; \
case $(srcdir) in \
@@ -3371,18 +19288,16 @@ configure-gzip:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gzip; \
cd gzip || exit 1; \
case $(srcdir) in \
@@ -3439,18 +19354,16 @@ configure-hello:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in hello; \
cd hello || exit 1; \
case $(srcdir) in \
@@ -3507,18 +19420,16 @@ configure-indent:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in indent; \
cd indent || exit 1; \
case $(srcdir) in \
@@ -3575,18 +19486,16 @@ configure-intl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in intl; \
cd intl || exit 1; \
case $(srcdir) in \
@@ -3643,18 +19552,16 @@ configure-tcl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tcl; \
cd tcl || exit 1; \
case $(srcdir) in \
@@ -3711,18 +19618,16 @@ configure-itcl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in itcl; \
cd itcl || exit 1; \
case $(srcdir) in \
@@ -3779,18 +19684,16 @@ configure-ld:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in ld; \
cd ld || exit 1; \
case $(srcdir) in \
@@ -3847,18 +19750,16 @@ configure-libgui:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libgui; \
cd libgui || exit 1; \
case $(srcdir) in \
@@ -3915,18 +19816,16 @@ configure-libiberty:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libiberty; \
cd libiberty || exit 1; \
case $(srcdir) in \
@@ -3983,18 +19882,16 @@ configure-libtool:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libtool; \
cd libtool || exit 1; \
case $(srcdir) in \
@@ -4051,18 +19948,16 @@ configure-m4:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in m4; \
cd m4 || exit 1; \
case $(srcdir) in \
@@ -4119,18 +20014,16 @@ configure-make:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in make; \
cd make || exit 1; \
case $(srcdir) in \
@@ -4187,18 +20080,16 @@ configure-mmalloc:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in mmalloc; \
cd mmalloc || exit 1; \
case $(srcdir) in \
@@ -4251,18 +20142,16 @@ configure-patch:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in patch; \
cd patch || exit 1; \
case $(srcdir) in \
@@ -4319,18 +20208,16 @@ configure-perl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in perl; \
cd perl || exit 1; \
case $(srcdir) in \
@@ -4387,18 +20274,16 @@ configure-prms:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in prms; \
cd prms || exit 1; \
case $(srcdir) in \
@@ -4455,18 +20340,16 @@ configure-rcs:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in rcs; \
cd rcs || exit 1; \
case $(srcdir) in \
@@ -4523,18 +20406,16 @@ configure-readline:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in readline; \
cd readline || exit 1; \
case $(srcdir) in \
@@ -4591,18 +20472,16 @@ configure-release:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in release; \
cd release || exit 1; \
case $(srcdir) in \
@@ -4651,18 +20530,16 @@ configure-recode:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in recode; \
cd recode || exit 1; \
case $(srcdir) in \
@@ -4719,18 +20596,16 @@ configure-sed:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in sed; \
cd sed || exit 1; \
case $(srcdir) in \
@@ -4787,18 +20662,16 @@ configure-send-pr:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in send-pr; \
cd send-pr || exit 1; \
case $(srcdir) in \
@@ -4855,18 +20728,16 @@ configure-shellutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in shellutils; \
cd shellutils || exit 1; \
case $(srcdir) in \
@@ -4923,18 +20794,16 @@ configure-sid:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in sid; \
cd sid || exit 1; \
case $(srcdir) in \
@@ -4991,18 +20860,16 @@ configure-sim:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in sim; \
cd sim || exit 1; \
case $(srcdir) in \
@@ -5059,18 +20926,16 @@ configure-tar:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tar; \
cd tar || exit 1; \
case $(srcdir) in \
@@ -5127,18 +20992,16 @@ configure-texinfo:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in texinfo; \
cd texinfo || exit 1; \
case $(srcdir) in \
@@ -5191,18 +21054,16 @@ configure-textutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in textutils; \
cd textutils || exit 1; \
case $(srcdir) in \
@@ -5259,18 +21120,16 @@ configure-time:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in time; \
cd time || exit 1; \
case $(srcdir) in \
@@ -5327,18 +21186,16 @@ configure-uudecode:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in uudecode; \
cd uudecode || exit 1; \
case $(srcdir) in \
@@ -5395,18 +21252,16 @@ configure-wdiff:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in wdiff; \
cd wdiff || exit 1; \
case $(srcdir) in \
@@ -5463,18 +21318,16 @@ configure-zip:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in zip; \
cd zip || exit 1; \
case $(srcdir) in \
@@ -5505,7 +21358,7 @@ maybe-check-zip:
# This module is only tested in a native toolchain.
check-zip:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -5534,18 +21387,16 @@ configure-zlib:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in zlib; \
cd zlib || exit 1; \
case $(srcdir) in \
@@ -5594,18 +21445,16 @@ configure-gdb:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gdb; \
cd gdb || exit 1; \
case $(srcdir) in \
@@ -5662,18 +21511,16 @@ configure-expect:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in expect; \
cd expect || exit 1; \
case $(srcdir) in \
@@ -5730,18 +21577,16 @@ configure-guile:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in guile; \
cd guile || exit 1; \
case $(srcdir) in \
@@ -5798,18 +21643,16 @@ configure-tk:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tk; \
cd tk || exit 1; \
case $(srcdir) in \
@@ -5866,18 +21709,16 @@ configure-tix:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tix; \
cd tix || exit 1; \
case $(srcdir) in \
@@ -5934,18 +21775,16 @@ configure-libtermcap:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libtermcap; \
cd libtermcap || exit 1; \
case $(srcdir) in \
@@ -5998,18 +21837,16 @@ configure-utils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in utils; \
cd utils || exit 1; \
case $(srcdir) in \
@@ -7712,18 +23549,16 @@ configure-gcc:
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gcc; \
cd gcc || exit 1; \
case $(srcdir) in \
@@ -7802,6 +23637,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+profiledbootstrap: all-bootstrap configure-gcc
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Bootstrapping the compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries and training compiler"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building feedback based compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+
.PHONY: cross
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@r=`${PWD}`; export r; \
@@ -7816,7 +23668,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
LANGUAGES="c c++" all
-.PHONY: check-gcc
+.PHONY: check-gcc maybe-check-gcc
maybe-check-gcc:
check-gcc:
@if [ -f ./gcc/Makefile ] ; then \
@@ -7841,7 +23693,7 @@ check-gcc-c++:
.PHONY: check-c++
check-c++:
- $(MAKE) check-target-libstdc++-v3 check-gcc-c++ NOTPARALLEL=parallel-ok
+ $(MAKE) check-target-libstdc++-v3 check-gcc-c++
.PHONY: install-gcc maybe-install-gcc
maybe-install-gcc:
@@ -8038,12 +23890,6 @@ $(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
# Special directives to GNU Make
# ------------------------------
-# Tell GNU make 3.79 not to run the top level in parallel. This
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
# Don't pass command-line variables to submakes.
.NOEXPORT:
MAKEOVERRIDES=
diff --git a/Makefile.tpl b/Makefile.tpl
index c07fed66392..d660e3a4b14 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -29,20 +29,11 @@ in
VPATH=@srcdir@
build_alias=@build_alias@
-build_cpu=@build_cpu@
-build_vendor=@build_vendor@
-build_os=@build_os@
-build_canonical=@build_cpu@-@build_vendor@-@build_os@
+build=@build@
host_alias=@host_alias@
-host_cpu=@host_cpu@
-host_vendor=@host_vendor@
-host_os=@host_os@
-host_canonical=@host_cpu@-@host_vendor@-@host_os@
+host=@host@
target_alias=@target_alias@
-target_cpu=@target_cpu@
-target_vendor=@target_vendor@
-target_os=@target_os@
-target_canonical=@target_cpu@-@target_vendor@-@target_os@
+target=@target@
program_transform_name = @program_transform_name@
@@ -266,7 +257,7 @@ USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \
else \
echo ar | sed '$(program_transform_name)' ; \
@@ -280,7 +271,7 @@ USUAL_AS_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=as ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \
else \
echo as | sed '$(program_transform_name)' ; \
@@ -313,7 +304,7 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \
else \
echo dlltool | sed '$(program_transform_name)' ; \
@@ -329,7 +320,7 @@ USUAL_LD_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=ld ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \
else \
echo ld | sed '$(program_transform_name)' ; \
@@ -345,7 +336,7 @@ USUAL_NM_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=nm ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \
else \
echo nm | sed '$(program_transform_name)' ; \
@@ -357,7 +348,7 @@ USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
if [ x'$(RANLIB)' != x ]; then \
echo $(RANLIB); \
else \
@@ -373,7 +364,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \
else \
echo windres | sed '$(program_transform_name)' ; \
@@ -475,7 +466,6 @@ RECURSE_FLAGS = \
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_HOST_FLAGS = \
'AR=$(AR)' \
'AS=$(AS)' \
@@ -504,7 +494,6 @@ X11_FLAGS_TO_PASS = \
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; the variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$$(AS_FOR_TARGET)' \
@@ -526,7 +515,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# unfortunately needs the native compiler and the target ar and
# ranlib.
# If any variables are added here, they must be added to do-*, below.
-# The HOST_* variables are a special case, which are used for the gcc
+# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
'AR=$(AR)' \
@@ -565,26 +554,6 @@ configure-target: [+
maybe-configure-target-[+module+][+
ENDFOR target_modules +]
-# This is a list of the targets for which we can do a clean-{target}.
-CLEAN_MODULES =[+
- FOR host_modules +][+
- IF (not (or (exist? "no_clean") (exist? "with_x"))) +] \
- clean-[+module+][+
- ENDIF no_clean +][+
- ENDFOR host_modules +]
-
-# All of the target modules that can be cleaned
-CLEAN_TARGET_MODULES =[+
- FOR target_modules +][+
- IF (not (exist? "no_clean")) +] \
- clean-target-[+module+][+
- ENDIF no_clean +][+
- ENDFOR target_modules +]
-
-# All of the x11 modules that can be cleaned
-CLEAN_X11_MODULES = [+ FOR host_modules +][+ IF with_x +]\
- clean-[+module+] [+ ENDIF with_x +][+ ENDFOR host_modules +]
-
# The target built for a native build.
.PHONY: all.normal
all.normal: @all_build_modules@ all-host all-target
@@ -604,59 +573,106 @@ all-target: [+
# ``make X'' in all subdirectories (because, in general, there is a
# dependency (below) of X upon do-X, a ``make X'' will also do this,
# but it may do additional work as well).
-# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
-# because it is so large that it can easily overflow the command line
-# length limit on some systems.
[+ FOR recursive_targets +]
-.PHONY: do-[+target+]
-do-[+target+]:
- @r=`${PWD}`; export r; \
+.PHONY: do-[+make_target+]
+do-[+make_target+]: [+make_target+]-host [+make_target+]-target
+
+.PHONY: [+make_target+]-host
+[+make_target+]-host: maybe-[+make_target+]-gcc [+
+ FOR host_modules +] \
+ maybe-[+make_target+]-[+module+][+
+ ENDFOR host_modules +]
+
+.PHONY: [+make_target+]-target
+[+make_target+]-target: [+
+ FOR target_modules +] \
+ maybe-[+make_target+]-target-[+module+][+
+ ENDFOR target_modules +]
+
+# GCC, the eternal special case
+.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
+maybe-[+make_target+]-gcc:
+[+make_target+]-gcc: [+
+ FOR depend +]\
+ [+depend+]-gcc [+
+ ENDFOR depend +]
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+
+# Host modules.
+[+ FOR host_modules +]
+.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
+maybe-[+make_target+]-[+module+]:
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-[+module+]:
+[+ ELSE +]
+[+make_target+]-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-[+module+] [+
+ ENDFOR depend +]
+ @[ -f ./[+module+]/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+target+]) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in [+module+]" ; \
+ (cd [+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+[+ ENDFOR host_modules +]
+
+# Target modules.
+[+ FOR target_modules +]
+.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
+maybe-[+make_target+]-target-[+module+]:
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-target-[+module+]:
+[+ ELSE +]
+[+make_target+]-target-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-target-[+module+] [+
+ ENDFOR depend +]
+ @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+target+]) \
- || exit 1; \
- else true; fi; \
- done
+ echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+[+ ENDFOR target_modules +]
[+ ENDFOR recursive_targets +]
-
# Here are the targets which correspond to the do-X targets.
.PHONY: info installcheck dvi install-info
@@ -703,33 +719,8 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
maintainer-clean: local-distclean
realclean: maintainer-clean
-# This rule is used to clean specific modules.
-.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
-$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
- @dir=`echo $@ | sed -e 's/clean-//'`; \
- if [ -f ./$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-.PHONY: $(CLEAN_TARGET_MODULES)
-$(CLEAN_TARGET_MODULES):
- @dir=`echo $@ | sed -e 's/clean-target-//'`; \
- rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
- if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
+# Extra dependency for clean-target, owing to the mixed nature of gcc
+clean-target: clean-target-libgcc
clean-target-libgcc:
test ! -d gcc/libgcc || \
(cd gcc/libgcc && find . -type d -print) | \
@@ -740,7 +731,7 @@ clean-target-libgcc:
.PHONY: check do-check
check:
- $(MAKE) do-check NOTPARALLEL=parallel-ok
+ $(MAKE) do-check
# Only include modules actually being configured and built.
do-check: maybe-check-gcc [+
@@ -934,18 +925,16 @@ configure-[+module+]:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in [+module+]; \
cd [+module+] || exit 1; \
case $(srcdir) in \
@@ -981,7 +970,7 @@ check-[+module+]:
[+ ELIF no_check_cross +]
# This module is only tested in a native toolchain.
check-[+module+]:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -1165,18 +1154,16 @@ configure-gcc:
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gcc; \
cd gcc || exit 1; \
case $(srcdir) in \
@@ -1255,6 +1242,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+profiledbootstrap: all-bootstrap configure-gcc
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Bootstrapping the compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries and training compiler"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building feedback based compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+
.PHONY: cross
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@r=`${PWD}`; export r; \
@@ -1269,7 +1273,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
LANGUAGES="c c++" all
-.PHONY: check-gcc
+.PHONY: check-gcc maybe-check-gcc
maybe-check-gcc:
check-gcc:
@if [ -f ./gcc/Makefile ] ; then \
@@ -1294,7 +1298,7 @@ check-gcc-c++:
.PHONY: check-c++
check-c++:
- $(MAKE) check-target-libstdc++-v3 check-gcc-c++ NOTPARALLEL=parallel-ok
+ $(MAKE) check-target-libstdc++-v3 check-gcc-c++
.PHONY: install-gcc maybe-install-gcc
maybe-install-gcc:
@@ -1491,12 +1495,6 @@ $(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
# Special directives to GNU Make
# ------------------------------
-# Tell GNU make 3.79 not to run the top level in parallel. This
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
# Don't pass command-line variables to submakes.
.NOEXPORT:
MAKEOVERRIDES=
diff --git a/README-maintainer-mode b/README-maintainer-mode
index fbe508f0c6e..0115a1ee556 100644
--- a/README-maintainer-mode
+++ b/README-maintainer-mode
@@ -3,7 +3,7 @@
Note that if you configure with --enable-maintainer-mode, you will need
special versions of automake, autoconf, libtool and gettext. You will
-find the sources for these in ftp://sourceware.cygnus.com/pub/binutils.
+find the sources for these in ftp://sources.redhat.com/pub/binutils.
Note - "make distclean" does not work with maintainer mode enabled.
The Makefiles in the some of the po/ subdirectories depend upon the
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 612884f2f39..487f23cf82b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,304 @@
+2003-06-13 Robert Millan <zeratul2@wanadoo.es>
+
+ * config.bfd: Add i386-netbsd-gnu target.
+
+2003-06-12 Nick Clifton <nickc@redhat.com>
+
+ * opncls.c (calc_crc32): Rename to
+ bfd_calc_gnu_debuglink_crc32 and export.
+ (GNU_DEBUGLINK): Define and use to replace occurrences of
+ hard-coded ".gnu_debuglink" in the code.
+ (get_debug_link_info): Prevent aborts by replacing call to
+ xmalloc with a call to malloc.
+ (find_separate_debug_file): Prevent aborts by replacing calls
+ to xmalloc and xstrdup with calls to malloc and strdup.
+ (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
+ section to a bfd.
+ * bfd-in2.h: Regenerate.
+
+2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
+
+ * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
+ New target (was i[3-7]86-*-openbsd* before).
+ (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
+ (vax-*-openbsd*): New target.
+
+2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
+ for n32, too.
+ (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
+ (mips_elf_rel_dyn_section): Use appropriate section alignment.
+ (mips_elf_create_got_section): Likewise.
+ (_bfd_mips_elf_create_dynamic_sections): Likewise.
+
+2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (mips_elf_generic_reloc): New Function.
+ (elf_mips_howto_table_rel): Use it.
+ (gprel32_with_gp): Move prototype.
+ (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
+ Use mips_elf_generic_reloc.
+ (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
+ Code cleanup.
+ (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
+ zero addend.
+ (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
+ as in the other *_gprel*_reloc functions.
+ (gprel32_with_gp): Handle partial_inplace properly.
+ (mips32_64bit_reloc): Use mips_elf_generic_reloc.
+ (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
+ Do addend handling directly instead of calling
+ _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
+ * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
+ of zero addend. Handle partial_inplace properly.
+ (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
+ addend.
+ (mips_elf64_gprel16_reloc): Likewise.
+ (mips_elf64_literal_reloc): Likewise.
+ (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
+ logic as in the other *_gprel*_reloc functions. Handle
+ partial_inplace properly.
+ (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
+ addend. Handle partial_inplace properly.
+ (mips16_gprel_reloc): Likewise. Do addend handling directly instead
+ of calling _bfd_mips_elf_gprel16_with_gp.
+ * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
+ (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
+ of zero addend.
+ (mips_elf_shift6_reloc): Handle partial_inplace properly.
+ (mips16_gprel_reloc): Likewise. Do addend handling directly instead
+ of calling _bfd_mips_elf_gprel16_with_gp.
+ * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
+ partial_inplace properly. Fix wrong addend handling. Fix overflow
+ check.
+ (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
+ exported.
+ (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
+ (_bfd_mips_elf_relocate_section): Likewise.
+ (mips_elf_create_dynamic_relocation): Update sec_info_type access.
+ * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
+ (_bfd_mips_elf_sign_extend): New prototype.
+
+2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
+
+ * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
+ New target (was sparc-*-openbsd* before).
+ (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
+
+ * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
+ * configure: Regenerate.
+
+2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * po/Make-in (DESTDIR): New.
+ (install-data-yes): Support $(DESTDIR).
+ (uninstall): Likewise.
+
+2003-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (config.status): Depend on version.h.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2003-06-10 Alan Modra <amodra@bigpond.net.au>
+ Gary Hade <garyhade@us.ibm.com>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * archures.c (bfd_mach_h8300sxn): New architecture.
+ * bfd-in2.h: Regenerate.
+ * cpu-h8300.c (h8300_scan): Check for 'sxn'.
+ (h8300sxn_info_struct): New.
+ (h8300sx_info_struct): Link to it.
+ * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
+ (elf32_h8_final_write_processing): Likewise.
+
+2003-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
+ elfxx-target.h so that we can use elf_backend_got_header_size.
+ (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
+ (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
+ associated macros.
+ (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
+ dst_mask.
+ (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
+ ppc_stub_plt_branch_r2off.
+ (struct ppc_stub_hash_entry): Reorganize.
+ (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
+ toc_curr, toc_off and emit_stub_syms.
+ (ppc64_elf_link_hash_table_create): Init them.
+ (ppc_stub_name): Correct string size.
+ (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
+ (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
+ used.
+ (ppc_type_of_stub): Tweak root.type test.
+ (build_plt_stub): Remove glink code. Adjust for insn macro changes.
+ (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
+ ppc_stub_plt_branch_r2off.
+ (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
+ range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
+ (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
+ Initialize elf_gp and toc_curr.
+ (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
+ (ppc64_elf_next_input_section): Set toc_off.
+ (group_sections): Ensure groups have the same TOC.
+ (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
+ (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
+ Build new glink stub.
+ (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
+ (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
+ * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
+ (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
+ * section.c (struct sec): Rename flag12 to has_gp_reloc.
+ (STD_SECTION): Update.
+ * ecoff.c (bfd_debug_section): Update comment.
+ * bfd-in2.h: Regenerate.
+
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
+ NULL function pointers.
+
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * simple.c (bfd_simple_get_relocated_section_contents): Call
+ _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
+
+2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
+ ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
+ swaptables.
+ * coff-tic4x.c: Ditto
+ * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
+ and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
+ CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
+ ticoff1_bad_format_hook() functions. Created the coff0 and coff1
+ swap tables.
+ * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
+ * coff-a29k.c: Append COFF_SWAP_TABLE argument
+ * coff-apollo.c: Ditto
+ * coff-arm.c: Ditto
+ * coff-h8300.c: Ditto
+ * coff-h8500.c: Ditto
+ * coff-i960.c: Ditto
+ * coff-m68k.c: Ditto
+ * coff-m88k.c: Ditto
+ * coff-mcore.c: Ditto
+ * coff-sh.c: Ditto
+ * coff-sparc.c: Ditto
+ * coff-tic80.c: Ditto
+ * coff-we32k.c: Ditto
+ * coff-z8k.c: Ditto
+ * coff-w65.c: Ditto
+
+2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
+ initialization bug
+
+2003-06-03 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
+ (bfd_section_from_phdr): Likewise.
+ (map_sections_to_segments): Create PT_GNU_STACK segment header.
+ (get_program_header_size): Count with PT_GNU_STACK.
+ * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
+ * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
+
+2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.h (elf_link_input_bfd): Call linker error_handler
+ for discarded definitions.
+
+2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * syms.c (decode_section_type): Return 'n' if section flags are
+ SEC_HAS_CONTENTS && SEC_READONLY.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
+ R_V850_ABS32. Add entry for R_V850_REL32.
+ (v850_elf_reloc_map): Likewise.
+ (v850_elf_check_relocs): Likewise.
+ (v850_elf_perform_relocation): Likewise.
+ (v850_elf_final_link_relocate): Likewise. Include computation
+ to make R_V850_REl32 pc-relative.
+
+2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
+ and DT_DEBUG dynamic tag even for position independent executables.
+ * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
+
+2003-06-02 Daniel Jacobowitz <drow@mvista.com>
+
+ * config.bfd: Move obsolete entries out of the range of the
+ targmatch sed script.
+
+2003-06-02 Daniel Jacobowitz <drow@mvista.com>
+
+ * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
+
+2003-05-31 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
+ plt entries, not just 8191.
+
+2003-05-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
+ Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
+
+2003-05-30 Ulrich Drepper <drepper@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (elf_link_add_object_symbols): Use !info->executable
+ instead of info->shared where appropriate.
+ (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
+ * elflink.c (_bfd_elf_create_got_section): Likewise.
+ (_bfd_elf_link_create_dynamic_sections): Likewise.
+ (_bfd_elf_link_assign_sym_version): Likewise.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
+ and DT_DEBUG dynamic tag even for position independent executables.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+ * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
+ * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
+ * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
+ * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
+ * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
+
+2003-05-30 Kris Warkentin <kewarken@qnx.com>
+
+ * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
+ signalled thread.
+ (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
+
+2003-05-29 Nick Clifton <nickc@redhat.com>
+
+ * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
+ Tidy up formatting.
+ * Makefile.am: Add dependency on safe-ctype.h.
+ * Makefile.in: Regenerate.
+
+2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c: Don't force symbols local unconditionally.
+
+2003-05-28 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
+ undefined_symbol call.
+
2003-05-27 Richard Sandiford <rsandifo@redhat.com>
* elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
@@ -183,8 +484,8 @@
(allocate_dynrelocs): For undef weak syms with non-default
visibility, a) don't allocate plt entries, b) don't allocate
.got relocs, c) discard dyn rel space
- (sh_elf_relocate_section): d) don't generate .got relocs, e)
- don't generate dynamic relocs.
+ (sh_elf_relocate_section): d) don't generate .got relocs, e)
+ don't generate dynamic relocs.
(sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
for weakdefs when symbol already adjusted.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 5ecaa5b1600..6240f35c251 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -862,8 +862,9 @@ CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
-# We want to rerun configure if config.bfd or configure.host change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
+# We want to rerun configure if config.bfd, configure.host or version.h change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd \
+ $(srcdir)/configure.host $(srcdir)/version.h
$(SHELL) ./config.status --recheck
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -918,7 +919,7 @@ archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
-cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h
+cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
@@ -1207,17 +1208,19 @@ elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h \
- elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h
elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
@@ -1301,9 +1304,11 @@ elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/xtensa.h $(INCDIR)/xtensa-isa.h elf32-target.h
+elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/xtensa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
@@ -1413,8 +1418,8 @@ pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
-pef.lo: pef.c pef.h pef-traceback.h $(INCDIR)/filenames.h \
- $(INCDIR)/libiberty.h
+pef.lo: pef.c $(INCDIR)/safe-ctype.h pef.h pef-traceback.h \
+ $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index d8fc69f4f59..aca93712044 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -809,7 +809,7 @@ configure.in version.h
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -1395,8 +1395,9 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
-# We want to rerun configure if config.bfd or configure.host change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
+# We want to rerun configure if config.bfd, configure.host or version.h change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd \
+ $(srcdir)/configure.host $(srcdir)/version.h
$(SHELL) ./config.status --recheck
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -1451,7 +1452,7 @@ archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
-cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h
+cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
@@ -1740,17 +1741,19 @@ elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h \
- elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h
elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
@@ -1834,9 +1837,11 @@ elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/xtensa.h $(INCDIR)/xtensa-isa.h elf32-target.h
+elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/xtensa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
@@ -1946,8 +1951,8 @@ pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
-pef.lo: pef.c pef.h pef-traceback.h $(INCDIR)/filenames.h \
- $(INCDIR)/libiberty.h
+pef.lo: pef.c $(INCDIR)/safe-ctype.h pef.h pef-traceback.h \
+ $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
diff --git a/bfd/archures.c b/bfd/archures.c
index 250892ce532..6132f155df0 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -170,6 +170,7 @@ DESCRIPTION
.#define bfd_mach_h8300hn 4
.#define bfd_mach_h8300sn 5
.#define bfd_mach_h8300sx 6
+.#define bfd_mach_h8300sxn 7
. bfd_arch_pdp11, {* DEC PDP-11 *}
. bfd_arch_powerpc, {* PowerPC *}
.#define bfd_mach_ppc 32
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8df80a00aa4..072812e4f14 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1,7 +1,7 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+ "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
+ "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
"linker.c" and "simple.c".
Run "make headers" in your build bfd/ to regenerate. */
@@ -905,9 +905,15 @@ bfd_make_writable PARAMS ((bfd *abfd));
bfd_boolean
bfd_make_readable PARAMS ((bfd *abfd));
+unsigned long
+bfd_calc_gnu_debuglink_crc32 PARAMS ((unsigned long crc, const unsigned char *buf, bfd_size_type len));
+
char *
bfd_follow_gnu_debuglink PARAMS ((bfd *abfd, const char *dir));
+bfd_boolean
+bfd_add_gnu_debuglink PARAMS ((bfd * abfd, const char * filename));
+
/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
@@ -1308,8 +1314,10 @@ typedef struct sec
/* Nonzero if this section needs the relax finalize pass. */
unsigned int need_finalize_relax:1;
+ /* Nonzero if this section has a gp reloc. */
+ unsigned int has_gp_reloc:1;
+
/* Usused bits. */
- unsigned int flag12:1;
unsigned int flag13:1;
unsigned int flag14:1;
unsigned int flag15:1;
@@ -1652,6 +1660,7 @@ enum bfd_architecture
#define bfd_mach_h8300hn 4
#define bfd_mach_h8300sn 5
#define bfd_mach_h8300sx 6
+#define bfd_mach_h8300sxn 7
bfd_arch_pdp11, /* DEC PDP-11 */
bfd_arch_powerpc, /* PowerPC */
#define bfd_mach_ppc 32
@@ -1792,7 +1801,7 @@ enum bfd_architecture
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
+#define bfd_mach_msp16 16
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_last
@@ -3480,14 +3489,14 @@ instruction opcode. */
BFD_RELOC_XTENSA_OP1,
BFD_RELOC_XTENSA_OP2,
-/* Xtensa relocation to mark that the assembler expanded the
+/* Xtensa relocation to mark that the assembler expanded the
instructions from an original target. The expansion size is
encoded in the reloc size. */
BFD_RELOC_XTENSA_ASM_EXPAND,
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
+/* Xtensa relocation to mark that the linker should simplify
+assembler-expanded instructions. This is commonly used
+internally by the linker after analysis of a
BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
BFD_RELOC_UNUSED };
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index fd547315fea..844d371a94f 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -580,4 +580,4 @@ coff_a29k_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
#include "coffcode.h"
-CREATE_BIG_COFF_TARGET_VEC (a29kcoff_big_vec, "coff-a29k-big", 0, SEC_READONLY, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (a29kcoff_big_vec, "coff-a29k-big", 0, SEC_READONLY, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-apollo.c b/bfd/coff-apollo.c
index d7b921260bb..cf584538f6e 100644
--- a/bfd/coff-apollo.c
+++ b/bfd/coff-apollo.c
@@ -115,7 +115,7 @@ apollo_howto2rtype (internal)
#endif
#ifdef NAMES_HAVE_UNDERSCORE
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL, COFF_SWAP_TABLE)
#else
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL, COFF_SWAP_TABLE)
#endif
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index f089a6c824d..a88cdba0500 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -2623,5 +2623,5 @@ coff_arm_final_link_postscript (abfd, pfinfo)
extern const bfd_target TARGET_BIG_SYM ;
/* Target vectors. */
-CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM)
-CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM)
+CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM, COFF_SWAP_TABLE)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE)
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index ac091533553..9ef907b87df 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -1398,4 +1398,4 @@ h8300_bfd_link_add_symbols (abfd, info)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-h8500.c b/bfd/coff-h8500.c
index 656bb48f37f..a94e4a30ec6 100644
--- a/bfd/coff-h8500.c
+++ b/bfd/coff-h8500.c
@@ -303,4 +303,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_BIG_COFF_TARGET_VEC (h8500coff_vec, "coff-h8500", 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (h8500coff_vec, "coff-h8500", 0, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index eee6718a5ef..e4dc05322fa 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -617,7 +617,7 @@ coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
extern const bfd_target icoff_big_vec;
-CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec)
+CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec, COFF_SWAP_TABLE)
const bfd_target icoff_big_vec =
{
diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c
index c2c1c295c86..a293b87b991 100644
--- a/bfd/coff-m68k.c
+++ b/bfd/coff-m68k.c
@@ -532,7 +532,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
#endif
#ifdef NAMES_HAVE_UNDERSCORE
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
#else
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, 0, NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, 0, NULL, COFF_SWAP_TABLE)
#endif
diff --git a/bfd/coff-m88k.c b/bfd/coff-m88k.c
index f2d7ecc353f..aa88b99aa5c 100644
--- a/bfd/coff-m88k.c
+++ b/bfd/coff-m88k.c
@@ -288,4 +288,4 @@ reloc_processing (relent, reloc, symbols, abfd, section)
#undef coff_write_armap
-CREATE_BIG_COFF_TARGET_VEC (m88kbcs_vec, "coff-m88kbcs", 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (m88kbcs_vec, "coff-m88kbcs", 0, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 7847bb751b5..c30f5aa9b1d 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -593,7 +593,7 @@ extern const bfd_target TARGET_LITTLE_SYM;
/* The transfer vectors that lead the outside world to all of the above. */
CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED,
(SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
- 0, & TARGET_LITTLE_SYM)
+ 0, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE)
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED,
(SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
- 0, & TARGET_BIG_SYM)
+ 0, & TARGET_BIG_SYM, COFF_SWAP_TABLE)
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index bcf059d299e..c9997dbedd4 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -3132,7 +3132,7 @@ sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order,
/* The target vectors. */
#ifndef TARGET_SHL_SYM
-CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE)
#endif
#ifdef TARGET_SHL_SYM
@@ -3147,10 +3147,10 @@ CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NUL
#ifdef COFF_WITH_PE
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE,
- SEC_CODE | SEC_DATA, '_', NULL);
+ SEC_CODE | SEC_DATA, '_', NULL, COFF_SWAP_TABLE);
#else
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE,
- 0, '_', NULL)
+ 0, '_', NULL, COFF_SWAP_TABLE)
#endif
#ifndef TARGET_SHL_SYM
diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c
index 4053a6d5f4b..acfa6d4924a 100644
--- a/bfd/coff-sparc.c
+++ b/bfd/coff-sparc.c
@@ -216,4 +216,4 @@ rtype2howto (cache_ptr, dst)
#define TARGET_NAME "coff-sparc"
#endif
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c
index 5c8de41995c..708e6264caa 100644
--- a/bfd/coff-tic4x.c
+++ b/bfd/coff-tic4x.c
@@ -32,10 +32,6 @@
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
-static bfd_boolean ticoff0_bad_format_hook
- PARAMS ((bfd *, PTR ));
-static bfd_boolean ticoff1_bad_format_hook
- PARAMS ((bfd *, PTR ));
static bfd_boolean ticoff_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
static bfd_reloc_status_type tic4x_relocation
@@ -50,32 +46,6 @@ static void tic4x_reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection * ));
-static bfd_boolean
-ticoff0_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF0_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
-static bfd_boolean
-ticoff1_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF1_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
static bfd_boolean
@@ -281,353 +251,20 @@ tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
}
-static const bfd_coff_backend_data ticoff0_swap_table =
-{
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
-};
-
-/* COFF1 differs in section header size. */
-static const bfd_coff_backend_data ticoff1_swap_table =
-{
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
-};
-
-
/* TI COFF v0, DOS tools (little-endian headers). */
-const bfd_target tic4x_coff0_vec =
-{
- "coff0-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char. */
- 15, /* ar_max_namelen. */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- NULL,
-
- (PTR)&ticoff0_swap_table
-};
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x", HAS_LOAD_PAGE, 0, '_', NULL, (PTR)&ticoff0_swap_table);
/* TI COFF v0, SPARC tools (big-endian headers). */
-const bfd_target tic4x_coff0_beh_vec =
-{
- "coff0-beh-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_BIG, /* Header byte order is big. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff0_vec,
-
- (PTR)&ticoff0_swap_table
-};
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_vec, (PTR)&ticoff0_swap_table);
/* TI COFF v1, DOS tools (little-endian headers). */
-const bfd_target tic4x_coff1_vec =
-{
- "coff1-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff0_beh_vec,
-
- (PTR)&ticoff1_swap_table
-};
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_beh_vec, (PTR)&ticoff1_swap_table);
/* TI COFF v1, SPARC tools (big-endian headers). */
-const bfd_target tic4x_coff1_beh_vec =
-{
- "coff1-beh-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_BIG, /* Header byte order is big. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff1_vec,
-
- (PTR)&ticoff1_swap_table
-};
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_vec, (PTR)&ticoff1_swap_table);
/* TI COFF v2, TI DOS tools output (little-endian headers). */
-const bfd_target tic4x_coff2_vec =
-{
- "coff2-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff1_beh_vec,
-
- COFF_SWAP_TABLE
-};
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_beh_vec, COFF_SWAP_TABLE);
/* TI COFF v2, TI SPARC tools output (big-endian headers). */
-const bfd_target tic4x_coff2_beh_vec =
-{
- "coff2-beh-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_BIG, /* Header byte order is big. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff2_vec,
-
- COFF_SWAP_TABLE
-};
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff2_vec, COFF_SWAP_TABLE);
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index cf7227c8261..fdf1b5a00c1 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -50,10 +50,6 @@ static reloc_howto_type * tic54x_coff_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void tic54x_lookup_howto
PARAMS ((arelent *, struct internal_reloc *));
-static bfd_boolean ticoff0_bad_format_hook
- PARAMS ((bfd *, PTR));
-static bfd_boolean ticoff1_bad_format_hook
- PARAMS ((bfd *, PTR));
static bfd_boolean ticoff_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
@@ -323,32 +319,6 @@ coff_tic54x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return genrel.howto;
}
-static bfd_boolean
-ticoff0_bad_format_hook (abfd, filehdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF0_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
-static bfd_boolean
-ticoff1_bad_format_hook (abfd, filehdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF1_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
@@ -435,88 +405,6 @@ tic54x_reloc_processing (relent, reloc, symbols, abfd, section)
tic54x_lookup_howto (relent, reloc);
}
-/* COFF0 differs in file/section header size and relocation entry size. */
-static const bfd_coff_backend_data ticoff0_swap_table =
- {
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
- };
-
-/* COFF1 differs in section header size. */
-static const bfd_coff_backend_data ticoff1_swap_table =
- {
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
- };
-
/* TI COFF v0, DOS tools (little-endian headers). */
const bfd_target tic54x_coff0_vec =
{
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 4185e7b18d8..7329b7b0dcd 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -719,4 +719,4 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
#undef C_LASTENT /* Clashes with TIc80's C_STATLAB */
#include "coffcode.h"
-CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL)
+CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c
index 093764a0da0..cc31a23108d 100644
--- a/bfd/coff-w65.c
+++ b/bfd/coff-w65.c
@@ -380,4 +380,4 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_LITTLE_COFF_TARGET_VEC (w65_vec, "coff-w65", BFD_IS_RELAXABLE, 0, '_', NULL)
+CREATE_LITTLE_COFF_TARGET_VEC (w65_vec, "coff-w65", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-we32k.c b/bfd/coff-we32k.c
index fb674a95806..b71df53ce81 100644
--- a/bfd/coff-we32k.c
+++ b/bfd/coff-we32k.c
@@ -66,4 +66,4 @@ static reloc_howto_type howto_table[] =
#define coff_write_armap bsd_write_armap
-CREATE_BIG_COFF_TARGET_VEC (we32kcoff_vec, "coff-we32k", 0, 0, 0, NULL)
+CREATE_BIG_COFF_TARGET_VEC (we32kcoff_vec, "coff-we32k", 0, 0, 0, NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index 068cfac7b6b..3337376fadb 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -350,4 +350,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 31338ee99ea..e9ad4df7e80 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -362,6 +362,12 @@ static unsigned int coff_compute_checksum
static bfd_boolean coff_apply_checksum
PARAMS ((bfd *));
#endif
+#ifdef TICOFF
+static bfd_boolean ticoff0_bad_format_hook
+ PARAMS ((bfd *, PTR ));
+static bfd_boolean ticoff1_bad_format_hook
+ PARAMS ((bfd *, PTR ));
+#endif
/* void warning(); */
@@ -1439,6 +1445,36 @@ coff_bad_format_hook (abfd, filehdr)
return TRUE;
}
+#ifdef TICOFF
+static bfd_boolean
+ticoff0_bad_format_hook (abfd, filehdr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF0_BADMAG (*internal_f))
+ return FALSE;
+
+ return TRUE;
+}
+#endif
+
+#ifdef TICOFF
+static bfd_boolean
+ticoff1_bad_format_hook (abfd, filehdr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF1_BADMAG (*internal_f))
+ return FALSE;
+
+ return TRUE;
+}
+#endif
+
/* Check whether this section uses an alignment other than the
default. */
@@ -5338,6 +5374,92 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
coff_link_output_has_begun, coff_final_link_postscript
};
+#ifdef TICOFF
+/* COFF0 differs in file/section header size and relocation entry size. */
+static const bfd_coff_backend_data ticoff0_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+#endif
+
+#ifdef TICOFF
+/* COFF1 differs in section header size. */
+static const bfd_coff_backend_data ticoff1_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+#endif
+
#ifndef coff_close_and_cleanup
#define coff_close_and_cleanup _bfd_generic_close_and_cleanup
#endif
@@ -5413,7 +5535,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
#define coff_bfd_discard_group bfd_generic_discard_group
#endif
-#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
+#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
const bfd_target VAR = \
{ \
NAME , \
@@ -5460,10 +5582,60 @@ const bfd_target VAR = \
\
ALTERNATIVE, \
\
- COFF_SWAP_TABLE \
+ SWAP_TABLE \
+};
+
+#define CREATE_BIGHDR_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
+const bfd_target VAR = \
+{ \
+ NAME , \
+ bfd_target_coff_flavour, \
+ BFD_ENDIAN_LITTLE, /* data byte order is little */ \
+ BFD_ENDIAN_BIG, /* header byte order is big */ \
+ /* object flags */ \
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
+ /* section flags */ \
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
+ UNDER, /* leading symbol underscore */ \
+ '/', /* ar_pad_char */ \
+ 15, /* ar_max_namelen */ \
+ \
+ /* Data conversion functions. */ \
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
+ \
+ /* Header conversion functions. */ \
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
+ \
+ /* bfd_check_format */ \
+ { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
+ _bfd_dummy_target }, \
+ /* bfd_set_format */ \
+ { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
+ /* bfd_write_contents */ \
+ { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
+ bfd_false }, \
+ \
+ BFD_JUMP_TABLE_GENERIC (coff), \
+ BFD_JUMP_TABLE_COPY (coff), \
+ BFD_JUMP_TABLE_CORE (_bfd_nocore), \
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), \
+ BFD_JUMP_TABLE_SYMBOLS (coff), \
+ BFD_JUMP_TABLE_RELOCS (coff), \
+ BFD_JUMP_TABLE_WRITE (coff), \
+ BFD_JUMP_TABLE_LINK (coff), \
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), \
+ \
+ ALTERNATIVE, \
+ \
+ SWAP_TABLE \
};
-#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
+#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
const bfd_target VAR = \
{ \
NAME , \
@@ -5508,5 +5680,5 @@ const bfd_target VAR = \
\
ALTERNATIVE, \
\
- COFF_SWAP_TABLE \
+ SWAP_TABLE \
};
diff --git a/bfd/config.bfd b/bfd/config.bfd
index d93b07131a7..90b52cc7806 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -68,8 +68,21 @@ esac
# Make sure that the left side always has two dashes. Otherwise you
# can get spurious matches. Even for unambiguous cases, do this as a
# convention, else the table becomes a real mess to understand and maintain.
+#
+# Keep obsolete entries above the START comment, to keep them out of
+# targmatch.h.
case "${targ}" in
+ mips*-dec-bsd*)
+ echo "This target is obsolete and has been removed."
+ exit 1
+ ;;
+
+ mips*-*-pe*)
+ echo "This target is obsolete and has been removed."
+ exit 1
+ ;;
+
# START OF targmatch.h
#ifdef BFD64
alpha*-*-freebsd*)
@@ -433,7 +446,7 @@ case "${targ}" in
targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
esac
;;
- i[3-7]86-*-netbsdelf*)
+ i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
;;
@@ -441,11 +454,16 @@ case "${targ}" in
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"
;;
- i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | i[3-7]86-*-openbsd*)
+ i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
+ i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3])
targ_defvec=i386netbsd_vec
targ_selvecs="bfd_elf32_i386_vec i386bsd_vec"
targ_underscore=yes
;;
+ i[3-7]86-*-openbsd*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386netbsd_vec
+ ;;
i[3-7]86-*-netware*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="nlm32_i386_vec i386coff_vec i386aout_vec"
@@ -718,10 +736,6 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
- mips*-dec-bsd*)
- targ_defvec=aout_mips_little_vec
- targ_underscore=yes
- ;;
mips*-dec-mach3*)
targ_defvec=aout_mips_little_vec
targ_cflags=-DSTAT_FOR_EXEC
@@ -756,11 +770,6 @@ case "${targ}" in
targ_defvec=aout_mips_little_vec
targ_cflags=-DSTAT_FOR_EXEC
;;
- mips*-*-pe*)
- targ_defvec=mipslpe_vec
- targ_selvecs="mipslpei_vec mipslpei_vec ecoff_little_vec ecoff_big_vec"
- targ_underscore=yes
- ;;
mips*-*-sysv4*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
@@ -942,7 +951,6 @@ case "${targ}" in
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
-
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
targ_defvec=bfd_powerpcle_pe_vec
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
@@ -1034,7 +1042,6 @@ case "${targ}" in
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
-
shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
targ_defvec=bfd_elf32_shl_vec
targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"
@@ -1104,10 +1111,14 @@ case "${targ}" in
targ_selvecs=bfd_elf32_sparc_vec
targ_underscore=yes
;;
- sparc-*-openbsd*)
+ sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
targ_defvec=sparcnetbsd_vec
targ_underscore=yes
;;
+ sparc-*-openbsd*)
+ targ_defvec=bfd_elf32_sparc_vec
+ targ_selvecs=sparcnetbsd_vec
+ ;;
sparc-*-elf* | sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sunos_big_vec
@@ -1168,7 +1179,6 @@ case "${targ}" in
targ_underscore=yes
;;
-
v850-*-*)
targ_defvec=bfd_elf32_v850_vec
;;
@@ -1195,6 +1205,11 @@ case "${targ}" in
targ_underscore=yes
;;
+ vax-*-openbsd*)
+ targ_defvec=vaxnetbsd_vec
+ targ_underscore=yes
+ ;;
+
vax*-*-*vms*)
targ_defvec=vms_vax_vec
;;
diff --git a/bfd/config.in b/bfd/config.in
index 222096e3c02..9a73c730252 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -25,9 +25,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -160,15 +157,9 @@
/* Define if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H
diff --git a/bfd/configure b/bfd/configure
index df2d7ff38fc..3b37998b4c2 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -5298,7 +5298,9 @@ rm -f conftest*
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/tahoe.h"'
;;
- vax-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ vax-*-netbsd* | vax-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
vax-*-ultrix2*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
@@ -5334,17 +5336,17 @@ rm -f conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5338: checking for $ac_hdr" >&5
+echo "configure:5340: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5343 "configure"
+#line 5345 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5372,12 +5374,12 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5376: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5378: checking for prstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5381 "configure"
+#line 5383 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5386,7 +5388,7 @@ int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -5408,12 +5410,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5412: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5414: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5417 "configure"
+#line 5419 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5422,7 +5424,7 @@ int main() {
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
@@ -5444,12 +5446,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5448: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5450: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5453 "configure"
+#line 5455 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5458,7 +5460,7 @@ int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
@@ -5480,12 +5482,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5484: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5486: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5489 "configure"
+#line 5491 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5494,7 +5496,7 @@ int main() {
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
@@ -5516,12 +5518,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5520: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5522: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5525 "configure"
+#line 5527 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5530,7 +5532,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5552,12 +5554,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5556: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5558: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5561 "configure"
+#line 5563 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5566,7 +5568,7 @@ int main() {
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
@@ -5588,12 +5590,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5592: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5594: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5597 "configure"
+#line 5599 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5602,7 +5604,7 @@ int main() {
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
@@ -5624,12 +5626,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5628: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5630: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5633 "configure"
+#line 5635 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5638,7 +5640,7 @@ int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -5660,12 +5662,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5664: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5666: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5669 "configure"
+#line 5671 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5674,7 +5676,7 @@ int main() {
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
@@ -5696,12 +5698,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5700: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5702: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5705 "configure"
+#line 5707 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5710,7 +5712,7 @@ int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -5732,12 +5734,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5736: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5738: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5741 "configure"
+#line 5743 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5746,7 +5748,7 @@ int main() {
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
@@ -5768,12 +5770,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5772: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5774: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5777 "configure"
+#line 5779 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5782,7 +5784,7 @@ int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -5804,12 +5806,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5808: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5810: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5813 "configure"
+#line 5815 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5818,7 +5820,7 @@ int main() {
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
@@ -5840,12 +5842,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5844: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5846: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5849 "configure"
+#line 5851 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5854,7 +5856,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
@@ -5876,12 +5878,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5880: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5882: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5885 "configure"
+#line 5887 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5890,7 +5892,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
@@ -5912,12 +5914,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5916: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:5918: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5921 "configure"
+#line 5923 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5926,7 +5928,7 @@ int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -6396,10 +6398,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6400: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6402: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6403 "configure"
+#line 6405 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6445,17 +6447,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6449: checking for $ac_hdr" >&5
+echo "configure:6451: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6454 "configure"
+#line 6456 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6484,12 +6486,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6488: checking for $ac_func" >&5
+echo "configure:6490: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6493 "configure"
+#line 6495 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6512,7 +6514,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6537,7 +6539,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6541: checking for working mmap" >&5
+echo "configure:6543: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6545,7 +6547,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6549 "configure"
+#line 6551 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6685,7 +6687,7 @@ main()
}
EOF
-if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6710,12 +6712,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6714: checking for $ac_func" >&5
+echo "configure:6716: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6719 "configure"
+#line 6721 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6738,7 +6740,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/bfd/configure.in b/bfd/configure.in
index b7081454d67..379b3ac5577 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -359,7 +359,9 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/tahoe.h"'
;;
- vax-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ vax-*-netbsd* | vax-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
vax-*-ultrix2*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index f61e7576a8b..e1c77bfe2e6 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -82,7 +82,13 @@ h8300_scan (info, string)
return (info->mach == bfd_mach_h8300sn);
if (*string == 'x' || *string == 'X')
- return (info->mach == bfd_mach_h8300sx);
+ {
+ string++;
+ if (*string == 'n' || *string == 'N')
+ return (info->mach == bfd_mach_h8300sxn);
+
+ return (info->mach == bfd_mach_h8300sx);
+ }
return (info->mach == bfd_mach_h8300s);
}
@@ -106,6 +112,22 @@ compatible (in, out)
return in;
}
+static const bfd_arch_info_type h8300sxn_info_struct =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_h8300,
+ bfd_mach_h8300sxn,
+ "h8300sxn", /* arch_name */
+ "h8300sxn", /* printable name */
+ 1,
+ FALSE, /* the default machine */
+ compatible,
+ h8300_scan,
+ 0
+};
+
static const bfd_arch_info_type h8300sx_info_struct =
{
32, /* 32 bits in a word */
@@ -119,7 +141,7 @@ static const bfd_arch_info_type h8300sx_info_struct =
FALSE, /* the default machine */
compatible,
h8300_scan,
- 0
+ &h8300sxn_info_struct
};
static const bfd_arch_info_type h8300sn_info_struct =
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 1ba7d56a6e4..4d9b3d49d5e 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -81,8 +81,10 @@ static asection bfd_debug_section =
"*DEBUG*", 0, 0, NULL, 0, 0, 0,
/* linker_mark, linker_has_input, gc_mark, segment_mark, */
0, 0, 0, 0,
- /* sec_info_type, use_rela_p, has_tls_reloc, flag11, flag12, */
- 0, 0, 0, 0, 0,
+ /* sec_info_type, use_rela_p, has_tls_reloc, */
+ 0, 0, 0,
+ /* need_finalize_relax, has_gp_reloc, */
+ 0, 0,
/* flag13, flag14, flag15, flag16, flag20, flag24, */
0, 0, 0, 0, 0, 0,
/* vma, lma, _cooked_size, _raw_size, */
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 1da605502b5..d3973071fb3 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1254,6 +1254,9 @@ struct elf_obj_tdata
/* Number of symbol version references we are about to emit. */
unsigned int cverrefs;
+ /* Segment flags for the PT_GNU_STACK segment. */
+ unsigned int stack_flags;
+
/* Symbol version definitions in external objects. */
Elf_Internal_Verdef *verdef;
diff --git a/bfd/elf.c b/bfd/elf.c
index 66383e7c0d4..906e13d8796 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1070,6 +1070,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
case PT_PHDR: pt = "PHDR"; break;
case PT_TLS: pt = "TLS"; break;
case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
+ case PT_GNU_STACK: pt = "STACK"; break;
default: sprintf (buf, "0x%lx", p->p_type); pt = buf; break;
}
fprintf (f, "%8s off 0x", pt);
@@ -2296,6 +2297,9 @@ bfd_section_from_phdr (abfd, hdr, index)
return _bfd_elf_make_section_from_phdr (abfd, hdr, index,
"eh_frame_hdr");
+ case PT_GNU_STACK:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "stack");
+
default:
/* Check for any processor-specific program segment types.
If no handler for them, default to making "segment" sections. */
@@ -3513,6 +3517,21 @@ map_sections_to_segments (abfd)
pm = &m->next;
}
+ if (elf_tdata (abfd)->stack_flags)
+ {
+ amt = sizeof (struct elf_segment_map);
+ m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_GNU_STACK;
+ m->p_flags = elf_tdata (abfd)->stack_flags;
+ m->p_flags_valid = 1;
+
+ *pm = m;
+ pm = &m->next;
+ }
+
free (sections);
sections = NULL;
@@ -4099,6 +4118,12 @@ get_program_header_size (abfd)
++segs;
}
+ if (elf_tdata (abfd)->stack_flags)
+ {
+ /* We need a PT_GNU_STACK segment. */
+ ++segs;
+ }
+
for (s = abfd->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LOAD) != 0
@@ -7015,18 +7040,30 @@ elfcore_grok_nto_status (abfd, note, tid)
char buf[100];
char *name;
asection *sect;
+ short sig;
+ unsigned flags;
/* nto_procfs_status 'pid' field is at offset 0. */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, (bfd_byte *) ddata);
- /* nto_procfs_status 'tid' field is at offset 4. */
- elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, (bfd_byte *) ddata + 4);
+ /* nto_procfs_status 'tid' field is at offset 4. Pass it back. */
+ *tid = bfd_get_32 (abfd, (bfd_byte *) ddata + 4);
+
+ /* nto_procfs_status 'flags' field is at offset 8. */
+ flags = bfd_get_32 (abfd, (bfd_byte *) ddata + 8);
/* nto_procfs_status 'what' field is at offset 14. */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, (bfd_byte *) ddata + 14);
+ if ((sig = bfd_get_16 (abfd, (bfd_byte *) ddata + 14)) > 0)
+ {
+ elf_tdata (abfd)->core_signal = sig;
+ elf_tdata (abfd)->core_lwpid = *tid;
+ }
- /* Pass tid back. */
- *tid = elf_tdata (abfd)->core_lwpid;
+ /* _DEBUG_FLAG_CURTID (current thread) is 0x80. Some cores
+ do not come from signals so we make sure we set the current
+ thread just in case. */
+ if (flags & 0x00000080)
+ elf_tdata (abfd)->core_lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
sprintf (buf, ".qnx_core_status/%d", *tid);
@@ -7075,7 +7112,11 @@ elfcore_grok_nto_gregs (abfd, note, tid)
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
- return elfcore_maybe_make_sect (abfd, ".reg", sect);
+ /* This is the current thread. */
+ if (elf_tdata (abfd)->core_lwpid == tid)
+ return elfcore_maybe_make_sect (abfd, ".reg", sect);
+
+ return TRUE;
}
#define BFD_QNT_CORE_INFO 7
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index f272dc8e084..e4929fb4ae0 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -582,6 +582,9 @@ elf32_h8_mach (flags)
case E_H8_MACH_H8300SX:
return bfd_mach_h8300sx;
+
+ case E_H8_MACH_H8300SXN:
+ return bfd_mach_h8300sxn;
}
}
@@ -622,6 +625,10 @@ elf32_h8_final_write_processing (abfd, linker)
case bfd_mach_h8300sx:
val = E_H8_MACH_H8300SX;
break;
+
+ case bfd_mach_h8300sxn:
+ val = E_H8_MACH_H8300SXN;
+ break;
}
elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH);
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index becfb73c873..e448c43b2d0 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3666,16 +3666,11 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->elf.root.type == bfd_link_hash_undefweak)
;
- else if (info->shared && !info->no_undefined
+ else if (info->shared
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
&& h->elf.type != STT_PARISC_MILLI)
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->elf.root.root.string, input_bfd,
- input_section, rel->r_offset, FALSE)))
- return FALSE;
- warned_undef = TRUE;
- }
+ ;
else
{
if (!((*info->callbacks->undefined_symbol)
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index cfcb7b34c19..cd3dc9acbe7 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1797,7 +1797,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -1963,7 +1963,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 3b472464b10..67688c996d3 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -47,12 +47,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ECOFF_SIGNED_32
#include "ecoffswap.h"
+static bfd_reloc_status_type mips_elf_generic_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf_hi16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf_lo16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf_got16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type gprel32_with_gp
+ PARAMS ((bfd *, asymbol *, arelent *, asection *, bfd_boolean, PTR,
+ bfd_vma));
static bfd_reloc_status_type mips_elf_gprel32_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips32_64bit_reloc
@@ -116,7 +121,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_NONE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -131,7 +136,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -146,7 +151,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -161,7 +166,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_REL32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -179,7 +184,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC + 4. */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
TRUE, /* partial_inplace */
0x03ffffff, /* src_mask */
@@ -269,7 +274,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_PC16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -284,7 +289,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_CALL16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -320,7 +325,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SHIFT5", /* name */
TRUE, /* partial_inplace */
0x000007c0, /* src_mask */
@@ -337,7 +342,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SHIFT6", /* name */
TRUE, /* partial_inplace */
0x000007c4, /* src_mask */
@@ -367,7 +372,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_DISP", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -382,7 +387,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_PAGE", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -397,7 +402,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_OFST", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -412,7 +417,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_HI16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -427,7 +432,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_LO16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -442,7 +447,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SUB", /* name */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
@@ -462,7 +467,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_HIGHER", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -477,7 +482,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_HIGHEST", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -492,7 +497,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_CALL_HI16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -507,7 +512,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_CALL_LO16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -522,7 +527,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SCN_DISP", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -543,7 +548,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_JALR", /* name */
FALSE, /* partial_inplace */
0x00000000, /* src_mask */
@@ -645,7 +650,7 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GNU_REL16_S2", /* name */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
@@ -661,7 +666,7 @@ static reloc_howto_type elf_mips_gnu_pcrel64 =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_PC64", /* name */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
@@ -677,7 +682,7 @@ static reloc_howto_type elf_mips_gnu_pcrel32 =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_PC32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -716,6 +721,33 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto =
0, /* dst_mask */
FALSE); /* pcrel_offset */
+/* We use this instead of bfd_elf_generic_reloc because the latter
+ gets the handling of zero addends wrong. */
+static bfd_reloc_status_type
+mips_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (symbol->flags & BSF_LOCAL) != 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* Just go on, nothing to see here. */
+ return bfd_reloc_continue;
+}
+
/* Do a R_MIPS_HI16 relocation. This has to be done in combination
with a R_MIPS_LO16 reloc, because there is a carry from the LO16 to
the HI16. Here we just save the information we need; we do the
@@ -761,7 +793,7 @@ mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -923,8 +955,8 @@ mips_elf_lo16_reloc (abfd, reloc_entry, symbol, data, input_section,
}
/* Now do the LO16 reloc in the usual way. */
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
+ return mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
/* Do a R_MIPS_GOT16 reloc. This is a reloc against the global offset
@@ -956,20 +988,14 @@ mips_elf_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
- /* If we're relocating, and this is a local symbol, we can handle it
- just like HI16. */
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) != 0)
- return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-
- abort ();
+ return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
@@ -1087,13 +1113,11 @@ _bfd_mips_elf32_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1120,10 +1144,6 @@ _bfd_mips_elf32_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
/* Do a R_MIPS_GPREL32 relocation. This is a 32 bit value which must
become the offset from the gp register. */
-static bfd_reloc_status_type gprel32_with_gp
- PARAMS ((bfd *, asymbol *, arelent *, asection *, bfd_boolean, PTR,
- bfd_vma));
-
static bfd_reloc_status_type
mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
@@ -1139,13 +1159,11 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
*error_message = (char *)
_("32bits gp relative relocation occurs for an external symbol");
@@ -1153,21 +1171,18 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
}
if (output_bfd != (bfd *) NULL)
- {
- relocateable = TRUE;
- gp = _bfd_get_gp_value (output_bfd);
- }
+ relocateable = TRUE;
else
{
relocateable = FALSE;
output_bfd = symbol->section->output_section->owner;
-
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable,
- error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
}
+ ret = mips_elf_final_gp (output_bfd, symbol, relocateable,
+ error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
relocateable, data, gp);
}
@@ -1184,7 +1199,7 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
bfd_vma gp;
{
bfd_vma relocation;
- unsigned long val;
+ bfd_vma val;
if (bfd_is_com_section (symbol->section))
relocation = 0;
@@ -1197,10 +1212,11 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- val = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
/* Set val to the offset into the section or symbol. */
- val += reloc_entry->addend;
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
/* Adjust val for the final section location and GP value. If we
are producing relocateable output, we don't want to do this for
@@ -1209,7 +1225,10 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- bfd_put_32 (abfd, (bfd_vma) val, (bfd_byte *) data + reloc_entry->address);
+ if (reloc_entry->howto->partial_inplace)
+ bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ else
+ reloc_entry->addend = val;
if (relocateable)
reloc_entry->address += input_section->output_offset;
@@ -1237,8 +1256,8 @@ mips32_64bit_reloc (abfd, reloc_entry, symbol, data, input_section,
unsigned long val;
bfd_size_type addr;
- r = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
+ r = mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
if (r != bfd_reloc_continue)
return r;
@@ -1315,16 +1334,16 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_boolean relocateable;
bfd_reloc_status_type ret;
bfd_vma gp;
- unsigned short extend, insn;
- unsigned long final;
+ unsigned short extend = 0;
+ unsigned short insn = 0;
+ bfd_signed_vma val;
+ bfd_vma relocation;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1346,33 +1365,55 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
-
- /* Stuff the current addend back as a 32 bit value, do the usual
- relocation, and then clean up. */
- bfd_put_32 (abfd,
- (bfd_vma) (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- (bfd_byte *) data + reloc_entry->address);
-
- ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-
- final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((insn & 0xffe0)
- | (final & 0x1f)),
- (bfd_byte *) data + reloc_entry->address + 2);
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
- return ret;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+ val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ }
+
+ _bfd_mips_elf_sign_extend(val, 16);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocateable output, we don't want to do this for
+ an external symbol. */
+ if (! relocateable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((val >> 11) & 0x1f)
+ | (val & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (val & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+ }
+ else
+ reloc_entry->addend = val;
+
+ if (relocateable)
+ reloc_entry->address += input_section->output_offset;
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1e1ab8cce3b..d2cbd836f40 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2719,7 +2719,7 @@ allocate_dynrelocs (h, inf)
for two entries is allocated. */
s->_raw_size += PLT_ENTRY_SIZE;
if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- >= PLT_NUM_SINGLE_ENTRIES)
+ > PLT_NUM_SINGLE_ENTRIES)
s->_raw_size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
@@ -2920,7 +2920,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -3102,7 +3102,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 9475f60a669..97be1dbd013 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1927,7 +1927,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -2085,7 +2085,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 4ff31bfb695..2042c34dec2 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -4338,7 +4338,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
if (htab->root.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -4500,7 +4500,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (! add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index e2c65448150..5f1bec589c7 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1820,7 +1820,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1997,7 +1997,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 62bbbdacf21..99c007768ac 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -189,7 +189,7 @@ static reloc_howto_type v850_elf_howto_table[] =
FALSE), /* pcrel_offset */
/* Simple 32bit reloc. */
- HOWTO (R_V850_32, /* type */
+ HOWTO (R_V850_ABS32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
@@ -197,7 +197,7 @@ static reloc_howto_type v850_elf_howto_table[] =
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
v850_elf_reloc, /* special_function */
- "R_V850_32", /* name */
+ "R_V850_ABS32", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -518,6 +518,21 @@ static reloc_howto_type v850_elf_howto_table[] =
0, /* src_mask */
0, /* dst_mask */
TRUE), /* pcrel_offset */
+
+ /* Simple pc-relative 32bit reloc. */
+ HOWTO (R_V850_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_REL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* Map BFD reloc types to V850 ELF reloc types. */
@@ -538,7 +553,8 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] =
{ BFD_RELOC_HI16_S, R_V850_HI16_S },
{ BFD_RELOC_HI16, R_V850_HI16 },
{ BFD_RELOC_LO16, R_V850_LO16 },
- { BFD_RELOC_32, R_V850_32 },
+ { BFD_RELOC_32, R_V850_ABS32 },
+ { BFD_RELOC_32_PCREL, R_V850_REL32 },
{ BFD_RELOC_16, R_V850_16 },
{ BFD_RELOC_8, R_V850_8 },
{ BFD_RELOC_V850_SDA_16_16_OFFSET, R_V850_SDA_16_16_OFFSET },
@@ -672,7 +688,8 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
case R_V850_HI16_S:
case R_V850_HI16:
case R_V850_LO16:
- case R_V850_32:
+ case R_V850_ABS32:
+ case R_V850_REL32:
case R_V850_16:
case R_V850_8:
case R_V850_CALLT_6_7_OFFSET:
@@ -905,7 +922,8 @@ v850_elf_perform_relocation (abfd, r_type, addend, address)
/* fprintf (stderr, "reloc type %d not SUPPORTED\n", r_type ); */
return bfd_reloc_notsupported;
- case R_V850_32:
+ case R_V850_REL32:
+ case R_V850_ABS32:
bfd_put_32 (abfd, addend, address);
return bfd_reloc_ok;
@@ -1466,11 +1484,17 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
value = SEXT24 (value);
break;
+ case R_V850_REL32:
+ value -= (input_section->output_section->vma
+ + input_section->output_offset
+ + offset);
+ break;
+
case R_V850_HI16_S:
case R_V850_HI16:
case R_V850_LO16:
case R_V850_16:
- case R_V850_32:
+ case R_V850_ABS32:
case R_V850_8:
break;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 9ce3bf3b56a..58ab6ba7a5d 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4090,7 +4090,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (!info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -4176,7 +4176,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index a43b3da9f70..baf030ab608 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1447,15 +1447,17 @@ mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
- if (((reloc_entry->addend & 0xffff) + 0x8000) & ~0xffff)
- reloc_entry->addend += 0x8000;
+ if (reloc_entry->howto->partial_inplace)
+ {
+ if (((reloc_entry->addend & 0xffff) + 0x8000) & ~0xffff)
+ reloc_entry->addend += 0x8000;
+ }
return bfd_reloc_continue;
}
@@ -1488,7 +1490,8 @@ mips_elf64_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
/* If we're relocating, and this is a local symbol, we can handle it
just like an R_MIPS_HI16. */
if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) != 0)
+ && ((symbol->flags & BSF_SECTION_SYM) != 0
+ || (symbol->flags & BSF_LOCAL) == 0))
return mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
@@ -1610,14 +1613,11 @@ mips_elf64_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1662,8 +1662,7 @@ mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1706,15 +1705,13 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_reloc_status_type ret;
bfd_vma gp;
bfd_vma relocation;
- unsigned long val;
+ bfd_vma val;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
*error_message = (char *)
_("32bits gp relative relocation occurs for an external symbol");
@@ -1722,21 +1719,18 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
}
if (output_bfd != (bfd *) NULL)
- {
- relocateable = TRUE;
- gp = _bfd_get_gp_value (output_bfd);
- }
+ relocateable = TRUE;
else
{
relocateable = FALSE;
output_bfd = symbol->section->output_section->owner;
-
- ret = mips_elf64_final_gp (output_bfd, symbol, relocateable,
- error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
}
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocateable,
+ error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
if (bfd_is_com_section (symbol->section))
relocation = 0;
else
@@ -1748,16 +1742,11 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- if (reloc_entry->howto->src_mask == 0)
- {
- /* This case arises with the 64-bit MIPS ELF ABI. */
- val = 0;
- }
- else
- val = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
/* Set val to the offset into the section or symbol. */
- val += reloc_entry->addend;
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
/* Adjust val for the final section location and GP value. If we
are producing relocateable output, we don't want to do this for
@@ -1766,7 +1755,10 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ if (reloc_entry->howto->partial_inplace)
+ bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ else
+ reloc_entry->addend = val;
if (relocateable)
reloc_entry->address += input_section->output_offset;
@@ -1792,15 +1784,17 @@ mips_elf64_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
- reloc_entry->addend = (reloc_entry->addend & 0x00007c0)
- | (reloc_entry->addend & 0x00000800) >> 9;
+ if (reloc_entry->howto->partial_inplace)
+ {
+ reloc_entry->addend = ((reloc_entry->addend & 0x00007c0)
+ | (reloc_entry->addend & 0x00000800) >> 9);
+ }
return bfd_reloc_continue;
}
@@ -1857,16 +1851,16 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_boolean relocateable;
bfd_reloc_status_type ret;
bfd_vma gp;
- unsigned short extend, insn;
- unsigned long final;
+ unsigned short extend = 0;
+ unsigned short insn = 0;
+ bfd_signed_vma val;
+ bfd_vma relocation;
/* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ addend, we don't want to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1888,33 +1882,55 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
-
- /* Stuff the current addend back as a 32 bit value, do the usual
- relocation, and then clean up. */
- bfd_put_32 (abfd,
- (bfd_vma) (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- (bfd_byte *) data + reloc_entry->address);
-
- ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-
- final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((insn & 0xffe0)
- | (final & 0x1f)),
- (bfd_byte *) data + reloc_entry->address + 2);
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
- return ret;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+ val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ }
+
+ _bfd_mips_elf_sign_extend(val, 16);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocateable output, we don't want to do this for
+ an external symbol. */
+ if (! relocateable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((val >> 11) & 0x1f)
+ | (val & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (val & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+ }
+ else
+ reloc_entry->addend = val;
+
+ if (relocateable)
+ reloc_entry->address += input_section->output_offset;
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index f32d261fe6e..bc47809a709 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -60,6 +60,47 @@ static bfd_boolean ppc64_elf_new_section_hook
PARAMS ((bfd *, asection *));
+#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
+#define TARGET_LITTLE_NAME "elf64-powerpcle"
+#define TARGET_BIG_SYM bfd_elf64_powerpc_vec
+#define TARGET_BIG_NAME "elf64-powerpc"
+#define ELF_ARCH bfd_arch_powerpc
+#define ELF_MACHINE_CODE EM_PPC64
+#define ELF_MAXPAGESIZE 0x10000
+#define elf_info_to_howto ppc64_elf_info_to_howto
+
+#define elf_backend_want_got_sym 0
+#define elf_backend_want_plt_sym 0
+#define elf_backend_plt_alignment 3
+#define elf_backend_plt_not_loaded 1
+#define elf_backend_got_symbol_offset 0
+#define elf_backend_got_header_size 8
+#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
+#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
+#define elf_backend_rela_normal 1
+
+#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
+#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
+#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
+#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
+#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
+
+#define elf_backend_object_p ppc64_elf_object_p
+#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
+#define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
+#define elf_backend_check_relocs ppc64_elf_check_relocs
+#define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
+#define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
+#define elf_backend_hide_symbol ppc64_elf_hide_symbol
+#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
+#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
+#define elf_backend_relocate_section ppc64_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
+#define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
+#define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections
+
/* The name of the dynamic interpreter. This is put in the .interp
section. */
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
@@ -77,7 +118,10 @@ static bfd_boolean ppc64_elf_new_section_hook
#define TP_OFFSET 0x7000
#define DTP_OFFSET 0x8000
-/* .plt call stub instructions. */
+/* .plt call stub instructions. The normal stub is like this, but
+ sometimes the .plt entry crosses a 64k boundary and we need to
+ insert an addis to adjust r12. */
+#define PLT_CALL_STUB_SIZE (7*4)
#define ADDIS_R12_R2 0x3d820000 /* addis %r12,%r2,xxx@ha */
#define STD_R2_40R1 0xf8410028 /* std %r2,40(%r1) */
#define LD_R11_0R12 0xe96c0000 /* ld %r11,xxx+0@l(%r12) */
@@ -86,19 +130,31 @@ static bfd_boolean ppc64_elf_new_section_hook
/* ld %r11,xxx+16@l(%r12) */
#define BCTR 0x4e800420 /* bctr */
-/* The normal stub is this size. */
-#define PLT_CALL_STUB_SIZE (7*4)
-
-/* But sometimes the .plt entry crosses a 64k boundary, and we need
- to adjust the high word with this insn. */
-#define ADDIS_R12_R12_1 0x3d8c0001 /* addis %r12,%r12,1 */
-
-/* The .glink fixup call stub is the same as the .plt call stub, but
- the first instruction restores r2, and the std is omitted. */
-#define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
-/* Always allow this much space. */
-#define GLINK_CALL_STUB_SIZE (8*4)
+#define ADDIS_R2_R2 0x3c420000 /* addis %r2,%r2,off@ha */
+#define ADDI_R2_R2 0x38420000 /* addi %r2,%r2,off@l */
+
+#define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
+
+/* glink call stub instructions. We enter with the index in R0, and the
+ address of glink entry in CTR. From that, we can calculate PLT0. */
+#define GLINK_CALL_STUB_SIZE (16*4)
+#define MFCTR_R12 0x7d8902a6 /* mfctr %r12 */
+#define SLDI_R11_R0_3 0x780b1f24 /* sldi %r11,%r0,3 */
+#define ADDIC_R2_R0_32K 0x34408000 /* addic. %r2,%r0,-32768 */
+#define SUB_R12_R12_R11 0x7d8b6050 /* sub %r12,%r12,%r11 */
+#define SRADI_R2_R2_63 0x7c42fe76 /* sradi %r2,%r2,63 */
+#define SLDI_R11_R0_2 0x780b1764 /* sldi %r11,%r0,2 */
+#define AND_R2_R2_R11 0x7c425838 /* and %r2,%r2,%r11 */
+ /* sub %r12,%r12,%r11 */
+#define ADD_R12_R12_R2 0x7d8c1214 /* add %r12,%r12,%r2 */
+#define ADDIS_R12_R12 0x3d8c0000 /* addis %r12,%r12,xxx@ha */
+ /* ld %r11,xxx@l(%r12) */
+#define ADDI_R12_R12 0x398c0000 /* addi %r12,%r12,xxx@l */
+ /* ld %r2,8(%r12) */
+ /* mtctr %r11 */
+ /* ld %r11,16(%r12) */
+ /* bctr */
/* Pad with this. */
#define NOP 0x60000000
@@ -1718,7 +1774,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
"R_PPC64_GOT_TPREL16_DS", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
/* Like GOT_TPREL16_DS, but no overflow. */
@@ -1733,7 +1789,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
"R_PPC64_GOT_TPREL16_LO_DS", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
/* Like GOT_TPREL16_LO_DS, but next higher group of 16 bits. */
@@ -2574,12 +2630,31 @@ struct plt_entry
. mtctr %r11
. ld %r11,xxx+16@toc@l(%r12)
. bctr
+
+ ppc_stub_long_branch and ppc_stub_plt_branch may also have additional
+ code to adjust the value and save r2 to support multiple toc sections.
+ A ppc_stub_long_branch with an r2 offset looks like:
+ . std %r2,40(%r1)
+ . addis %r2,%r2,off@ha
+ . addi %r2,%r2,off@l
+ . b dest
+
+ A ppc_stub_plt_branch with an r2 offset looks like:
+ . std %r2,40(%r1)
+ . addis %r12,%r2,xxx@toc@ha
+ . ld %r11,xxx@toc@l(%r12)
+ . addis %r2,%r2,off@ha
+ . addi %r2,%r2,off@l
+ . mtctr %r11
+ . bctr
*/
enum ppc_stub_type {
ppc_stub_none,
ppc_stub_long_branch,
+ ppc_stub_long_branch_r2off,
ppc_stub_plt_branch,
+ ppc_stub_plt_branch_r2off,
ppc_stub_plt_call
};
@@ -2588,6 +2663,8 @@ struct ppc_stub_hash_entry {
/* Base hash table entry structure. */
struct bfd_hash_entry root;
+ enum ppc_stub_type stub_type;
+
/* The stub section. */
asection *stub_sec;
@@ -2599,8 +2676,6 @@ struct ppc_stub_hash_entry {
bfd_vma target_value;
asection *target_section;
- enum ppc_stub_type stub_type;
-
/* The symbol table entry, if any, that this was derived from. */
struct ppc_link_hash_entry *h;
@@ -2687,8 +2762,17 @@ struct ppc_link_hash_table
asection *link_sec;
/* The stub section. */
asection *stub_sec;
+ /* Along with elf_gp, specifies the TOC pointer used in this group. */
+ bfd_vma toc_off;
} *stub_group;
+ /* Support for multiple toc sections. */
+ unsigned int no_multi_toc;
+ unsigned int multi_toc_needed;
+
+ /* Temp used when calculating TOC pointers. */
+ bfd_vma toc_curr;
+
/* Assorted information used by ppc64_elf_size_stubs. */
int top_index;
asection **input_list;
@@ -2717,6 +2801,9 @@ struct ppc_link_hash_table
bfd_vma offset;
} tlsld_got;
+ /* Set if we should emit symbols for stubs. */
+ unsigned int emit_stub_syms;
+
/* Set on error. */
unsigned int stub_error;
@@ -2799,7 +2886,7 @@ static enum ppc_stub_type ppc_type_of_stub
PARAMS ((asection *, const Elf_Internal_Rela *,
struct ppc_link_hash_entry **, bfd_vma));
static bfd_byte *build_plt_stub
- PARAMS ((bfd *, bfd_byte *, int, int));
+ PARAMS ((bfd *, bfd_byte *, int));
static bfd_boolean ppc_build_one_stub
PARAMS ((struct bfd_hash_entry *, PTR));
static bfd_boolean ppc_size_one_stub
@@ -2854,11 +2941,11 @@ stub_hash_newfunc (entry, table, string)
/* Initialize the local fields. */
eh = (struct ppc_stub_hash_entry *) entry;
+ eh->stub_type = ppc_stub_none;
eh->stub_sec = NULL;
eh->stub_offset = 0;
eh->target_value = 0;
eh->target_section = NULL;
- eh->stub_type = ppc_stub_none;
eh->h = NULL;
eh->id_sec = NULL;
}
@@ -2964,6 +3051,9 @@ ppc64_elf_link_hash_table_create (abfd)
htab->add_stub_section = NULL;
htab->layout_sections_again = NULL;
htab->stub_group = NULL;
+ htab->no_multi_toc = 0;
+ htab->multi_toc_needed = 0;
+ htab->toc_curr = 0;
htab->sgot = NULL;
htab->srelgot = NULL;
htab->splt = NULL;
@@ -2977,6 +3067,7 @@ ppc64_elf_link_hash_table_create (abfd)
htab->tls_sec = NULL;
htab->tls_get_addr = NULL;
htab->tlsld_got.refcount = 0;
+ htab->emit_stub_syms = 0;
htab->stub_error = 0;
htab->has_14bit_branch = 0;
htab->have_undefweak = 0;
@@ -3038,7 +3129,7 @@ ppc_stub_name (input_section, sym_sec, h, rel)
}
else
{
- len = 8 + 1 + 8 + 1 + 8 + 1 + 16 + 1;
+ len = 8 + 1 + 8 + 1 + 8 + 1 + 8 + 1;
stub_name = bfd_malloc (len);
if (stub_name != NULL)
{
@@ -3622,6 +3713,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_GOT16_LO:
case R_PPC64_GOT16_LO_DS:
/* This symbol requires a global offset table entry. */
+ sec->has_gp_reloc = 1;
if (htab->sgot == NULL
&& !create_got_section (htab->elf.dynobj, info))
return FALSE;
@@ -3690,12 +3782,6 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_SECTOFF_HA:
case R_PPC64_SECTOFF_DS:
case R_PPC64_SECTOFF_LO_DS:
- case R_PPC64_TOC16:
- case R_PPC64_TOC16_LO:
- case R_PPC64_TOC16_HI:
- case R_PPC64_TOC16_HA:
- case R_PPC64_TOC16_DS:
- case R_PPC64_TOC16_LO_DS:
case R_PPC64_DTPREL16:
case R_PPC64_DTPREL16_LO:
case R_PPC64_DTPREL16_HI:
@@ -3708,6 +3794,16 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_DTPREL16_HIGHESTA:
break;
+ /* Nor do these. */
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ sec->has_gp_reloc = 1;
+ break;
+
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
case R_PPC64_GNU_VTINHERIT:
@@ -4772,7 +4868,7 @@ get_sym_h (hp, symp, symsecp, tls_maskp, locsymsp, r_symndx, ibfd)
/* Returns TLS_MASKP for the given REL symbol. Function return is 0 on
error, 2 on a toc GD type suitable for optimization, 3 on a toc LD
- type suitable for optimization, and 1 otherwise. */
+ type suitable for optimization, and 1 otherwise. */
static int
get_tls_mask (tls_maskp, locsymsp, rel, ibfd)
@@ -5737,7 +5833,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -5867,8 +5963,16 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
if (s == htab->sbrlt || s == htab->srelbrlt)
/* These haven't been allocated yet; don't strip. */
continue;
+ else if (s == htab->sgot)
+ {
+ /* Automatic multiple tocs aren't possible if we are using the
+ GOT. The GOT is accessed via r2, so we can't adjust r2.
+ FIXME: There's no reason why we couldn't lay out multiple
+ GOTs too. */
+ if (s->_raw_size > elf_backend_got_header_size)
+ htab->no_multi_toc = 1;
+ }
else if (s == htab->splt
- || s == htab->sgot
|| s == htab->sglink)
{
/* Strip this section if we don't need it; see the
@@ -5936,7 +6040,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
@@ -6014,8 +6118,8 @@ ppc_type_of_stub (input_sec, rel, hash, destination)
}
}
- if (h->elf.root.type == bfd_link_hash_undefweak
- || h->elf.root.type == bfd_link_hash_undefined)
+ if (h->elf.root.type != bfd_link_hash_defined
+ && h->elf.root.type != bfd_link_hash_defweak)
return ppc_stub_none;
}
@@ -6043,28 +6147,24 @@ ppc_type_of_stub (input_sec, rel, hash, destination)
/* Build a .plt call stub. */
static bfd_byte *
-build_plt_stub (obfd, p, offset, glink)
+build_plt_stub (obfd, p, offset)
bfd *obfd;
bfd_byte *p;
int offset;
- int glink;
{
#define PPC_LO(v) ((v) & 0xffff)
#define PPC_HI(v) (((v) >> 16) & 0xffff)
#define PPC_HA(v) PPC_HI ((v) + 0x8000)
- if (glink)
- bfd_put_32 (obfd, LD_R2_40R1, p), p += 4;
bfd_put_32 (obfd, ADDIS_R12_R2 | PPC_HA (offset), p), p += 4;
- if (!glink)
- bfd_put_32 (obfd, STD_R2_40R1, p), p += 4;
+ bfd_put_32 (obfd, STD_R2_40R1, p), p += 4;
bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p), p += 4;
if (PPC_HA (offset + 8) != PPC_HA (offset))
- bfd_put_32 (obfd, ADDIS_R12_R12_1, p), p += 4;
+ bfd_put_32 (obfd, ADDIS_R12_R12 | 1, p), p += 4;
offset += 8;
bfd_put_32 (obfd, LD_R2_0R12 | PPC_LO (offset), p), p += 4;
if (PPC_HA (offset + 8) != PPC_HA (offset))
- bfd_put_32 (obfd, ADDIS_R12_R12_1, p), p += 4;
+ bfd_put_32 (obfd, ADDIS_R12_R12 | 1, p), p += 4;
offset += 8;
bfd_put_32 (obfd, MTCTR_R11, p), p += 4;
bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p), p += 4;
@@ -6101,11 +6201,28 @@ ppc_build_one_stub (gen_entry, in_arg)
stub_entry->stub_offset = stub_sec->_cooked_size;
loc = stub_sec->contents + stub_entry->stub_offset;
+ if (htab->emit_stub_syms)
+ {
+ struct elf_link_hash_entry *h;
+ h = elf_link_hash_lookup (&htab->elf, stub_entry->root.string,
+ TRUE, FALSE, FALSE);
+ if (h == NULL)
+ return FALSE;
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = stub_entry->stub_sec;
+ h->root.u.def.value = stub_entry->stub_offset;
+ h->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_DEF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_FORCED_LOCAL);
+ }
+
stub_bfd = stub_sec->owner;
switch (stub_entry->stub_type)
{
case ppc_stub_long_branch:
+ case ppc_stub_long_branch_r2off:
/* Branches are relative. This is where we are going to. */
off = (stub_entry->target_value
+ stub_entry->target_section->output_offset
@@ -6116,13 +6233,30 @@ ppc_build_one_stub (gen_entry, in_arg)
+ stub_sec->output_offset
+ stub_sec->output_section->vma);
- BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
-
+ if (stub_entry->stub_type != ppc_stub_long_branch_r2off)
+ size = 4;
+ else
+ {
+ bfd_vma r2off;
+
+ r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
+ bfd_put_32 (stub_bfd, (bfd_vma) STD_R2_40R1, loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) ADDI_R2_R2 | PPC_LO (r2off), loc);
+ loc += 4;
+ off -= 12;
+ size = 16;
+ }
bfd_put_32 (stub_bfd, (bfd_vma) B_DOT | (off & 0x3fffffc), loc);
- size = 4;
+
+ BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
break;
case ppc_stub_plt_branch:
+ case ppc_stub_plt_branch_r2off:
br_entry = ppc_branch_hash_lookup (&htab->branch_hash_table,
stub_entry->root.string + 9,
FALSE, FALSE);
@@ -6145,7 +6279,7 @@ ppc_build_one_stub (gen_entry, in_arg)
{
/* Create a reloc for the branch lookup table entry. */
Elf_Internal_Rela rela;
- bfd_byte *loc;
+ bfd_byte *rl;
rela.r_offset = (br_entry->offset
+ htab->sbrlt->output_offset
@@ -6153,18 +6287,18 @@ ppc_build_one_stub (gen_entry, in_arg)
rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
rela.r_addend = off;
- loc = htab->srelbrlt->contents;
- loc += htab->srelbrlt->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (htab->srelbrlt->owner, &rela, loc);
+ rl = htab->srelbrlt->contents;
+ rl += htab->srelbrlt->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (htab->srelbrlt->owner, &rela, rl);
}
off = (br_entry->offset
+ htab->sbrlt->output_offset
+ htab->sbrlt->output_section->vma
- elf_gp (htab->sbrlt->output_section->owner)
- - TOC_BASE_OFF);
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
- if (off + 0x80000000 > 0xffffffff || (off & 7) != 0)
+ if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
(*_bfd_error_handler)
(_("linkage table error against `%s'"),
@@ -6175,11 +6309,34 @@ ppc_build_one_stub (gen_entry, in_arg)
}
indx = off;
- bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R12_R2 | PPC_HA (indx), loc);
- bfd_put_32 (stub_bfd, (bfd_vma) LD_R11_0R12 | PPC_LO (indx), loc + 4);
- bfd_put_32 (stub_bfd, (bfd_vma) MTCTR_R11, loc + 8);
- bfd_put_32 (stub_bfd, (bfd_vma) BCTR, loc + 12);
- size = 16;
+ if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
+ {
+ bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R12_R2 | PPC_HA (indx), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) LD_R11_0R12 | PPC_LO (indx), loc);
+ size = 16;
+ }
+ else
+ {
+ bfd_vma r2off;
+
+ r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
+ bfd_put_32 (stub_bfd, (bfd_vma) STD_R2_40R1, loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R12_R2 | PPC_HA (indx), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) LD_R11_0R12 | PPC_LO (indx), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) ADDI_R2_R2 | PPC_LO (r2off), loc);
+ size = 28;
+ }
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) MTCTR_R11, loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, (bfd_vma) BCTR, loc);
break;
case ppc_stub_plt_call:
@@ -6212,9 +6369,9 @@ ppc_build_one_stub (gen_entry, in_arg)
off += (htab->splt->output_offset
+ htab->splt->output_section->vma
- elf_gp (htab->splt->output_section->owner)
- - TOC_BASE_OFF);
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
- if (off + 0x80000000 > 0xffffffff || (off & 7) != 0)
+ if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
(*_bfd_error_handler)
(_("linkage table error against `%s'"),
@@ -6224,7 +6381,7 @@ ppc_build_one_stub (gen_entry, in_arg)
return FALSE;
}
- p = build_plt_stub (stub_bfd, loc, (int) off, 0);
+ p = build_plt_stub (stub_bfd, loc, (int) off);
size = p - loc;
break;
@@ -6270,18 +6427,16 @@ ppc_size_one_stub (gen_entry, in_arg)
off += (htab->splt->output_offset
+ htab->splt->output_section->vma
- elf_gp (htab->splt->output_section->owner)
- - TOC_BASE_OFF);
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
- size = 28;
+ size = PLT_CALL_STUB_SIZE;
if (PPC_HA ((int) off + 16) != PPC_HA ((int) off))
size += 4;
}
else
{
- /* ppc_stub_long_branch or ppc_stub_plt_branch. */
- stub_entry->stub_type = ppc_stub_long_branch;
- size = 4;
-
+ /* ppc_stub_long_branch or ppc_stub_plt_branch, or their r2off
+ variants. */
off = (stub_entry->target_value
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
@@ -6289,6 +6444,19 @@ ppc_size_one_stub (gen_entry, in_arg)
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
+ /* Reset the stub type from the plt variant in case we now
+ can reach with a shorter stub. */
+ if (stub_entry->stub_type >= ppc_stub_plt_branch)
+ stub_entry->stub_type += ppc_stub_long_branch - ppc_stub_plt_branch;
+
+ size = 4;
+ if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
+ {
+ off -= 12;
+ size = 16;
+ }
+
+ /* If the branch offset if too big, use a ppc_stub_plt_branch. */
if (off + (1 << 25) >= (bfd_vma) (1 << 26))
{
struct ppc_branch_hash_entry *br_entry;
@@ -6310,8 +6478,11 @@ ppc_size_one_stub (gen_entry, in_arg)
br_entry->offset = htab->sbrlt->_raw_size;
htab->sbrlt->_raw_size += 8;
}
- stub_entry->stub_type = ppc_stub_plt_branch;
+
+ stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
size = 16;
+ if (stub_entry->stub_type != ppc_stub_plt_branch)
+ size = 28;
}
}
@@ -6335,8 +6506,7 @@ ppc64_elf_setup_section_lists (output_bfd, info)
bfd_size_type amt;
struct ppc_link_hash_table *htab = ppc_hash_table (info);
- if (htab->elf.root.creator->flavour != bfd_target_elf_flavour
- || htab->sbrlt == NULL)
+ if (htab->sbrlt == NULL)
return 0;
/* Find the top input section id. */
@@ -6358,6 +6528,8 @@ ppc64_elf_setup_section_lists (output_bfd, info)
if (htab->stub_group == NULL)
return -1;
+ elf_gp (output_bfd) = htab->toc_curr = ppc64_elf_toc (output_bfd);
+
/* We can't use output_bfd->section_count here to find the top output
section index as some sections may have been removed, and
_bfd_strip_section_from_output doesn't renumber the indices. */
@@ -6394,6 +6566,59 @@ ppc64_elf_setup_section_lists (output_bfd, info)
return 1;
}
+/* The linker repeatedly calls this function for each toc input
+ section. Group input bfds such that the toc within a group
+ is less than 64k in size. Will break with cute linker scripts
+ that play games with dot in the output toc section. */
+
+void
+ppc64_elf_next_toc_section (info, isec)
+ struct bfd_link_info *info;
+ asection *isec;
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+
+ if (!htab->no_multi_toc)
+ {
+ bfd_vma addr = isec->output_offset + isec->output_section->vma;
+ bfd_vma off = addr - htab->toc_curr;
+ if (off + isec->_raw_size > 0x10000)
+ {
+ htab->toc_curr = addr;
+ htab->multi_toc_needed = 1;
+ }
+ elf_gp (isec->owner) = (htab->toc_curr
+ - elf_gp (isec->output_section->owner)
+ + TOC_BASE_OFF);
+ }
+}
+
+/* Called after the last call to the above function. */
+
+void
+ppc64_elf_reinit_toc (output_bfd, info)
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ bfd *ibfd;
+ bfd_vma curr;
+
+ /* toc_curr tracks the TOC offset used for code sections below in
+ ppc64_elf_next_input_section. Start off at 0x8000. */
+ htab->toc_curr = curr = TOC_BASE_OFF;
+
+ /* Set the TOC base in all input bfds. Some may not have a TOC
+ section and thus not be set in ppc64_elf_next_toc_section. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ if (elf_gp (ibfd) == 0)
+ elf_gp (ibfd) = curr;
+ else
+ curr = elf_gp (ibfd);
+ }
+}
+
/* The linker repeatedly calls this function for each input section,
in the order that input sections are linked into output sections.
Build lists of input sections to determine groupings between which
@@ -6419,6 +6644,17 @@ ppc64_elf_next_input_section (info, isec)
*list = isec;
}
}
+
+ /* If a code section has a function that uses the TOC then we need
+ to use the right TOC (obviously). Also, make sure that .opd gets
+ the correct TOC value. */
+ if (isec->has_gp_reloc || (isec->flags & SEC_CODE) == 0)
+ htab->toc_curr = elf_gp (isec->owner);
+
+ /* Functions that don't use the TOC can belong in any TOC group.
+ Use the last TOC base. This happens to make _init and _fini
+ pasting work. */
+ htab->stub_group[isec->id].toc_off = htab->toc_curr;
}
/* See whether we can group stub sections together. Grouping stub
@@ -6446,6 +6682,7 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
asection *prev;
bfd_size_type total;
bfd_boolean big_sec;
+ bfd_vma curr_toc;
curr = tail;
if (tail->_cooked_size)
@@ -6453,10 +6690,12 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
else
total = tail->_raw_size;
big_sec = total >= stub_group_size;
+ curr_toc = htab->stub_group[tail->id].toc_off;
while ((prev = PREV_SEC (curr)) != NULL
&& ((total += curr->output_offset - prev->output_offset)
- < stub_group_size))
+ < stub_group_size)
+ && htab->stub_group[prev->id].toc_off == curr_toc)
curr = prev;
/* OK, the size from the start of CURR to the end is less
@@ -6487,7 +6726,8 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
total = 0;
while (prev != NULL
&& ((total += tail->output_offset - prev->output_offset)
- < stub_group_size))
+ < stub_group_size)
+ && htab->stub_group[prev->id].toc_off == curr_toc)
{
tail = prev;
prev = PREV_SEC (tail);
@@ -6676,6 +6916,22 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
/* Determine what (if any) linker stub is needed. */
stub_type = ppc_type_of_stub (section, irela, &hash,
destination);
+
+ if (stub_type != ppc_stub_plt_call)
+ {
+ /* Check whether we need a TOC adjusting stub.
+ Since the linker pastes together pieces from
+ different object files when creating the
+ _init and _fini functions, it may be that a
+ call to what looks like a local sym is in
+ fact a call needing a TOC adjustment. */
+ if (sym_sec != NULL
+ && sym_sec->output_section != NULL
+ && (htab->stub_group[sym_sec->id].toc_off
+ != htab->stub_group[section->id].toc_off))
+ stub_type = ppc_stub_long_branch_r2off;
+ }
+
if (stub_type == ppc_stub_none)
continue;
@@ -6728,9 +6984,9 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
return FALSE;
}
+ stub_entry->stub_type = stub_type;
stub_entry->target_value = sym_value;
stub_entry->target_section = sym_sec;
- stub_entry->stub_type = stub_type;
stub_entry->h = hash;
stub_entry->addend = irela->r_addend;
stub_changed = TRUE;
@@ -6842,14 +7098,15 @@ ppc64_elf_toc (obfd)
hash table. This function is called via gldelf64ppc_finish. */
bfd_boolean
-ppc64_elf_build_stubs (info)
+ppc64_elf_build_stubs (emit_stub_syms, info)
+ bfd_boolean emit_stub_syms;
struct bfd_link_info *info;
{
struct ppc_link_hash_table *htab = ppc_hash_table (info);
asection *stub_sec;
- bfd_vma plt_r2;
bfd_byte *p;
+ htab->emit_stub_syms = emit_stub_syms;
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
@@ -6870,20 +7127,55 @@ ppc64_elf_build_stubs (info)
if (htab->splt != NULL)
{
unsigned int indx;
+ bfd_vma plt0;
/* Build the .glink plt call stub. */
- plt_r2 = (htab->splt->output_offset
- + htab->splt->output_section->vma
- - elf_gp (htab->splt->output_section->owner)
- - TOC_BASE_OFF);
- p = htab->sglink->contents;
- p = build_plt_stub (htab->sglink->owner, p, (int) plt_r2, 1);
- while (p < htab->sglink->contents + GLINK_CALL_STUB_SIZE)
+ plt0 = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ - (htab->sglink->output_section->vma
+ + htab->sglink->output_offset
+ + GLINK_CALL_STUB_SIZE));
+ if (plt0 + 0x80008000 > 0xffffffff)
{
- bfd_put_32 (htab->sglink->owner, NOP, p);
- p += 4;
+ (*_bfd_error_handler) (_(".glink and .plt too far apart"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
+ p = htab->sglink->contents;
+ bfd_put_32 (htab->sglink->owner, MFCTR_R12, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, SLDI_R11_R0_3, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, ADDIC_R2_R0_32K, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, SUB_R12_R12_R11, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, SRADI_R2_R2_63, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, SLDI_R11_R0_2, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, AND_R2_R2_R11, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, SUB_R12_R12_R11, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, ADD_R12_R12_R2, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, ADDIS_R12_R12 | PPC_HA (plt0), p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, LD_R11_0R12 | PPC_LO (plt0), p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, ADDI_R12_R12 | PPC_LO (plt0), p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, LD_R2_0R12 | 8, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, MTCTR_R11, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, LD_R11_0R12 | 16, p);
+ p += 4;
+ bfd_put_32 (htab->sglink->owner, BCTR, p);
+ p += 4;
+
/* Build the .glink lazy link call stubs. */
indx = 0;
while (p < htab->sglink->contents + htab->sglink->_raw_size)
@@ -7023,7 +7315,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_boolean warned;
- long insn;
+ long insn, mask;
struct ppc_stub_hash_entry *stub_entry;
bfd_vma max_br_offset;
bfd_vma from;
@@ -7039,8 +7331,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_type == R_PPC64_TOC)
{
- /* Relocation value is TOC base. Symbol is ignored. */
- relocation = TOCstart + TOC_BASE_OFF;
+ /* Relocation value is TOC base. */
+ relocation = TOCstart + htab->stub_group[input_section->id].toc_off;
}
else if (r_symndx < symtab_hdr->sh_info)
{
@@ -7360,7 +7652,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (tls_gd == 0)
{
/* We changed the symbol on an LD reloc. Start over
- in order to get h, sym, sec etc. right. */
+ in order to get h, sym, sec etc. right. */
rel--;
continue;
}
@@ -7453,16 +7745,24 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
case R_PPC64_REL24:
- /* A REL24 branching to a linkage function is followed by a
- nop. We replace the nop with a ld in order to restore
- the TOC base pointer. Only calls to shared objects need
- to alter the TOC base. These are recognized by their
- need for a PLT entry. */
- if (h != NULL
- && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
- && fdh->plt.plist != NULL
+ /* Calls to functions with a different TOC, such as calls to
+ shared objects, need to alter the TOC pointer. This is
+ done using a linkage stub. A REL24 branching to these
+ linkage stubs needs to be followed by a nop, as the nop
+ will be replaced with an instruction to restore the TOC
+ base pointer. */
+ if (((h != NULL
+ && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
+ && fdh->plt.plist != NULL)
+ || ((fdh = h, sec) != NULL
+ && sec->output_section != NULL
+ && (htab->stub_group[sec->id].toc_off
+ != htab->stub_group[input_section->id].toc_off)))
&& (stub_entry = ppc_get_stub_entry (input_section, sec, fdh,
- rel, htab)) != NULL)
+ rel, htab)) != NULL
+ && (stub_entry->stub_type == ppc_stub_plt_call
+ || stub_entry->stub_type == ppc_stub_plt_branch_r2off
+ || stub_entry->stub_type == ppc_stub_long_branch_r2off))
{
bfd_boolean can_plt_call = 0;
@@ -7480,11 +7780,42 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (!can_plt_call)
{
- /* If this is a plain branch rather than a branch
- and link, don't require a nop. */
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if ((insn & 1) == 0)
- can_plt_call = 1;
+ if (stub_entry->stub_type == ppc_stub_plt_call)
+ {
+ /* If this is a plain branch rather than a branch
+ and link, don't require a nop. */
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((insn & 1) == 0)
+ can_plt_call = 1;
+ }
+ else
+ {
+ if (strcmp (input_section->output_section->name,
+ ".init") == 0
+ || strcmp (input_section->output_section->name,
+ ".fini") == 0)
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): automatic multiple TOCs "
+ "not supported using your crt files; "
+ "recompile with -mminimal-toc or upgrade gcc"),
+ bfd_archive_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset);
+ else
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): sibling call optimization to `%s' "
+ "does not allow automatic multiple TOCs; "
+ "recompile with -mminimal-toc or "
+ "-fno-optimize-sibling-calls, "
+ "or make `%s' extern"),
+ bfd_archive_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset,
+ sym_name,
+ sym_name);
+ bfd_set_error (bfd_error_bad_value);
+ ret = FALSE;
+ }
}
if (can_plt_call)
@@ -7492,7 +7823,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (stub_entry->stub_offset
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
- unresolved_reloc = FALSE;
+ if (stub_entry->stub_type == ppc_stub_plt_call)
+ unresolved_reloc = FALSE;
}
}
@@ -7690,8 +8022,9 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
}
- /* Init the .got section contents if we're not
- emitting a reloc. */
+ /* Init the .got section contents here if we're not
+ emitting a reloc. A reloc will also init the
+ section contents via _bfd_final_link_relocate. */
else
{
relocation += rel->r_addend;
@@ -7768,7 +8101,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_TOC16_DS:
case R_PPC64_TOC16_LO_DS:
case R_PPC64_TOC16_HA:
- addend -= TOCstart + TOC_BASE_OFF;
+ addend -= TOCstart + htab->stub_group[input_section->id].toc_off;
break;
/* Relocate against the beginning of the section. */
@@ -7921,7 +8254,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
or this is an opd section reloc which must point
at a local function. */
outrel.r_addend += relocation;
- /* ??? why? */
+ /* We need to relocate .opd contents for ld.so, and
+ it doesn't hurt to relocate in other cases. */
relocate = TRUE;
if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
{
@@ -8072,12 +8406,23 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_TPREL16_LO_DS:
case R_PPC64_DTPREL16_DS:
case R_PPC64_DTPREL16_LO_DS:
- if (((relocation + addend) & 3) != 0)
+ insn = bfd_get_32 (input_bfd, contents + (rel->r_offset & ~3));
+ mask = 3;
+ /* If this reloc is against an lq insn, then the value must be
+ a multiple of 16. This is somewhat of a hack, but the
+ "correct" way to do this by defining _DQ forms of all the
+ _DS relocs bloats all reloc switches in this file. It
+ doesn't seem to make much sense to use any of these relocs
+ in data, so testing the insn should be safe. */
+ if ((insn & (0x3f << 26)) == (56 << 26))
+ mask = 15;
+ if (((relocation + addend) & mask) != 0)
{
(*_bfd_error_handler)
- (_("%s: error: relocation %s not a multiple of 4"),
+ (_("%s: error: relocation %s not a multiple of %d"),
bfd_archive_filename (input_bfd),
- ppc64_elf_howto_table[(int) r_type]->name);
+ ppc64_elf_howto_table[(int) r_type]->name,
+ mask + 1);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
continue;
@@ -8094,12 +8439,17 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
max_br_offset = 1 << 25;
branch_check:
- /* If the branch is out of reach, then redirect the
- call to the local stub for this function. */
+ /* If the branch is out of reach or the TOC register needs
+ adjusting, then redirect the call to the local stub for
+ this function. */
from = (rel->r_offset
+ input_section->output_offset
+ input_section->output_section->vma);
- if (relocation + addend - from + max_br_offset >= 2 * max_br_offset
+ if ((relocation + addend - from + max_br_offset >= 2 * max_br_offset
+ || (sec != NULL
+ && sec->output_section != NULL
+ && (htab->stub_group[sec->id].toc_off
+ != htab->stub_group[input_section->id].toc_off)))
&& (stub_entry = ppc_get_stub_entry (input_section, sec, h,
rel, htab)) != NULL)
{
@@ -8322,6 +8672,11 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
case DT_PPC64_GLINK:
s = htab->sglink;
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+ /* We stupidly defined DT_PPC64_GLINK to be the start
+ of glink rather than the first entry point, which is
+ what ld.so needs, and now have a bigger stub to
+ support automatic multiple TOCs. */
+ dyn.d_un.d_ptr += GLINK_CALL_STUB_SIZE - 32;
break;
case DT_PPC64_OPD:
@@ -8400,53 +8755,4 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
return TRUE;
}
-#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
-#define TARGET_LITTLE_NAME "elf64-powerpcle"
-#define TARGET_BIG_SYM bfd_elf64_powerpc_vec
-#define TARGET_BIG_NAME "elf64-powerpc"
-#define ELF_ARCH bfd_arch_powerpc
-#define ELF_MACHINE_CODE EM_PPC64
-#define ELF_MAXPAGESIZE 0x10000
-#define elf_info_to_howto ppc64_elf_info_to_howto
-
-#ifdef EM_CYGNUS_POWERPC
-#define ELF_MACHINE_ALT1 EM_CYGNUS_POWERPC
-#endif
-
-#ifdef EM_PPC_OLD
-#define ELF_MACHINE_ALT2 EM_PPC_OLD
-#endif
-
-#define elf_backend_want_got_sym 0
-#define elf_backend_want_plt_sym 0
-#define elf_backend_plt_alignment 3
-#define elf_backend_plt_not_loaded 1
-#define elf_backend_got_symbol_offset 0
-#define elf_backend_got_header_size 8
-#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
-#define elf_backend_can_gc_sections 1
-#define elf_backend_can_refcount 1
-#define elf_backend_rela_normal 1
-
-#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
-#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
-#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
-#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
-#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
-
-#define elf_backend_object_p ppc64_elf_object_p
-#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
-#define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
-#define elf_backend_check_relocs ppc64_elf_check_relocs
-#define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
-#define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
-#define elf_backend_hide_symbol ppc64_elf_hide_symbol
-#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
-#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
-#define elf_backend_relocate_section ppc64_elf_relocate_section
-#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
-#define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
-#define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections
-
#include "elf64-target.h"
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 4b80cc56ecb..1968c4e526a 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -29,10 +29,14 @@ bfd_vma ppc64_elf_toc
PARAMS ((bfd *));
int ppc64_elf_setup_section_lists
PARAMS ((bfd *, struct bfd_link_info *));
+void ppc64_elf_next_toc_section
+ PARAMS ((struct bfd_link_info *, asection *));
+void ppc64_elf_reinit_toc
+ PARAMS ((bfd *, struct bfd_link_info *));
void ppc64_elf_next_input_section
PARAMS ((struct bfd_link_info *, asection *));
bfd_boolean ppc64_elf_size_stubs
PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
asection *(*) (const char *, asection *), void (*) (void)));
bfd_boolean ppc64_elf_build_stubs
- PARAMS ((struct bfd_link_info *));
+ PARAMS ((bfd_boolean, struct bfd_link_info *));
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 98555f269bf..b5d724a5582 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1898,7 +1898,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -2056,7 +2056,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index d666fca9cbe..fe3195ca3a0 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -3643,7 +3643,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -3777,7 +3777,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
must add the entries now so that we get the correct size for
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
- if (! info->shared)
+ if (info->executable)
{
if (! bfd_elf64_add_dynamic_entry (info, DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index d7ad1b725de..d25b429337a 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1781,7 +1781,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1880,7 +1880,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
struct elf_strtab_hash *dynstr;
struct elf_link_hash_table *eht = elf_hash_table (info);
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c0ce57d708d..b39cdcd819c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1618,7 +1618,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -1779,7 +1779,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 55c5b4264e0..0263631e791 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1363,7 +1363,9 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
relent->addend = rela.r_addend;
- if (entsize == sizeof (Elf_External_Rela))
+ if ((entsize == sizeof (Elf_External_Rela)
+ && ebd->elf_info_to_howto != NULL)
+ || ebd->elf_info_to_howto_rel == NULL)
(*ebd->elf_info_to_howto) (abfd, relent, &rela);
else
(*ebd->elf_info_to_howto_rel) (abfd, relent, &rela);
diff --git a/bfd/elflink.c b/bfd/elflink.c
index cc311863e1a..d6f6d705ead 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -94,7 +94,7 @@ _bfd_elf_create_got_section (abfd, info)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
- if (info->shared
+ if (! info->executable
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -144,7 +144,7 @@ _bfd_elf_link_create_dynamic_sections (abfd, info)
/* A dynamically linked executable has a .interp section, but a
shared library does not. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_make_section (abfd, ".interp");
if (s == NULL
@@ -227,7 +227,7 @@ _bfd_elf_link_create_dynamic_sections (abfd, info)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
- if (info->shared
+ if (! info->executable
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -295,7 +295,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
- if (info->shared
+ if (! info->executable
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
@@ -1760,7 +1760,7 @@ _bfd_elf_link_assign_sym_version (h, data)
/* If we are building an application, we need to create a
version node for this version. */
- if (t == NULL && ! info->shared)
+ if (t == NULL && info->executable)
{
struct bfd_elf_version_tree **pp;
int version_index;
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 7b32491d945..8acb7a93632 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -474,7 +474,7 @@ elf_link_add_object_symbols (abfd, info)
.gnu.warning.SYMBOL are treated as warning symbols for the given
symbol. This differs from .gnu.warning sections, which generate
warnings when they are included in an output file. */
- if (! info->shared)
+ if (info->executable)
{
asection *s;
@@ -1321,7 +1321,7 @@ elf_link_add_object_symbols (abfd, info)
}
else
new_flag = ELF_LINK_HASH_DEF_REGULAR;
- if (info->shared
+ if (! info->executable
|| (old_flags & (ELF_LINK_HASH_DEF_DYNAMIC
| ELF_LINK_HASH_REF_DYNAMIC)) != 0)
dynsym = TRUE;
@@ -1937,6 +1937,43 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (! is_elf_hash_table (info))
return TRUE;
+ if (info->execstack)
+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
+ else if (info->noexecstack)
+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
+ else
+ {
+ bfd *inputobj;
+ asection *notesec = NULL;
+ int exec = 0;
+
+ for (inputobj = info->input_bfds;
+ inputobj;
+ inputobj = inputobj->link_next)
+ {
+ asection *s;
+
+ if (inputobj->flags & DYNAMIC)
+ continue;
+ s = bfd_get_section_by_name (inputobj, ".note.GNU-stack");
+ if (s)
+ {
+ if (s->flags & SEC_CODE)
+ exec = PF_X;
+ notesec = s;
+ }
+ else
+ exec = PF_X;
+ }
+ if (notesec)
+ {
+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | exec;
+ if (exec && info->relocateable
+ && notesec->output_section != bfd_abs_section_ptr)
+ notesec->output_section->flags |= SEC_CODE;
+ }
+ }
+
/* Any syms created from now on start with -1 in
got.refcount/offset and plt.refcount/offset. */
elf_hash_table (info)->init_refcount = elf_hash_table (info)->init_offset;
@@ -2174,7 +2211,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (bfd_get_section_by_name (output_bfd, ".preinit_array") != NULL)
{
/* DT_PREINIT_ARRAY is not allowed in shared library. */
- if (info->shared)
+ if (! info->executable)
{
bfd *sub;
asection *o;
@@ -2440,7 +2477,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (info->flags_1)
{
- if (! info->shared)
+ if (info->executable)
info->flags_1 &= ~ (DF_1_INITFIRST
| DF_1_NODELETE
| DF_1_NOOPEN);
@@ -4417,7 +4454,8 @@ elf_link_output_extsym (h, data)
referenced by regular files, because we will already have issued
warnings for them. */
if (! finfo->info->relocateable
- && (! finfo->info->shared || ! finfo->info->allow_shlib_undefined)
+ && (finfo->info->executable
+ || ! finfo->info->allow_shlib_undefined)
&& h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
@@ -5002,13 +5040,13 @@ elf_link_input_bfd (finfo, input_bfd)
memset (rel, 0, sizeof (*rel));
}
else
- {
- if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, h->root.root.string,
- input_bfd, o, rel->r_offset,
- TRUE)))
- return FALSE;
- }
+ finfo->info->callbacks->error_handler
+ (LD_DEFINITION_IN_DISCARDED_SECTION,
+ _("%T: discarded in section `%s' from %s\n"),
+ h->root.root.string,
+ h->root.root.string,
+ h->root.u.def.section->name,
+ bfd_archive_filename (h->root.u.def.section->owner));
}
}
else
@@ -5027,26 +5065,21 @@ elf_link_input_bfd (finfo, input_bfd)
}
else
{
- bfd_boolean ok;
- const char *msg
- = _("local symbols in discarded section %s");
- bfd_size_type amt
- = strlen (sec->name) + strlen (msg) - 1;
- char *buf = (char *) bfd_malloc (amt);
-
- if (buf != NULL)
- sprintf (buf, msg, sec->name);
- else
- buf = (char *) sec->name;
- ok = (*finfo->info->callbacks
- ->undefined_symbol) (finfo->info, buf,
- input_bfd, o,
- rel->r_offset,
- TRUE);
- if (buf != sec->name)
+ static int count;
+ int ok;
+ char *buf;
+
+ ok = asprintf (&buf, "local symbol %d",
+ count++);
+ if (ok <= 0)
+ buf = (char *) "local symbol";
+ finfo->info->callbacks->error_handler
+ (LD_DEFINITION_IN_DISCARDED_SECTION,
+ _("%T: discarded in section `%s' from %s\n"),
+ buf, buf, sec->name,
+ bfd_archive_filename (input_bfd));
+ if (ok != -1)
free (buf);
- if (!ok)
- return FALSE;
}
}
}
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 2e499488821..1741e35ceec 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -1453,9 +1453,10 @@ mips_elf_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
char **error_message;
{
/* If we're relocating, and this is a local symbol, we can handle it
- just like HI16. */
+ just like an R_MIPS_HI16. */
if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) != 0)
+ && ((symbol->flags & BSF_SECTION_SYM) != 0
+ || (symbol->flags & BSF_LOCAL) == 0))
return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
@@ -1654,12 +1655,10 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
- /* R_MIPS_GPREL32 relocations are defined for local symbols only.
- We will only have an addend if this is a newly created reloc,
- not read from an ELF file. */
+ /* R_MIPS_GPREL32 relocations are defined for local symbols only. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
*error_message = (char *)
_("32bits gp relative relocation occurs for an external symbol");
@@ -1750,8 +1749,11 @@ mips_elf_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
{
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
- reloc_entry->addend = (reloc_entry->addend & 0x00007c0)
- | (reloc_entry->addend & 0x00000800) >> 9;
+ if (reloc_entry->howto->partial_inplace)
+ {
+ reloc_entry->addend = ((reloc_entry->addend & 0x00007c0)
+ | (reloc_entry->addend & 0x00000800) >> 9);
+ }
SET_RELOC_ADDEND (reloc_entry)
@@ -1801,8 +1803,10 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd_boolean relocateable;
bfd_reloc_status_type ret;
bfd_vma gp;
- unsigned short extend, insn;
- unsigned long final;
+ unsigned short extend = 0;
+ unsigned short insn = 0;
+ bfd_signed_vma val;
+ bfd_vma relocation;
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
@@ -1822,33 +1826,55 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
-
- /* Stuff the current addend back as a 32 bit value, do the usual
- relocation, and then clean up. */
- bfd_put_32 (abfd,
- (bfd_vma) (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- (bfd_byte *) data + reloc_entry->address);
-
- ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-
- final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((insn & 0xffe0)
- | (final & 0x1f)),
- (bfd_byte *) data + reloc_entry->address + 2);
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
- return ret;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+ val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ }
+
+ _bfd_mips_elf_sign_extend(val, 16);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocateable output, we don't want to do this for
+ an external symbol. */
+ if (! relocateable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((val >> 11) & 0x1f)
+ | (val & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (val & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+ }
+ else
+ reloc_entry->addend = val;
+
+ if (relocateable)
+ reloc_entry->address += input_section->output_offset;
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
}
#undef GET_RELOC_ADDEND
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index ab2ff21c887..37fc968f53b 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -2903,7 +2903,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
/* Set the contents of the .interp section to the interpreter. */
if (ia64_info->root.dynamic_sections_created
- && !info->shared)
+ && info->executable)
{
sec = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (sec != NULL);
@@ -3078,7 +3078,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
later (in finish_dynamic_sections) but we must add the entries now
so that we get the correct size for the .dynamic section. */
- if (!info->shared)
+ if (info->executable)
{
/* The DT_DEBUG entry is filled in by the dynamic linker and used
by the debugger. */
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index bede3e61293..dbbfb314523 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -434,7 +434,6 @@ static const Elf_Internal_Rela *mips_elf_next_relocation
const Elf_Internal_Rela *));
static bfd_boolean mips_elf_local_relocation_p
PARAMS ((bfd *, const Elf_Internal_Rela *, asection **, bfd_boolean));
-static bfd_vma mips_elf_sign_extend PARAMS ((bfd_vma, int));
static bfd_boolean mips_elf_overflow_p PARAMS ((bfd_vma, int));
static bfd_vma mips_elf_high PARAMS ((bfd_vma));
static bfd_vma mips_elf_higher PARAMS ((bfd_vma));
@@ -517,11 +516,11 @@ static bfd *reldyn_sorting_bfd;
/* The name of the options section. */
#define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
- (ABI_64_P (abfd) ? ".MIPS.options" : ".options")
+ (NEWABI_P (abfd) ? ".MIPS.options" : ".options")
/* The name of the stub section. */
#define MIPS_ELF_STUB_SECTION_NAME(abfd) \
- (ABI_64_P (abfd) ? ".MIPS.stubs" : ".stub")
+ (NEWABI_P (abfd) ? ".MIPS.stubs" : ".stub")
/* The size of an external REL relocation. */
#define MIPS_ELF_REL_SIZE(abfd) \
@@ -1091,8 +1090,8 @@ _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section,
bfd_vma gp;
{
bfd_vma relocation;
- unsigned long insn;
- unsigned long val;
+ unsigned long insn = 0;
+ bfd_signed_vma val;
if (bfd_is_com_section (symbol->section))
relocation = 0;
@@ -1105,21 +1104,17 @@ _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
/* Set val to the offset into the section or symbol. */
- if (reloc_entry->howto->src_mask == 0)
- {
- /* This case occurs with the 64-bit MIPS ELF ABI. */
- val = reloc_entry->addend;
- }
- else
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
{
- val = ((insn & 0xffff) + reloc_entry->addend) & 0xffff;
- if (val & 0x8000)
- val -= 0x10000;
+ insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ val += insn & 0xffff;
}
+ _bfd_mips_elf_sign_extend(val, 16);
+
/* Adjust val for the final section location and GP value. If we
are producing relocateable output, we don't want to do this for
an external symbol. */
@@ -1127,13 +1122,18 @@ _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section,
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- insn = (insn & ~0xffff) | (val & 0xffff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+ if (reloc_entry->howto->partial_inplace)
+ {
+ insn = (insn & ~0xffff) | (val & 0xffff);
+ bfd_put_32 (abfd, (bfd_vma) insn,
+ (bfd_byte *) data + reloc_entry->address);
+ }
+ else
+ reloc_entry->addend = val;
if (relocateable)
reloc_entry->address += input_section->output_offset;
-
- else if ((long) val >= 0x8000 || (long) val < -0x8000)
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
return bfd_reloc_overflow;
return bfd_reloc_ok;
@@ -1663,7 +1663,7 @@ mips_elf_rel_dyn_section (dynobj, create_p)
| SEC_LINKER_CREATED
| SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, sreloc,
- 4))
+ MIPS_ELF_LOG_FILE_ALIGN (dynobj)))
return NULL;
}
return sreloc;
@@ -2741,8 +2741,8 @@ mips_elf_local_relocation_p (input_bfd, relocation, local_sections,
/* Sign-extend VALUE, which has the indicated number of BITS. */
-static bfd_vma
-mips_elf_sign_extend (value, bits)
+bfd_vma
+_bfd_mips_elf_sign_extend (value, bits)
bfd_vma value;
int bits;
{
@@ -2873,7 +2873,7 @@ mips_elf_create_got_section (abfd, info, maybe_exclude)
s = bfd_make_section (abfd, ".got");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags)
- || ! bfd_set_section_alignment (abfd, s, 4))
+ || ! bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return FALSE;
/* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the
@@ -3305,7 +3305,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
return bfd_reloc_continue;
case R_MIPS_16:
- value = symbol + mips_elf_sign_extend (addend, 16);
+ value = symbol + _bfd_mips_elf_sign_extend (addend, 16);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -3356,7 +3356,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
case R_MIPS_GNU_REL16_S2:
- value = symbol + mips_elf_sign_extend (addend << 2, 18) - p;
+ value = symbol + _bfd_mips_elf_sign_extend (addend << 2, 18) - p;
overflowed_p = mips_elf_overflow_p (value, 18);
value = (value >> 2) & howto->dst_mask;
break;
@@ -3381,7 +3381,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
if (local_p)
value = (((addend << 2) | ((p + 4) & 0xf0000000)) + symbol) >> 2;
else
- value = (mips_elf_sign_extend (addend << 2, 28) + symbol) >> 2;
+ value = (_bfd_mips_elf_sign_extend (addend << 2, 28) + symbol) >> 2;
value &= howto->dst_mask;
break;
@@ -3441,7 +3441,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
instruction. If the addend was separate, leave it alone,
otherwise we may lose significant bits. */
if (howto->partial_inplace)
- addend = mips_elf_sign_extend (addend, 16);
+ addend = _bfd_mips_elf_sign_extend (addend, 16);
value = symbol + addend - gp;
/* If the symbol was local, any earlier relocatable links will
have adjusted its addend with the gp offset, so compensate
@@ -3490,7 +3490,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
case R_MIPS_PC16:
- value = mips_elf_sign_extend (addend, 16) + symbol - p;
+ value = _bfd_mips_elf_sign_extend (addend, 16) + symbol - p;
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -3853,7 +3853,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
/* We begin by assuming that the offset for the dynamic relocation
is the same as for the original relocation. We'll adjust this
later to reflect the correct output offsets. */
- if (elf_section_data (input_section)->sec_info_type != ELF_INFO_TYPE_STABS)
+ if (input_section->sec_info_type != ELF_INFO_TYPE_STABS)
{
outrel[1].r_offset = rel[1].r_offset;
outrel[2].r_offset = rel[2].r_offset;
@@ -4974,19 +4974,19 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
/* Change alignments of some sections. */
s = bfd_get_section_by_name (abfd, ".hash");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynsym");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynstr");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".reginfo");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
}
if (!info->shared)
@@ -6353,7 +6353,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_bfd, contents);
l &= lo16_howto->src_mask;
l <<= lo16_howto->rightshift;
- l = mips_elf_sign_extend (l, 16);
+ l = _bfd_mips_elf_sign_extend (l, 16);
addend <<= 16;
@@ -7799,10 +7799,10 @@ _bfd_mips_elf_hide_symbol (info, entry, force_local)
h = (struct mips_elf_link_hash_entry *) entry;
if (h->forced_local)
return;
- h->forced_local = TRUE;
+ h->forced_local = force_local;
dynobj = elf_hash_table (info)->dynobj;
- if (dynobj != NULL)
+ if (dynobj != NULL && force_local)
{
got = mips_elf_got_section (dynobj, FALSE);
g = mips_elf_section_data (got)->u.got_info;
@@ -7898,7 +7898,7 @@ _bfd_mips_elf_discard_info (abfd, cookie, info)
cookie->rel = cookie->rels;
cookie->relend = cookie->rels + o->reloc_count;
- for (i = 0, skip = 0; i < o->_raw_size; i ++)
+ for (i = 0, skip = 0; i < o->_raw_size / PDR_SIZE; i ++)
{
if (MNAME(abfd,_bfd_elf,reloc_symbol_deleted_p) (i * PDR_SIZE, cookie))
{
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 3064c39d137..088dd6a57eb 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -108,6 +108,7 @@ extern bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
extern unsigned long _bfd_elf_mips_mach
PARAMS ((flagword));
-extern bfd_boolean _bfd_mips_relax_section (bfd *, asection *,
- struct bfd_link_info *,
- bfd_boolean *);
+extern bfd_boolean _bfd_mips_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+extern bfd_vma _bfd_mips_elf_sign_extend
+ PARAMS ((bfd_vma, int));
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 47719797df3..b6b4097983a 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -716,28 +716,32 @@ bfd_release (abfd, block)
without debug symbols).
*/
-static unsigned long calc_crc32 PARAMS ((unsigned long, const unsigned char *, size_t));
static char * get_debug_link_info PARAMS ((bfd *, unsigned long *));
static bfd_boolean separate_debug_file_exists PARAMS ((const char *, const unsigned long));
static char * find_separate_debug_file PARAMS ((bfd *, const char *));
+#define GNU_DEBUGLINK ".gnu_debuglink"
/*
-INTERNAL_FUNCTION
- calc_crc32
+FUNCTION
+ bfd_calc_gnu_debuglink_crc32
SYNOPSIS
- unsigned long calc_crc32 (unsigned long crc, const unsigned char *buf, size_t len);
+ unsigned long bfd_calc_gnu_debuglink_crc32 (unsigned long crc, const unsigned char *buf, bfd_size_type len);
DESCRIPTION
- Advance the CRC32 given by @var{crc} through @var{len}
- bytes of @var{buf}. Return the updated CRC32 value.
+ Computes a CRC value as used in the .gnu_debuglink section.
+ Advances the previously computed @var{crc} value by computing
+ and adding in the crc32 for @var{len} bytes of @var{buf}.
+
+RETURNS
+ Return the updated CRC32 value.
*/
-static unsigned long
-calc_crc32 (crc, buf, len)
+unsigned long
+bfd_calc_gnu_debuglink_crc32 (crc, buf, len)
unsigned long crc;
const unsigned char *buf;
- size_t len;
+ bfd_size_type len;
{
static const unsigned long crc32_table[256] =
{
@@ -808,7 +812,7 @@ INTERNAL_FUNCTION
get_debug_link_info
SYNOPSIS
- char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
+ char * get_debug_link_info (bfd * abfd, unsigned long * crc32_out)
DESCRIPTION
fetch the filename and CRC32 value for any separate debuginfo
@@ -818,8 +822,8 @@ DESCRIPTION
static char *
get_debug_link_info (abfd, crc32_out)
- bfd *abfd;
- unsigned long *crc32_out;
+ bfd * abfd;
+ unsigned long * crc32_out;
{
asection * sect;
bfd_size_type debuglink_size;
@@ -831,14 +835,17 @@ get_debug_link_info (abfd, crc32_out)
BFD_ASSERT (abfd);
BFD_ASSERT (crc32_out);
- sect = bfd_get_section_by_name (abfd, ".gnu_debuglink");
+ sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
if (sect == NULL)
return NULL;
debuglink_size = bfd_section_size (abfd, sect);
- contents = xmalloc (debuglink_size);
+ contents = malloc (debuglink_size);
+ if (contents == NULL)
+ return NULL;
+
ret = bfd_get_section_contents (abfd, sect, contents,
(file_ptr)0, debuglink_size);
if (! ret)
@@ -877,7 +884,7 @@ separate_debug_file_exists (name, crc)
static char buffer [8 * 1024];
unsigned long file_crc = 0;
int fd;
- int count;
+ bfd_size_type count;
BFD_ASSERT (name);
@@ -886,7 +893,7 @@ separate_debug_file_exists (name, crc)
return FALSE;
while ((count = read (fd, buffer, sizeof (buffer))) > 0)
- file_crc = calc_crc32 (file_crc, buffer, count);
+ file_crc = bfd_calc_gnu_debuglink_crc32 (file_crc, buffer, count);
close (fd);
@@ -930,16 +937,21 @@ find_separate_debug_file (abfd, debug_file_directory)
return NULL;
basename = get_debug_link_info (abfd, & crc32);
-
if (basename == NULL)
return NULL;
+
if (strlen (basename) < 1)
{
free (basename);
return NULL;
}
- dir = xstrdup (abfd->filename);
+ dir = strdup (abfd->filename);
+ if (dir == NULL)
+ {
+ free (basename);
+ return NULL;
+ }
BFD_ASSERT (strlen (dir) != 0);
/* Strip off filename part. */
@@ -950,11 +962,17 @@ find_separate_debug_file (abfd, debug_file_directory)
dir[i + 1] = '\0';
BFD_ASSERT (dir[i] == '/' || dir[0] == '\0')
- debugfile = xmalloc (strlen (debug_file_directory) + 1
- + strlen (dir)
- + strlen (".debug/")
- + strlen (basename)
- + 1);
+ debugfile = malloc (strlen (debug_file_directory) + 1
+ + strlen (dir)
+ + strlen (".debug/")
+ + strlen (basename)
+ + 1);
+ if (debugfile == NULL)
+ {
+ free (basename);
+ free (dir);
+ return NULL;
+ }
/* First try in the same directory as the original file: */
strcpy (debugfile, dir);
@@ -1037,3 +1055,114 @@ bfd_follow_gnu_debuglink (abfd, dir)
#endif
return find_separate_debug_file (abfd, dir);
}
+
+/*
+FUNCTION
+ bfd_add_gnu_debuglink
+
+SYNOPSIS
+ bfd_boolean bfd_add_gnu_debuglink (bfd * abfd, const char * filename);
+
+DESCRIPTION
+
+ Takes a @var{BFD} and adds a .gnu_debuglink section containing a link
+ to the specified @var{filename}. The filename should be relative to
+ the current directory.
+
+RETURNS
+ <<TRUE>> is returned if all is ok. Otherwise <<FALSE>> is returned
+ and bfd_error is set.
+*/
+
+bfd_boolean
+bfd_add_gnu_debuglink (abfd, filename)
+ bfd *abfd;
+ const char * filename;
+{
+ asection * sect;
+ bfd_size_type debuglink_size;
+ unsigned long crc32;
+ char * contents;
+ bfd_size_type crc_offset;
+ FILE * handle;
+ static char buffer[8 * 1024];
+ size_t count;
+
+ if (abfd == NULL || filename == NULL)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+
+ /* Make sure that we can read the file.
+ XXX - Should we attempt to locate the debug info file using the same
+ algorithm as gdb ? At the moment, since we are creating the
+ .gnu_debuglink section, we insist upon the user providing us with a
+ correct-for-section-creation-time path, but this need not conform to
+ the gdb location algorithm. */
+ handle = fopen (filename, FOPEN_RB);
+ if (handle == NULL)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return FALSE;
+ }
+
+ crc32 = 0;
+ while ((count = fread (buffer, 1, sizeof buffer, handle)) > 0)
+ crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count);
+ fclose (handle);
+
+ /* Strip off any path components in filename,
+ now that we no longer need them. */
+ filename = lbasename (filename);
+
+ sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
+ if (sect)
+ {
+ /* Section already exists. */
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+
+ sect = bfd_make_section (abfd, GNU_DEBUGLINK);
+ if (sect == NULL)
+ return FALSE;
+
+ if (! bfd_set_section_flags (abfd, sect,
+ SEC_HAS_CONTENTS | SEC_DEBUGGING))
+ /* XXX Should we delete the section from the bfd ? */
+ return FALSE;
+
+
+ debuglink_size = strlen (filename) + 1;
+ debuglink_size += 3;
+ debuglink_size &= ~3;
+ debuglink_size += 4;
+
+ if (! bfd_set_section_size (abfd, sect, debuglink_size))
+ /* XXX Should we delete the section from the bfd ? */
+ return FALSE;
+
+ contents = malloc (debuglink_size);
+ if (contents == NULL)
+ {
+ /* XXX Should we delete the section from the bfd ? */
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+
+ strcpy (contents, filename);
+ crc_offset = debuglink_size - 4;
+
+ bfd_put_32 (abfd, crc32, (bfd_byte *) (contents + crc_offset));
+
+ if (! bfd_set_section_contents (abfd, sect, contents,
+ (file_ptr)0, debuglink_size))
+ {
+ /* XXX Should we delete the section from the bfd ? */
+ free (contents);
+ return FALSE;
+ }
+
+ return TRUE;
+}
diff --git a/bfd/pef.c b/bfd/pef.c
index b4c5bfed1e8..550dbb81f55 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -1,5 +1,5 @@
/* PEF support for BFD.
- Copyright 1999, 2000, 2001, 2002
+ Copyright 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,7 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include <ctype.h>
+#include "safe-ctype.h"
#include "pef.h"
#include "pef-traceback.h"
@@ -33,76 +33,56 @@
#define BFD_IO_FUNCS 0
#endif
-#define bfd_pef_close_and_cleanup _bfd_generic_close_and_cleanup
-#define bfd_pef_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define bfd_pef_new_section_hook _bfd_generic_new_section_hook
-#define bfd_pef_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define bfd_pef_get_lineno _bfd_nosymbols_get_lineno
-#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols
-#define bfd_pef_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-
-#define bfd_pef_get_reloc_upper_bound _bfd_norelocs_get_reloc_upper_bound
-#define bfd_pef_canonicalize_reloc _bfd_norelocs_canonicalize_reloc
-#define bfd_pef_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
-
-#define bfd_pef_set_arch_mach _bfd_generic_set_arch_mach
-
-#define bfd_pef_get_section_contents _bfd_generic_get_section_contents
-#define bfd_pef_set_section_contents _bfd_generic_set_section_contents
-
-#define bfd_pef_bfd_get_relocated_section_contents \
- bfd_generic_get_relocated_section_contents
-#define bfd_pef_bfd_relax_section bfd_generic_relax_section
-#define bfd_pef_bfd_gc_sections bfd_generic_gc_sections
-#define bfd_pef_bfd_merge_sections bfd_generic_merge_sections
-#define bfd_pef_bfd_discard_group bfd_generic_discard_group
-#define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
-#define bfd_pef_bfd_final_link _bfd_generic_final_link
-#define bfd_pef_bfd_link_split_section _bfd_generic_link_split_section
-#define bfd_pef_get_section_contents_in_window \
- _bfd_generic_get_section_contents_in_window
-
-static void bfd_pef_print_symbol
-PARAMS ((bfd *abfd, PTR afile, asymbol *symbol, bfd_print_symbol_type how));
-static void bfd_pef_convert_architecture
-PARAMS ((unsigned long architecture,
- enum bfd_architecture *type, unsigned long *subtype));
-static bfd_boolean bfd_pef_mkobject PARAMS ((bfd *abfd));
-static int bfd_pef_parse_traceback_table
-PARAMS ((bfd *abfd, asection *section, unsigned char *buf,
- size_t len, size_t pos, asymbol *sym, FILE *file));
-static const char *bfd_pef_section_name PARAMS ((bfd_pef_section *section));
-static unsigned long bfd_pef_section_flags PARAMS ((bfd_pef_section *section));
-static asection *bfd_pef_make_bfd_section
-PARAMS ((bfd *abfd, bfd_pef_section *section));
-static int bfd_pef_read_header PARAMS ((bfd *abfd, bfd_pef_header *header));
-static const bfd_target *bfd_pef_object_p PARAMS ((bfd *));
-static int bfd_pef_parse_traceback_tables
-PARAMS ((bfd *abfd, asection *sec, unsigned char *buf,
- size_t len, long *nsym, asymbol **csym));
-static int bfd_pef_parse_function_stub
-PARAMS ((bfd *abfd, unsigned char *buf, size_t len, unsigned long *offset));
-static int bfd_pef_parse_function_stubs
-PARAMS ((bfd *abfd, asection *codesec, unsigned char *codebuf, size_t codelen,
- unsigned char *loaderbuf, size_t loaderlen, unsigned long *nsym,
- asymbol **csym));
-static long bfd_pef_parse_symbols PARAMS ((bfd *abfd, asymbol **csym));
-static long bfd_pef_count_symbols PARAMS ((bfd *abfd));
-static long bfd_pef_get_symtab_upper_bound PARAMS ((bfd *));
-static long bfd_pef_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *bfd_pef_make_empty_symbol PARAMS ((bfd *));
-static void bfd_pef_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static int bfd_pef_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-
-static int bfd_pef_xlib_read_header
-PARAMS ((bfd *abfd, bfd_pef_xlib_header *header));
-static int bfd_pef_xlib_scan PARAMS ((bfd *abfd, bfd_pef_xlib_header *header));
-static const bfd_target *bfd_pef_xlib_object_p PARAMS ((bfd *abfd));
+#define bfd_pef_close_and_cleanup _bfd_generic_close_and_cleanup
+#define bfd_pef_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define bfd_pef_new_section_hook _bfd_generic_new_section_hook
+#define bfd_pef_bfd_is_local_label_name bfd_generic_is_local_label_name
+#define bfd_pef_get_lineno _bfd_nosymbols_get_lineno
+#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols
+#define bfd_pef_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#define bfd_pef_get_reloc_upper_bound _bfd_norelocs_get_reloc_upper_bound
+#define bfd_pef_canonicalize_reloc _bfd_norelocs_canonicalize_reloc
+#define bfd_pef_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
+#define bfd_pef_set_arch_mach _bfd_generic_set_arch_mach
+#define bfd_pef_get_section_contents _bfd_generic_get_section_contents
+#define bfd_pef_set_section_contents _bfd_generic_set_section_contents
+#define bfd_pef_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
+#define bfd_pef_bfd_relax_section bfd_generic_relax_section
+#define bfd_pef_bfd_gc_sections bfd_generic_gc_sections
+#define bfd_pef_bfd_merge_sections bfd_generic_merge_sections
+#define bfd_pef_bfd_discard_group bfd_generic_discard_group
+#define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
+#define bfd_pef_bfd_final_link _bfd_generic_final_link
+#define bfd_pef_bfd_link_split_section _bfd_generic_link_split_section
+#define bfd_pef_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+
+static void bfd_pef_print_symbol PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
+static void bfd_pef_convert_architecture PARAMS ((unsigned long, enum bfd_architecture *, unsigned long *));
+static bfd_boolean bfd_pef_mkobject PARAMS ((bfd *));
+static int bfd_pef_parse_traceback_table PARAMS ((bfd *, asection *, unsigned char *, size_t, size_t, asymbol *, FILE *));
+static const char *bfd_pef_section_name PARAMS ((bfd_pef_section *));
+static unsigned long bfd_pef_section_flags PARAMS ((bfd_pef_section *));
+static asection *bfd_pef_make_bfd_section PARAMS ((bfd *, bfd_pef_section *));
+static int bfd_pef_read_header PARAMS ((bfd *, bfd_pef_header *));
+static const bfd_target *bfd_pef_object_p PARAMS ((bfd *));
+static int bfd_pef_parse_traceback_tables PARAMS ((bfd *, asection *, unsigned char *, size_t, long *, asymbol **));
+static int bfd_pef_parse_function_stub PARAMS ((bfd *, unsigned char *, size_t, unsigned long *));
+static int bfd_pef_parse_function_stubs PARAMS ((bfd *, asection *, unsigned char *, size_t, unsigned char *, size_t, unsigned long *, asymbol **));
+static long bfd_pef_parse_symbols PARAMS ((bfd *, asymbol **));
+static long bfd_pef_count_symbols PARAMS ((bfd *));
+static long bfd_pef_get_symtab_upper_bound PARAMS ((bfd *));
+static long bfd_pef_get_symtab PARAMS ((bfd *, asymbol **));
+static asymbol *bfd_pef_make_empty_symbol PARAMS ((bfd *));
+static void bfd_pef_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
+static int bfd_pef_sizeof_headers PARAMS ((bfd *, bfd_boolean));
+static int bfd_pef_xlib_read_header PARAMS ((bfd *, bfd_pef_xlib_header *));
+static int bfd_pef_xlib_scan PARAMS ((bfd *, bfd_pef_xlib_header *));
+static const bfd_target *bfd_pef_xlib_object_p PARAMS ((bfd *));
static void
bfd_pef_print_symbol (abfd, afile, symbol, how)
@@ -112,6 +92,7 @@ bfd_pef_print_symbol (abfd, afile, symbol, how)
bfd_print_symbol_type how;
{
FILE *file = (FILE *) afile;
+
switch (how)
{
case bfd_print_symbol_name:
@@ -186,14 +167,14 @@ bfd_pef_parse_traceback_table (abfd, section, buf, len, pos, sym, file)
sym->flags = 0;
sym->udata.i = 0;
- /* memcpy is fine since all fields are unsigned char */
+ /* memcpy is fine since all fields are unsigned char. */
if ((pos + 8) > len)
return -1;
memcpy (&table, buf + pos, 8);
- /* calling code relies on returned symbols having a name and
- correct offset */
+ /* Calling code relies on returned symbols having a name and
+ correct offset. */
if ((table.lang != TB_C) && (table.lang != TB_CPLUSPLUS))
return -1;
@@ -218,8 +199,8 @@ bfd_pef_parse_traceback_table (abfd, section, buf, len, pos, sym, file)
off.tb_offset = bfd_getb32 (buf + pos + offset);
offset += 4;
- /* need to subtract 4 because the offset includes the 0x0L
- preceding the table */
+ /* Need to subtract 4 because the offset includes the 0x0L
+ preceding the table. */
if (file != NULL)
fprintf (file, " [offset = 0x%lx]", off.tb_offset);
@@ -271,14 +252,14 @@ bfd_pef_parse_traceback_table (abfd, section, buf, len, pos, sym, file)
memcpy (namebuf, buf + pos + offset, name.name_len);
namebuf[name.name_len] = '\0';
- /* strip leading period inserted by compiler */
+ /* Strip leading period inserted by compiler. */
if (namebuf[0] == '.')
memmove (namebuf, namebuf + 1, name.name_len + 1);
sym->name = namebuf;
for (s = sym->name; (*s != '\0'); s++)
- if (! isprint (*s))
+ if (! ISPRINT (*s))
return -1;
offset += name.name_len;
@@ -713,8 +694,7 @@ static int bfd_pef_parse_traceback_tables (abfd, sec, buf, len, nsym, csym)
for (;;)
{
- /* we're reading symbols two at a time */
-
+ /* We're reading symbols two at a time. */
if (csym && ((csym[count] == NULL) || (csym[count + 1] == NULL)))
break;
@@ -735,7 +715,7 @@ static int bfd_pef_parse_traceback_tables (abfd, sec, buf, len, nsym, csym)
&function, 0);
if (ret < 0)
{
- /* skip over 0x0L to advance to next possible traceback table */
+ /* Skip over 0x0L to advance to next possible traceback table. */
pos += 4;
continue;
}
@@ -743,7 +723,7 @@ static int bfd_pef_parse_traceback_tables (abfd, sec, buf, len, nsym, csym)
BFD_ASSERT (function.name != NULL);
/* Don't bother to compute the name if we are just
- counting symbols */
+ counting symbols. */
if (csym)
{
@@ -913,7 +893,7 @@ static int bfd_pef_parse_function_stubs (abfd, codesec, codebuf, codelen,
{
if (*s == '\0')
break;
- if (! isprint (*s))
+ if (! ISPRINT (*s))
goto error;
namelen++;
}
diff --git a/bfd/po/Make-in b/bfd/po/Make-in
index a288585d893..1608b2d6272 100644
--- a/bfd/po/Make-in
+++ b/bfd/po/Make-in
@@ -24,6 +24,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+DESTDIR =
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -124,9 +126,9 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -136,7 +138,7 @@ install-data-yes: all
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -166,12 +168,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -184,12 +186,12 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 24d4a48337c..bbd8ddad096 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -111,6 +111,7 @@ cpu-vax.c
cpu-w65.c
cpu-we32k.c
cpu-xstormy16.c
+cpu-xtensa.c
cpu-z8k.c
demo64.c
dwarf1.c
@@ -149,6 +150,7 @@ elf32-iq2000.c
elf32-m32r.c
elf32-m68hc11.c
elf32-m68hc12.c
+elf32-m68hc1x.c
elf32-m68k.c
elf32-m88k.c
elf32-mcore.c
@@ -166,6 +168,7 @@ elf32-sparc.c
elf32-v850.c
elf32-vax.c
elf32-xstormy16.c
+elf32-xtensa.c
elf32.c
elf64-alpha.c
elf64-gen.c
@@ -304,3 +307,5 @@ xcoff-target.h
xcofflink.c
xsym.c
xsym.h
+xtensa-isa.c
+xtensa-modules.c
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 8471c0cda7e..f402c966b59 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-02-08 03:22-0200\n"
+"POT-Creation-Date: 2003-06-03 14:40+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,163 +14,176 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: aout-adobe.c:196
+#: aout-adobe.c:204
#, c-format
msgid "%s: Unknown section type in a.out.adobe file: %x\n"
msgstr ""
-#: aout-cris.c:208
+#: aout-cris.c:207
#, c-format
msgid "%s: Invalid relocation type exported: %d"
msgstr ""
-#: aout-cris.c:252
+#: aout-cris.c:251
#, c-format
msgid "%s: Invalid relocation type imported: %d"
msgstr ""
-#: aout-cris.c:263
+#: aout-cris.c:262
#, c-format
msgid "%s: Bad relocation record imported: %d"
msgstr ""
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1295 aoutx.h:1716
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1669
+#: aoutx.h:1682
#, c-format
msgid ""
"%s: can not represent section for symbol `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1671
+#: aoutx.h:1684
msgid "*unknown*"
msgstr ""
-#: aoutx.h:3735
+#: aoutx.h:3776
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr ""
-#: archive.c:1826
+#: archive.c:1823
msgid "Warning: writing archive was slow: rewriting timestamp\n"
msgstr ""
-#: archive.c:2093
+#: archive.c:2090
msgid "Reading archive file mod timestamp"
msgstr ""
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2116
msgid "Writing updated armap timestamp"
msgstr ""
-#: bfd.c:274
+#: bfd.c:286
msgid "No error"
msgstr ""
-#: bfd.c:275
+#: bfd.c:287
msgid "System call error"
msgstr ""
-#: bfd.c:276
+#: bfd.c:288
msgid "Invalid bfd target"
msgstr ""
-#: bfd.c:277
+#: bfd.c:289
msgid "File in wrong format"
msgstr ""
-#: bfd.c:278
+#: bfd.c:290
msgid "Archive object file in wrong format"
msgstr ""
-#: bfd.c:279
+#: bfd.c:291
msgid "Invalid operation"
msgstr ""
-#: bfd.c:280
+#: bfd.c:292
msgid "Memory exhausted"
msgstr ""
-#: bfd.c:281
+#: bfd.c:293
msgid "No symbols"
msgstr ""
-#: bfd.c:282
+#: bfd.c:294
msgid "Archive has no index; run ranlib to add one"
msgstr ""
-#: bfd.c:283
+#: bfd.c:295
msgid "No more archived files"
msgstr ""
-#: bfd.c:284
+#: bfd.c:296
msgid "Malformed archive"
msgstr ""
-#: bfd.c:285
+#: bfd.c:297
msgid "File format not recognized"
msgstr ""
-#: bfd.c:286
+#: bfd.c:298
msgid "File format is ambiguous"
msgstr ""
-#: bfd.c:287
+#: bfd.c:299
msgid "Section has no contents"
msgstr ""
-#: bfd.c:288
+#: bfd.c:300
msgid "Nonrepresentable section on output"
msgstr ""
-#: bfd.c:289
+#: bfd.c:301
msgid "Symbol needs debug section which does not exist"
msgstr ""
-#: bfd.c:290
+#: bfd.c:302
msgid "Bad value"
msgstr ""
-#: bfd.c:291
+#: bfd.c:303
msgid "File truncated"
msgstr ""
-#: bfd.c:292
+#: bfd.c:304
msgid "File too big"
msgstr ""
-#: bfd.c:293
+#: bfd.c:305
msgid "#<Invalid error code>"
msgstr ""
-#: bfd.c:700
+#: bfd.c:712
#, c-format
msgid "BFD %s assertion fail %s:%d"
msgstr ""
-#: bfd.c:719
+#: bfd.c:731
#, c-format
msgid "BFD %s internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: bfd.c:723
+#: bfd.c:735
#, c-format
msgid "BFD %s internal error, aborting at %s line %d\n"
msgstr ""
-#: bfd.c:725
+#: bfd.c:737
msgid "Please report this bug.\n"
msgstr ""
+#: bfdwin.c:206
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr ""
+
+#: bfdwin.c:209
+msgid "not mapping: env var not set\n"
+msgstr ""
+
#: binary.c:306
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
msgstr ""
+#: coff-rs6000.c:3616 coff64-rs6000.c:2109
+#, c-format
+msgid "%s: symbol `%s' has unrecognized smclas %d"
+msgstr ""
+
#: coff-a29k.c:119
msgid "Missing IHCONST"
msgstr ""
@@ -179,7 +192,7 @@ msgstr ""
msgid "Missing IHIHALF"
msgstr ""
-#: coff-a29k.c:212 coff-or32.c:228
+#: coff-a29k.c:212 coff-or32.c:236
msgid "Unrecognized reloc"
msgstr ""
@@ -191,323 +204,334 @@ msgstr ""
msgid "missing IHIHALF reloc"
msgstr ""
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433
+#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
msgid "GP relative relocation used when GP not defined"
msgstr ""
-#: coff-alpha.c:1485
+#: coff-alpha.c:1488
msgid "using multiple gp values"
msgstr ""
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:294
#, c-format
msgid "%s: unable to find THUMB glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:329
#, c-format
msgid "%s: unable to find ARM glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
#, c-format
msgid "%s(%s): warning: interworking not enabled."
msgstr ""
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1398 elf32-arm.h:1002
#, c-format
msgid " first occurrence: %s: arm call to thumb"
msgstr ""
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1493 elf32-arm.h:895
#, c-format
msgid " first occurrence: %s: thumb call to arm"
msgstr ""
-#: coff-arm.c:1477
+#: coff-arm.c:1496
msgid " consider relinking with --support-old-code enabled"
msgstr ""
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1788 coff-tic80.c:686 cofflink.c:3038
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
msgstr ""
-#: coff-arm.c:2107
+#: coff-arm.c:2132
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
msgstr ""
-#: coff-arm.c:2235
+#: coff-arm.c:2265
#, c-format
msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
msgstr ""
-#: coff-arm.c:2250 elf32-arm.h:2287
+#: coff-arm.c:2280 elf32-arm.h:2328
#, c-format
msgid ""
"ERROR: %s passes floats in float registers, whereas %s passes them in "
"integer registers"
msgstr ""
-#: coff-arm.c:2253 elf32-arm.h:2292
+#: coff-arm.c:2283 elf32-arm.h:2333
#, c-format
msgid ""
"ERROR: %s passes floats in integer registers, whereas %s passes them in "
"float registers"
msgstr ""
-#: coff-arm.c:2268
+#: coff-arm.c:2298
#, c-format
msgid ""
"ERROR: %s is compiled as position independent code, whereas target %s is "
"absolute position"
msgstr ""
-#: coff-arm.c:2271
+#: coff-arm.c:2301
#, c-format
msgid ""
"ERROR: %s is compiled as absolute position code, whereas target %s is "
"position independent"
msgstr ""
-#: coff-arm.c:2300 elf32-arm.h:2348
+#: coff-arm.c:2330 elf32-arm.h:2405
#, c-format
msgid "Warning: %s supports interworking, whereas %s does not"
msgstr ""
-#: coff-arm.c:2303 elf32-arm.h:2355
+#: coff-arm.c:2333 elf32-arm.h:2412
#, c-format
msgid "Warning: %s does not support interworking, whereas %s does"
msgstr ""
-#: coff-arm.c:2330
+#: coff-arm.c:2360
#, c-format
msgid "private flags = %x:"
msgstr ""
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2368 elf32-arm.h:2467
msgid " [floats passed in float registers]"
msgstr ""
-#: coff-arm.c:2340
+#: coff-arm.c:2370
msgid " [floats passed in integer registers]"
msgstr ""
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2373 elf32-arm.h:2470
msgid " [position independent]"
msgstr ""
-#: coff-arm.c:2345
+#: coff-arm.c:2375
msgid " [absolute position]"
msgstr ""
-#: coff-arm.c:2349
+#: coff-arm.c:2379
msgid " [interworking flag not initialised]"
msgstr ""
-#: coff-arm.c:2351
+#: coff-arm.c:2381
msgid " [interworking supported]"
msgstr ""
-#: coff-arm.c:2353
+#: coff-arm.c:2383
msgid " [interworking not supported]"
msgstr ""
-#: coff-arm.c:2401 elf32-arm.h:2114
+#: coff-arm.c:2431 elf32-arm.h:2150
#, c-format
msgid ""
"Warning: Not setting interworking flag of %s since it has already been "
"specified as non-interworking"
msgstr ""
-#: coff-arm.c:2405 elf32-arm.h:2118
+#: coff-arm.c:2435 elf32-arm.h:2154
#, c-format
msgid "Warning: Clearing the interworking flag of %s due to outside request"
msgstr ""
-#: coff-i960.c:136 coff-i960.c:485
-msgid "uncertain calling convention for non-COFF symbol"
+#: coffcode.h:1102
+#, c-format
+msgid "%s (%s): Section flag %s (0x%x) ignored"
msgstr ""
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9967
-msgid "unsupported reloc type"
+#: coffcode.h:2178
+#, c-format
+msgid "Unrecognized TI COFF target id '0x%x'"
msgstr ""
-#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739
-msgid "GP relative relocation when _gp not defined"
+#: coffcode.h:4401
+#, c-format
+msgid "%s: warning: illegal symbol index %ld in line numbers"
msgstr ""
-#. No other sections should appear in -membedded-pic
-#. code.
-#: coff-mips.c:2468
-msgid "reloc against unsupported section"
+#: coffcode.h:4415
+#, c-format
+msgid "%s: warning: duplicate line number information for `%s'"
msgstr ""
-#: coff-mips.c:2476
-msgid "reloc not properly aligned"
+#: coffcode.h:4769
+#, c-format
+msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
msgstr ""
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coffcode.h:4902
#, c-format
-msgid "%s: unsupported relocation type 0x%02x"
+msgid "warning: %s: local symbol `%s' has no section"
msgstr ""
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-tic4x.c:248 coff-tic54x.c:403 coffcode.h:5009
#, c-format
-msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
+msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr ""
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coffcode.h:5047
#, c-format
-msgid "%s: symbol `%s' has unrecognized smclas %d"
+msgid "%s: illegal relocation type %d at address 0x%lx"
msgstr ""
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coffgen.c:1666
#, c-format
-msgid "Unrecognized reloc type 0x%x"
+msgid "%s: bad string table size %lu"
msgstr ""
-#: coff-tic54x.c:390 coffcode.h:4874
+#: coff-h8300.c:1096
#, c-format
-msgid "%s: warning: illegal symbol index %ld in relocs"
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
msgstr ""
-#: coff-w65.c:363
-#, c-format
-msgid "ignoring reloc %s\n"
+#: coff-i960.c:137 coff-i960.c:486
+msgid "uncertain calling convention for non-COFF symbol"
msgstr ""
-#: coffcode.h:1081
+#: cofflink.c:538 elflink.h:1276
#, c-format
-msgid "%s (%s): Section flag %s (0x%x) ignored"
+msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr ""
-#: coffcode.h:2137
+#: cofflink.c:2328
#, c-format
-msgid "Unrecognized TI COFF target id '0x%x'"
+msgid "%s: relocs in section `%s', but it has no contents"
msgstr ""
-#: coffcode.h:4263
+#: cofflink.c:2671 coffswap.h:890
#, c-format
-msgid "%s: warning: illegal symbol index %ld in line numbers"
+msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr ""
-#: coffcode.h:4277
+#: cofflink.c:2680 coffswap.h:876
#, c-format
-msgid "%s: warning: duplicate line number information for `%s'"
+msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: coffcode.h:4636
-#, c-format
-msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1741
+msgid "unsupported reloc type"
msgstr ""
-#: coffcode.h:4767
-#, c-format
-msgid "warning: %s: local symbol `%s' has no section"
+#: coff-mips.c:839 elf32-mips.c:1061 elf64-mips.c:1587 elfn32-mips.c:1553
+msgid "GP relative relocation when _gp not defined"
msgstr ""
-#: coffcode.h:4912
+#. No other sections should appear in -membedded-pic
+#. code.
+#: coff-mips.c:2431
+msgid "reloc against unsupported section"
+msgstr ""
+
+#: coff-mips.c:2439
+msgid "reloc not properly aligned"
+msgstr ""
+
+#: coff-rs6000.c:2790
#, c-format
-msgid "%s: illegal relocation type %d at address 0x%lx"
+msgid "%s: unsupported relocation type 0x%02x"
msgstr ""
-#: coffgen.c:1661
+#: coff-rs6000.c:2883
#, c-format
-msgid "%s: bad string table size %lu"
+msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr ""
-#: cofflink.c:536 elflink.h:1967
+#: coff-tic4x.c:200 coff-tic54x.c:292 coff-tic80.c:449
#, c-format
-msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
+msgid "Unrecognized reloc type 0x%x"
msgstr ""
-#: cofflink.c:2317
+#: coff-w65.c:364
#, c-format
-msgid "%s: relocs in section `%s', but it has no contents"
+msgid "ignoring reloc %s\n"
msgstr ""
-#: cofflink.c:2653 coffswap.h:889
+#: cpu-arm.c:196 cpu-arm.c:206
#, c-format
-msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
+msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
msgstr ""
-#: cofflink.c:2662 coffswap.h:876
+#: cpu-arm.c:344
#, c-format
-msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
+msgid "warning: unable to update contents of %s section in %s"
msgstr ""
-#: dwarf2.c:381
+#: dwarf2.c:380
msgid "Dwarf Error: Can't find .debug_str section."
msgstr ""
-#: dwarf2.c:398
+#: dwarf2.c:397
#, c-format
msgid ""
-"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
-"size (%u)."
+"Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str "
+"size (%lu)."
msgstr ""
-#: dwarf2.c:542
+#: dwarf2.c:541
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr ""
-#: dwarf2.c:559
+#: dwarf2.c:556
#, c-format
msgid ""
-"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size "
-"(%u)."
+"Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size "
+"(%lu)."
msgstr ""
#: dwarf2.c:756
#, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
msgstr ""
-#: dwarf2.c:843
+#: dwarf2.c:933
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr ""
-#: dwarf2.c:929
+#: dwarf2.c:1032
msgid "Dwarf Error: Can't find .debug_line section."
msgstr ""
-#: dwarf2.c:952
+#: dwarf2.c:1049
#, c-format
msgid ""
-"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."
+"Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%"
+"lu)."
msgstr ""
-#: dwarf2.c:1143
+#: dwarf2.c:1255
msgid "Dwarf Error: mangled line number section."
msgstr ""
-#: dwarf2.c:1318 dwarf2.c:1529
+#: dwarf2.c:1470 dwarf2.c:1620
#, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
+msgid "Dwarf Error: Could not find abbrev number %u."
msgstr ""
-#: dwarf2.c:1490
+#: dwarf2.c:1581
#, c-format
msgid ""
-"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
+"Dwarf Error: found dwarf version '%u', this reader only handles version 2 "
"information."
msgstr ""
-#: dwarf2.c:1497
+#: dwarf2.c:1588
#, c-format
msgid ""
"Dwarf Error: found address size '%u', this reader can not handle sizes "
"greater than '%u'."
msgstr ""
-#: dwarf2.c:1520
+#: dwarf2.c:1611
#, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
msgstr ""
-#: ecoff.c:1328
+#: ecoff.c:1337
#, c-format
msgid "Unknown basic type %d"
msgstr ""
@@ -568,831 +592,895 @@ msgid ""
" Type: %s"
msgstr ""
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:4286
-#: elf64-sh64.c:1640 elf64-x86-64.c:1275
-#, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr ""
-
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf32-xstormy16.c:976 elf64-mmix.c:1302
-msgid "internal error: out of range error"
-msgstr ""
-
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7600 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1306
-msgid "internal error: unsupported relocation error"
-msgstr ""
-
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1288
-msgid "internal error: dangerous error"
-msgstr ""
-
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf32-xstormy16.c:988 elf64-mmix.c:1314
-msgid "internal error: unknown error"
-msgstr ""
-
-#: elf.c:343
+#: elf32-arm.h:1228
#, c-format
-msgid "%s: invalid string offset %u >= %lu for section `%s'"
-msgstr ""
-
-#: elf.c:448
-#, c-format
-msgid "%s: invalid SHT_GROUP entry"
-msgstr ""
-
-#: elf.c:529
-#, c-format
-msgid "%s: no group info for section %s"
-msgstr ""
-
-#: elf.c:840
-msgid ""
-"\n"
-"Program Header:\n"
-msgstr ""
-
-#: elf.c:889
-msgid ""
-"\n"
-"Dynamic Section:\n"
-msgstr ""
-
-#: elf.c:1018
-msgid ""
-"\n"
-"Version definitions:\n"
-msgstr ""
-
-#: elf.c:1041
-msgid ""
-"\n"
-"Version References:\n"
-msgstr ""
-
-#: elf.c:1046
-#, c-format
-msgid " required from %s:\n"
-msgstr ""
-
-#: elf.c:1682
-#, c-format
-msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
msgstr ""
-#: elf.c:3296
+#: elf32-arm.h:1424
#, c-format
-msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
msgstr ""
-#: elf.c:3400
+#: elf32-arm.h:1918 elf32-sh.c:4703 elf64-sh64.c:1613
#, c-format
-msgid "%s: Not enough room for program headers, try linking with -N"
+msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
msgstr ""
-#: elf.c:3525
+#: elf32-arm.h:2012
#, c-format
msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
-msgstr ""
-
-#: elf.c:3811
-#, c-format
-msgid "%s: warning: allocated section `%s' not in segment"
-msgstr ""
-
-#: elf.c:4142
-#, c-format
-msgid "%s: symbol `%s' required but not present"
-msgstr ""
-
-#: elf.c:4395
-#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr ""
-
-#: elf.c:5808
-#, c-format
-msgid "%s: unsupported relocation type %s"
+"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
msgstr ""
-#: elf32-arm.h:1224
-#, c-format
-msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
+#: elf-m10200.c:442 elf-m10300.c:655 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1383 elf32-d10v.c:481 elf32-fr30.c:633 elf32-frv.c:815
+#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
+#: elf32-openrisc.c:436 elf32-v850.c:1753 elf32-xstormy16.c:976
+#: elf64-mmix.c:1332
+msgid "internal error: out of range error"
msgstr ""
-#: elf32-arm.h:1420
-#, c-format
-msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
+#: elf-m10200.c:446 elf-m10300.c:659 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1387 elf32-d10v.c:485 elf32-fr30.c:637 elf32-frv.c:819
+#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
+#: elf32-v850.c:1757 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6533
+msgid "internal error: unsupported relocation error"
msgstr ""
-#: elf32-arm.h:1904 elf32-i386.c:1782 elf32-sh.c:4198
-#, c-format
-msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
+#: elf-m10200.c:450 elf-m10300.c:663 elf32-arm.h:2096 elf32-d10v.c:489
+#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
+msgid "internal error: dangerous error"
msgstr ""
-#: elf32-arm.h:1998
-#, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+#: elf-m10200.c:454 elf-m10300.c:667 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1395 elf32-d10v.c:493 elf32-fr30.c:645 elf32-frv.c:827
+#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
+#: elf32-openrisc.c:448 elf32-v850.c:1777 elf32-xstormy16.c:988
+#: elf64-mmix.c:1344
+msgid "internal error: unknown error"
msgstr ""
-#: elf32-arm.h:2166
+#: elf32-arm.h:2202
#, c-format
msgid ""
"Warning: Clearing the interworking flag of %s because non-interworking code "
"in %s has been linked with it"
msgstr ""
-#: elf32-arm.h:2261
+#: elf32-arm.h:2302
#, c-format
msgid ""
"ERROR: %s is compiled for EABI version %d, whereas %s is compiled for "
"version %d"
msgstr ""
-#: elf32-arm.h:2275
+#: elf32-arm.h:2316
#, c-format
msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
msgstr ""
-#: elf32-arm.h:2303
+#: elf32-arm.h:2344
#, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgid "ERROR: %s uses VFP instructions, whereas %s does not"
msgstr ""
-#: elf32-arm.h:2308
+#: elf32-arm.h:2349
#, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgid "ERROR: %s uses FPA instructions, whereas %s does not"
msgstr ""
-#: elf32-arm.h:2328
+#: elf32-arm.h:2360 elf32-arm.h:2365
+#, c-format
+msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+msgstr ""
+
+#: elf32-arm.h:2385
#, c-format
msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
msgstr ""
-#: elf32-arm.h:2333
+#: elf32-arm.h:2390
#, c-format
msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
msgstr ""
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3255
+#: elf32-arm.h:2443 elf32-cris.c:2968 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9379
#, c-format
msgid "private flags = %lx:"
msgstr ""
-#: elf32-arm.h:2395
+#: elf32-arm.h:2452
msgid " [interworking enabled]"
msgstr ""
-#: elf32-arm.h:2403
+#: elf32-arm.h:2460
msgid " [VFP float format]"
msgstr ""
-#: elf32-arm.h:2405
+#: elf32-arm.h:2462
+msgid " [Maverick float format]"
+msgstr ""
+
+#: elf32-arm.h:2464
msgid " [FPA float format]"
msgstr ""
-#: elf32-arm.h:2414
+#: elf32-arm.h:2473
msgid " [new ABI]"
msgstr ""
-#: elf32-arm.h:2417
+#: elf32-arm.h:2476
msgid " [old ABI]"
msgstr ""
-#: elf32-arm.h:2420
+#: elf32-arm.h:2479
msgid " [software FP]"
msgstr ""
-#: elf32-arm.h:2428
+#: elf32-arm.h:2488
msgid " [Version1 EABI]"
msgstr ""
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2491 elf32-arm.h:2502
msgid " [sorted symbol table]"
msgstr ""
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2493 elf32-arm.h:2504
msgid " [unsorted symbol table]"
msgstr ""
-#: elf32-arm.h:2439
+#: elf32-arm.h:2499
msgid " [Version2 EABI]"
msgstr ""
-#: elf32-arm.h:2447
+#: elf32-arm.h:2507
msgid " [dynamic symbols use segment index]"
msgstr ""
-#: elf32-arm.h:2450
+#: elf32-arm.h:2510
msgid " [mapping symbols precede others]"
msgstr ""
-#: elf32-arm.h:2457
+#: elf32-arm.h:2517
msgid " <EABI version unrecognised>"
msgstr ""
-#: elf32-arm.h:2464
+#: elf32-arm.h:2524
msgid " [relocatable executable]"
msgstr ""
-#: elf32-arm.h:2467
+#: elf32-arm.h:2527
msgid " [has entry point]"
msgstr ""
-#: elf32-arm.h:2472
+#: elf32-arm.h:2532
msgid "<Unrecognised flag bits set>"
msgstr ""
-#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984
-#: elf64-mmix.c:1310
+#: elf32-avr.c:820 elf32-cris.c:1391 elf32-fr30.c:641 elf32-frv.c:823
+#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
+#: elf32-openrisc.c:444 elf32-v850.c:1761 elf32-xstormy16.c:984
+#: elf64-mmix.c:1340
msgid "internal error: dangerous relocation"
msgstr ""
-#: elf32-cris.c:949
+#: elf32-cris.c:931
#, c-format
msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1012
+#: elf32-cris.c:993
#, c-format
msgid ""
"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:996 elf32-cris.c:1122
msgid "[whose name is lost]"
msgstr ""
-#: elf32-cris.c:1131
+#: elf32-cris.c:1111
#, c-format
msgid ""
"%s: relocation %s with non-zero addend %d against local symbol from %s "
"section"
msgstr ""
-#: elf32-cris.c:1138
+#: elf32-cris.c:1118
#, c-format
msgid ""
"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1156
+#: elf32-cris.c:1136
#, c-format
msgid ""
"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1171
+#: elf32-cris.c:1151
#, c-format
msgid "%s: relocation %s in section %s with no GOT created"
msgstr ""
-#: elf32-cris.c:1289
+#: elf32-cris.c:1270
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
msgstr ""
-#: elf32-cris.c:2523
+#: elf32-cris.c:2493
#, c-format
msgid ""
"%s, section %s:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
-#: elf32-cris.c:2994
+#: elf32-cris.c:2971
msgid " [symbols have a _ prefix]"
msgstr ""
-#: elf32-cris.c:3033
+#: elf32-cris.c:3010
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
msgstr ""
-#: elf32-cris.c:3034
+#: elf32-cris.c:3011
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
msgstr ""
-#: elf32-gen.c:82 elf64-gen.c:82
+#: elf32-frv.c:1223
+#, c-format
+msgid ""
+"%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr ""
+
+#: elf32-frv.c:1273 elf32-iq2000.c:895
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr ""
+
+#: elf32-frv.c:1285
+#, c-format
+msgid ""
+"%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%"
+"lx)"
+msgstr ""
+
+#: elf32-frv.c:1321 elf32-iq2000.c:933
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr ""
+
+#: elf32-gen.c:83 elf64-gen.c:82
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
msgstr ""
-#: elf32-hppa.c:646
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3147
#, c-format
msgid "%s: cannot create stub entry %s"
msgstr ""
-#: elf32-hppa.c:937 elf32-hppa.c:3549
+#: elf32-hppa.c:957 elf32-hppa.c:3538
#, c-format
msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
msgstr ""
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1340 elf64-x86-64.c:751 elf64-x86-64.c:876
#, c-format
msgid ""
"%s: relocation %s can not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1360
#, c-format
msgid ""
"%s: relocation %s should not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1553
#, c-format
msgid "Could not find relocation section for %s"
msgstr ""
-#: elf32-hppa.c:2871
+#: elf32-hppa.c:2828
#, c-format
msgid "%s: duplicate export stub %s"
msgstr ""
-#: elf32-hppa.c:3433
+#: elf32-hppa.c:3416
#, c-format
msgid "%s(%s+0x%lx): fixing %s"
msgstr ""
-#: elf32-hppa.c:4073
+#: elf32-hppa.c:4039
#, c-format
msgid "%s(%s+0x%lx): cannot handle %s for %s"
msgstr ""
-#: elf32-hppa.c:4412
+#: elf32-hppa.c:4357
msgid ".got section not immediately after .plt section"
msgstr ""
-#: elf32-i386.c:298
+#: elf32-i386.c:390
#, c-format
msgid "%s: invalid relocation type %d"
msgstr ""
-#: elf32-i386.c:718 elf32-s390.c:637 elf64-s390.c:595
+#: elf32-i386.c:923 elf32-s390.c:919 elf32-sparc.c:887 elf32-xtensa.c:635
+#: elf64-s390.c:873 elf64-x86-64.c:729
#, c-format
msgid "%s: bad symbol index: %d"
msgstr ""
-#: elf32-i386.c:863 elf32-s390.c:791 elf64-ppc.c:2198 elf64-s390.c:759
+#: elf32-i386.c:1032 elf32-s390.c:1089 elf32-sh.c:6422 elf32-sparc.c:1011
+#: elf64-s390.c:1051
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf32-i386.c:1146 elf32-s390.c:1200 elf64-ppc.c:3956 elf64-s390.c:1165
+#: elf64-x86-64.c:965
#, c-format
msgid "%s: bad relocation section name `%s'"
msgstr ""
-#: elf32-i386.c:2073 elf32-s390.c:1956 elf64-ppc.c:4128 elf64-s390.c:1959
+#: elf32-i386.c:3003 elf32-m68k.c:1757 elf32-s390.c:2936 elf32-sparc.c:2876
+#: elf32-xtensa.c:2160 elf64-s390.c:2933 elf64-sparc.c:2664
+#: elf64-x86-64.c:2553
#, c-format
msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
msgstr ""
-#: elf32-i386.c:2111 elf32-s390.c:1994 elf64-s390.c:1997
+#: elf32-i386.c:3042 elf32-m68k.c:1796 elf32-s390.c:2974 elf64-s390.c:2971
+#: elf64-x86-64.c:2591
#, c-format
msgid "%s(%s+0x%lx): reloc against `%s': error %d"
msgstr ""
-#: elf32-m32r.c:923
-msgid "SDA relocation when _SDA_BASE_ not defined"
+#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+msgid ""
+"ip2k relaxer: switch table without complete matching relocation information."
msgstr ""
-#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537
-#, c-format
-msgid "%s: unknown relocation type %d"
+#: elf32-ip2k.c:588 elf32-ip2k.c:767
+msgid "ip2k relaxer: switch table header corrupt."
msgstr ""
-#: elf32-m32r.c:1223
+#: elf32-ip2k.c:1395
#, c-format
-msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
msgstr ""
-#: elf32-m32r.c:2000
+#: elf32-ip2k.c:1409
#, c-format
-msgid "%s: Instruction set mismatch with previous modules"
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr ""
+
+#. Only if it's not an unresolved symbol.
+#: elf32-ip2k.c:1593
+msgid "unsupported relocation between data/insn address spaces"
msgstr ""
-#: elf32-m32r.c:2023
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2211 elf64-sparc.c:3072
+#: elfxx-mips.c:9336
#, c-format
-msgid "private flags = %lx"
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-m32r.c:2028
-msgid ": m32r instructions"
+#: elf32-m32r.c:930
+msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr ""
-#: elf32-m32r.c:2029
-msgid ": m32rx instructions"
+#: elf32-ia64.c:3903 elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407
+#: elf64-ia64.c:3903
+#, c-format
+msgid "%s: unknown relocation type %d"
msgstr ""
-#: elf32-m68k.c:413
-msgid " [cpu32]"
+#: elf32-m32r.c:1226
+#, c-format
+msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
msgstr ""
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m32r.c:1952
#, c-format
-msgid "%s: Relocation %s (%d) is not currently supported.\n"
+msgid "%s: Instruction set mismatch with previous modules"
msgstr ""
-#: elf32-mcore.c:438
+#: elf32-m32r.c:1975
#, c-format
-msgid "%s: Unknown relocation type %d\n"
+msgid "private flags = %lx"
msgstr ""
-#: elf32-mips.c:2156 elf64-mips.c:1972
-msgid "32bits gp relative relocation occurs for an external symbol"
+#: elf32-m32r.c:1980
+msgid ": m32r instructions"
msgstr ""
-#: elf32-mips.c:2305
-#, c-format
-msgid "Linking mips16 objects into %s format is not supported"
+#: elf32-m32r.c:1981
+msgid ": m32rx instructions"
msgstr ""
-#: elf32-mips.c:3129
+#: elf32-m68hc1x.c:1217
#, c-format
-msgid "%s: linking PIC files with non-PIC files"
+msgid ""
+"Reference to the far symbol `%s' using a wrong relocation may result in "
+"incorrect execution"
msgstr ""
-#: elf32-mips.c:3139
+#: elf32-m68hc1x.c:1240
#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
+msgid ""
+"banked address [%lx:%04lx] (%lx) is not in the same bank as current banked "
+"address [%lx:%04lx] (%lx)"
msgstr ""
-#: elf32-mips.c:3168
+#: elf32-m68hc1x.c:1259
#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgid ""
+"reference to a banked address [%lx:%04lx] in the normal address space at %"
+"04lx"
msgstr ""
-#: elf32-mips.c:3190
+#: elf32-m68hc1x.c:1396
#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgid ""
+"%s: linking files compiled for 16-bit integers (-mshort) and others for 32-"
+"bit integers"
msgstr ""
-#: elf32-mips.c:3213
+#: elf32-m68hc1x.c:1404
#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgid ""
+"%s: linking files compiled for 32-bit double (-fshort-double) and others for "
+"64-bit double"
msgstr ""
-#: elf32-mips.c:3227 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027
+#: elf32-m68hc1x.c:1414
#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
msgstr ""
-#: elf32-mips.c:3258
-msgid " [abi=O32]"
+#: elf32-m68hc1x.c:1462
+msgid "[abi=32-bit int, "
msgstr ""
-#: elf32-mips.c:3260
-msgid " [abi=O64]"
+#: elf32-m68hc1x.c:1464
+msgid "[abi=16-bit int, "
msgstr ""
-#: elf32-mips.c:3262
-msgid " [abi=EABI32]"
+#: elf32-m68hc1x.c:1467
+msgid "64-bit double, "
msgstr ""
-#: elf32-mips.c:3264
-msgid " [abi=EABI64]"
+#: elf32-m68hc1x.c:1469
+msgid "32-bit double, "
msgstr ""
-#: elf32-mips.c:3266
-msgid " [abi unknown]"
+#: elf32-m68hc1x.c:1472
+msgid "cpu=HC11]"
msgstr ""
-#: elf32-mips.c:3268
-msgid " [abi=N32]"
+#: elf32-m68hc1x.c:1474
+msgid "cpu=HCS12]"
msgstr ""
-#: elf32-mips.c:3270
-msgid " [abi=64]"
+#: elf32-m68hc1x.c:1476
+msgid "cpu=HC12]"
msgstr ""
-#: elf32-mips.c:3272
-msgid " [no abi set]"
+#: elf32-m68hc1x.c:1479
+msgid " [memory=bank-model]"
msgstr ""
-#: elf32-mips.c:3275
-msgid " [mips1]"
+#: elf32-m68hc1x.c:1481
+msgid " [memory=flat]"
msgstr ""
-#: elf32-mips.c:3277
-msgid " [mips2]"
+#: elf32-m68k.c:400
+msgid " [cpu32]"
msgstr ""
-#: elf32-mips.c:3279
-msgid " [mips3]"
+#: elf32-m68k.c:403
+msgid " [m68000]"
msgstr ""
-#: elf32-mips.c:3281
-msgid " [mips4]"
+#: elf32-mcore.c:353 elf32-mcore.c:456
+#, c-format
+msgid "%s: Relocation %s (%d) is not currently supported.\n"
msgstr ""
-#: elf32-mips.c:3283
-msgid " [mips5]"
+#: elf32-mcore.c:441
+#, c-format
+msgid "%s: Unknown relocation type %d\n"
msgstr ""
-#: elf32-mips.c:3285
-msgid " [mips32]"
+#: elf32-mips.c:1151 elf64-mips.c:1720 elfn32-mips.c:1665
+msgid "32bits gp relative relocation occurs for an external symbol"
msgstr ""
-#: elf32-mips.c:3287
-msgid " [mips64]"
+#: elf32-mips.c:1294 elf64-mips.c:1836 elfn32-mips.c:1781
+#, c-format
+msgid "Linking mips16 objects into %s format is not supported"
msgstr ""
-#: elf32-mips.c:3289
-msgid " [unknown ISA]"
+#: elf32-ppc.c:2176
+#, c-format
+msgid ""
+"%s: compiled with -mrelocatable and linked with modules compiled normally"
msgstr ""
-#: elf32-mips.c:3292
-msgid " [32bitmode]"
+#: elf32-ppc.c:2184
+#, c-format
+msgid ""
+"%s: compiled normally and linked with modules compiled with -mrelocatable"
msgstr ""
-#: elf32-mips.c:3294
-msgid " [not 32bitmode]"
+#: elf32-ppc.c:2309
+#, c-format
+msgid "%s: unknown special linker type %d"
msgstr ""
-#: elf32-mips.c:4967
-msgid "static procedure (no name)"
+#: elf32-ppc.c:3178
+#, c-format
+msgid "%s: relocation %s cannot be used when making a shared object"
msgstr ""
-#: elf32-mips.c:5585 elf64-mips.c:6694
+#: elf32-ppc.c:4651 elf64-ppc.c:7532
#, c-format
-msgid "%s: illegal section name `%s'"
+msgid "%s: unknown relocation type %d for symbol %s"
msgstr ""
-#: elf32-mips.c:6152 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
+#: elf32-ppc.c:4902
+#, c-format
+msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
msgstr ""
-#: elf32-mips.c:7263 elf64-mips.c:4203
+#: elf32-ppc.c:5190 elf32-ppc.c:5214 elf32-ppc.c:5271
#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgid ""
+"%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr ""
-#: elf32-mips.c:8272 elf64-mips.c:5891
+#: elf32-ppc.c:5325
#, c-format
-msgid "%s: Malformed reloc detected for section %s"
+msgid "%s: relocation %s is not yet supported for symbol %s."
msgstr ""
-#: elf32-mips.c:8350 elf64-mips.c:5969
+#: elf32-ppc.c:5379 elf64-ppc.c:8124
#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
msgstr ""
-#: elf32-ppc.c:1436 elf64-ppc.c:1521
+#: elf32-ppc.c:5429 elf64-ppc.c:8170
#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
msgstr ""
-#: elf32-ppc.c:1444 elf64-ppc.c:1529
+#: elf32-ppc.c:5695
#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgid "corrupt or empty %s section in %s"
msgstr ""
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:5702
#, c-format
-msgid "%s: Unknown special linker type %d"
+msgid "unable to read in %s section from %s"
msgstr ""
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:5708
#, c-format
-msgid "%s: relocation %s cannot be used when making a shared object"
+msgid "corrupt %s section in %s"
msgstr ""
-#: elf32-ppc.c:3097 elf64-ppc.c:3720
+#: elf32-ppc.c:5751
#, c-format
-msgid "%s: unknown relocation type %d for symbol %s"
+msgid "warning: unable to set size of %s section in %s"
msgstr ""
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
-#, c-format
-msgid ""
-"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+#: elf32-ppc.c:5804
+msgid "failed to allocate space for new APUinfo section."
msgstr ""
-#: elf32-ppc.c:3589
-#, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
+#: elf32-ppc.c:5823
+msgid "failed to compute new APUinfo section."
+msgstr ""
+
+#: elf32-ppc.c:5826
+msgid "failed to install new APUinfo section."
msgstr ""
-#: elf32-sh.c:1971
+#: elf32-s390.c:2173 elf64-s390.c:2144
#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
+msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
msgstr ""
-#: elf32-sh.c:1983
+#: elf32-sh64.c:221 elf64-sh64.c:2407
#, c-format
-msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
msgstr ""
-#: elf32-sh.c:2000
+#: elf32-sh64.c:224 elf64-sh64.c:2410
#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
msgstr ""
-#: elf32-sh.c:2015
+#: elf32-sh64.c:226 elf64-sh64.c:2412
#, c-format
-msgid "%s: 0x%lx: warning: could not find expected reloc"
+msgid "%s: object size does not match that of target %s"
msgstr ""
-#: elf32-sh.c:2072
+#: elf32-sh64.c:461 elf64-sh64.c:2990
#, c-format
-msgid "%s: 0x%lx: warning: symbol in unexpected section"
+msgid "%s: encountered datalabel symbol in input"
msgstr ""
-#: elf32-sh.c:2193
+#: elf32-sh64.c:544
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr ""
+
+#: elf32-sh64.c:547
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr ""
+
+#: elf32-sh64.c:565
#, c-format
-msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
msgstr ""
-#: elf32-sh.c:2202
+#: elf32-sh64.c:614 elf64-sh64.c:1748
#, c-format
-msgid "%s: 0x%lx: warning: bad count"
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
msgstr ""
-#: elf32-sh.c:2611 elf32-sh.c:3002
+#: elf32-sh64.c:698
#, c-format
-msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
+msgid "%s: could not write out added .cranges entries"
msgstr ""
-#: elf32-sh.c:4146 elf64-sh64.c:1557
-msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+#: elf32-sh64.c:760
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
msgstr ""
-#: elf32-sh.c:4357
+#: elf32-sh.c:2103
#, c-format
-msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
msgstr ""
-#: elf32-sh64.c:211 elf64-sh64.c:2391
+#: elf32-sh.c:2115
#, c-format
-msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr ""
-#: elf32-sh64.c:214 elf64-sh64.c:2394
+#: elf32-sh.c:2132
#, c-format
-msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
msgstr ""
-#: elf32-sh64.c:216 elf64-sh64.c:2396
+#: elf32-sh.c:2147
#, c-format
-msgid "%s: object size does not match that of target %s"
+msgid "%s: 0x%lx: warning: could not find expected reloc"
msgstr ""
-#: elf32-sh64.c:447 elf64-sh64.c:2973
+#: elf32-sh.c:2175
#, c-format
-msgid "%s: encountered datalabel symbol in input"
+msgid "%s: 0x%lx: warning: symbol in unexpected section"
msgstr ""
-#: elf32-sh64.c:530
-msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+#: elf32-sh.c:2300
+#, c-format
+msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
msgstr ""
-#: elf32-sh64.c:533
-msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+#: elf32-sh.c:2309
+#, c-format
+msgid "%s: 0x%lx: warning: bad count"
msgstr ""
-#: elf32-sh64.c:551
+#: elf32-sh.c:2712 elf32-sh.c:3088
#, c-format
-msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr ""
+
+#: elf32-sh.c:4651 elf64-sh64.c:1585
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
msgstr ""
-#: elf32-sh64.c:600 elf64-sh64.c:1684
+#: elf32-sh.c:4806
#, c-format
-msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgid "%s: unresolvable relocation against symbol `%s' from %s section"
msgstr ""
-#: elf32-sh64.c:684
+#: elf32-sh.c:4878
#, c-format
-msgid "%s: could not write out added .cranges entries"
+msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
msgstr ""
-#: elf32-sh64.c:745
+#: elf32-sh.c:6621 elf64-alpha.c:4848
#, c-format
-msgid "%s: could not write out sorted .cranges entries"
+msgid "%s: TLS local exec code cannot be linked into shared objects"
msgstr ""
-#: elf32-sparc.c:1554 elf64-sparc.c:2280
+#: elf32-sparc.c:2518 elf64-sparc.c:2314
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr ""
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:3345
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
msgstr ""
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:3359
#, c-format
msgid "%s: linking little endian files with big endian files"
msgstr ""
-#: elf32-v850.c:682
+#: elf32-v850.c:736
#, c-format
msgid "Variable `%s' cannot occupy in multiple small data regions"
msgstr ""
-#: elf32-v850.c:685
+#: elf32-v850.c:739
#, c-format
msgid ""
"Variable `%s' can only be in one of the small, zero, and tiny data regions"
msgstr ""
-#: elf32-v850.c:688
+#: elf32-v850.c:742
#, c-format
msgid ""
"Variable `%s' cannot be in both small and zero data regions simultaneously"
msgstr ""
-#: elf32-v850.c:691
+#: elf32-v850.c:745
#, c-format
msgid ""
"Variable `%s' cannot be in both small and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:694
+#: elf32-v850.c:748
#, c-format
msgid ""
"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:1072
+#: elf32-v850.c:1126
msgid "FAILED to find previous HI16 reloc\n"
msgstr ""
-#: elf32-v850.c:1703
+#: elf32-v850.c:1765
msgid "could not locate special linker symbol __gp"
msgstr ""
-#: elf32-v850.c:1707
+#: elf32-v850.c:1769
msgid "could not locate special linker symbol __ep"
msgstr ""
-#: elf32-v850.c:1711
+#: elf32-v850.c:1773
msgid "could not locate special linker symbol __ctbp"
msgstr ""
-#: elf32-v850.c:1877
+#: elf32-v850.c:1939
#, c-format
msgid "%s: Architecture mismatch with previous modules"
msgstr ""
-#: elf32-v850.c:1897
+#: elf32-v850.c:1959
#, c-format
msgid "private flags = %lx: "
msgstr ""
-#: elf32-v850.c:1902
+#: elf32-v850.c:1964
msgid "v850 architecture"
msgstr ""
-#: elf32-v850.c:1903
+#: elf32-v850.c:1965
msgid "v850e architecture"
msgstr ""
-#: elf32-v850.c:1904
-msgid "v850ea architecture"
+#: elf32-vax.c:549
+msgid " [nonpic]"
+msgstr ""
+
+#: elf32-vax.c:552
+msgid " [d-float]"
+msgstr ""
+
+#: elf32-vax.c:555
+msgid " [g-float]"
+msgstr ""
+
+#: elf32-vax.c:663
+#, c-format
+msgid ""
+"%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of "
+"%ld"
+msgstr ""
+
+#: elf32-vax.c:1667
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr ""
+
+#: elf32-vax.c:1802
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr ""
+
+#: elf32-vax.c:1808
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
msgstr ""
-#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247
+#: elf32-ia64.c:2429 elf32-xstormy16.c:462 elf64-ia64.c:2429
msgid "non-zero addend in @fptr reloc"
msgstr ""
-#: elf64-alpha.c:858
+#: elf64-alpha.c:1108
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr ""
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3731
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr ""
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4602 elf64-alpha.c:4614
#, c-format
msgid "%s: gp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4640 elf64-alpha.c:4773
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-alpha.c:4668
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr ""
+
+#: elf64-alpha.c:4693
+msgid "<unknown>"
+msgstr ""
+
+#: elf64-alpha.c:4698
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr ""
+
+#: elf64-alpha.c:4749
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr ""
+
+#: elf64-alpha.c:4832
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-alpha.c:4855
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-hppa.c:2086
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr ""
-#: elf64-mmix.c:1002
+#: elf64-mmix.c:1032
#, c-format
msgid ""
"%s: Internal inconsistency error for value for\n"
@@ -1400,517 +1488,818 @@ msgid ""
"08lx\n"
msgstr ""
-#: elf64-mmix.c:1386
+#: elf64-mmix.c:1416
#, c-format
msgid ""
"%s: base-plus-offset relocation against register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1391
+#: elf64-mmix.c:1421
#, c-format
msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1435
+#: elf64-mmix.c:1465
#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1440
+#: elf64-mmix.c:1470
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1477
+#: elf64-mmix.c:1507
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
msgstr ""
-#: elf64-mmix.c:1505
+#: elf64-mmix.c:1535
#, c-format
msgid ""
"%s: LOCAL directive: Register $%ld is not a local register. First global "
"register is $%ld."
msgstr ""
-#: elf64-mmix.c:1967
+#: elf64-mmix.c:1994
#, c-format
msgid ""
"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
"linked file\n"
msgstr ""
-#: elf64-mmix.c:2026
+#: elf64-mmix.c:2053
msgid "Register section has contents\n"
msgstr ""
-#: elf64-ppc.c:1484 libbfd.c:1436
+#: elf64-mmix.c:2216
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+" Please report this bug."
+msgstr ""
+
+#: elf64-ppc.c:2362 libbfd.c:887
#, c-format
msgid "%s: compiled for a big endian system and target is little endian"
msgstr ""
-#: elf64-ppc.c:1486 libbfd.c:1438
+#: elf64-ppc.c:2364 libbfd.c:889
#, c-format
msgid "%s: compiled for a little endian system and target is big endian"
msgstr ""
-#: elf64-ppc.c:3354
+#: elf64-ppc.c:4903
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr ""
+
+#: elf64-ppc.c:4923
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr ""
+
+#: elf64-ppc.c:4943
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr ""
+
+#: elf64-ppc.c:6131
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr ""
+
+#: elf64-ppc.c:6170 elf64-ppc.c:6220
#, c-format
msgid "linkage table error against `%s'"
msgstr ""
-#: elf64-ppc.c:3436
-msgid "stub section size doesn't match calculated size"
+#: elf64-ppc.c:6301
+#, c-format
+msgid "can't build branch stub `%s'"
msgstr ""
-#: elf64-ppc.c:4065
+#: elf64-ppc.c:6934
+msgid "stubs don't match calculated size"
+msgstr ""
+
+#: elf64-ppc.c:8009
#, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
+msgid "%s: relocation %s is not supported for symbol %s."
msgstr ""
-#: elf64-ppc.c:4109
+#: elf64-ppc.c:8078
#, c-format
msgid "%s: error: relocation %s not a multiple of 4"
msgstr ""
-#: elf64-sparc.c:1277
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf64-sh64.c:1704
+#, c-format
+msgid ""
+"%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr ""
+
+#: elf64-sparc.c:1370
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
msgstr ""
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1407
#, c-format
msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr ""
-#: elf64-sparc.c:1334
+#: elf64-sparc.c:1427
#, c-format
msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
msgstr ""
-#: elf64-sparc.c:1357
+#: elf64-sparc.c:1450
#, c-format
msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
msgstr ""
-#: elf64-sparc.c:1404
+#: elf64-sparc.c:1496
#, c-format
msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
msgstr ""
-#: elf64-sparc.c:3008
+#: elf64-sparc.c:3053
#, c-format
msgid "%s: linking UltraSPARC specific with HAL specific code"
msgstr ""
-#: elfcode.h:1218
+#: elf64-x86-64.c:818
+#, c-format
+msgid "%s: %s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf.c:372
+#, c-format
+msgid "%s: invalid string offset %u >= %lu for section `%s'"
+msgstr ""
+
+#: elf.c:624
+#, c-format
+msgid "%s: invalid SHT_GROUP entry"
+msgstr ""
+
+#: elf.c:695
+#, c-format
+msgid "%s: no group info for section %s"
+msgstr ""
+
+#: elf.c:1055
+msgid ""
+"\n"
+"Program Header:\n"
+msgstr ""
+
+#: elf.c:1105
+msgid ""
+"\n"
+"Dynamic Section:\n"
+msgstr ""
+
+#: elf.c:1234
+msgid ""
+"\n"
+"Version definitions:\n"
+msgstr ""
+
+#: elf.c:1257
+msgid ""
+"\n"
+"Version References:\n"
+msgstr ""
+
+#: elf.c:1262
+#, c-format
+msgid " required from %s:\n"
+msgstr ""
+
+#: elf.c:1944
+#, c-format
+msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgstr ""
+
+#: elf.c:3668
+#, c-format
+msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+msgstr ""
+
+#: elf.c:3773
+#, c-format
+msgid "%s: Not enough room for program headers, try linking with -N"
+msgstr ""
+
+#: elf.c:3904
+#, c-format
+msgid ""
+"Error: First section in segment (%s) starts at 0x%x whereas the segment "
+"starts at 0x%x"
+msgstr ""
+
+#: elf.c:4218
+#, c-format
+msgid "%s: warning: allocated section `%s' not in segment"
+msgstr ""
+
+#: elf.c:4542
+#, c-format
+msgid "%s: symbol `%s' required but not present"
+msgstr ""
+
+#: elf.c:4830
+#, c-format
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr ""
+
+#: elf.c:5461
+#, c-format
+msgid ""
+"Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr ""
+
+#: elf.c:6274
+#, c-format
+msgid "%s: unsupported relocation type %s"
+msgstr ""
+
+#: elfcode.h:1117
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr ""
-#: elflink.c:434
+#: elfcode.h:1346
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr ""
+
+#: elflink.c:1456
+#, c-format
+msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr ""
+
+#: elflink.c:1807
+#, c-format
+msgid "%s: undefined versioned symbol name %s"
+msgstr ""
+
+#: elflink.c:1956
#, c-format
msgid "%s: Section %s is too large to add hole of %ld bytes"
msgstr ""
-#: elflink.h:1113
+#: elflink.c:2315
#, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr ""
+
+#: elflink.c:2607
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
-#: elflink.h:1784
+#: elflink.h:1022
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr ""
-#: elflink.h:1825
+#: elflink.h:1063
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr ""
-#: elflink.h:1945
+#: elflink.h:1238
#, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
+msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
msgstr ""
-#: elflink.h:4014
+#: elflink.h:1252
#, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
msgstr ""
-#: elflink.h:4320
+#: elflink.h:2123
#, c-format
-msgid "%s: undefined versioned symbol name %s"
+msgid "%s: undefined version: %s"
msgstr ""
-#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280
-msgid "Error: out of memory"
+#: elflink.h:2189
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
msgstr ""
-#: elflink.h:4714
+#: elflink.h:3040
msgid "Not enough memory to sort relocations"
msgstr ""
-#: elflink.h:5980
+#: elflink.h:3922 elflink.h:3965
#, c-format
-msgid "%s: could not find output section %s for input section %s"
+msgid "%s: could not find output section %s"
+msgstr ""
+
+#: elflink.h:3928
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr ""
+
+#: elflink.h:4447
+#, c-format
+msgid "%s: %s symbol `%s' in %s is referenced by DSO"
msgstr ""
-#: elflink.h:6553
-msgid "warning: relocation against removed section; zeroing"
+#: elflink.h:4528
+#, c-format
+msgid "%s: could not find output section %s for input section %s"
msgstr ""
-#: elflink.h:6583
-msgid "warning: relocation against removed section"
+#: elflink.h:4630
+#, c-format
+msgid "%s: %s symbol `%s' isn't defined"
msgstr ""
-#: elflink.h:6596
+#: elflink.h:5033
#, c-format
msgid "local symbols in discarded section %s"
msgstr ""
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:901
+msgid "static procedure (no name)"
+msgstr ""
+
+#: elfxx-mips.c:1935
+msgid "not enough GOT space for local GOT entries"
+msgstr ""
+
+#: elfxx-mips.c:3755
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr ""
+
+#: elfxx-mips.c:5266
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr ""
+
+#: elfxx-mips.c:5340
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elfxx-mips.c:8833
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr ""
+
+#: elfxx-mips.c:9166
+#, c-format
+msgid "%s: endianness incompatible with that of the selected emulation"
+msgstr ""
+
+#: elfxx-mips.c:9178
+#, c-format
+msgid "%s: ABI is incompatible with that of the selected emulation"
+msgstr ""
+
+#: elfxx-mips.c:9245
+#, c-format
+msgid "%s: warning: linking PIC files with non-PIC files"
+msgstr ""
+
+#: elfxx-mips.c:9262
+#, c-format
+msgid "%s: linking 32-bit code with 64-bit code"
+msgstr ""
+
+#: elfxx-mips.c:9290
+#, c-format
+msgid "%s: linking %s module with previous %s modules"
+msgstr ""
+
+#: elfxx-mips.c:9313
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr ""
+
+#: elfxx-mips.c:9382
+msgid " [abi=O32]"
+msgstr ""
+
+#: elfxx-mips.c:9384
+msgid " [abi=O64]"
+msgstr ""
+
+#: elfxx-mips.c:9386
+msgid " [abi=EABI32]"
+msgstr ""
+
+#: elfxx-mips.c:9388
+msgid " [abi=EABI64]"
+msgstr ""
+
+#: elfxx-mips.c:9390
+msgid " [abi unknown]"
+msgstr ""
+
+#: elfxx-mips.c:9392
+msgid " [abi=N32]"
+msgstr ""
+
+#: elfxx-mips.c:9394
+msgid " [abi=64]"
+msgstr ""
+
+#: elfxx-mips.c:9396
+msgid " [no abi set]"
+msgstr ""
+
+#: elfxx-mips.c:9399
+msgid " [mips1]"
+msgstr ""
+
+#: elfxx-mips.c:9401
+msgid " [mips2]"
+msgstr ""
+
+#: elfxx-mips.c:9403
+msgid " [mips3]"
+msgstr ""
+
+#: elfxx-mips.c:9405
+msgid " [mips4]"
+msgstr ""
+
+#: elfxx-mips.c:9407
+msgid " [mips5]"
+msgstr ""
+
+#: elfxx-mips.c:9409
+msgid " [mips32]"
+msgstr ""
+
+#: elfxx-mips.c:9411
+msgid " [mips64]"
+msgstr ""
+
+#: elfxx-mips.c:9413
+msgid " [mips32r2]"
+msgstr ""
+
+#: elfxx-mips.c:9415
+msgid " [unknown ISA]"
+msgstr ""
+
+#: elfxx-mips.c:9418
+msgid " [mdmx]"
+msgstr ""
+
+#: elfxx-mips.c:9421
+msgid " [mips16]"
+msgstr ""
+
+#: elfxx-mips.c:9424
+msgid " [32bitmode]"
+msgstr ""
+
+#: elfxx-mips.c:9426
+msgid " [not 32bitmode]"
+msgstr ""
+
+#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr ""
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
#, c-format
msgid "Output file requires shared library `%s.so.%s'\n"
msgstr ""
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
+#: sparclinux.c:656 sparclinux.c:706
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr ""
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
msgid "Warning: fixup count mismatch\n"
msgstr ""
-#: ieee.c:235
+#: ieee.c:293
#, c-format
msgid "%s: string too long (%d chars, max 65535)"
msgstr ""
-#: ieee.c:365
+#: ieee.c:428
#, c-format
msgid "%s: unrecognized symbol `%s' flags 0x%x"
msgstr ""
-#: ieee.c:877
+#: ieee.c:938
#, c-format
msgid "%s: unimplemented ATI record %u for symbol %u"
msgstr ""
-#: ieee.c:902
+#: ieee.c:963
#, c-format
msgid "%s: unexpected ATN type %d in external part"
msgstr ""
-#: ieee.c:924
+#: ieee.c:985
#, c-format
msgid "%s: unexpected type after ATN"
msgstr ""
-#: ihex.c:258
+#: ihex.c:264
#, c-format
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
msgstr ""
-#: ihex.c:368
+#: ihex.c:372
#, c-format
msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
msgstr ""
-#: ihex.c:422
+#: ihex.c:426
#, c-format
msgid "%s:%u: bad extended address record length in Intel Hex file"
msgstr ""
-#: ihex.c:439
+#: ihex.c:443
#, c-format
msgid "%s:%u: bad extended start address length in Intel Hex file"
msgstr ""
-#: ihex.c:456
+#: ihex.c:460
#, c-format
msgid "%s:%u: bad extended linear address record length in Intel Hex file"
msgstr ""
-#: ihex.c:473
+#: ihex.c:477
#, c-format
msgid "%s:%u: bad extended linear start address length in Intel Hex file"
msgstr ""
-#: ihex.c:490
+#: ihex.c:494
#, c-format
msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
msgstr ""
-#: ihex.c:610
+#: ihex.c:619
#, c-format
msgid "%s: internal error in ihex_read_section"
msgstr ""
-#: ihex.c:645
+#: ihex.c:654
#, c-format
msgid "%s: bad section length in ihex_read_section"
msgstr ""
-#: ihex.c:863
+#: ihex.c:872
#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
msgstr ""
-#: libbfd.c:492
-#, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
-msgstr ""
-
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr ""
-
-#: libbfd.c:1467
+#: libbfd.c:918
#, c-format
msgid "Deprecated %s called at %s line %d in %s\n"
msgstr ""
-#: libbfd.c:1470
+#: libbfd.c:921
#, c-format
msgid "Deprecated %s called\n"
msgstr ""
-#: linker.c:1849
+#: linker.c:1877
#, c-format
msgid "%s: indirect symbol `%s' to `%s' is a loop"
msgstr ""
-#: linker.c:2745
+#: linker.c:2780
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
msgstr ""
-#: merge.c:897
+#: merge.c:896
#, c-format
msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr ""
-#: mmo.c:459
+#: mmo.c:503
#, c-format
msgid "%s: No core to allocate section name %s\n"
msgstr ""
-#: mmo.c:535
+#: mmo.c:579
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr ""
-#: mmo.c:1188
+#: mmo.c:1287
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr ""
-#: mmo.c:1334
+#: mmo.c:1433
#, c-format
msgid ""
"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
"starting with `%s'\n"
msgstr ""
-#: mmo.c:1569
+#: mmo.c:1674
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr ""
-#: mmo.c:1579
+#: mmo.c:1684
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr ""
-#: mmo.c:1615
+#: mmo.c:1720
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
msgstr ""
-#: mmo.c:1661
+#: mmo.c:1766
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
msgstr ""
-#: mmo.c:1700
+#: mmo.c:1805
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1709
+#: mmo.c:1814
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1732
+#: mmo.c:1837
#, c-format
msgid ""
"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
"for lop_fixrx\n"
msgstr ""
-#: mmo.c:1755
+#: mmo.c:1860
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr ""
-#: mmo.c:1775
+#: mmo.c:1880
#, c-format
msgid ""
"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
msgstr ""
-#: mmo.c:1788
+#: mmo.c:1893
#, c-format
msgid ""
"%s: invalid mmo file: file name for number %d was not specified before use\n"
msgstr ""
-#: mmo.c:1894
+#: mmo.c:1999
#, c-format
msgid ""
"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
msgstr ""
-#: mmo.c:1930
+#: mmo.c:2035
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr ""
-#: mmo.c:1943
+#: mmo.c:2048
#, c-format
msgid ""
"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
"to the preceding lop_stab (%ld)\n"
msgstr ""
-#: mmo.c:2608
+#: mmo.c:2698
#, c-format
msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr ""
-#: mmo.c:2896
+#: mmo.c:2949
#, c-format
msgid ""
"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
"s\n"
msgstr ""
-#: mmo.c:2930
+#: mmo.c:3039
#, c-format
msgid ""
"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
"%d. Only `Main' will be emitted.\n"
msgstr ""
-#: mmo.c:2975
+#: mmo.c:3084
#, c-format
msgid "%s: internal error, symbol table changed size from %d to %d words\n"
msgstr ""
-#: mmo.c:3030
+#: mmo.c:3139
#, c-format
msgid "%s: internal error, internal register section %s had contents\n"
msgstr ""
-#: mmo.c:3082
+#: mmo.c:3191
#, c-format
msgid "%s: no initialized registers; section length 0\n"
msgstr ""
-#: mmo.c:3088
+#: mmo.c:3197
#, c-format
msgid "%s: too many initialized registers; section length %ld\n"
msgstr ""
-#: mmo.c:3093
+#: mmo.c:3202
#, c-format
msgid ""
"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
"08lx\n"
msgstr ""
-#: oasys.c:1036
+#: oasys.c:1052
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr ""
-#: osf-core.c:132
+#: osf-core.c:137
#, c-format
msgid "Unhandled OSF/1 core file section type %d\n"
msgstr ""
-#: pe-mips.c:658
+#. XXX code yet to be written.
+#: peicode.h:787
#, c-format
-msgid "%s: `ld -r' not supported with PE MIPS objects\n"
+msgid "%s: Unhandled import type; %x"
msgstr ""
-#. OK, at this point the following variables are set up:
-#. src = VMA of the memory we're fixing up
-#. mem = pointer to memory we're fixing up
-#. val = VMA of what we need to refer to
-#.
-#: pe-mips.c:794
+#: peicode.h:792
#, c-format
-msgid "%s: unimplemented %s\n"
+msgid "%s: Unrecognised import type; %x"
msgstr ""
-#: pe-mips.c:820
+#: peicode.h:806
#, c-format
-msgid "%s: jump too far away\n"
+msgid "%s: Unrecognised import name type; %x"
msgstr ""
-#: pe-mips.c:847
+#: peicode.h:1164
#, c-format
-msgid "%s: bad pair/reflo after refhi\n"
+msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
msgstr ""
-#. XXX code yet to be written.
-#: peicode.h:785
+#: peicode.h:1176
#, c-format
-msgid "%s: Unhandled import type; %x"
+msgid ""
+"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
+"archive"
msgstr ""
-#: peicode.h:790
+#: peicode.h:1193
#, c-format
-msgid "%s: Unrecognised import type; %x"
+msgid "%s: size field is zero in Import Library Format header"
msgstr ""
-#: peicode.h:804
+#: peicode.h:1224
#, c-format
-msgid "%s: Unrecognised import name type; %x"
+msgid "%s: string not null terminated in ILF object file."
msgstr ""
-#: peicode.h:1162
+#: pe-mips.c:659
#, c-format
-msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgid "%s: `ld -r' not supported with PE MIPS objects\n"
msgstr ""
-#: peicode.h:1174
+#. OK, at this point the following variables are set up:
+#. src = VMA of the memory we're fixing up
+#. mem = pointer to memory we're fixing up
+#. val = VMA of what we need to refer to
+#.
+#: pe-mips.c:795
#, c-format
-msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
+msgid "%s: unimplemented %s\n"
msgstr ""
-#: peicode.h:1191
+#: pe-mips.c:821
#, c-format
-msgid "%s: size field is zero in Import Library Format header"
+msgid "%s: jump too far away\n"
msgstr ""
-#: peicode.h:1219
+#: pe-mips.c:848
#, c-format
-msgid "%s: string not null terminated in ILF object file."
+msgid "%s: bad pair/reflo after refhi\n"
msgstr ""
#: ppcboot.c:416
@@ -1961,16 +2350,21 @@ msgstr ""
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr ""
-#: som.c:5402
+#: som.c:5422
msgid "som_sizeof_headers unimplemented"
msgstr ""
-#: srec.c:301
+#: srec.c:302
#, c-format
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr ""
-#: syms.c:998
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr ""
+
+#: syms.c:1042
msgid "Unsupported .stab relocation"
msgstr ""
@@ -1994,28 +2388,28 @@ msgstr ""
msgid "unknown gsd/egsd subtype %d"
msgstr ""
-#: vms-hdr.c:406
+#: vms-hdr.c:408
msgid "Object module NOT error-free !\n"
msgstr ""
-#: vms-misc.c:543
+#: vms-misc.c:541
#, c-format
msgid "Stack overflow (%d) in _bfd_vms_push"
msgstr ""
-#: vms-misc.c:561
+#: vms-misc.c:559
msgid "Stack underflow in _bfd_vms_pop"
msgstr ""
-#: vms-misc.c:919
+#: vms-misc.c:918
msgid "_bfd_vms_output_counted called with zero bytes"
msgstr ""
-#: vms-misc.c:924
+#: vms-misc.c:923
msgid "_bfd_vms_output_counted called with too many bytes"
msgstr ""
-#: vms-misc.c:1055
+#: vms-misc.c:1054
#, c-format
msgid "Symbol %s replaced by %s\n"
msgstr ""
@@ -2025,26 +2419,26 @@ msgstr ""
msgid "failed to enter %s"
msgstr ""
-#: vms-tir.c:81
+#: vms-tir.c:102
msgid "No Mem !"
msgstr ""
-#: vms-tir.c:362
+#: vms-tir.c:383
#, c-format
msgid "bad section index in %s"
msgstr ""
-#: vms-tir.c:375
+#: vms-tir.c:396
#, c-format
msgid "unsupported STA cmd %s"
msgstr ""
-#: vms-tir.c:380 vms-tir.c:1240
+#: vms-tir.c:401 vms-tir.c:1261
#, c-format
msgid "reserved STA cmd %d"
msgstr ""
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-tir.c:512 vms-tir.c:535
#, c-format
msgid "%s: no symbol \"%s\""
msgstr ""
@@ -2053,39 +2447,39 @@ msgstr ""
#. rotate
#. Redefine symbol to current location.
#. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
+#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
+#: vms-tir.c:859 vms-tir.c:1584
#, c-format
msgid "%s: not supported"
msgstr ""
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-tir.c:607 vms-tir.c:1439
#, c-format
msgid "%s: not implemented"
msgstr ""
-#: vms-tir.c:590 vms-tir.c:1422
+#: vms-tir.c:611 vms-tir.c:1443
#, c-format
msgid "reserved STO cmd %d"
msgstr ""
-#: vms-tir.c:708 vms-tir.c:1568
+#: vms-tir.c:729 vms-tir.c:1589
#, c-format
msgid "reserved OPR cmd %d"
msgstr ""
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-tir.c:797 vms-tir.c:1653
#, c-format
msgid "reserved CTL cmd %d"
msgstr ""
#. stack byte from image
#. arg: none.
-#: vms-tir.c:1148
+#: vms-tir.c:1169
msgid "stack-from-image not implemented"
msgstr ""
-#: vms-tir.c:1166
+#: vms-tir.c:1187
msgid "stack-entry-mask not fully implemented"
msgstr ""
@@ -2096,341 +2490,340 @@ msgstr ""
#.
#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
#. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
+#: vms-tir.c:1201
msgid "PASSMECH not fully implemented"
msgstr ""
-#: vms-tir.c:1199
+#: vms-tir.c:1220
msgid "stack-local-symbol not fully implemented"
msgstr ""
-#: vms-tir.c:1212
+#: vms-tir.c:1233
msgid "stack-literal not fully implemented"
msgstr ""
-#: vms-tir.c:1233
+#: vms-tir.c:1254
msgid "stack-local-symbol-entry-point-mask not fully implemented"
msgstr ""
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
+#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
+#: vms-tir.c:1640 vms-tir.c:1648
#, c-format
msgid "%s: not fully implemented"
msgstr ""
-#: vms-tir.c:1684
+#: vms-tir.c:1705
#, c-format
msgid "obj code %d not found"
msgstr ""
-#: vms-tir.c:2019
+#: vms-tir.c:2043
#, c-format
msgid "SEC_RELOC with no relocs in section %s"
msgstr ""
-#: vms-tir.c:2307
+#: vms-tir.c:2331
#, c-format
msgid "Unhandled relocation %s"
msgstr ""
-#: xcofflink.c:1241
+#: xcofflink.c:1244
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
msgstr ""
-#: xcofflink.c:1294
+#: xcofflink.c:1297
#, c-format
msgid "%s: class %d symbol `%s' has no aux entries"
msgstr ""
-#: xcofflink.c:1317
+#: xcofflink.c:1320
#, c-format
msgid "%s: symbol `%s' has unrecognized csect type %d"
msgstr ""
-#: xcofflink.c:1329
+#: xcofflink.c:1332
#, c-format
msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr ""
-#: xcofflink.c:1365
+#: xcofflink.c:1368
#, c-format
msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr ""
-#: xcofflink.c:1517
+#: xcofflink.c:1520
#, c-format
msgid "%s: csect `%s' not in enclosing section"
msgstr ""
-#: xcofflink.c:1624
+#: xcofflink.c:1627
#, c-format
msgid "%s: misplaced XTY_LD `%s'"
msgstr ""
-#: xcofflink.c:1948
+#: xcofflink.c:1958
#, c-format
msgid "%s: reloc %s:%d not in csect"
msgstr ""
-#: xcofflink.c:2083
+#: xcofflink.c:2095
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr ""
-#: xcofflink.c:2104
+#: xcofflink.c:2116
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr ""
-#: xcofflink.c:2749
+#: xcofflink.c:2761
#, c-format
msgid "%s: no such symbol"
msgstr ""
-#: xcofflink.c:2890
+#: xcofflink.c:2894
msgid "error: undefined symbol __rtinit"
msgstr ""
-#: xcofflink.c:3458
+#: xcofflink.c:3455
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr ""
-#: xcofflink.c:4452
+#: xcofflink.c:4448
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
msgstr ""
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr ""
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5310 xcofflink.c:6130
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr ""
-#: xcofflink.c:5329
+#: xcofflink.c:5325
#, c-format
msgid "%s: loader reloc in read-only section %s"
msgstr ""
-#: elf32-ia64.c:2189 elf64-ia64.c:2189
+#: elf32-ia64.c:2371 elf64-ia64.c:2371
msgid "@pltoff reloc against local symbol"
msgstr ""
-#: elf32-ia64.c:3413 elf64-ia64.c:3413
+#: elf32-ia64.c:3749 elf64-ia64.c:3749
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr ""
-#: elf32-ia64.c:3424 elf64-ia64.c:3424
+#: elf32-ia64.c:3760 elf64-ia64.c:3760
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr ""
-#: elf32-ia64.c:3728 elf64-ia64.c:3728
+#: elf32-ia64.c:4076 elf64-ia64.c:4076
#, c-format
msgid "%s: linking non-pic code in a shared library"
msgstr ""
-#: elf32-ia64.c:3761 elf64-ia64.c:3761
+#: elf32-ia64.c:4109 elf64-ia64.c:4109
#, c-format
msgid "%s: @gprel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:3900 elf64-ia64.c:3900
+#: elf32-ia64.c:4285 elf64-ia64.c:4285
+#, c-format
+msgid "%s: @internal branch to dynamic symbol %s"
+msgstr ""
+
+#: elf32-ia64.c:4287 elf64-ia64.c:4287
#, c-format
-msgid "%s: dynamic relocation against speculation fixup"
+msgid "%s: speculation fixup to dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:3908 elf64-ia64.c:3908
+#: elf32-ia64.c:4289 elf64-ia64.c:4289
#, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
+msgid "%s: @pcrel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf32-ia64.c:4501 elf64-ia64.c:4501
msgid "unsupported reloc"
msgstr ""
-#: elf32-ia64.c:4372 elf64-ia64.c:4372
+#: elf32-ia64.c:4780 elf64-ia64.c:4780
#, c-format
msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
msgstr ""
-#: elf32-ia64.c:4381 elf64-ia64.c:4381
+#: elf32-ia64.c:4789 elf64-ia64.c:4789
#, c-format
msgid "%s: linking big-endian files with little-endian files"
msgstr ""
-#: elf32-ia64.c:4390 elf64-ia64.c:4390
+#: elf32-ia64.c:4798 elf64-ia64.c:4798
#, c-format
msgid "%s: linking 64-bit files with 32-bit files"
msgstr ""
-#: elf32-ia64.c:4399 elf64-ia64.c:4399
+#: elf32-ia64.c:4807 elf64-ia64.c:4807
#, c-format
msgid "%s: linking constant-gp files with non-constant-gp files"
msgstr ""
-#: elf32-ia64.c:4409 elf64-ia64.c:4409
+#: elf32-ia64.c:4817 elf64-ia64.c:4817
#, c-format
msgid "%s: linking auto-pic files with non-auto-pic files"
msgstr ""
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:985 pepigen.c:985
#, c-format
msgid "%s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:1002 pepigen.c:1002
#, c-format
msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
msgstr ""
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1016 pepigen.c:1016
msgid "Export Directory [.edata (or where ever we found it)]"
msgstr ""
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1017 pepigen.c:1017
msgid "Import Directory [parts of .idata]"
msgstr ""
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1018 pepigen.c:1018
msgid "Resource Directory [.rsrc]"
msgstr ""
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1019 pepigen.c:1019
msgid "Exception Directory [.pdata]"
msgstr ""
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1020 pepigen.c:1020
msgid "Security Directory"
msgstr ""
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1021 pepigen.c:1021
msgid "Base Relocation Directory [.reloc]"
msgstr ""
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1022 pepigen.c:1022
msgid "Debug Directory"
msgstr ""
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1023 pepigen.c:1023
msgid "Description Directory"
msgstr ""
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1024 pepigen.c:1024
msgid "Special Directory"
msgstr ""
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1025 pepigen.c:1025
msgid "Thread Storage Directory [.tls]"
msgstr ""
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1026 pepigen.c:1026
msgid "Load Configuration Directory"
msgstr ""
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1027 pepigen.c:1027
msgid "Bound Import Directory"
msgstr ""
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1028 pepigen.c:1028
msgid "Import Address Table Directory"
msgstr ""
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1029 pepigen.c:1029
msgid "Delay Import Directory"
msgstr ""
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
msgid "Reserved"
msgstr ""
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1094 pepigen.c:1094
msgid ""
"\n"
"There is an import table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1076 pepigen.c:1076
+#: peigen.c:1099 pepigen.c:1099
#, c-format
msgid ""
"\n"
"There is an import table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1136 pepigen.c:1136
#, c-format
msgid ""
"\n"
"Function descriptor located at the start address: %04lx\n"
msgstr ""
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1139 pepigen.c:1139
#, c-format
msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
msgstr ""
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1145 pepigen.c:1145
msgid ""
"\n"
"No reldata section! Function descriptor not decoded.\n"
msgstr ""
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1150 pepigen.c:1150
#, c-format
msgid ""
"\n"
"The Import Tables (interpreted %s section contents)\n"
msgstr ""
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1153 pepigen.c:1153
msgid ""
" vma: Hint Time Forward DLL First\n"
" Table Stamp Chain Name Thunk\n"
msgstr ""
-#: peigen.c:1180 pepigen.c:1180
+#: peigen.c:1204 pepigen.c:1204
#, c-format
msgid ""
"\n"
"\tDLL Name: %s\n"
msgstr ""
-#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247
-msgid "\tvma: Hint/Ord Member-Name\n"
-msgstr ""
-
-#: peigen.c:1246 pepigen.c:1246
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr ""
-
-#: peigen.c:1253 pepigen.c:1253
-msgid "\t>>> Ran out of IAT members!\n"
+#: peigen.c:1215 pepigen.c:1215
+msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
msgstr ""
-#: peigen.c:1271 pepigen.c:1271
-msgid "\tThe Import Address Table is identical\n"
+#: peigen.c:1240 pepigen.c:1240
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1343 pepigen.c:1343
+#: peigen.c:1380 pepigen.c:1380
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1348 pepigen.c:1348
+#: peigen.c:1385 pepigen.c:1385
#, c-format
msgid ""
"\n"
"There is an export table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1379 pepigen.c:1379
+#: peigen.c:1416 pepigen.c:1416
#, c-format
msgid ""
"\n"
@@ -2438,129 +2831,129 @@ msgid ""
"\n"
msgstr ""
-#: peigen.c:1383 pepigen.c:1383
+#: peigen.c:1420 pepigen.c:1420
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr ""
-#: peigen.c:1386 pepigen.c:1386
+#: peigen.c:1423 pepigen.c:1423
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr ""
-#: peigen.c:1389 pepigen.c:1389
+#: peigen.c:1426 pepigen.c:1426
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr ""
-#: peigen.c:1392 pepigen.c:1392
+#: peigen.c:1429 pepigen.c:1429
msgid "Name \t\t\t\t"
msgstr ""
-#: peigen.c:1398 pepigen.c:1398
+#: peigen.c:1435 pepigen.c:1435
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr ""
-#: peigen.c:1401 pepigen.c:1401
+#: peigen.c:1438 pepigen.c:1438
msgid "Number in:\n"
msgstr ""
-#: peigen.c:1404 pepigen.c:1404
+#: peigen.c:1441 pepigen.c:1441
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr ""
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1445 pepigen.c:1445
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr ""
-#: peigen.c:1411 pepigen.c:1411
+#: peigen.c:1448 pepigen.c:1448
msgid "Table Addresses\n"
msgstr ""
-#: peigen.c:1414 pepigen.c:1414
+#: peigen.c:1451 pepigen.c:1451
msgid "\tExport Address Table \t\t"
msgstr ""
-#: peigen.c:1419 pepigen.c:1419
+#: peigen.c:1456 pepigen.c:1456
msgid "\tName Pointer Table \t\t"
msgstr ""
-#: peigen.c:1424 pepigen.c:1424
+#: peigen.c:1461 pepigen.c:1461
msgid "\tOrdinal Table \t\t\t"
msgstr ""
-#: peigen.c:1439 pepigen.c:1439
+#: peigen.c:1476 pepigen.c:1476
#, c-format
msgid ""
"\n"
"Export Address Table -- Ordinal Base %ld\n"
msgstr ""
-#: peigen.c:1458 pepigen.c:1458
+#: peigen.c:1495 pepigen.c:1495
msgid "Forwarder RVA"
msgstr ""
-#: peigen.c:1469 pepigen.c:1469
+#: peigen.c:1506 pepigen.c:1506
msgid "Export RVA"
msgstr ""
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1513 pepigen.c:1513
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
msgstr ""
-#: peigen.c:1531 pepigen.c:1531
+#: peigen.c:1568 pepigen.c:1568
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
msgstr ""
-#: peigen.c:1535 pepigen.c:1535
+#: peigen.c:1572 pepigen.c:1572
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
msgstr ""
-#: peigen.c:1538 pepigen.c:1538
+#: peigen.c:1575 pepigen.c:1575
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr ""
-#: peigen.c:1540 pepigen.c:1540
+#: peigen.c:1577 pepigen.c:1577
msgid ""
" vma:\t\tBegin End EH EH PrologEnd Exception\n"
" \t\tAddress Address Handler Data Address Mask\n"
msgstr ""
-#: peigen.c:1610 pepigen.c:1610
+#: peigen.c:1647 pepigen.c:1647
msgid " Register save millicode"
msgstr ""
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1650 pepigen.c:1650
msgid " Register restore millicode"
msgstr ""
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1653 pepigen.c:1653
msgid " Glue code sequence"
msgstr ""
-#: peigen.c:1668 pepigen.c:1668
+#: peigen.c:1705 pepigen.c:1705
msgid ""
"\n"
"\n"
"PE File Base Relocations (interpreted .reloc section contents)\n"
msgstr ""
-#: peigen.c:1698 pepigen.c:1698
+#: peigen.c:1735 pepigen.c:1735
#, c-format
msgid ""
"\n"
"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
msgstr ""
-#: peigen.c:1711 pepigen.c:1711
+#: peigen.c:1748 pepigen.c:1748
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr ""
@@ -2568,7 +2961,7 @@ msgstr ""
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
#. emulate it here.
-#: peigen.c:1751 pepigen.c:1751
+#: peigen.c:1788 pepigen.c:1788
#, c-format
msgid ""
"\n"
diff --git a/bfd/section.c b/bfd/section.c
index 04f439e9b4e..6facfe2066d 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -399,8 +399,10 @@ CODE_FRAGMENT
. {* Nonzero if this section needs the relax finalize pass. *}
. unsigned int need_finalize_relax:1;
.
+. {* Nonzero if this section has a gp reloc. *}
+. unsigned int has_gp_reloc:1;
+.
. {* Usused bits. *}
-. unsigned int flag12:1;
. unsigned int flag13:1;
. unsigned int flag14:1;
. unsigned int flag15:1;
@@ -617,8 +619,11 @@ static const asymbol global_syms[] =
/* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
0, 0, 1, 0, \
\
- /* sec_info_type, use_rela_p, has_tls_reloc, need_finalize_relax, flag12, */ \
- 0, 0, 0, 0, 0, \
+ /* sec_info_type, use_rela_p, has_tls_reloc, */ \
+ 0, 0, 0, \
+ \
+ /* need_finalize_relax, has_gp_reloc, */ \
+ 0, 0, \
\
/* flag13, flag14, flag15, flag16, flag20, flag24, */ \
0, 0, 0, 0, 0, 0, \
diff --git a/bfd/simple.c b/bfd/simple.c
index a247f1153ba..0042e60a3f5 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -243,7 +243,7 @@ bfd_simple_get_relocated_section_contents (abfd, sec, outbuf, symbol_table)
if (symbol_table == NULL)
{
- bfd_link_add_symbols (abfd, &link_info);
+ _bfd_generic_link_add_symbols (abfd, &link_info);
storage_needed = bfd_get_symtab_upper_bound (abfd);
symbol_table = (asymbol **) bfd_malloc (storage_needed);
diff --git a/bfd/syms.c b/bfd/syms.c
index d65a8689ca7..0fcb7b36623 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -619,6 +619,9 @@ decode_section_type (section)
}
if (section->flags & SEC_DEBUGGING)
return 'N';
+ if ((section->flags & SEC_HAS_CONTENTS) &&
+ (section->flags & SEC_READONLY))
+ return 'n';
return '?';
}
diff --git a/bfd/version.h b/bfd/version.h
index f9de765b097..809db7ac086 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030523
+#define BFD_VERSION_DATE 20030613
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/config.guess b/config.guess
index 6bdac8d7b61..04c91cc5de3 100755
--- a/config.guess
+++ b/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-05-09'
+timestamp='2003-06-06'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -320,6 +321,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -767,8 +771,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
- x86:Interix*:3*)
- echo i586-pc-interix3
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -797,6 +801,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
diff --git a/config.sub b/config.sub
index fe4f1edf3c0..97e405bac4d 100755
--- a/config.sub
+++ b/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-05-09'
+timestamp='2003-06-06'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -771,18 +771,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
- pentiumii | pentium2)
+ pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pn)
basic_machine=pn-gould
;;
@@ -1131,7 +1137,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix*)
+ | -powermax* | -dnix* | -nx6 | -nx7)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
diff --git a/configure b/configure
index e0d5acfb6b2..22f8673b9e6 100755
--- a/configure
+++ b/configure
@@ -12,10 +12,10 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --disable-serial-[{host,target,build}-]configure
- Don't force sequential configuration of
+ --enable-serial-[{host,target,build}-]configure
+ Force sequential configuration of
sub-packages for the host, target or build
- machine, or of any sub-packages at all"
+ machine, or all sub-packages"
ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
@@ -1916,10 +1916,6 @@ fi
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
- mips*-*-irix6*o32)
- with_stabs=yes;
- extra_host_args="${extra_host_args} --with-stabs"
- ;;
mips*-*-irix6*)
;;
mips*-*-* | alpha*-*-osf*)
@@ -2341,7 +2337,8 @@ rm -f maybedep.tmp
echo '# maybedep.tmp' > maybedep.tmp
# Make-targets which may need maybe dependencies.
-mts="configure all install check"
+mts="configure all install check clean distclean dvi info install-info"
+mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
# Loop over modules and make-targets.
for module in ${build_modules} ; do
@@ -2389,13 +2386,20 @@ if test "${enable_serial_configure+set}" = set; then
fi
+case ${enable_serial_configure} in
+ yes)
+ enable_serial_build_configure=yes
+ enable_serial_host_configure=yes
+ enable_serial_target_configure=yes
+ ;;
+esac
+
# These force 'configure's to be done one at a time, to avoid problems
# with contention over a shared config.cache.
rm -f serdep.tmp
echo '# serdep.tmp' > serdep.tmp
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_build_configure}" = xno ||
+test "x${enable_serial_build_configure}" = xyes &&
for item in ${build_configdirs} ; do
case ${olditem} in
"") ;;
@@ -2404,8 +2408,7 @@ for item in ${build_configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_host_configure}" = xno ||
+test "x${enable_serial_host_configure}" = xyes &&
for item in ${configdirs} ; do
case ${olditem} in
"") ;;
@@ -2414,8 +2417,7 @@ for item in ${configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_target_configure}" = xno ||
+test "x${enable_serial_target_configure}" = xyes &&
for item in ${target_configdirs} ; do
case ${olditem} in
"") ;;
@@ -2691,7 +2693,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2695: checking for $ac_word" >&5
+echo "configure:2697: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2724,7 +2726,7 @@ if test -z "$ac_cv_prog_AR" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2728: checking for $ac_word" >&5
+echo "configure:2730: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2763,7 +2765,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
+echo "configure:2769: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2796,7 +2798,7 @@ if test -z "$ac_cv_prog_AS" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2800: checking for $ac_word" >&5
+echo "configure:2802: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2835,7 +2837,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2839: checking for $ac_word" >&5
+echo "configure:2841: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2868,7 +2870,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2872: checking for $ac_word" >&5
+echo "configure:2874: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2907,7 +2909,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2911: checking for $ac_word" >&5
+echo "configure:2913: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2940,7 +2942,7 @@ if test -z "$ac_cv_prog_LD" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2944: checking for $ac_word" >&5
+echo "configure:2946: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2979,7 +2981,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2983: checking for $ac_word" >&5
+echo "configure:2985: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3012,7 +3014,7 @@ if test -z "$ac_cv_prog_NM" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3016: checking for $ac_word" >&5
+echo "configure:3018: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3051,7 +3053,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3055: checking for $ac_word" >&5
+echo "configure:3057: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3084,7 +3086,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3088: checking for $ac_word" >&5
+echo "configure:3090: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3123,7 +3125,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3127: checking for $ac_word" >&5
+echo "configure:3129: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3156,7 +3158,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3160: checking for $ac_word" >&5
+echo "configure:3162: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3195,7 +3197,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3199: checking for $ac_word" >&5
+echo "configure:3201: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3228,7 +3230,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3232: checking for $ac_word" >&5
+echo "configure:3234: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3267,7 +3269,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3271: checking for $ac_word" >&5
+echo "configure:3273: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3300,7 +3302,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3304: checking for $ac_word" >&5
+echo "configure:3306: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3348,7 +3350,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3352: checking for $ac_word" >&5
+echo "configure:3354: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3381,7 +3383,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3385: checking for $ac_word" >&5
+echo "configure:3387: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3420,7 +3422,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3424: checking for $ac_word" >&5
+echo "configure:3426: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3453,7 +3455,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3457: checking for $ac_word" >&5
+echo "configure:3459: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3492,7 +3494,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3496: checking for $ac_word" >&5
+echo "configure:3498: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3525,7 +3527,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3529: checking for $ac_word" >&5
+echo "configure:3531: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3564,7 +3566,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3568: checking for $ac_word" >&5
+echo "configure:3570: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3597,7 +3599,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3601: checking for $ac_word" >&5
+echo "configure:3603: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3636,7 +3638,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3640: checking for $ac_word" >&5
+echo "configure:3642: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3669,7 +3671,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3673: checking for $ac_word" >&5
+echo "configure:3675: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3708,7 +3710,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3712: checking for $ac_word" >&5
+echo "configure:3714: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3741,7 +3743,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3745: checking for $ac_word" >&5
+echo "configure:3747: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3780,7 +3782,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3784: checking for $ac_word" >&5
+echo "configure:3786: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3813,7 +3815,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3817: checking for $ac_word" >&5
+echo "configure:3819: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3880,7 +3882,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3884: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:3886: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
diff --git a/configure.in b/configure.in
index 87ab222891f..646a1c9d392 100644
--- a/configure.in
+++ b/configure.in
@@ -1230,10 +1230,6 @@ fi
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
- mips*-*-irix6*o32)
- with_stabs=yes;
- extra_host_args="${extra_host_args} --with-stabs"
- ;;
mips*-*-irix6*)
;;
mips*-*-* | alpha*-*-osf*)
@@ -1655,7 +1651,8 @@ rm -f maybedep.tmp
echo '# maybedep.tmp' > maybedep.tmp
# Make-targets which may need maybe dependencies.
-mts="configure all install check"
+mts="configure all install check clean distclean dvi info install-info"
+mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
# Loop over modules and make-targets.
for module in ${build_modules} ; do
@@ -1697,18 +1694,25 @@ AC_SUBST_FILE(maybe_dependencies)
# Create the serialization dependencies. This uses a temporary file.
AC_ARG_ENABLE([serial-configure],
-[ --disable-serial-[{host,target,build}-]configure
- Don't force sequential configuration of
+[ --enable-serial-[{host,target,build}-]configure
+ Force sequential configuration of
sub-packages for the host, target or build
- machine, or of any sub-packages at all])
+ machine, or all sub-packages])
+
+case ${enable_serial_configure} in
+ yes)
+ enable_serial_build_configure=yes
+ enable_serial_host_configure=yes
+ enable_serial_target_configure=yes
+ ;;
+esac
# These force 'configure's to be done one at a time, to avoid problems
# with contention over a shared config.cache.
rm -f serdep.tmp
echo '# serdep.tmp' > serdep.tmp
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_build_configure}" = xno ||
+test "x${enable_serial_build_configure}" = xyes &&
for item in ${build_configdirs} ; do
case ${olditem} in
"") ;;
@@ -1717,8 +1721,7 @@ for item in ${build_configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_host_configure}" = xno ||
+test "x${enable_serial_host_configure}" = xyes &&
for item in ${configdirs} ; do
case ${olditem} in
"") ;;
@@ -1727,8 +1730,7 @@ for item in ${configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_target_configure}" = xno ||
+test "x${enable_serial_target_configure}" = xyes &&
for item in ${target_configdirs} ; do
case ${olditem} in
"") ;;
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 33b6fbf8551..01070fc4f89 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,24 +1,184 @@
+2003-06-13 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
+ (ppc64_standard_linkage_target): Use it.
+
+ * solib-svr4.c (solib_break_names): Recognize the 64-bit PowerPC
+ Linux entry point symbols for _dl_debug_state, too.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): When UNWIND_DUMMY_ID is
+ available, do not use the FP register, and always save the TOS.
+ * dummy-frame.c (dummy_frame_this_id): Do not assert
+ SAVE_DUMMY_FRAME_TOS.
+ * i386-tdep.c (i386_save_dummy_frame_tos): Delete function.
+ (i386_gdbarch_init): Do not set save_dummy_frame_tos.
+ (i386_push_dummy_call): Add 8 to the returned SP.
+ * frame.c (legacy_frame_p): Do not require SAVE_DUMMY_FRAME_TOS.
+ * d10v-tdep.c (d10v_unwind_dummy_id): Use d10v_unwind_sp.
+ (d10v_gdbarch_init): Do not set save_dummy_frame_tos.
+ * x86-64-tdep.c (x86_64_save_dummy_frame_tos): Delete function.
+ (x86_64_push_dummy_call): Return "sp + 16".
+ (x86_64_init_abi): Do not set save_dummy_frame_tos.
+ * alpha-tdep.c (alpha_gdbarch_init): Do not set
+ save_dummy_frame_tos.
+
+2003-06-13 Jim Blandy <jimb@redhat.com>
+
+ * frv-tdep.c (frv_use_struct_convention): Delete static
+ declaration for function deleted in my change of 2003-06-12.
+
+2003-06-13 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_address_to_pointer): Shift code addrs right 1 bit.
+ (avr_pointer_to_address): Shift code addrs left 1 bit.
+ (avr_convert_from_func_ptr_addr): Delete function since operation is
+ better handled by avr_address_to_pointer and avr_pointer_to_address.
+ (avr_gdbarch_init): Don't set convert_from_func_ptr_add method.
+
+2003-06-13 Mark Kettenis <kettenis@gnu.org>
+
+ From Kelley Cook <kelleycook@wideopenwest.com>:
+ * configure.host: Accept i[34567]86 variants.
+ * configure.tgt: Likewise.
+ * nlm/configure.in: Likewise.
+ * nlm/configure: Regenerated.
+
+2003-06-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (solib-svr4.h): Dont' include it.
+ (arm_linux_svr4_fetch_link_map_offsets): Move to ...
+ * arm-linux-tdep.c: ... here. Make static.
+ (arm_linux_init_abi): Register it.
+ (solib-svr4.h): Include it.
+ * Makefile.in: Update dependencies.
+ * config/arm/tm-linux.h (SVR4_FETCH_LINK_MAP_OFFSETS): Delete.
+ (arm_linux_svr4_fetch_link_map_offsets): Delete declaration.
+
+2003-06-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c: Add definitions E_RET0_REGNUM and E_RET1_REGNUM to
+ indicate registers used for return values.
+ (struct frame_extra_info): Drop args_pointer and locals_pointer.
+ (h8300_examine_prologue): Remove initializing dropped frame_extra_info
+ members.
+ (h8300_init_extra_frame_info): Ditto.
+ (h8300_frame_locals_address): Removed.
+ (h8300_frame_args_address): Removed.
+ (h8300_extract_return_value): Use new regcache structure. Only care
+ for 16 bit CPUs.
+ (h8300h_extract_return_value): Same function for 32 bit CPUs.
+ (h8300_store_return_value): Use new regcache structure. Only care
+ for 16 bit CPUs.
+ (h8300h_store_return_value): Same function for 32 bit CPUs.
+ (h8300_store_struct_return): Removed.
+ (h8300_extract_struct_value_address): Use new regcache structure.
+ (h8300h_extract_struct_value_address): Removed.
+ (h8300_push_dummy_code): New function.
+ (h8300_gdbarch_init): Slightly rearranged to stress deprecated calls.
+ Remove call_dummy_words. Call set_gdbarch_extract_return_value and
+ set_gdbarch_store_return_value architecture dependent.
+ Call set_gdbarch_push_dummy_code and
+ set_gdbarch_extract_struct_value_address.
+ Remove calls to set_gdbarch_frame_args_address,
+ set_gdbarch_frame_locals_address,
+ set_gdbarch_deprecated_store_struct_return,
+ set_gdbarch_deprecated_extract_return_value,
+ set_gdbarch_deprecated_extract_struct_value_address,
+ set_gdbarch_deprecated_call_dummy_words and
+ set_gdbarch_deprecated_sizeof_call_dummy_words.
+
+2003-06-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300_register_byte): Remove.
+ (h8300h_register_byte): Remove.
+ (h8300_register_virtual_type): Remove. Substitute by...
+ (h8300_register_type): New function.
+ (h8300_extract_struct_value_address): Drop usage of h8300_register_byte.
+ (h8300h_extract_struct_value_address): Ditto.
+ (h8300_gdbarch_init): Drop calls to
+ set_gdbarch_deprecated_register_byte and
+ set_gdbarch_deprecated_register_virtual_type.
+ Add call to set_gdbarch_register_type.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Update comments on registers.
+ (deprecated_register_byte): Rename register_byte.
+ (deprecated_register_raw_size): Rename register_raw_size.
+ (deprecated_register_virtual_size): Rename register_virtual_size.
+ (deprecated_register_virtual_type): Rename register_virtual_type.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c: Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * hppa-tdep.c (hppa_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Replace remaining instances of
+ mips_o32_use_struct_convention with always_use_struct_convention.
+
+2003-06-12 David Carlton <carlton@kealia.com>
+
+ * cp-namespace.c (cp_set_block_scope): Comment out
+ processing_has_namespace_info branch.
+
2003-06-12 Jim Blandy <jimb@redhat.com>
- * ppc-linux-tdep.c (ppc64_linux_bfd_entry_point): New function.
- (ppc_linux_init_abi): Register it as our bfd_entry_point method.
+ Recognize and skip 64-bit PowerPC Linux linkage functions.
+ * ppc-linux-tdep.c (insn_d, insn_ds, insn_xfx, read_insn, struct
+ insn_pattern, insns_match_pattern, d_field, ds_field): New
+ functions, macros, and types for working with PPC instructions.
+ (ppc64_standard_linkage, PPC64_STANDARD_LINKAGE_LEN,
+ ppc64_in_solib_call_trampoline, ppc64_standard_linkage_target,
+ ppc64_skip_trampoline_code): New functions, variables, and macros
+ for recognizing and skipping linkage functions.
+ (ppc_linux_init_abi): Use ppc64_in_solib_call_trampoline and
+ ppc64_skip_trampoline_code for the 64-bit PowerPC Linux ABI.
- * gdbarch.sh (gdbarch_bfd_entry_point): New gdbarch method.
- * arch-utils.c (generic_bfd_entry_point): New function.
- * arch-utils.h (generic_bfd_entry_point): New declaration.
- * gdbarch.c, gdbarch.h: Regenerated.
- * solib-svr4.c (enable_break): Call it, instead of accessing
- tmp_bfd->start_address directly.
+ * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
+ register offsets for both the 32- and 64-bit interfaces.
- * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): New
- function.
- (ppc_linux_init_abi): Register it as the
- CONVERT_FROM_FUNC_PTR_ADDR method under the PPC64 Linux ABI.
+ Actually finish the job started by my change of 2003-05-29.
+ * config/powerpc/tm-linux.h (SKIP_TRAMPOLINE_CODE): Remove the
+ other #definition of this.
+ (ppc_linux_skip_trampoline_code): Remove declaration.
+ * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Make this
+ static.
+ (ppc_linux_init_abi): Register it as the skip_trampoline_code
+ method for GDBARCH.
-2003-06-11 Jim Blandy <jimb@redhat.com>
+ * config/powerpc/nm-ppc64-linux.h (PTRACE_XFER_TYPE): This is
+ 'long' on ppc64-*-linux*.
- * solib-svr4.c (solib_break_names): Recognize the 64-bit PowerPC
- Linux entry point symbols for _dl_debug_state, too.
+ * ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ
+ isn't #defined, assume the register doesn't exist: act as if
+ tdep->ppc_mq_regnum were -1.
+
+ * configure.host, configure.tgt: Add entries for
+ powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and
+ powerpc/linux.mt.
+ * config/powerpc/ppc64-linux.mh, config/powerpc/nm-ppc64-linux.mh:
+ New files.
* arch-utils.c (always_use_struct_convention): New function.
* arch-utils.h (always_use_struct_convention): New prototype.
@@ -34,59 +194,1784 @@
* h8300-tdep.c (h8300_use_struct_convention): Delete.
(h8300_gdbarch_init): Register always_use_struct_convention,
instead of h8300_use_struct_convention.
- * mips_o32-tdep.c (mips_o32_use_struct_convention): Delete.
+ * mips-tdep.c (mips_o32_use_struct_convention): Delete.
(mips_o32_gdbarch_init): Register always_use_struct_convention,
instead of mips_o32_use_struct_convention.
-2003-06-10 Jim Blandy <jimb@redhat.com>
+2003-06-12 Andrew Cagney <cagney@redhat.com>
- * ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
- (ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
- method.
+ * wince.c: Include "mips-tdep.h".
+ * mips-tdep.h (mips_next_pc): Declare.
+ * mcore-tdep.c: Make more local functions static.
+ * Makefile.in (wince.o): Update dependencies.
- * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
- (ppc64_standard_linkage_target): Use it.
+2003-06-12 David Carlton <carlton@kealia.com>
- Recognize and skip 64-bit PowerPC Linux linkage functions.
- * ppc-linux-tdep.c (insn_d, insn_ds, insn_xfx, read_insn, struct
- insn_pattern, insns_match_pattern, d_field, ds_field): New
- functions, macros, and types for working with PPC instructions.
- (ppc64_standard_linkage, PPC64_STANDARD_LINKAGE_LEN,
- ppc64_in_solib_call_trampoline, ppc64_standard_linkage_target,
- ppc64_skip_trampoline_code): New functions, variables, and macros
- for recognizing and skipping linkage functions.
- (ppc_linux_init_abi): Use ppc64_in_solib_call_trampoline and
- ppc64_skip_trampoline_code for the 64-bit PowerPC Linux ABI.
+ * symtab.c (lookup_symbol_aux_minsyms): Replace
+ DEPRECATED_SYMBOL_NAME by SYMBOL_LINKAGE_NAME.
+ (find_pc_sect_line, search_symbols, rbreak_command): Ditto.
+ (COMPLETION_LIST_ADD_SYMBOL): Rewrite in terms of
+ SYMBOL_NATURAL_NAME.
- * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
- register offsets for both the 32- and 64-bit interfaces.
+2003-06-12 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.in (tuiDisassem.o): Update dependencies.
+
+2003-06-12 David Carlton <carlton@bactrian.org>
+
+ * symtab.h: Delete declaration of make_symbol_overload_list.
+ Add declaration of lookup_partial_symbol.
+ * symtab.c (remove_params): Move to cp-support.c.
+ (overload_list_add_symbol, make_symbol_overload_list)
+ (sym_return_val_size, sym_return_val_index): Ditto.
+ (lookup_partial_symbol): Make extern.
+ * cp-support.h: Add declaration of make_symbol_overload_list.
+ * cp-support.c: Include dictionary.h, objfiles.h, frame.h,
+ symtab.h, and block.h.
+ (remove_params): Move here from symtab.c.
+ (overload_list_add_symbol, make_symbol_overload_list)
+ (sym_return_val_size, sym_return_val_index): Ditto.
+ * valops.c: Include cp-support.h.
+ * Makefile.in (cp-support.o): Depend on dictionary_h, objfiles_h,
+ frame_h, and block_h.
+ (valops.o): Depend on cp_support_h.
+
+2003-06-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c: Add H8SX registers. Drop E_NUM_REGS entirely,
+ substitute by NUM_REGS throughout.
+ (h8300_register_name): Only care for H8/300 and H8/300H registers.
+ (h8300s_register_name): New function for H8S registers.
+ (h8300sx_register_name): Ditto for H8SX registers.
+ (h8300_print_register): Revise register printing, avoid depending
+ on 32 bit long.
+ (h8300_register_byte): Only care for H8/300 registers.
+ (h8300h_register_byte): New function for any other architecture.
+ (h8300_register_raw_size): Remove.
+ (h8300_register_virtual_type): Revise to return actually useful
+ type.
+ (h8300_extract_struct_value_address): Only care for H8/300 registers.
+ (h8300h_extract_struct_value_address): New function for any other
+ architecture.
+ (h8300_gdbarch_init): Add h8300sxn. Call set_gdbarch_num_regs,
+ set_gdbarch_register_name, set_gdbarch_register_byte,
+ set_gdbarch_ptr_bit and set_gdbarch_addr_bit architecture dependent.
+ Remove calls to set_gdbarch_deprecated_register_size,
+ set_gdbarch_deprecated_register_bytes, set_gdbarch_register_raw_size,
+ set_gdbarch_deprecated_max_register_raw_size,
+ set_gdbarch_register_virtual_size and
+ set_gdbarch_deprecated_max_register_virtual_size entirely.
+ Call set_gdbarch_long_long_bit, set_gdbarch_double_bit and
+ set_gdbarch_long_double_bit.
+
+2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * doublest.c (convert_doublest_to_floatformat): When dealing
+ with the implied integer bit, only alter mant_bits if we are
+ processing a full 32 bits of mantissa.
+
+2003-06-11 David Carlton <carlton@bactrian.org>
+
+ * dictionary.h: New.
+ * dictionary.c: New.
+ * block.h: Add opaque declaration for struct dictionary.
+ (struct block): Add 'dict' member; delete 'hashtable', 'nsyms',
+ 'sym' members.
+ (BLOCK_DICT): New macro.
+ Delete macros BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM,
+ BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE,
+ BLOCK_SHOULD_SORT.
+ (ALL_BLOCK_SYMBOLS): Update definition.
+ * Makefile.in (SFILES): Add dictionary.c.
+ (dictionary_h): New.
+ (COMMON_OBS): Add dictionary.o.
+ (dictionary.o): New.
+ (ada-lang.o): Depend on dictionary_h.
+ (buildsym.o, coffread.o, jv-lang.o, mdebugread.o, objfiles.o)
+ (stack.o, symmisc.o, symtab.o, tracepoint.o, valops.o)
+ (mi-cmd-stack.o): Ditto.
+ (gdbtk-cmds.o): Update dependencies.
+ (gdbtk-stack.o): Ditto.
+ * ada-lang.c: Include dictionary.h.
+ (symtab_for_sym): Update uses of ALL_BLOCK_SYMBOLS.
+ (fill_in_ada_prototype, debug_print_block): Ditto.
+ (ada_add_block_symbols): Update uses of ALL_BLOCK_SYMBOLS; replace
+ explicit iteration by use of ALL_BLOCK_SYMBOLS. Delete variable
+ 'is_sorted'.
+ * mdebugread.c: Include dictionary.h.
+ (struct parse_stack): Delete 'maxsyms' member.
+ (parse_symbol): Update calls to new_block. Delete calls to
+ shrink_block. Use dictionary methods.
+ (psymtab_to_symtab_1): Delete calls to sort_symtab_syms.
+ Update calls to new_symtab. Don't maintain maxsyms data.
+ (mylookup_symbol): Update use of ALL_BLOCK_SYMBOLS.
+ (add_symbol): Just call dict_add_symbol.
+ (new_symtab): Delete 'maxsyms' argument.
+ (new_symtab): Update calls to new_block.
+ (new_block): Delete 'maxsyms' argument; add 'function' argument.
+ (shrink_block): Delete function.
+ (fixup_sigtramp): Update call to new_block. Add symbol via
+ dict_add_symbol.
+ * jv-lang.c: Include dictionary.h.
+ (get_java_class_symtab): Set the BLOCK_DICT of the blocks
+ appropriately. Set class_symtab->free_func. Make sure the
+ blockvector is big enough to hold two blocks.
+ (add_class_symtab_symbol): Use dictionary methods.
+ (free_class_block): New function.
+ (type_from_class): Replace explicit iteration by
+ ALL_BLOCK_SYMBOLS.
+ * symtab.h (struct symtab): Replace 'free_ptr' method by
+ 'free_func'.
+ * dwarf2read.c (psymtab_to_symtab_1): Delete call to
+ sort_symtab_syms.
+ * dwarfread.c (psymtab_to_symtab_1): Delete call to
+ sort_symtab_syms.
+ * coffread.c (coff_symfile_read): Delete call to sort_symtab_syms.
+ Include dictionary.h.
+ (patch_opaque_types): Update use of ALL_BLOCK_SYMBOLS.
+ * dbxread.c (dbx_psymtab_to_symtab_1): Delete call to
+ sort_symtab_syms.
+ * objfiles.c: Include dictionary.h.
+ (objfile_relocate): Update use of ALL_BLOCK_SYMBOLS.
+ * buildsym.c: Include dictionary.h.
+ (finish_block): Use dictionary methods.
+ (end_symtab): Set free_func to NULL, not free_ptr.
+ * tracepoint.c: Include dictionary.h.
+ (add_local_symbols): Update use of ALL_BLOCK_SYMBOLS.
+ (scope_info): Ditto.
+ * stack.c: Include dictionary.h.
+ (print_block_frame_locals): Update use of ALL_BLOCK_SYMBOLS.
+ (print_block_frame_labels, print_frame_arg_vars)
+ (print_frame_args): Ditto.
+ * symmisc.c (free_symtab_block): Use dictionary methods.
+ (dump_symtab): Ditto.
+ (free_symtab): Replace use of 'free_ptr' by 'free_func'.
+ Include dictionary.h.
+ * symfile.h: Delete declarations of sort_block_syms,
+ sort_symtab_syms.
+ * symfile.c (sort_block_syms): Delete.
+ (sort_symtab_syms): Delete.
+ * symtab.c: Include dictionary.h.
+ (lookup_block_symbol): Use dictionary iterators.
+ (find_pc_sect_symtab): Update use of ALL_BLOCK_SYMBOLS.
+ (search_symbols, make_symbol_completion_list): Ditto.
+ (make_symbol_overload_list): Ditto.
+ * valops.c (value_of_local): Use dict_empty.
+ Include dictionary.h.
+
+2003-06-11 J. Brobecker <brobecker@gnat.com>
+
+ * win32-nat.c (solib_symbols_add): Fix a small compilation error.
+
+2003-06-11 David Carlton <carlton@bactrian.org>
+
+ * block.h (BLOCK_SHOULD_SORT): Delete.
+ * symtab.c (lookup_block_symbol): Don't worry about sorted linear
+ blocks.
+ * ada-lang.c (ada_add_block_symbols): Ditto.
+ * symfile.c (sort_block_syms): Delete.
+ (sort_symtab_syms): Ditto.
+ * symfile.h: Delete sort_symtabs_syms and sort_block_syms
+ declarations.
+ * coffread.c (coff_symfile_read): Don't call sort_symtab_syms.
+ * dbxread.c (dbx_psymtab_to_symtab_1): Ditto.
+ * dwarf2read.c (psymtab_to_symtab_1): Ditto.
+ * dwarfread.c (psymtab_to_symtab_1): Ditto.
+ * hpread.c (hpread_psymtab_to_symtab_1): Ditto.
+ * mdebugread.c (psymtab_to_symtab_1): Ditto.
+ * xcoffread.c (xcoff_psymtab_to_symtab_1): Ditto.
+
+2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-tdep.c (ia64_gdbarch_init): Set number of long double
+ bits to 128.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_REGISTER_CONVERTIBLE): Deprecate
+ REGISTER_CONVERTIBLE.
+ (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL): Same.
+ (DEPRECATED_REGISTER_CONVERT_TO_RAW): Same, make "from" constant.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arch-utils.h (deprecated_register_convertible_not): Rename
+ generic_register_convertible_not.
+ * arch-utils.c (deprecated_register_convertible_not): Rename
+ generic_register_convertible.
+ (legacy_convert_register_p, legacy_register_to_value): Update.
+ * sh-tdep.c (sh64_push_arguments): Update.
+ * m68klinux-tdep.c (m68k_linux_extract_return_value): Update.
+ * config/m68k/tm-delta68.h (DEPRECATED_EXTRACT_RETURN_VALUE): Update.
+ * m68klinux-tdep.c (m68k_linux_store_return_value): Update.
+ * config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Update.
+ * arch-utils.c (legacy_value_to_register): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ (rs6000_register_convert_to_raw): Make parameter "from" const.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ (mips_register_convert_to_raw): Make parameter"virt_buf" const.
+ * infcmd.c (default_print_registers_info): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ (ia64_register_convert_to_raw): Make parameter "from" const.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ (i386_register_convert_to_raw): Update.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * remote-fileio.c: Include "remote-fileio.h".
+ * Makefile.in (remote-fileio.o): Update dependencies.
+ (remote_fileio_h): Fix typo.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * xstormy16-tdep.c (xstormy16_push_return_address): Make static.
+ (xstormy16_save_dummy_frame_tos): Make static.
+ (_initialize_xstormy16_tdep): Add declaration.
+ * vax-tdep.c (_initialize_vax_tdep): Add declaration.
+ * v850-tdep.c: Make local functions static.
+ (_initialize_v850_tdep): Add declaration.
+ * sparc-tdep.c: Make local functions static.
+ (_initialize_sparc_tdep): Add declaration.
+ * sh-tdep.c: Make local functions static.
+ (_initialize_sh_tdep): Add declaration.
+ * sh3-rom.c (_initialize_sh3_rom): Add declaration.
+ * s390-tdep.c: Make local functions static.
+ (_initialize_s390_tdep): Add declaration.
+ * dbxread.c (find_stab_function_addr): Make static.
+ * ppc-bdm.c (_initialize_bdm_ppc): Add declaration.
+ * ocd.c (_initialize_remote_ocd): Add declaration.
+ * dink32-rom.c (_initialize_dink32_rom): Add declaration.
+ * ppcbug-rom.c (_initialize_ppcbug_rom): Add declaration.
+ * ns32k-tdep.c (_initialize_ns32k_tdep): Add declaration.
+ * ns32knbsd-tdep.c (_initialize_ns32knbsd_tdep): Add declaration.
+ * mips-tdep.c (_initialize_mips_tdep): Add declaration.
+ * remote-array.c (_initialize_array): Add declaration.
+ (_initialize_remote_monitors): Add declaration.
+ * remote-mips.c: Make local functions static.
+ (_initialize_remote_mips): Add declaration.
+ * mcore-tdep.c: Make all local functions static.
+ (_initialize_mcore_tdep): Add declaration.
+ * dbug-rom.c (_initialize_dbug_rom): Add declaration.
+ * abug-rom.c (_initialize_abug_rom): Add declaration.
+ * rom68k-rom.c (_initialize_rom68k): Add declaration.
+ * cpu32bug-rom.c (_initialize_cpu32bug_rom): Add declaration.
+ * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
+ * remote-est.c (_initialize_est): Add declaration.
+ * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
+ (m68hc11_call_dummy_address): Make static.
+ * ia64-tdep.c: Make local functions static.
+ (_initialize_ia64_tdep): Add declaration.
+ * solib-legacy.c (_initialize_svr4_lm): Add declaration.
+ * monitor.c (monitor_wait_filter): Make static.
+ (_initialize_remote_monitors): Add declaration.
+ * remote-hms.c (_initialize_remote_hms): Add declaration.
+ * remote-e7000.c (fetch_regs_from_dump): Make static.
+ (expect_n): Make static.
+ (_initialize_remote_e7000): Add declaration.
+ * ser-e7kpc.c: Always include "defs.h".
+ (_initialize_ser_e7000pc): Add declaration.
+ * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
+ * cris-tdep.c: Make all but one function static.
+ (_initialize_cris_tdep): Add declaration.
+ * solib-svr4.c (_initialize_svr4_solib): Add declaration.
+ * solib.c (update_solib_list): Make static.
+ (_initialize_solib): Add declaration.
+ * avr-tdep.c (avr_breakpoint_from_pc): Make static.
+ (_initialize_avr_tdep): Add declaration.
+ * remote-rdi.c (voiddummy): Make static.
+ (_initialize_remote_rdi): Add declaration.
+ * arm-tdep.c (_initialize_arm_tdep): Add declaration.
+ * remote-rdp.c (send_rdp): Make static.
+ (_initialize_remote_rdp): Add declaration.
+ * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
+
+2003-06-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * remote-fileio.c: Make ari happy.
+
+2003-06-10 J. Brobecker <brobecker@gnat.com>
+
+ * rs6000-nat.c (child_xfer_memory): Compute the right address when
+ fetching the trailing bytes of the buffer we are about to write.
+
+2003-06-10 Andrew Cagney <cagney@redhat.com>
+
+ * remote-fileio.h (REMOTE_FILEIO_H): Replace FILEIO_H.
+ * Makefile.in (remote-fileio.o): Update dependencies.
+ * remote-fileio.c: Include "gdb_wait.h" and "gdb_stat.h". Do not
+ include <setjmp.h>, or <sys/types.h> conditional on USG.
+ (remote_fio_jmp_buf): Delete global variable.
+
+2003-06-10 Corinna Vinschen <vinschen@redhat.com>
+ Martin M. Hunt <hunt@redhat.com>
+
+ * Makefile.in (REMOTE_OBS): Add remote-fileio.o
+ (SFILES): Add remote-fileio.c.
+ Add dependencies for building remote-fileio.o. Add remote-fileio.h to
+ dependencies for building remote.o.
+ * remote-fileio.c: New file implementing the remote File-I/O protocol.
+ * remote-fileio.h: New header file defining remote File-I/O interface.
+ * remote.c (remote_write_bytes, remote_read_bytes): Remove
+ static storage class.
+ (remote_wait, remote_async_wait): Call remote_fileio_request() on
+ 'F' packet.
+ (_initialize_remote): Call initialize_remote_fileio().
+ * remote.h: Declare remote_write_bytes() and remote_read_bytes().
+ * defs.h: Declare gdb_stdin, gdb_stdtargerr and gdb_stdtargin.
+ * main.c: New ui_file gdb_stdin, gdb_stdtargerr and gdb_stdtargin.
+ (captured_main): Initialize new ui_files.
+ * ui-file.c: Add read and fgets input functions.
+ (ui_file_new): set ui_file_fputs and ui_file_read to null functions.
+ (null_file_read): New function.
+ (ui_file_read): New function.
+ (set_ui_file_read): New function.
+ (stdio_file_read): New function.
+ * ui-file.h: New type ui_file_read_ftype.
+ (set_ui_file_read): Declare.
+ (ui_file_read): Declare.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_unwind_get_saved_register): Rename
+ generic_unwind_get_saved_register, update comments.
+ * mips-tdep.c (mips_get_saved_register): Update.
+ * frame.c (deprecated_unwind_get_saved_register): Update.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * vax-tdep.c (vax_frame_locals_address): Delete function.
+ (vax_gdbarch_init): Do not set frame_locals_address.
+ * m68hc11-tdep.c (m68hc11_frame_locals_address): Delete function.
+ (m68hc11_gdbarch_init): Do not set frame_locals_address.
+ * s390-tdep.c (s390_frame_args_address): Delete function.
+ (s390_gdbarch_init): Do not set frame_args_address or
+ frame_locals_address.
+ * ns32k-tdep.c (ns32k_frame_locals_address): Delete.
+ (ns32k_gdbarch_init): Do not set frame_locals_address.
+ * hppa-tdep.c (hppa_frame_args_address): Delete function.
+ (hppa_frame_locals_address): Delete function.
+ (hppa_gdbarch_init): Do not set frame_args_address, or
+ frame_locals_address.
+ * arm-tdep.c (arm_frame_args_address): Delete.
+ (arm_frame_locals_address): Delete.
+ (arm_gdbarch_init): Do not set frame_args_address, or
+ frame_locals_address.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (FRAME_NUM_ARGS): Change to function with predicate.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arch-utils.h (frame_num_args_unknown): Delete both declarations.
+ * arch-utils.c (frame_num_args_unknown): Delete function.
+ * stack.c (print_args_stub): Use FRAME_NUM_ARGS_P.
+ (frame_info): Use FRAME_NUM_ARGS_P.
+ * arm-tdep.c (arm_frame_num_args): Delete function.
+ (arm_gdbarch_init): Do not set frame_num_args.
+ * config/pa/tm-hppa64.h (FRAME_NUM_ARGS): Delete.
+ * hppa-tdep.c (hppa_frame_num_args): Delete function.
+ (hppa_gdbarch_init): Do not set frame_num_args.
+ * config/sparc/tm-sparc.h (FRAME_NUM_ARGS): Delete.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ frame_num_args to default frame_num_args_unknown.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68k-tdep.c (m68k_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * alpha-tdep.c (alpha_gdbarch_init): Ditto.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * printcmd.c (print_frame_nameless_args): Moved to "stack.c".
+ (print_frame_args): Moved to "stack.c".
+ * stack.c: Include "gdb_assert.h".
+ (print_frame_nameless_args): Moved from "printcmd.c", made static.
+ (print_frame_args): Moved from "printcmd.c".
+ * frame.h (print_frame_args): Delete declaration.
+ * Makefile.in (stack.o): Update dependencies.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (get_prev_frame): Remove reference to
+ frame_args_address_correct in comments.
+ * frame-base.c (default_frame_args_address): Delete code
+ conditional on FRAME_ARGS_ADDRESS_CORRECT.
+ * vax-tdep.c (vax_frame_args_address_correct): Delete.
+ (vax_frame_args_address): Merge in vax_frame_args_address_correct.
+ * config/vax/tm-vax.h (FRAME_ARGS_ADDRESS_CORRECT): Delete
+ (vax_frame_args_address_correct): Delete declaration.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (UNWIND_SP): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.c (frame_sp_unwind): New function.
+ (get_frame_sp): New function.
+ * frame.h (get_frame_sp, frame_sp_unwind): Declare.
+ * regcache.c (read_sp): Rewrite, try each of TARGET_READ_SP,
+ gdbarch_unwind_sp and SP_REGNUM when looking for the SP register
+ value.
+ * d10v-tdep.c (d10v_unwind_sp): Replace d10v_read_sp.
+ (d10v_gdbarch_init): Set unwind_sp instead of read_sp.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ Deprecate BIG_REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT and
+ REMOTE_BREAKPOINT.
+ * remote.c: Update.
+ * config/sh/tm-sh.h (DEPRECATED_BIG_REMOTE_BREAKPOINT): Update.
+ (DEPRECATED_LITTLE_REMOTE_BREAKPOINT): Update.
+ * config/m68k/tm-sun3.h: Update.
+ * config/m68k/tm-m68klynx.h: Update.
+ * config/h8300/tm-h8300.h (DEPRECATED_REMOTE_BREAKPOINT): Update.
+
+ * trad-frame.h (struct trad_frame_saved_reg): Rename "struct
+ trad_frame". Update comments.
+ * d10v-tdep.c (struct d10v_unwind_cache): Update.
+ * trad-frame.c (trad_frame_alloc_saved_regs): Update.
+ (trad_frame_register_value, trad_frame_prev_register): Update.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
+ from GCC's acinclude.m4.
+ * configure.in: Check for getopt's delcaration.
+ * aclocal.m4, config.in, configure: Re-generate.
+ * main.c (error_init): Delete declaration.
+ * defs.h (error_init): Declare.
+ * rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
+ (rs6000_convert_from_func_ptr_addr): Make static.
+ (_initialize_rs6000_tdep): Add declaration.
+ * cli/cli-cmds.c (dont_repeat): Delete declaration.
+ (show_commands, set_verbose, show_history): Delete declaration.
+ * top.h (set_verbose): Add declaration.
+ (show_history, set_history, show_commands): Add declaration.
+ (do_restore_instream_cleanup): Add declaration.
+ * objc-lang.c (specialcmp): Make static.
+ (print_object_command): Make static.
+ (find_objc_msgsend): Make static.
+ (find_objc_msgcall_submethod_helper): Make static.
+ (find_objc_msgcall_submethod): Make static.
+ (_initialize_objc_language): Add declaration.
+ (find_implementation_from_class): Make static.
+ (find_implementation): Make static.
+ * objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
+ * objc-lang.h (lookup_struct_typedef): Add declaration.
+ * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
+ * cli/cli-script.c (clear_hook_in_cleanup): Make static.
+ (do_restore_user_call_depth): Make static.
+ (do_restore_instream_cleanup): Delete declaration.
+ (dont_repeat): Delete declaration.
+ * cli/cli-decode.c (add_abbrev_cmd): Delete function.
+ * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
+ * reggroups.c (_initialize_reggroup): Add declaration.
+ * cp-support.c (_initialize_cp_support): Add declaration.
+ * cp-abi.c (_initialize_cp_abi): Add declaration.
+ * hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
+ * gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
+ (_initialize_gnu_v3_abi): Add declaration.
+ * gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
+ (_initialize_gnu_v2_abi): Add declaration.
+ * frame-base.c (_initialize_frame_base): Add declaration.
+ * doublest.c (floatformat_from_length): Make static.
+ * frame-unwind.c (_initialize_frame_unwind): Add declaration.
+ * frame.c (create_sentinel_frame): Make static.
+ (_initialize_frame): Add declaration.
+ * top.c (do_catch_errors): Make static.
+ (gdb_rl_operate_and_get_next_completion): Make static.
+ * typeprint.c: Include "typeprint.h".
+ * sentinel-frame.c (sentinel_frame_prev_register): Make static.
+ (sentinel_frame_this_id): Make static.
+ * p-valprint.c (_initialize_pascal_valprint): Add declaration.
+ * ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
+ * dwarf2-frame.c (dwarf2_frame_cache): Make static.
+ * p-exp.y (push_current_type, pop_current_type): ISO C declaration.
+ * dwarf2expr.h (dwarf_expr_context): ISO C declaration.
+ * maint.c (maintenance_print_architecture): Make static.
+ * signals/signals.c (_initialize_signals): Add declaration.
+ * std-regs.c (_initialize_frame_reg): Add declaration.
+ * jv-exp.y (push_variable): ISO C definition.
+ (push_qualified_expression_name): Ditto.
+ * memattr.c (_initialize_mem): Add declaration.
+ * remote.c (remote_check_watch_resources): Make static.
+ (remote_stopped_by_watchpoint): Make static.
+ (remote_stopped_data_address): Make static.
+ * d10v-tdep.c (nr_dmap_regs): Make static.
+ (a0_regnum): Make static.
+ (d10v_frame_unwind_cache): Make static.
+ (d10v_frame_p): Make static.
+ * osabi.c (show_osabi): Make static.
+ (_initialize_gdb_osabi): Add extern declaration.
+ * gdbtypes.c (make_qualified_type): Make static.
+ (safe_parse_type): Make static.
+ * macrocmd.c (_initialize_macrocmd): Add extern declaration.
+ * macrotab.c (macro_bcache_free): Make static.
+ * interps.c (interp_set_quiet): Make static.
+ (interpreter_exec_cmd): Make static.
+ * stack.h (select_frame_command): New file.
+ * stack.c: Include "stack.h".
+ (select_frame_command_wrapper): Delete function.
+ (select_frame_command): Make global.
+ * infcall.c: Include "infcall.h".
+ * linespec.c: Include "linespec.h".
+ * symfile.c (sections_overlap): Make static.
+ * cp-support.h (cp_initialize_namespace): ISO C declaration.
+ * charset.c (_initialize_charset): Add missing prototype.
+ * regcache.c (init_legacy_regcache_descr): Make static.
+ (do_regcache_xfree): Make static.
+ (regcache_xfer_part): Make static.
+ (_initialize_regcache): Add missing prototype.
+ * breakpoint.c (parse_breakpoint_sals): Make static.
+ (breakpoint_sals_to_pc): Make static.
+ * interps.h (clear_interpreter_hooks): ISO C declaration.
+ * Makefile.in (stack_h): Define.
+ (stack.o, typeprint.o, mi-main.o): Update dependencies.
+ (mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (d10v-tdep.o): Update dependencies.
+ (SFILES): Add trad-frame.c.
+ (trad_frame_h): Define.
+ (COMMON_OBS): Add trad-frame.o.
+ (trad-frame.o): Specify dependencies.
+ * d10v-tdep.c: Include "trad-frame.h".
+ (saved_regs_unwinder): Delete function.
+ (d10v_frame_prev_register): Use trad_frame_prev_register.
+ (struct d10v_unwind_cache): Change type of "saved_regs" to "struct
+ trad_frame", delete "regs" and "prev_sp".
+ (prologue_find_regs): Use trad-frame.
+ * trad-frame.h, trad-frame.c: New files.
+
+2003-06-08 Mark Kettenis <kettenis@gnu.org>
-2003-06-06 Jim Blandy <jimb@redhat.com>
+ * dwarf2cfi.c, dwarf2cfi.h: Remove.
- Merged from trunk:
+2003-06-07 Adam Fedor <fedor@gnu.org>
+
+ * gdb/objc-lang.c (FETCH_ARGUMENT): Remove macro.
+ (OBJC_FETCH_POINTER_ARGUMENT): Shorthand macro for
+ using FETCH_POINTER_ARGUMENT with Objective-C method arguments.
+ (find_implementation, resolve_msgsend, resolve_msgsend_stret,
+ resolve_msgsend_super, resolve_msgsend_super_stret):
+ Use it.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * symfile.h: Re-indent, clean up comments.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * inferior.h (deprecated_write_sp): Replace
+ generic_target_write_sp.
+ * regcache.c (deprecated_write_sp): Replace
+ generic_target_write_sp.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Update.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * dwarf2-frame.c (dwarf2_frame_cache): Add comments on PC_REGNUM.
+ Assert that PC_REGNUM is valid.
+ (dwarf2_frame_prev_register): Add comments on SP_REGNUM.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (TARGET_READ_SP): Add predicate, delete default.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * mn10300-tdep.c: Include "gdb_assert.h".
+ (mn10300_read_fp): New function.
+ (mn10300_gdbarch_init): Set deprecated_target_read_fp to
+ mn10300_read_fp. Do not set read_sp to generic_target_read_sp.
+ * ia64-tdep.c: Include "gdb_assert.h".
+ (ia64_read_fp): New function.
+ (ia64_gdbarch_init): Set deprecated_target_read_fp to
+ ia64_read_sp. Do not set read_sp to generic_target_read_sp.
+ * regcache.c (generic_target_read_sp): Delete function.
+ (read_sp): Try TARGET_READ_SP and SP_REGNUM for the SP register.
+ * inferior.h (generic_target_read_sp): Delete declaration.
+ * frv-tdep.c (frv_gdbarch_init): Do not set read_sp to
+ generic_target_read_sp.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * Makefile.in (mn10300-tdep.o, ia64-tdep.o): Update dependencies.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Comment each field of startup_gdbarch.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (TARGET_READ_PC): Add predicate, remove default.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * regcache.c: Update comments on read_pc et.al.
+ (generic_target_read_pc): Delete function.
+ (read_pc_pid): Try TARGET_READ_PC and PC_REGNUM for a PC register.
+ * inferior.h (generic_target_read_pc): Delete declaration.
+ * frv-tdep.c (frv_gdbarch_init): Do not set read_pc to
+ generic_target_read_pc.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * elfread.c (elf_symtab_read): Replace "special_local_sym_p" and
+ "index" with "special_local_sect". Use strcmp instead of STREQ.
+ Append period to coments.
+
+2003-06-06 Mark Mitchell <mark@codesourcery.com>
+
+ * elfread.c (elf_symtab_read): Avoid use of SECT_OFF_MAX.
+ (elfstab_offset_sections): Likewise.
+ * gdb-stabs.h (stab_section_info): Likewise.
+ * i386-interix-tdep.c (pei_adjust_objfile_offsets): Likewise.
+ * objfiles.c (objfile_relocate): Likewise.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Likewise.
+ * remote.c (get_offsets): Likewise.
+ (remote_cisco_objfile_relocate): Likewise.
+ * somread.c (som_symfile_offsets): Likewise.
+ * symfile.c (alloc_section_addr_info): New function.
+ (build_section_addr_info_from_section_tab): Use it.
+ (free_section_addr_info): Adjust.
+ (default_symfile_offsets): Avoid use of SECT_OFF_MAX.
+ (syms_from_objfile): Allocate local_addr dynamically.
+ (symbol_file_add_with_addrs_or_offsets): Allocate orig_addrs
+ dynamically.
+ (add_symbol_file_command): Allocate sect_opts dynamically.
+ (reread_symbols): Avoid use of SECT_OFF_MAX.
+ * symfile.h (section_addr_info): Do not use MAX_SECTIONS.
+ (alloc_section_addr_info): Declare it.
+ * symtab.h (SIZEOF_SECTION_OFFSETS): Remove.
+ * win32-nat.c (solib_symbols_add): Allocate section_addrs
+ dynamically.
+ * xcoffread.c (xcoff_symfile_offsets): Avoid use of SECT_OFF_MAX.
- 2003-05-29 Kevin Buettner <kevinb@redhat.com>
+2003-06-06 Andrew Cagney <cagney@redhat.com>
- From Jimi X <jimix@watson.ibm.com>:
- * rs6000-tdep.c (skip_prologue): Improve support for 64-bit code.
+ * d10v-tdep.c (struct d10v_unwind_cache): Delete "return_pc".
+ (d10v_frame_unwind_cache): Do not set "return_pc".
+
+2003-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * h8300-tdep.c: Make tidy (long lines).
+
+2003-06-06 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_fill_fxsave): Pass correct regnums
+ to regcache_collect().
+
+2003-06-05 J. Brobecker <brobecker@gnat.com>
+
+ * hppa-hpux-tdep.c (hppa_hpux_init_abi): New function, setting
+ pc_in_sigtramp multiarch method.
+ (hppa_hpux_som_init_abi): Use it.
+ (hppa_hpux_elf_init_abi): Likewise.
+ * config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Remove, now that this
+ macro has been multiarched.
+ * config/pa/tm-hppa64.h (PC_IN_SIGTRAMP): Temporarily set this
+ macro here, as hppa64 isn't multiarched yet.
+
+2003-06-05 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (value_h): Add $(frame_h).
+ * value.h: Include "frame.h".
+ (struct value): Replace "frame_addr" with "frame_id".
+ (VALUE_FRAME_ID): Replace VALUE_FRAME.
+ * values.c (allocate_value): Use VALUE_FRAME_ID.
+ (value_copy): Use VALUE_FRAME_ID.
+ * findvar.c (value_from_register): Use VALUE_FRAME_ID.
+ * valops.c (value_assign): Update. Use frame_find_by_id.
+
+2003-06-05 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_push_arguments): Don't clear offset
+ in each pass.
+
+2003-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread-db.c (check_event): For create/death event breakpoints,
+ loop through all messages to ensure that we read the message
+ corresponding to the breakpoint we are at.
+
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * h8300-tdep.c (h8300_gdbarch_init): Add h8300hn, h8300sn.
+
+2003-06-04 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (struct comp_unit): Add member `dbase'.
+ (read_encoded_value): Handle DW_EH_PE_datarel encoding.
+ (dwarf2_build_frame_info): Set base for DW_EH_PE_datarel encodings
+ when handling .eh_frame sections.
+
+2003-06-04 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Use the generic
+ prepare_to_proceed procedure instead of the hppa-specific one.
+ * hppa-tdep.c (hppa_prepare_to_proceed): Remove, no longer used.
+
+2003-06-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acconfig.h: Add HAVE_TKILL_SYSCALL definition check.
+ * config.in: Regenerated.
+ * configure.in: Add test for syscall function and check for
+ __NR_tkill macro in <syscall.h> to set HAVE_TKILL_SYSCALL.
+ * configure: Regenerated.
+ * lin-lwp.c [HAVE_TKILL_SYSCALL]: Include <unistd.h> and
+ <sys/syscall.h>.
+ (kill_lwp): New function that uses tkill syscall or
+ uses kill, depending on whether threading model is nptl or not.
+ All callers of kill() changed to use kill_lwp().
+ (lin_lwp_wait): Make special check when WIFEXITED occurs to
+ see if all threads have already exited in the nptl model.
+ (stop_and_resume_callback): New callback function used by the
+ lin_lwp_wait thread exit handling code.
+ (stop_wait_callback): Check for threads already having exited and
+ delete such threads fromt the lwp list when discovered.
+ (stop_callback): Don't assert retcode of kill call.
+
+ Roland McGrath <roland@redhat.com>
+ * i386-linux-nat.c (ps_get_thread_area): New function needed by
+ nptl libthread_db.
+
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_next_pc): Use alpha_read_insn.
+ (alpha_sigtramp_frame_this_id): Use get_frame_memory.
+ (alpha_sigtramp_frame_prev_register): Likewise.
+ (alpha_heuristic_frame_prev_register): Likewise.
+ * alpha-mdebug-tdep.c (alpha_mdebug_frame_prev_register): Likewise.
+
+ * alpha-mdebug-tdep.c (alpha_mdebug_after_prologue): Use
+ alpha-specific register id names.
+ (alpha_mdebug_frame_unwind_cache): Likewise.
+ (alpha_mdebug_frame_prev_register): Likewise.
+
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_dwarf2_init_abi): New.
+ * alpha-tdep.h (alpha_dwarf2_init_abi): Declare it.
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Use it.
+ * alphafbsd-tdep.c (alphafbsd_init_abi): Register dwarf2 and mdebug
+ unwind routines.
+ * alphanbsd-tdep.c (alphanbsd_init_abi): Likewise.
+ * config/alpha/fbsd.mt (TDEPFILES): Add alpha-mdebug-tdep.o.
+ * config/alpha/nbsd.mt (TDEPFILES): Likewise.
+
+ * alpha-linux-tdep.c: Remove unnecessary includes.
+ * Makefile.in (alpha-linux-tdep.o): Update.
+
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * alphabsd-tdep.c (alphabsd_supply_fpreg): Fix typo last change.
+ (alphabsd_fill_fpreg): Likewise.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alphanbsd-tdep.c (alphanbsd_sigcontext_addr): Replace
+ references to struct frame_info fields by calls to the equivalent
+ accessors. Necessary now that frame_info is opaque.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alphanbsd-tdep.c (alphanbsd_skip_sigtramp_frame): Delete.
+ (alphanbsd_init_abi): Do not set skip_sigtramp_frame in tdep
+ structure, field no longer exists.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * config/alpha/alpha-osf1.mt (TDEPFILES): Add alpha-mdebug-tdep.o.
+ * alpha-osf1-tdep.c (alpha_osf1_init_abi): Enable the mdebug module.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Replace
+ references to struct frame_info fields by calls to the equivalent
+ accessors. Necessary now that frame_info is opaque.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (alpha_osf1_skip_sigtramp_frame): Delete.
+ (alpha_osf1_init_abi): Do not set skip_sigtramp_frame in tdep
+ structure, field no longer exists.
+
+2003-06-03 Theodore A. Roth <troth@openavr.org>
+
+ * remote.c (init_remote_state): Compute sizeof_g_packet by
+ accumulation of the size of all registers instead of blindly using
+ DEPRECATED_REGISTER_BYTES.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * config/h8300/tm-h8300.h (h8300sxmode): Declare.
+ * h8300-tdep.c (h8300_gdbarch_init): Set machine mode
+ for h8300sx.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (objfiles.h): #include, needed for symfile_objfile.
+ * Makefile.in (alpha-osf1-tdep.o): Update dependencies.
+
+2003-06-03 Andrew Cagney <cagney@redhat.com>
+
+ * sparc-tdep.c (sparc_convert_to_virtual): Delete function.
+ (sparc_convert_to_raw): Delete function.
+ (sparc_gdbarch_init): Do not set register_convert_to_raw or
+ register_convert_to_virtual.
+
+2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread-db.c (thread_db_mourn_inferior): Unpush thread target
+ layer if not dealing with a statically-linked threaded program.
+
+2003-06-03 Kris Warkentin <kewarken@qnx.com>
+
+ * solib.c (solib_open): Update comment to reflect actual search order.
+
+2003-06-03 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (get_frame_memory_signed): New function.
+ (get_frame_memory, get_frame_memory_unsigned): New function.
+ (get_frame_arch): New function.
+ * frame.h (get_frame_signed_memory, get_frame_arch): Declare.
+ (get_frame_memory, get_frame_unsigned_memory): Declare.
+ * d10v-tdep.c (d10v_frame_unwind_cache): Use
+ get_frame_memory_unsigned and get_frame_arch.
+ (d10v_frame_unwind_cache, saved_regs_unwinder): Ditto.
+
+2003-06-03 Raoul Gough <RaoulGough@yahoo.co.uk>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2003-06-03 Jim Blandy <jimb@redhat.com>
+
+ * s390-nat.c (supply_gregset, fill_gregset): On the s390x, the
+ elements of gregset_t are 64 bits each, but access registers
+ are still 32 bits, so they're packed two per gregset_t
+ element. Unpack/pack them properly.
+
+2003-06-02 David Carlton <carlton@bactrian.org>
+
+ * linespec.c (find_methods): Break out code into
+ add_matching_methods and add_constructors.
+ (add_matching_methods): New.
+ (add_constructors): Ditto.
+
+2003-06-02 Andrew Cagney <cagney@redhat.com>
+
+ * sparc-tdep.c (sparc_print_registers): Delete call to
+ REGISTER_CONVERTIBLE.
+ (sparc_gdbarch_init): Do not set register_convertible.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+
+2003-06-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * target.h (TARGET_SYMFILE_POSTREAD): Delete unused macro.
+ * symfile.c (reread_symbols): Delete call to TARGET_SYMFILE_POSTREAD.
+ (syms_from_objfile): Ditto.
+
+2003-06-03 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_gdbarch_init): Use set_gdbarch_print_insn ...
+ (_initialize_m68k_tdep): ... instead of deprecated_tm_print_insn.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_reggroup_p): Zero is only
+ a member of all_reggroup.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_type): Change from _virtual_type.
+ (alpha_convert_flt_dbl, alpha_convert_dbl_flt): Remove.
+ (alpha_lds, alpha_sts): New.
+ (alpha_convert_register_p): Change from _register_convertible.
+ (alpha_register_to_value): Change from _convert_to_virtual;
+ restructure and fail for type sizes other than 4 or 8.
+ (alpha_value_to_register): Similarly.
+ (alpha_extract_return_value): Use alpha_sts.
+ (alpha_store_return_value): Use alpha_lds.
+ (alpha_gdbarch_init): Update hooks.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_virtual_type): Use alpha-specific
+ regnum identifiers.
+ (alpha_sigtramp_register_address): Likewise.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
-2003-06-05 Jim Blandy <jimb@redhat.com>
+ * alpha-tdep.c (alpha_supply_int_regs, alpha_fill_int_regs): New.
+ (alpha_supply_fp_regs, alpha_fill_fp_regs): New.
+ * alpha-tdep.h: Declare them.
+
+ * alpha-nat.c (fetch_osf_core_registers): Constify core_reg_mapping.
+ Remove zerobuf. Don't error on UNIQUE.
+ (fetch_elf_core_registers): Use alpha_supply_{int,fp}_regs.
+ (ALPHA_REGSET_UNIQUE): Provide default.
+ (supply_gregset): Use alpha_supply_int_regs.
+ (fill_gregset): Use alpha_fill_int_regs.
+ (supply_fpregset): Use alpha_supply_fp_regs.
+ (fill_fpregset): Use alpha_fill_fp_regs.
+ * alphabsd-tdep.c (NUM_GREGS, NUM_FPREGS): Remove.
+ (alphabsd_supply_reg): Use alpha_supply_int_regs.
+ (alphabsd_fill_reg): Use alpha_fill_int_regs.
+ (alphabsd_supply_fpreg): Use alpha_supply_fp_regs.
+ (alphabsd_fill_fpreg): Use alpha_fill_fp_regs.
+ * config/alpha/nm-linux.h (ALPHA_REGSET_UNIQUE): New.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_store_return_value): Avoid switch fallthru.
+
+ * alpha-tdep.c (alpha_extract_return_value): Use internal_error.
+ (alpha_store_return_value): Likewise.
+
+2003-06-02 David Carlton <carlton@math.stanford.edu>
+
+ * block.c (contained_in): Add 'const' to arguments.
+ (block_function): Ditto.
+ * block.h: Update declarations for block_function and
+ contained_in.
+
+2003-06-02 David Carlton <carlton@math.stanford.edu>
+
+ * objc-lang.c (find_imps): Delete unneeded variable 'sym_symtab'.
+ * c-valprint.c (c_val_print): Delete unneeded variable 's'.
+ * p-valprint.c (pascal_val_print): Ditto.
+ * ada-lang.c (standard_lookup): Delete unneded variable 'symtab'.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Use
+ builtin_type_ieee_double_little instead of builtin_type_double.
+
+ * alpha-tdep.c (alpha_push_dummy_call): Handle ABI mandated
+ sign-extension of 32-bit values.
+ (alpha_store_return_value): Similarly.
+
+ * alpha-tdep.c (alpha_push_dummy_call): Handle COMPLEX types.
+ (alpha_extract_return_value): Likewise.
+ (alpha_store_return_value): Likewise.
+
+ * alpha-tdep.c (alpha_extract_return_value): Handle IEEE Quad floats.
+ (alpha_store_return_value): Error on IEEE Quad floats.
+
+ * alpha-tdep.c (alpha_extract_return_value): Convert to regcache.
+ (alpha_extract_struct_value_address): Likewise.
+ (alpha_store_return_value): Likewise.
+ (alpha_store_struct_return): Remove.
+ (alpha_gdbarch_init): Update hook registration to match.
+
+ * alpha-tdep.c (alpha_register_convert_to_virtual): Tidy use of
+ deprecated interfaces; use ALPHA_REGISTER_SIZE instead of gdbarch
+ macros where appropriate.
+ (alpha_register_convert_to_raw): Similarly. Use unpack_long.
+ (alpha_convert_flt_dbl, alpha_convert_dbl_flt): New.
+
+ * alpha-tdep.c (alpha_register_virtual_type): Use void_data_ptr
+ for SP, GP; void_func_ptr for PC; non-language-specific types
+ for all others.
+ * alpha-tdep.h (ALPHA_GP_REGNUM): New.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * top.h (lim_at_start): Declare.
+ * main.c (captured_main): Set it.
+ * top.c (lim_at_start): Define.
+ (command_loop): Use it instead of &environ.
+ * event-top.c (command_handler): Likewise.
+
+2003-06-01 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * mipsnbsd-tdep.c: Update copyright years.
+ (fetch_core_registers): Correct arguments to mipsnbsd_supply_fpreg.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * Makefile.in (ALLDEPFILES): Add alpha-mdebug-tdep.c.
+ (alpha-linux-tdep.o): Update dependencies.
+ (alpha-nat.o, alpha-tdep.o, alpha-mdebug-tdep.o): Likewise.
+ * alpha-mdebug-tdep.c: Remove unneeded includes.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_reggroup_p): New.
+ (alpha_gdbarch_init): Register it.
+
+2003-06-02 Andrew Cagney <cagney@redhat.com>
+
+ * dwarfread.c: Eliminate "register"
+ (decode_die_type): Eliminate assignment within "if".
+ (struct_type, decode_array_element_type): Ditto.
+ (dwarf_read_array_type, read_tag_pointer_type): Ditto.
+ (read_subroutine_type, enum_type, add_enum_psymbol): Ditto.
+ (decode_modified_type, completedieinfo): Ditto.
+ * block.c: Eliminate "register".
+ (blockvector_for_pc_sect): Eliminate assignment within "if".
+ * cp-support.h (struct symbol): Opaque declaration.
+ * breakpoint.c (handle_gnu_v3_exceptions): Use xfree, not free.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Use set_gdbarch_print_insn ...
+ (_initialize_alpha_tdep): ... not deprecated_tm_print_insn.
+
+2003-06-01 Adam Fedor <fedor@gnu.org>
+
+ * gdbarch.sh (function_list): Add FETCH_POINTER_ARGUMENT.
+ * gdbarch.[ch]: Regenerate.
+ * hppa-tdep.c (hppa_fetch_pointer_argument): New function.
+ (hppa_gdbarch_init): Set it in the gdbarch vector.
+ * i386-tdep.c (i386_fetch_pointer_argument): New
+ (i386_gdbarch_init): Set it into gdbarch.
+ * rs6000-tdep.c (rs6000_fetch_pointer_argument): New.
+ (rs6000_gdbarch_init): Set it in gdbarch.
+ * sparc-tdep.c (sparc_fetch_pointer_argument): New
+ (sparc_gdbarch_init): Set it in gdbarch.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (extract_address): Delete declaration.
+ * findvar.c (extract_address): Delete function.
+ * xstormy16-tdep.c (xstormy16_extract_return_value): Replace
+ extract_address with the inline equivalent,
+ extract_unsigned_integer.
+ (xstormy16_extract_struct_value_address): Ditto.
+ (xstormy16_pointer_to_address): Ditto.
+ * vax-tdep.c (vax_extract_struct_value_address): Ditto.
+ * v850-tdep.c (v850_push_arguments): Ditto.
+ (v850_extract_return_value): Ditto.
+ (v850_extract_struct_value_address): Ditto.
+ * sparcnbsd-tdep.c (sparcnbsd_get_longjmp_target_32): Ditto.
+ (sparcnbsd_get_longjmp_target_64): Ditto.
+ * sparc-tdep.c (sparc_frame_saved_pc): Ditto.
+ (get_longjmp_target): Ditto.
+ * sh-tdep.c (sh_extract_struct_value_address): Ditto.
+ (sh64_extract_struct_value_address): Ditto.
+ (sh_push_arguments): Ditto.
+ (sh64_push_arguments): Ditto.
+ * remote-vxsparc.c (vx_read_register): Ditto.
+ * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Ditto.
+ * ns32k-tdep.c (ns32k_extract_struct_value_address): Ditto.
+ * mn10300-tdep.c (mn10300_extract_struct_value_address): Ditto.
+ * mipsv4-nat.c (get_longjmp_target): Ditto.
+ * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Ditto.
+ * mips-nat.c (get_longjmp_target): Ditto.
+ * mips-linux-tdep.c (mips_linux_get_longjmp_target): Ditto.
+ * mcore-tdep.c (mcore_extract_struct_value_address): Ditto.
+ * m68k-tdep.c (m68k_get_longjmp_target): Ditto.
+ * m68hc11-tdep.c (m68hc11_extract_struct_value_address): Ditto.
+ * irix5-nat.c (get_longjmp_target): Ditto.
+ * irix4-nat.c (get_longjmp_target): Ditto.
+ * ia64-tdep.c (generic_elf_find_global_pointer): Ditto.
+ (ia64_push_arguments): Ditto.
+ * hpux-thread.c (hpux_thread_store_registers): Ditto.
+ * h8300-tdep.c (h8300_push_arguments): Ditto.
+ (h8300_store_return_value): Ditto.
+ (h8300_extract_struct_value_address): Ditto.
+ * frv-tdep.c (frv_extract_struct_value_address): Ditto.
+ (frv_push_arguments): Ditto.
+ * avr-tdep.c (avr_pointer_to_address): Ditto.
+ (avr_push_arguments): Ditto.
+ * arm-tdep.c (arm_push_dummy_call): Ditto.
+ (arm_get_longjmp_target): Ditto.
+ * arm-linux-tdep.c (arm_linux_push_arguments): Ditto.
+ * alpha-tdep.c (alpha_extract_struct_value_address): Ditto.
+ (alpha_get_longjmp_target): Ditto.
+
+ * solib-irix.c (extract_mips_address): Inline extract_address,
+ replacing it with extract_signed_integer.
+ * solib-svr4.c (SOLIB_EXTRACT_ADDRESS): Ditto.
+ (LM_NAME, IGNORE_FIRST_LINK_MAP_ENTRY): Ditto.
+ (first_link_map_member, open_symbol_file_object): Ditto.
+ (svr4_fetch_objfile_link_map, svr4_fetch_objfile_link_map): Ditto.
+ * solib-sunos.c (SOLIB_EXTRACT_ADDRESS): Ditto.
+ (LM_NEXT, LM_NAME): Ditto.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.h (ALPHA_FP_REGNUM): Remove.
+ * alpha-tdep.c (alpha_register_name): Remove vfp entry.
+ (alpha_cannot_fetch_register): Remove ALPHA_FP_REGNUM.
+ (alpha_cannot_store_register): Likewise.
+ * alphabsd-nat.c (fetch_inferior_registers): Don't set FP_REGNUM.
+ * alpha-nat.c (supply_gregset): Likewise.
+ * alphanbsd-tdep.c (fetch_core_registers): Likewise.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): Update comment on
+ DEPRECATED_DUMMY_WRITE_SP.
+
+ * mips-tdep.c (mips_gdbarch_init): Do not set
+ deprecated_dummy_write_sp.
+ (mips_eabi_push_dummy_call): Set the SP register.
+ (mips_o64_push_dummy_call): Set the SP register.
+ (mips_o32_push_dummy_call): Set the SP register.
+ (mips_n32n64_push_dummy_call): Set the SP register.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE
+ instead of ALPHA_MAX_REGISTER_RAW_SIZE.
+ (supply_gregset): Likewise.
+ * alpha-tdep.c (alpha_store_return_value): Likewise.
+ (alpha_get_longjmp_target): Likewise.
+ (alpha_register_name): Constify array.
+ (alpha_gdbarch_init): Remove deprecated_fp_regnum,
+ deprecated_register_size, deprecated_register_bytes,
+ deprecated_max_register_raw_size, deprecated_max_register_virtual_size.
+ * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove.
+ (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies
+ from arg_reg_buffer to regcache to avoid double conversion.
+
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (child_resume): Use I386_ESP_REGNUM instead of
+ SP_REGNUM.
+ * i386-linux-tdep.c (i386_linux_sigcontext_addr): Likewise.
+ * i386bsd-tdep.c (i386bsd_sigcontext_addr): Likewise.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * dwarf2-frame.c (struct dwarf2_cie): Add saw_z_augmentation.
+ (decode_frame_entry): Set it. Skip FDE augmentation.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * dwarf2-frame.c (dwarf2_frame_cache): Handle retaddr_column
+ not overlapping PC_REGNUM.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Transmography from
+ alpha_push_arguments. Don't dump argument register data to
+ the target stack. Fix float and 128-bit long double semantics.
+ Store $t12 and $ra as specified by the ABI. Use regcache everywhere.
+ (alpha_fix_call_dummy): Remove.
+ (alpha_call_dummy_words): Remove.
+ (alpha_gdbarch_init): Kill deprecated call hooks; add push_dummy_call.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Install dwarf2 unwinder.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (is_mips16_addr): New function.
+ (make_mips16_addr, unmake_mips16_addr): New functions.
+ (pc_is_mips16, mips_fetch_instruction): Use.
+ (gdb_print_insn_mips, mips_breakpoint_from_pc): Use.
+ (gdb_print_insn_mips): Eliminate TM_PRINT_INSN_MACH.
+ (mips_dump_tdep): Delete print of TM_PRINT_INSN_MACH,
+ UNMAKE_MIPS16_ADDR, MAKE_MIPS16_ADDR, IS_MIPS16_ADDR and
+ TARGET_MIPS.
+ * config/mips/tm-mips.h: Update copyright.
+ (TARGET_MIPS, TM_PRINT_INSN_MACH): Delete.
+ (DEPRECATED_REGISTER_SIZE, DEPRECATED_REGISTER_BYTES): Delete.
+ (IS_MIPS16_ADDR, MAKE_MIPS16_ADDR, UNMAKE_MIPS16_ADDR): Delete.
+ * config/mips/tm-irix6.h (DEPRECATED_REGISTER_BYTES): Delete.
+ (TM_PRINT_INSN_MACH): Delete.
+ * config/mips/tm-irix5.h (DEPRECATED_REGISTER_BYTES): Delete.
+
+ * configure.tgt: Replace mips64*vr4xxx*el-*-elf*,
+ mips64*vr4xxx*-*-elf*, mips64*vr4300*el-*-elf*,
+ mips64*vr4300*-*-elf*, mips64*vr4100*el-*-elf*,
+ mips64*vr4100*-*-elf*, mips64*vr5000*el-*-elf*, and
+ mips64*vr5000*-*-elf* with mips64 mips64*vr*-*-elf*. Delete
+ mips*tx39*el*-elf*. Map mips*-sony-* and mips64*-big-* onto
+ mips64. Map mips*-dec-*, mips*-big-*, mips*-little-*,
+ mips*-*-riscos* and mips*-*-sysv* onto mips.
+ * config/mips/mips64.mt: New file.
+ * config/mips/mips.mt: New file.
+ * config/mips/littlemips.mt: Delete file.
+ * config/mips/decstation.mt: Delete file.
+ * config/mips/vr4300el.mt: Delete file.
+ * config/mips/vr5000el.mt: Delete file.
+ * config/mips/vr5000.mt: Delete file.
+ * config/mips/vr4100.mt: Delete file.
+ * config/mips/vr4xxxel.mt: Delete file.
+ * config/mips/vr4300.mt: Delete file.
+ * config/mips/vr4xxx.mt: Delete file.
+ * config/mips/bigmips.mt: Delete file.
+ * config/mips/bigmips64.mt: Delete file.
+ * config/mips/tx39l.mt (TM_FILE): Set to "tm-tx39.h".
+ * config/mips/embedl64.mt (TM_FILE): Set to "tm-mips64.h".
+ * config/mips/embed64.mt (TM_FILE): Set to "tm-mips64.h"
+ * config/mips/embedl.mt (TM_FILE): Set to "tm-mips.h".
+ * config/mips/tm-tx39.h: Include "tm-mips.h" instead of
+ "tm-bigmips.h".
+ * config/mips/tm-irix3.h: Ditto.
+ * config/mips/tm-mipsv4.h: Ditto.
+ * config/mips/tm-embed.h: Ditto.
+ * config/mips/tm-irix6.h: Include "tm-mips64.h" instead of
+ "tm-bigmips64.h".
+ * config/mips/tm-vr5000el.h: Delete file.
+ * config/mips/tm-tx39l.h: Delete file.
+ * config/mips/tm-vr4300el.h: Delete file.
+ * config/mips/tm-vr4xxxel.h: Delete file.
+ * config/mips/tm-vr4300.h: Delete file.
+ * config/mips/tm-vr4100.h: Delete file.
+ * config/mips/tm-vr4xxx.h: Delete file.
+ * config/mips/tm-vr5000.h: Delete file.
+ * config/mips/tm-embedl64.h: Delete file.
+ * config/mips/tm-embedl.h: Delete file.
+ * config/mips/tm-embed64.h: Delete file.
+ * config/mips/tm-bigmips64.h: Delete file.
+ * config/mips/tm-bigmips.h: Delete file.
+
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ Fix gdb/1216.
+ * shnbsd-nat.c: Include "sh-tdep.h".
+
+ From Richard Henderson <rth@redhat.com>:
+ * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Fix ptr arithmetic.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (set_reg_offset): Add saved_regs parameter. Add
+ forward declaration.
+ (mips16_heuristic_proc_desc): Pass temp_saved_regs.
+ (mips16_heuristic_proc_desc): Pass temp_saved_regs.
+ (mips_find_saved_regs): Use set_reg_offset.
+ (mips_frame_init_saved_regs): Delete function.
+ (mips_pop_frame): Call mips_find_saved_regs instead of
+ DEPRECATED_FRAME_INIT_SAVED_REGS.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Do not set
+ deprecated_max_register_raw_size, register_virtual_size, and
+ deprecated_max_register_virtual_size.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c: Include "dwarf2-frame.h".
+ (i386_gdbarch_init): Hook in the DWARF CFI frame unwinder.
+ * Makefile.in (i386-tdep.o): Update dependencies.
+
+ * dwarf2-frame.c, dwarf2-frame.h: New files.
+ * Makefile.in (SFILES): Add dwarf2-frame.c.
+ (dwarf2_frame_h): Define.
+ (COMMON_OBS): Add dwarf2-frame.o.
+ (dwarf2-frame.o): Add dependencies.
+
+2003-05-31 Andreas Jaeger <aj@suse.de>
+
+ * x86-64-linux-nat.c: Fix comment.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_push_dummy_call): Adjust for changed
+ function signature.
+
+ * i386-tdep.c (i386_sigtramp_frame_p): Only handle frames if we
+ have a sigcontext_addr handler.
+ * x86-64-tdep.c (x86_64_sigtramp_frame_p): Assert that we have a
+ sigcontext_addr handler.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (print_gp_register_row): Replace do_gp_register_row.
+ (print_fp_register_row): Replace do_fp_register_row.
+ (mips_print_fp_register): Add "file" and "frame" parameters.
+ (mips_print_register): Add "file" and "frame" parameters.
+ (mips_print_registers_info): Replace mips_do_registers_info.
+ (mips_gdbarch_init): Set print_registers_info instead of
+ deprecated_do_registers_info.
+ (mips_read_fp_register_single): Add "frame" parameter.
+ (mips_read_fp_register_double): Add "frame" parameter.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_register_name): Check for MMX registers first.
+ Fixes a bug where GDB would print the wrong register names for
+ targets without SSE.
+
+ * x86-64-tdep.c (X86_64_NUM_SAVED_REGS): Set to X86_64_NUM_GREGS.
+ (x86_64_sigtramp_frame_cache): Use `sc_reg_offset' to find saved
+ registers.
+
+ * x86-64-linux-tdep.c (x86_64_linux_sc_reg_offset): New variable.
+ (x86_64_linux_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+
+ From Michal Ludvig <mludvig@suse.cz>:
+ * i386-tdep.h (struct gdbarch_tdep): Add members `sc_reg_offset'
+ and `sc_num_regs'.
+ (I386_EAX_REGNUM, I386_EDX_REGNUM, I386_ESP_REGNUM,
+ I386_EBP_REGNUM, I386_EIP_REGNUM, I386_EFLAGS_REGNUM,
+ I386_ST0_REGNUM): Move here from...
+ * i386-tdep.c: ... here.
+ (I386_NUM_SAVED_REGS): Define to I386_NUM_REGS.
+ (i386_sigtramp_frame_cache): Use `sc_reg_offset' to find saved
+ registers if possible.
+ (i386_gdbarch_init): Initialize TDEP->sc_reg_offset.
+ * i386bsd-tdep.c (i386bsd_sc_pc_offset, i386bsd_sc_sp_offset):
+ Remove variables.
+ (i386bsd_sc_reg_offset): New variable.
+ (i386bsd_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ (i386fbsd_sc_reg_offset): New variable.
+ (i386fbsdaout_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs.
+ (i386fbsd4_sc_pc_offset, i386fbsd4_sc_sp_offset): Remove
+ variables.
+ (i386fbsd4_sc_reg_offset): New variable.
+ (i3864bsd4_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ * i386-linux-tdep.c (i386_linux_sc_reg_offset): New variable.
+ (i386_linux_init_abi): Set TDEP->sc_reg_offset and TDEP->sc_num_regs.
+ * i386nbsd-tdep.c (i386nbsd_sc_pc_offset, i386nbsd_sc_sp_offset):
+ Remove variables.
+ (i386nbsd_sc_reg_offset): New variable.
+ (i386nbsd_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ * i386obsd-tdep.c (i386obsd_sc_pc_offset, i386obsd_sc_sp_offset):
+ Remove variables.
+ (i386obsd_sc_reg_offset): New variable.
+ (i386obsd_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Adjust for changes in
+ i386bsd-tdep.c, i386nbsd-tdep.c and i386obsd-tdep.c. Add check
+ for frame pointer offset in `struct sigcontext'.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Do not set the deprecated
+ architecture methods call_dummy_words, sizeof_call_dummy_words,
+ push_return_address, store_struct_return, and fix_call_dummy. Set
+ push_dummy_call instead of deprecated_push_arguments.
+ (mips_store_struct_return): Delete function.
+ (mips_fix_call_dummy): Delete function.
+ (mips_push_return_address): Delete function.
+ (mips_eabi_push_dummy_call): Replace mips_eabi_push_arguments, set
+ RA_REGNUM and T9_REGNUM.
+ (mips_n32n64_push_dummy_call): Ditto for
+ mips_n32n64_push_arguments.
+ (mips_o32_push_dummy_call): Ditto for mips_o32_push_arguments.
+ (mips_o64_push_dummy_call): Ditto for mips_o64_push_arguments.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (PUSH_DUMMY_CALL): Add "func_addr" parameter. Rename
+ "dummy_addr" to "bp_addr".
+ * infcall.c (call_function_by_hand): Pass "funaddr" to
+ gdbarch_push_dummy_call.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * i386-tdep.c (i386_push_dummy_call): Update.
+ * arm-tdep.c (arm_push_dummy_call): Update.
+ * d10v-tdep.c (d10v_push_dummy_call): Update.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.h (x86_64_num_regs, x86_64_num_gregs): Remove
+ variable declarations.
+ (x86_64_register_number, x86_64_register_name): Remove prototypes.
+ (x86_64_linux_frame_saved_pc, x86_64_linux+saved_pc_after_call,
+ x86_64_linux_in_sigtramp, x86_64_linux_frame_chain,
+ x86_64_init_frame_pc, x86_64_init_frame_pc,
+ x86_64_function_has_prologue): Remove prototypes.
+ (X86_64_NUM_GREGS): New define.
+ (x86_64_supply_fxsave, x86_64_fill_fxsave): New prototypes.
+ * x86-64-tdep.c: Don't include "dwarf2cfi.h". Include
+ "dummy_frame.h", "frame.h", "frame-base.h", "frame-unwind.h".
+ (RAX_REGNUM, RDX_REGNUM, RDI_REGNUM, EFLAGS_REGNUM, ST0_REGNUM,
+ XMM1_REGNUM): Remove defines.
+ (X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, X86_64_RDI_REGNUM,
+ X86_64_RBP_REGNUM, X86_64_RSP_REGNUM, X86_64_RIP_REGNUM,
+ X86_64_EFLAGS_REGNUM, X86_64_ST0_REGNUM, X86_64_XMM0_REGNUM,
+ X86_64_XMM1_REGNUM): New defines.
+ (struct x86_64_register_info): Renamed from `struct
+ register_info'. Remove `size' member.
+ (x86_64_register_info_table): Remove variable.
+ (x86_64_register_info): New variable.
+ (X86_64_NUM_REGS): New define.
+ (X86_64_NUM_GREGS): Remove define.
+ (x86_64_num_regs, x86_64_num_gregs): Remove variables.
+ (x86_64_dwarf2gdb_regno_map, x86_64_dwarf2gdb_regno_map_length):
+ Remove variables.
+ (x86_54_dwarf2_reg_to_regnum): Remove function.
+ (x86_64_dwarf_regmap, x86_64_dwarf_regmap_len): New variables.
+ (x86_64_dwarf_reg_to_regnum): New function.
+ (x86_64_register_name): Rewrite.
+ (x86_64_register_raw_size): Remove function.
+ (x86_64_register_byte_table): Remove variable.
+ (x86_64_register_byte): Remove function.
+ (x86_64_register_virtual_type): Remove function.
+ (x86_64_register_type): New function.
+ (x86_64_register_convertible, x86_64_register_convert_to_virtual,
+ x86_64_register_convert_to_raw): Remove functions.
+ (x86_64_push_return_address, x86_64_pop_frame): Remove functon.
+ (x86_64_use_struct_convention): Make static. Adjust for renamed
+ defines.
+ (x86_64_frame_init_saved_regs): Remove function.
+ (x86_64_push_arguments): Make static. Change to accept a regcache
+ as argument.
+ (x86_64_store_return_value, x86_64_extract_return_value): Make
+ static. Rewrite based on i386 counterparts.
+ (x86_64_push_dummy_call): New function.
+ (X86_64_NUM_SAVED_REGS): New define.
+ (x86_64_register_number): Remove function.
+ (x86_64_store_struct_return): Remove function.
+ (x86_64_frameless_function_invocation,
+ x86_64_function_has_prologue): Remove functions.
+ (PROLOG_BUFSIZE): Remove define.
+ (struct x86_64_frame_cache): New structure.
+ (x86_64_alloc_frame_cache, x86_64_analyze_prologue,
+ x86_64_frame_cache, x86_64_frame_this_id,
+ x86_64_frame_prev_register, x86_64_frame_p,
+ x86_64_sigtramp_frame_cache, x86_64_sigtramp_frame_this_id,
+ x86_64_sigtramp_frame_prev_register, x86_sigtramp_frame_p): New
+ functions.
+ (x86_64_frame_unwind, x86_64_sigtramp_frame_unwind): New
+ variables.
+ (x86_64_skip_prologue): Rewrite in terms of
+ x86_64_analyze_prologue.
+ (x86_64_frame_base_address): New function.
+ (x86_64_frame_base): New variable.
+ (x86_64_save_dummy_frame_tos, x86_64_unwind_dummy_id): Rewrite.
+ (x86_64_init_abi): Set register_type and push_dummy_call. Don't
+ set deprecated_fp_regnum, deprecated_register_size,
+ deprecated_register_bytes, register_raw_size, register_byte,
+ register_virtual_type, register_convertiable,
+ register_convert_to_virtual, convert_to_raw,
+ deprecated_get_saved_register, deprecated_target_read_fp,
+ deprecated_push_arguments, deprecated_push_return_address,
+ deprecated_pop_frame, deprecated_store_struct_return,
+ deprecated_frame_init_saved_regs, deprecated_frame_chain,
+ frameless_function_invocation, deprecated_frame_saved_pc,
+ deprecated_saved_pc_after_call, frame_num_args, pc_in_sigtramp,
+ dwarf2_build_frame_info, deprecated_init_extra_frame_info,
+ deprecated_init_frame_pc and virtual_frame_pointer. Call
+ frame_unwind_append_predicate to register x86_64_sigtramp_frame_p
+ and x86_64_frame_p. Call frame_base_set_default to register
+ x86_64_frame_base.
+ (I387_FISEG_REGNUM, I387_FOSEG_REGNUM): New defines.
+ (x86_64_supply_fxsave, x86_64_fill_fxsave): New functions.
+ (_initialize_x86_64_tdep): Remove function.
+ * x86-64-linux-tdep.c: Don't include "dwarf2cfi.h".
+ (LINUX_SIGINFO_SIZE, LINUX_UCONTEXT_SIGCONTEXT_OFFSET,
+ LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONTEXT_FP_OFFSET): Don't
+ define.
+ (X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Define.
+ (x86_64_linux_sigcontext_addr): Rewrite.
+ (x86_64_linux_sigtramp_saved_pc, x86_64_linux_saved_pc_after_call,
+ x86_64_linux_frame_saved_pc): Remove functions.
+ (x86_64_linux_pc_in_sigtramp): Renamed from
+ x86_64_linux_in_sigtramp. Try harder to recognize a signal
+ trampoline.
+ (x86_64_linux_frame_chain, x86_64_init_frame_pc):
+ Remove_functions.
+ (x86_64_linux_init_abi): Set pc_in_sigtramp. Initialize
+ TDEP->sigcontext_addr, TDEP->sc_pc_offset and TDEP->sc_sp_offset.
+ * x86-64-linux-nat.c: Sync with i386-linux-tdep.c.
+ (x86_64_regmap): Rename to regmap.
+ (GETREGS_SUPPLIES): Use X86_64_NUM_GREGS instead of
+ x86_64_num_gregs.
+ (supply_gregset, fill_gregset): Likewise. Use regmap instead of
+ x86_64_regmap.
+ (x86_64_fxsave_offset): Remove function.
+ (supply_fpregset): Simply call x86_64_supply_fxsave.
+ (fill_fpregset): Simply call x86_64_fill_fxsave.
+ (fetch_inferior_registers, store_inferior_registers): Avoid
+ asignment in if-statement.
+ (LINUX_SYSCALL_LEN, LINUX_SYSCALL_REGNUM, SYS_Sigreturn,
+ SYS_rt_sigreturn, LINUX_SIGCONTEXT_EFLAGS_OFFSET,
+ LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Remove defines.
+ (fetch_core_registers): Remove function.
+ (linux_elf_core_fns): Remove.
+ (offsetoff): Don't define.
+ (_initialize_x86_64_linux_nat, kernel_u_size): Remove functions.
+ * config/i386/x86-64linux.mt (TDEPFILES): Add i386-linux-tdep.o.
+ * config/i386/x86-64linux.mh (NATDEPFILES): Remove core-aout.o,
+ add core-regset.o.
+ * config/i386/nm-x86-64linux.h: Use NM_X86_64_LINUX_H for
+ protection against multiple includes instead of NM_X86_64_h. Add
+ various comments. Include "config/nm-linux.h". Don't include
+ <signal.h>.
+ (REGISTER_U_ADDR, KERNEL_U_SIZE, U_REGS_OFFSET, KERN_U_ADDR,
+ GET_THREAD_SIGNALS): Remove defines.
+ (x86_64_register_u_addr, kernel_u_size,
+ lin_thread_get_thread_signals): Remove prototypes.
+ (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE): Define to `long'.
+ [HAVE_LINK_H]: Don't include "solib.h".
+ [HAVE_LINK_H] (SVR4_SHARED_LIBS): Remove define.
+ * config/i386/tm-x86-64linux.h: Fix comments.
+ * Makefile.in (x86-64-linux-nat.o, x86_64-linux-tdep.o,
+ x86-64-tdep.o): Update dependencies.
+
+2003-05-30 Andrew Cagney <cagney@redhat.com>
+
+ * config/sparc/tm-sparc.h (sparc_extract_struct_value_address):
+ Change parameter type to a "struct regcache *".
+
+ * gdbarch.sh: Regardless of the multi-arch level, always define
+ the macro when not already defined.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-05-30 Richard Henderson <rth@redhat.com>
+
+ * alpha-mdebug-tdep.c (alpha_mdebug_frame_p): Reject prologues.
+ (alpha_mdebug_frame_unwind_cache): Don't call the heuristic unwinder.
+ (alpha_mdebug_frame_this_id): Likewise.
+ (alpha_mdebug_frame_prev_register): Likewise.
+ (alpha_mdebug_frame_base_address): Likewise.
+ (alpha_mdebug_frame_locals_address): Likewise.
+ (alpha_mdebug_frame_args_address): Likewise.
+ (struct alpha_mdebug_unwind_cache): Remove in_prologue_cache.
+ * alpha-tdep.c (alpha_heuristic_proc_start): Use get_pc_function_start.
+ (alpha_heuristic_frame_unwind_cache): Make static; add missing
+ loop increment.
+ (alpha_heuristic_frame_this_id): Make static.
+ (alpha_heuristic_frame_prev_register): Likewise.
+ (alpha_heuristic_frame_base_address): Likewise.
+ * alpha-tdep.h: Update.
+
+2003-05-30 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (i386bsd_sigcontext_addr): Remove prototype.
+ (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS): Remove
+ defenitions.
+ (IS_FP_REGNUM, IS_SSE_REGNUM): Remove definitions.
+ * i386-tdep.c: Mark functions that are 64-bit safe as such.
+ (I386_EAX_REGNUM, I386_EDX_REGNUM, I386_ESP_REGNUM,
+ I386_EBP_REGNUM, I386_EIP_REGNUM, I386_EFLAGS_REGNUM,
+ I386_ST0_REGNUM): New defines.
+ (CODESTREAM_BUFSIZ, codestream_tell, codestream_peek,
+ codestream_get): Remove define.
+ (codestream_next_addr, condestream_addr, condestream_buf,
+ codestream_off, codestream_cnt): Remove variables.
+ (codestream_fill, codestream_seek, codestream_read): Remove
+ functions.
+ (i386_follow_jump): Rewrite to avoid usage of removed codestream
+ functionality.
+ (i386_get_frame_setup, i386_frameless_signal_p, i386_frame_chain,
+ i386_sigtramp_saved_pc, i386_sigtramp_saved_sp,
+ i386_frame_saved_pc, i386_saved_pc_after_call,
+ i386_frame_num_args, i386_frame_init_saved_regs,
+ i386_push_return_address, i386_do_pop_frame, i386_pop_frame,
+ i386_push_arguments): Remove functions.
+ (i386_skip_prologue): Rewrite to avoid usage of removed codestream
+ functionality. Use i386_analyze_prologue instead of
+ i386_get_frame_setup.
+ (I386_NUM_SAVED_REGS): New define.
+ (struct i386_frame_cache): New structure.
+ (i386_alloc_frame_cache, i386_analyze_struct_return,
+ i386_skip_probe, i386_analyze_frame_setup,
+ i386_analyze_register_saves, i386_analyze_prologue,
+ i386_unwind_pc, i386_frame_cache, i386_frame_this_id,
+ i386_frame_prev_register, i386_sigtramp_frame_cache,
+ i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register,
+ i386_frame_p, i386_sigtramp_frame_p, i386_frame_base_address,
+ i386_unwind_dummy_id, i386_save_dummy_tos, i386_push_dummy_call):
+ New functions.
+ (i386_frame_unwind, i386_sigtramp_frame_unwind, i386_frame_base):
+ New variables.
+ (LOW_RETURN_REGNUM, HIGH_RETURN_REGNUM): Define in terms of
+ I386_EAX_REGNUM and I386_EDX_REGNUM.
+ (i386_extract_return_value, i386_store_return_value): Use
+ I386_ST0_REGNUM where appropriate.
+ (i386_extract_struct_value_address): Rewrite to use extract_address.
+ (i386_svr4_pc_in_sigtramp): Add comment.
+ (i386_svr4_sigcontext_addr): Rewrite.
+ (i386_svr4_init_abi): Adjust TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ (i386_gdbarch_init): Don't set deprecated_init_frame_pc. Set
+ sp_regnum, fp_regnum, pc_regnum, ps_regnum and fp0_regnum in terms
+ of new defines. Set push_dummy_call, don't set
+ deprecated_push_arguments, deprecated_push_return_address,
+ deprecated_pop_frame. Don't set parm_boundary. Don't set
+ deprecated_frame_chain, deprecated_frame_saved_pc,
+ deprecated_saved_pc_after_call. Set unwind_dummy_id,
+ save_dummy_frame_tos, unwind_pc. Call
+ frame_unwind_append_predicate and frame_base_set_default. Don't
+ set deprecated_dummy_write_pc. Don't set deprecated_fp_regnum.
+ Don't set frameless_function_invocation. Don't set
+ deprecated_register_bytes, deprecated_register_size,
+ deprecated_call_dummy_words and deprecated_sizeof_call_dummy.
+ * i386-linux-tdep.c: Fix formatting in some comments.
+ (LINUX_SIGTRAMP_INSN0, LINUX_SIGTRAMP_OFFSET0,
+ LINUX_SIGTRAMP_INSN1, LINUX_SIGTRAMP_OFFSET1,
+ LINUX_SIGTRAMP_INSN2, LINUX_SIGTRAMP_OFFSET2,
+ LINUX_RT_SIGTRAMP_INSN0, LINUX_RT_SIGTRAMP_OFFSET0,
+ LINUX_RT_SIGTRAMP_INSN1, LINUX_RT_SIGTRAMP_OFFSET1): Drop
+ redundant parentheses.
+ (I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET): New define.
+ (i386_linux_sigcontext_addr): Use it. Rewrite.
+ (find_minsym_and_objfile): Change name of second argument.
+ (skip_gnu_resolver): Renamed from skip_hurd_resolver. All callers
+ changed. Use frame_pc_unwind instead of
+ DEPRECATED_SAVED_PC_AFTER_CALL.
+ (i386_linux_init_abi): Don't set deprecated_register_bytes.
+ * i386bsd-tdep.c (i386bsd_sigcontext_addr): Rewrite.
+ * i386-nto-tdep.c (i386nto_sigcontext_addr): Adapt for new frame
+ unwinder.
+ * i386-cygwin-tdep.c: Don't include "gdbcore.h", "frame.h" and
+ "dummy-frame.h".
+ (i386_cygwin_frame_chain_valid, i386_cygwin_frame_chain): Removed.
+ (_initialize_i386_cygwin_tdep): New prototype.
+ (i386_cygwin_init_abi): Don't set deprecated_frame_chain and
+ deprecated_frame_chain_valid.
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Don't set
+ TDEP->sigcontext_addr, TDEP->sc_pc_offset and TDEP->sc_sp_offset.
+ Rely on the SVR4 defaults.
+ * config/i386/i386sol2.mt (TDEPFILES): Remove i386bsd-tdep.o.
+ * Makefile.in (i386-tdep.o, i386-cygwin-tdep.o): Update dependencies.
+
+2003-05-30 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): Always call
+ DEPRECATED_FIX_CALL_DUMMY, even for AT_ENTRY_POINT case.
+
+2003-05-30 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Fix loop
+ increment.
+
+2003-05-29 Jim Blandy <jimb@redhat.com>
Use gdbarch methods for solib stuff on PowerPC Linux.
* config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
- show through. Remove later #definition of SKIP_TRAMPOLINE_CODE.
- (ppc_linux_skip_trampoline_code): Delete declaration.
+ show through.
* ppc-linux-tdep.c (ppc_linux_init_abi): Register
IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
giving the same effect as the #definitions above.
- (ppc_linux_skip_trampoline_code): Make this static.
-2003-05-29 Jim Blandy <jimb@redhat.com>
+2003-05-29 Adam Fedor <fedor@gnu.org>
+
+ * objc-lang.c (CONVERT_FUNCPTR): Remove macro
+ (find_implementation_from_class): Replace it with the standard
+ case i.e. do nothing.
+
+2003-05-29 Richard Henderson <rth@redhat.com>
+
+ * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): New.
+ (alpha_linux_sigtramp_offset): Use it. Make static.
+ (alpha_linux_sigcontext_addr): Handle __NR_rt_sigreturn;
+ update for new frame model.
+ * alpha-mdebug-tdep.c: New file.
+ * alpha-osf1-tdep.c (alpha_call_dummy_address): Move from alpha-tdep.c.
+ (alpha_osf1_init_abi): Install it.
+ * alpha-tdep.c (PROC_*): Move to alpha-mdebug-tdep.c.
+ (linked_proc_desc_table): Remove.
+ (alpha_frame_past_sigtramp_frame): Remove.
+ (alpha_dynamic_sigtramp_offset): Remove.
+ (ALPHA_PROC_SIGTRAMP_MAGIC): Remove.
+ (alpha_proc_desc_is_dyn_sigtramp): Remove.
+ (alpha_set_proc_desc_is_dyn_sigtramp): Remove.
+ (push_sigtramp_desc): Remove.
+ (alpha_cannot_fetch_register): Use ALPHA_FP_REGNUM.
+ (alpha_cannot_store_register): Likewise.
+ (alpha_sigcontext_addr): Remove.
+ (alpha_find_saved_regs): Remove.
+ (alpha_frame_init_saved_regs): Remove.
+ (alpha_init_frame_pc_first): Remove.
+ (read_next_frame_reg): Remove.
+ (alpha_frame_saved_pc): Remove.
+ (alpha_saved_pc_after_call): Remove.
+ (temp_proc_desc, temp_saved_regs): Remove.
+ (alpha_about_to_return): Remove.
+ (cached_proc_desc): Remove.
+ (alpha_frame_chain): Remove.
+ (alpha_print_extra_frame_info): Remove.
+ (alpha_init_extra_frame_info): Remove.
+ (alpha_frame_locals_address): Remove.
+ (alpha_frame_args_address): Remove.
+ (alpha_push_arguments): Use ALPHA_REGISTER_BYTES not sizeof CORE_ADDR.
+ (alpha_push_dummy_frame): Remove.
+ (alpha_pop_frame): Remove.
+ (alpha_after_prologue): Rename from after_prologue; remove mdebug bits.
+ (alpha_read_insn): New.
+ (alpha_skip_prologue): Merge alpha_skip_prologue_internal; adjust
+ for different insn encodings.
+ (alpha_in_lenient_prologue): Remove.
+ (struct alpha_sigtramp_unwind_cache): New.
+ (alpha_sigtramp_frame_unwind_cache): New.
+ (alpha_sigtramp_register_address): New.
+ (alpha_sigtramp_frame_this_id): New.
+ (alpha_sigtramp_frame_prev_register): New.
+ (alpha_sigtramp_frame_unwind): New.
+ (alpha_sigtramp_frame_p): New.
+ (struct alpha_heuristic_unwind_cache): New.
+ (alpha_heuristic_proc_start): Rename from heuristic_proc_start;
+ don't count nop insns that occur between functions.
+ (alpha_heuristic_frame_unwind_cache): New; incorporate much of
+ heuristic_proc_desc, but without the mdebug wrapping.
+ (alpha_heuristic_frame_this_id): New.
+ (alpha_heuristic_frame_prev_register): New.
+ (alpha_heuristic_frame_unwind): New.
+ (alpha_heuristic_frame_p): New.
+ (alpha_heuristic_frame_base_address): New.
+ (alpha_heuristic_frame_base): New.
+ (alpha_unwind_dummy_id): New.
+ (alpha_unwind_pc): New.
+ (alpha_gdbarch_init): Don't set skip_sigtramp_frame. Kill use of
+ frame related deprecated initializations; install replacements.
+ (alpha_dump_tdep): Remove.
+ * alpha-tdep.h (struct gdbarch_tdep): Remove skip_sigtramp_frame.
+ (alpha_read_insn, alpha_after_prologue,
+ alpha_heuristic_frame_unwind_cache, alpha_heuristic_frame_this_id,
+ alpha_heuristic_frame_prev_register,
+ alpha_heuristic_frame_base_address, alpha_mdebug_init_abi): Declare.
+ * config/alpha/alpha-linux.mt (TDEPFILES): Add alpha-mdebug-tdep.o.
+ * config/alpha/tm-alpha.h (PRINT_EXTRA_FRAME_INFO): Remove.
+ * config/alpha/tm-alphalinux.h (SIGTRAMP_START, SIGTRAMP_END): Remove.
+
+2003-05-29 Andrew Cagney <cagney@redhat.com>
+
+ * gdb_assert.h (gdb_assert_fail): Provide different definitions
+ dependant on the availability of ASSERT_FUNCTION.
+ (ASSERT_FUNCTION): Do not define when there is no function name.
+
+2003-05-29 Kevin Buettner <kevinb@redhat.com>
- Support gdbserver on 64-bit PowerPC Linux.
- * configure.tgt (powerpc64-*-linux*): Build gdbserver, please.
- * regformats/reg-ppc64.dat: New file.
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (skip_prologue): Improve support for 64-bit code.
2003-05-28 Jim Blandy <jimb@redhat.com>
@@ -94,18 +1979,10 @@
argument to ptrace to int; the system headers should give it the
right type, and pointers don't fit in ints on powerpc64-*-*.
- * config/powerpc/nm-ppc64-linux.h (PTRACE_XFER_TYPE): This is
- 'long' on ppc64-*-linux*.
-
- * configure.host, configure.tgt: Add entries for
- powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and
- powerpc/linux.mt.
- * config/powerpc/ppc64-linux.mh, config/powerpc/nm-ppc64-linux.mh:
- New files.
+2003-05-28 H.J. Lu <hongjiu.lu@intel.com>
- * ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ
- isn't #defined, assume the register doesn't exist: act as if
- tdep->ppc_mq_regnum were -1.
+ * dwarf2read.c (process_die): Handle DW_TAG_try_block and
+ DW_TAG_catch_block.
2003-05-26 Elena Zannoni <ezannoni@redhat.com>
@@ -570,10 +2447,10 @@
2003-05-15 David Carlton <carlton@bactrian.org>
Committed by Elena Zannoni <ezannoni@redhat.com>
- * symtab.c (lookup_symbol_aux): Delete calls to
- lookup_symbol_aux_minsyms.
- (lookup_symbol_aux_minsyms): Comment out function and
- prototype. Delete lookup by mangled name.
+ * symtab.c (lookup_symbol_aux): Delete calls to
+ lookup_symbol_aux_minsyms.
+ (lookup_symbol_aux_minsyms): Comment out function and
+ prototype. Delete lookup by mangled name.
2003-05-14 Kevin Buettner <kevinb@redhat.com>
@@ -1439,7 +3316,7 @@
2003-04-18 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_frame_align): New function.
- (s390_gdbarch_init): Register it with the gdbarch object.
+ (s390_gdbarch_init): Register it with the gdbarch object.
2003-04-17 Richard Henderson <rth@redhat.com>
@@ -1454,7 +3331,7 @@
2003-04-17 Elena Zannoni <ezannoni@redhat.com>
* values.c (value_being_returned): Don't fetch the return
- value if the return type is void.
+ value if the return type is void.
2003-04-17 Jeff Johnston <jjohnstn@redhat.com>
@@ -1466,6 +3343,30 @@
td_thr_events_t, td_notify_t, td_thr_iter_f, and td_thrinfo_t
as types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2003-04-16 Kevin Buettner <kevinb@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): For the SysV ABI, set
@@ -1979,7 +3880,7 @@
2003-04-08 Elena Zannoni <ezannoni@redhat.com>
- * infrun.c (stop_soon): Rename from stop_soon_quietly.
+ * infrun.c (stop_soon): Rename from stop_soon_quietly.
(struct inferior_status): Rename stop_soon_quietly field to stop_soon.
(clear_proceed_status): Rename stop_soon_quietly to stop_soon.
(start_remote): Ditto.
@@ -1988,7 +3889,7 @@
(restore_inferior_status): Ditto.
* infcmd.c (attach_command): Ditto.
* fork-child.c (startup_inferior): Ditto.
- * inferior.h (stop_soon): Rename from stop_soon_quietly.
+ * inferior.h (stop_soon): Rename from stop_soon_quietly.
* alpha-tdep.c (heuristic_proc_start): Ditto.
* mips-tdep.c (heuristic_proc_start): Ditto.
* solib-svr4.c (svr4_solib_create_inferior_hook): Ditto.
@@ -2022,11 +3923,11 @@
2003-04-07 Elena Zannoni <ezannoni@redhat.com>
* disasm.c (dump_insns): Move variables inside loop, or they will
- be freed more than once, causing wild memory corruptions.
+ be freed more than once, causing wild memory corruptions.
(gdb_disassembly): Look for the substring "-thread",
- instead of "-threads" in the target name, to make sure to find
- the 'multi-thread' target. Also, make sure we do the right thing
- with the "core" target.
+ instead of "-threads" in the target name, to make sure to find
+ the 'multi-thread' target. Also, make sure we do the right thing
+ with the "core" target.
2003-04-07 Kevin Buettner <kevinb@redhat.com>
@@ -2187,9 +4088,9 @@
2003-04-04 Elena Zannoni <ezannoni@redhat.com>
- * x86-64-tdep.c (x86_64_push_arguments): Handle correctly the
- signed integer case.
- (classify_argument): Handle enumerations and references.
+ * x86-64-tdep.c (x86_64_push_arguments): Handle correctly the
+ signed integer case.
+ (classify_argument): Handle enumerations and references.
2003-04-04 Andrew Cagney <cagney@redhat.com>
@@ -2227,15 +4128,15 @@
* language.c (language_demangle): New function.
(unk_lang_demangle): Likewise.
(unknown_language_defn, auto_language_defn, local_language_defn):
- Add ukn_lang_demangle.
+ Add ukn_lang_demangle.
* ada-lang.c (ada_language_defn): Add NULL for la_demangle element.
- * f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
+ * f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
* c-lang.c (c_language_defn, asm_language_defn): Likewise.
(cplus_language_defn): Add cplus_demangle for la_demangle element.
* jv-lang.c (java_demangle): New function
(java_language_defn): Use it for la_demangle element.
- * objc-lang.c (objc_demangle): Add options argument
- (objc_language_defn): Use objc_demangle for la_demangle element.
+ * objc-lang.c (objc_demangle): Add options argument
+ (objc_language_defn): Use objc_demangle for la_demangle element.
* maint.c (maintenance_demangle): Replace switch with
call to language_demangle.
* utils.c (fprintf_symbol_filtered): Likewise.
@@ -2469,7 +4370,7 @@
2003-03-30 Andrew Cagney <cagney@redhat.com>
2002-11-10 Klee Dienes <kdienes@apple.com>
- * value.h (struct value): Update comment.
+ * value.h (struct value): Update comment.
2003-03-30 Andrew Cagney <cagney@redhat.com>
@@ -2628,7 +4529,7 @@
2003-03-28 Bob Rossi <bob_rossi@cox.net>
- * MAINTAINERS (write after approval): Add myself.
+ * MAINTAINERS (write after approval): Add myself.
2003-03-27 Theodore A. Roth <troth@openavr.org>
@@ -3257,12 +5158,12 @@
2003-03-13 D. Venkatasubramanian <dvenkat@noida.hcltech.com>
- * MAINTAINERS (write after approval): Alphabetically
+ * MAINTAINERS (write after approval): Alphabetically
listing corrected.
2003-03-13 D. Venkatasubramanian <dvenkat@noida.hcltech.com>
- * MAINTAINERS (write after approval): Add myself.
+ * MAINTAINERS (write after approval): Add myself.
2003-03-12 Andrew Cagney <cagney@redhat.com>
@@ -4184,7 +6085,7 @@
2003-02-20 Adam Fedor <fedor@gnu.org>
* objc-lang.h (find_methods): Remove declaration.
- * objc-lang.c (find_methods): Make static.
+ * objc-lang.c (find_methods): Make static.
2003-02-20 Christopher Faylor <cgf@redhat.com>
@@ -4380,10 +6281,10 @@
2003-02-18 Elena Zannoni <ezannoni@redhat.com>
From Jim Ingham <jingham@apple.com>:
- * dbxread.c (process_one_symbol): Use last_function_start rather
- than function_start_offset to find the real beginning of the
- current function. The latter is just the text section offset on
- some systems, the former is always the real function start.
+ * dbxread.c (process_one_symbol): Use last_function_start rather
+ than function_start_offset to find the real beginning of the
+ current function. The latter is just the text section offset on
+ some systems, the former is always the real function start.
2003-02-17 Andrew Cagney <cagney@redhat.com>
@@ -4398,7 +6299,7 @@
2003-02-14 Elena Zannoni <ezannoni@redhat.com>
- From Brian Ford <ford@vss.fsi.com>
+ From Brian Ford <ford@vss.fsi.com>
* cli/cli-decode.c (lookup_cmd_composition) [TUI]: Properly
conditionalize tui_active test.
@@ -4436,8 +6337,8 @@
2003-02-12 Jason Molenda (jmolenda@apple.com)
- * symmisc.c (print_objfile_statistics): Include information about
- the number of psymtabs and symtabs in each object file.
+ * symmisc.c (print_objfile_statistics): Include information about
+ the number of psymtabs and symtabs in each object file.
2003-02-13 Keith R Seitz <keiths@redhat.com>
@@ -4561,9 +6462,9 @@
(threads_continue_all_with_signals): Ditto.
2003-02-05 Jim Ingham <jingham@apple.com>
- Keith Seitz <keiths@redhat.com>
- Elena Zannoni <ezannoni@redhat.com>
- Andrew Cagney <ac131313@redhat.com>
+ Keith Seitz <keiths@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
* Makefile.in (SUBDIR_CLI_OBS): Add "cli-interp.o".
(SUBDIR_CLI_SRCS): Add "cli/cli-interp.c".
@@ -4822,11 +6723,11 @@
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
- * ui-out.c (make_cleanup_ui_out_table_begin_end)
- (do_cleanup_table_end): New functions.
- * breakpoint.c (print_it_typical, print_one_breakpoint, mention):
- Use cleanups to invoke_ui_out_tuple_end().
- (breakpoint_1): Use cleanup to invoke ui_out_table_end().
+ * ui-out.c (make_cleanup_ui_out_table_begin_end)
+ (do_cleanup_table_end): New functions.
+ * breakpoint.c (print_it_typical, print_one_breakpoint, mention):
+ Use cleanups to invoke_ui_out_tuple_end().
+ (breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
@@ -4863,8 +6764,8 @@
2003-02-01 Andrew Cagney <ac131313@redhat.com>
From 2002-11-09 Jason Molenda (jason-cl@molenda.com)
- * stack.c (print_frame_info_base): Output complete FRAME tuple
- for synthesized frames.
+ * stack.c (print_frame_info_base): Output complete FRAME tuple
+ for synthesized frames.
2003-02-02 Andrew Cagney <ac131313@redhat.com>
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 08af70eac6f..7a8ae989fd3 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -327,6 +327,7 @@ Klee Dienes kdienes@apple.com
Richard Earnshaw rearnsha@arm.com
Frank Ch. Eigler fche@redhat.com
Ben Elliston bje@redhat.com
+Raoul Gough RaoulGough@yahoo.co.uk
Anthony Green green@redhat.com
Matthew Green mrg@eterna.com.au
Chris Faylor cgf@redhat.com
@@ -351,6 +352,7 @@ Mark Kettenis kettenis@gnu.org
Jim Kingdon jkingdon@engr.sgi.com ++
Jonathan Larmour jlarmour@redhat.co.uk
Jeff Law law@redhat.com
+David Lecomber david@streamline-computing.com
Robert Lipe rjl@sco.com
H.J. Lu hjl@lucon.org
Michal Ludvig mludvig@suse.cz
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c52eadccfc1..6a34d2f1423 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -400,7 +400,7 @@ SER_HARDWIRE = @SER_HARDWIRE@
# The `remote' debugging target is supported for most architectures,
# but not all (e.g. 960)
-REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o
+REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o
# This is remote-sim.o if a simulator is to be linked in.
SIM_OBS =
@@ -513,8 +513,8 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
charset.c cli-out.c coffread.c coff-pe-read.c \
complaints.c completer.c corefile.c \
cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
- dbxread.c demangle.c disasm.c doublest.c \
- dummy-frame.c dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c \
+ dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \
+ dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.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 frame.c \
frame-base.c \
@@ -535,12 +535,14 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
objc-exp.y objc-lang.c \
objfiles.c osabi.c observer.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
- regcache.c reggroups.c remote.c \
+ regcache.c reggroups.c remote.c remote-fileio.c \
scm-exp.c scm-lang.c scm-valprint.c \
sentinel-frame.c \
serial.c ser-unix.c source.c \
stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \
- target.c thread.c top.c tracepoint.c typeprint.c \
+ target.c thread.c top.c tracepoint.c \
+ trad-frame.c \
+ typeprint.c \
tui/tui.c tui/tui.h tui/tuiCommand.c tui/tuiCommand.h \
tui/tuiData.c tui/tuiData.h tui/tuiDataWin.c tui/tuiDataWin.h \
tui/tuiDisassem.c tui/tuiDisassem.h tui/tuiGeneralWin.c \
@@ -631,6 +633,7 @@ dcache_h = dcache.h
defs_h = defs.h $(config_h) $(gdb_locale_h) $(gdb_signals_h) $(ansidecl_h) \
$(libiberty_h) $(progress_h) $(bfd_h) $(tui_h) $(ui_file_h) $(xm_h) \
$(nm_h) $(tm_h) $(fopen_same_h) $(gdbarch_h) $(arch_utils_h)
+dictionary_h = dictionary.h
disasm_h = disasm.h
doublest_h = doublest.h $(floatformat_h)
dst_h = dst.h
@@ -638,6 +641,7 @@ dummy_frame_h = dummy-frame.h
dwarf2cfi_h = dwarf2cfi.h
dwarf2expr_h = dwarf2expr.h
dwarf2loc_h = dwarf2loc.h
+dwarf2_frame_h = dwarf2-frame.h
environ_h = environ.h
event_loop_h = event-loop.h
event_top_h = event-top.h
@@ -707,6 +711,7 @@ regcache_h = regcache.h
reggroups_h = reggroups.h
remote_utils_h = remote-utils.h $(target_h)
remote_h = remote.h
+remote_fileio_h = remote-fileio.h
scm_lang_h = scm-lang.h $(scm_tags_h)
scm_tags_h = scm-tags.h
sentinel_frame_h = sentinel-frame.h
@@ -723,18 +728,20 @@ source_h = source.h
sparcnbsd_tdep_h = sparcnbsd-tdep.h
srec_h = srec.h
stabsread_h = stabsread.h
+stack_h = stack.h
symfile_h = symfile.h
symtab_h = symtab.h
target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
terminal_h = terminal.h
top_h = top.h
+trad_frame_h = trad-frame.h
infttrace_h = infttrace.h
tracepoint_h = tracepoint.h
typeprint_h = typeprint.h
ui_file_h = ui-file.h
ui_out_h = ui-out.h
valprint_h = valprint.h
-value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
+value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
vax_tdep_h = vax-tdep.h
version_h = version.h
@@ -837,7 +844,7 @@ TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
charset.o disasm.o dummy-frame.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
- block.o symtab.o symfile.o symmisc.o linespec.o \
+ block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \
infcall.o \
infcmd.o infrun.o \
expprint.o environ.o stack.o thread.o \
@@ -853,7 +860,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o coff-pe-read.o elfread.o \
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
- dwarf2expr.o dwarf2loc.o \
+ dwarf2expr.o dwarf2loc.o dwarf2-frame.o \
c-lang.o f-lang.o objc-lang.o \
ui-out.o cli-out.o \
varobj.o wrapper.o \
@@ -870,7 +877,8 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
frame-base.o \
gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
cp-namespace.o \
- reggroups.o
+ reggroups.o \
+ trad-frame.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
@@ -1355,7 +1363,7 @@ ALLDEPFILES = \
aix-thread.c \
alpha-nat.c alphabsd-nat.c \
alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \
- alpha-osf1-tdep.c alphafbsd-tdep.c \
+ alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \
arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \
armnbsd-nat.c armnbsd-tdep.c \
avr-tdep.c \
@@ -1494,7 +1502,7 @@ ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \
$(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \
$(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \
$(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \
- $(infcall_h)
+ $(infcall_h) $(dictionary_h)
ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \
$(inferior_h) $(symtab_h) $(target_h) $(gdbcore_h) $(gregset_h) \
$(ada_lang_h)
@@ -1508,17 +1516,21 @@ ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \
$(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \
$(ppc_tdep_h)
-alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(alpha_tdep_h) $(osabi_h)
-alpha-nat.o: alpha-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
- $(regcache_h) $(alpha_tdep_h) $(gregset_h) $(gdb_string_h)
+alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \
+ $(osabi_h) $(alpha_tdep_h)
+alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
+ $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h)
alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(osabi_h) $(gdb_string_h) $(alpha_tdep_h)
-alpha-tdep.o: alpha-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
+ $(value_h) $(osabi_h) $(gdb_string_h) $(alpha_tdep_h) $(objfiles_h)
+alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
+ $(frame_unwind_h) $(frame_base_h) $(inferior_h) $(symtab_h) \
$(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
$(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
- $(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h) \
- $(osabi_h) $(block_h)
+ $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) $(gdb_assert_h) \
+ $(elf_bfd_h) $(alpha_tdep_h) $(dwarf2_frame_h)
+alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \
+ $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \
+ $(block_h) $(gdb_assert_h) $(alpha_tdep_h)
alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
@@ -1540,10 +1552,10 @@ arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
$(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
$(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
- $(osabi_h)
+ $(solib_svr4_h) $(osabi_h)
arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
$(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
- $(doublest_h) $(value_h) $(arch_utils_h) $(solib_svr4_h) $(osabi_h) \
+ $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \
$(arm_tdep_h) $(sim_arm_h) $(elf_bfd_h) $(coff_internal_h) \
$(elf_arm_h) $(gdb_assert_h)
armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
@@ -1575,7 +1587,7 @@ buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \
$(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \
$(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) \
- $(stabsread_h) $(block_h) $(cp_support_h)
+ $(stabsread_h) $(block_h) $(cp_support_h) $(dictionary_h)
builtin-regs.o: builtin-regs.c $(defs_h) $(builtin_regs_h) $(gdbtypes_h) \
$(gdb_string_h) $(gdb_assert_h)
c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
@@ -1599,7 +1611,8 @@ coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
$(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
$(coff_internal_h) $(libcoff_h) $(symfile_h) $(objfiles_h) \
$(buildsym_h) $(gdb_stabs_h) $(stabsread_h) $(complaints_h) \
- $(target_h) $(gdb_assert_h) $(block_h) $(coff_pe_read_h)
+ $(target_h) $(gdb_assert_h) $(block_h) $(dictionary_h) \
+ $(coff_pe_read_h)
coff-pe-read.o: coff-pe-read.c $(bfd_h) $(defs_h) $(symtab_h) \
$(gdbtypes_h) $(symfile_h) $(objfiles_h) $(coff_pe_read_h)
complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \
@@ -1624,7 +1637,8 @@ cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) \
cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \
$(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h)
cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \
- $(demangle_h) $(gdb_assert_h) $(gdbcmd_h)
+ $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \
+ $(objfiles_h) $(frame_h) $(block_h)
cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
$(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
@@ -1638,9 +1652,9 @@ cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(inferior_h) \
d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
$(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \
- $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \
- $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \
- $(gdb_assert_h) $(disasm_h)
+ $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) $(remote_h) \
+ $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) $(disasm_h) \
+ $(trad_frame_h) $(gdb_assert_h)
dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
@@ -1653,6 +1667,8 @@ dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \
delta68-nat.o: delta68-nat.c $(defs_h)
demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \
$(gdb_string_h)
+dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+ $(buildsym_h) $(gdb_assert_h) $(dictionary_h)
dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(symfile_h) $(inferior_h) $(regcache_h)
disasm.o: disasm.c $(defs_h) $(gdb_string_h) $(target_h) $(value_h) \
@@ -1674,6 +1690,10 @@ dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \
dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(dwarf2expr_h) \
$(dwarf2loc_h) $(ax_h) $(ax_gdb_h) $(regcache_h) $(gdb_string_h)
+dwarf2-frame.o: $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) $(frame_h) \
+ $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
+ $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \
+ $(gdb_string_h) $(dwarf2_frame_h)
dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
$(symfile_h) $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) \
$(demangle_h) $(expression_h) $(filenames_h) $(macrotab_h) \
@@ -1792,11 +1812,12 @@ i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h) \
$(osabi_h)
i386-stub.o: i386-stub.c
-i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
- $(gdbcore_h) $(objfiles_h) $(target_h) $(floatformat_h) $(symfile_h) \
- $(symtab_h) $(gdbcmd_h) $(command_h) $(arch_utils_h) $(regcache_h) \
- $(doublest_h) $(value_h) $(gdb_assert_h) $(i386_tdep_h) \
- $(i387_tdep_h) $(osabi_h)
+i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
+ $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
+ $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
+ $(reggroups_h) $(symfile_h) $(symtab_h) $(target_h) $(value_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h)
i386b-nat.o: i386b-nat.c $(defs_h)
i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) \
@@ -1811,7 +1832,7 @@ i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h) $(osabi_h)
i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(regcache_h) $(target_h) $(i386_tdep_h) $(osabi_h)
i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(gdb_string_h) \
- $(i386_tdep_h) $(osabi_h) $(gdbcore_h) $(frame_h) $(dummy_frame_h)
+ $(i386_tdep_h) $(osabi_h)
i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
$(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
$(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
@@ -1834,7 +1855,7 @@ ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(arch_utils_h)
ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(doublest_h) \
- $(value_h) $(objfiles_h) $(elf_common_h) $(elf_bfd_h)
+ $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) $(elf_bfd_h)
inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
$(event_top_h) $(inf_loop_h) $(remote_h)
infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
@@ -1870,7 +1891,7 @@ irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \
- $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h)
+ $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h)
jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \
$(c_lang_h) $(cp_abi_h)
@@ -1886,8 +1907,8 @@ language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
$(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
- $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \
- $(cp_abi_h) $(source_h) $(parser_defs_h) $(block_h) $(objc_lang_h)
+ $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
+ $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) $(objc_lang_h)
linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
$(cli_decode_h) $(gdb_string_h)
@@ -1951,7 +1972,7 @@ mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(symfile_h) $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) \
$(stabsread_h) $(complaints_h) $(demangle_h) $(gdb_assert_h) \
- $(block_h) \
+ $(block_h) $(dictionary_h) \
$(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) $(gdb_string_h) \
$(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
$(aout_stab_gnu_h) $(expression_h) $(language_h)
@@ -1988,9 +2009,9 @@ mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
$(symfile_h) $(regcache_h)
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
- $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
- $(symfile_h) $(regcache_h) $(arch_utils_h)
+mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(regcache_h) $(arch_utils_h) $(gdb_assert_h)
monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
$(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_regex_h) $(srec_h) $(regcache_h)
@@ -2012,7 +2033,7 @@ objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_stat_h) \
$(gdb_obstack_h) $(gdb_string_h) $(breakpoint_h) $(mmalloc_h) \
- $(block_h)
+ $(block_h) $(dictionary_h)
observer.o: observer.c $(observer_h) $(defs_h)
ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
@@ -2138,7 +2159,10 @@ remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
$(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \
$(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
$(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
- $(gdbcore_h) $(solib_h)
+ $(gdbcore_h) $(solib_h) $(remote-fileio_h)
+remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
+ $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \
+ $(remote_fileio_h)
rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h)
rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
@@ -2249,8 +2273,9 @@ stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
$(doublest_h) $(stabsread_h) $(cp_abi_h) $(cp_support_h)
stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
- $(gdbcore_h) $(target_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \
- $(annotate_h) $(ui_out_h) $(source_h) $(block_h)
+ $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \
+ $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \
+ $(gdb_assert_h) $(dictionary_h)
standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \
$(inferior_h) $(gdb_wait_h)
std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
@@ -2271,13 +2296,13 @@ symm-tdep.o: symm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
$(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
$(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h) \
- $(readline_h) $(block_h) $(gdb_regex_h)
+ $(readline_h) $(block_h) $(gdb_regex_h) $(dictionary_h)
symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
$(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
$(language_h) $(demangle_h) $(inferior_h) $(linespec_h) \
$(filenames_h) $(gdb_obstack_h) $(gdb_string_h) $(gdb_stat_h) \
- $(cp_abi_h) $(source_h) $(block_h) $(objc_lang_h)
+ $(cp_abi_h) $(source_h) $(block_h) $(objc_lang_h) $(dictionary_h)
target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
$(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
$(gdb_wait_h) $(dcache_h) $(regcache_h)
@@ -2298,10 +2323,12 @@ tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
$(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
$(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
$(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \
- $(block_h) $(ax_h) $(ax_gdb_h) $(readline_h)
+ $(block_h) $(ax_h) $(ax_gdb_h) $(readline_h) $(dictionary_h)
+trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) $(regcache_h)
typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
- $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
+ $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \
+ $(gdb_string_h)
ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
$(ui_out_h) $(gdb_assert_h)
@@ -2323,7 +2350,7 @@ valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \
$(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \
$(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(gdb_string_h) \
- $(gdb_assert_h) $(block_h)
+ $(gdb_assert_h) $(block_h) $(dictionary_h) $(cp_support_h)
valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \
$(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h)
@@ -2344,18 +2371,19 @@ win32-nat.o: win32-nat.c $(defs_h) $(tm_h) $(frame_h) $(inferior_h) \
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h)
wince-stub.o: wince-stub.c $(wince_stub_h)
wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
- $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \
- $(regcache_h)
+ $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \
+ $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) $(regcache_h) $(mips_tdep_h)
wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h)
x86-64-linux-nat.o: x86-64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(regcache_h) $(gdb_assert_h) $(x86_64_tdep_h)
+ $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gregset_h) \
+ $(x86_64_tdep_h)
x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdb_string_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h) \
- $(osabi_h)
-x86-64-tdep.o: x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) $(objfiles_h) \
- $(x86_64_tdep_h) $(dwarf2cfi_h) $(gdb_assert_h) $(block_h)
+ $(regcache_h) $(osabi_h) $(gdb_string_h) $(x86_64_tdep_h)
+x86-64-tdep.o: x86-64-tdep.c $(defs_h) \
+ $(inferior_h) $(gdbcore_h) $(arch_utils_h) $(block_h) \
+ $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
+ $(inferior_h) $(gdbcmd_h) $(gdbcode_h) $(objfiles_h) $(regcache_h) \
+ $(symfile_h) $(gdb_assert_h) $(x86_64_tdep_h) $(i387_tdep_h)
xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
$(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \
$(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \
@@ -2490,9 +2518,10 @@ gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(symtab_h) $(inferior_h) \
- $(command_h) $(bfd_h) $(top_h) $(symfile_h) $(objfiles_h) $(target_h) \
- $(gdb_string_h) $(tracepoint_h) $(source_h) $(regcache_h)
+ $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \
+ $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \
+ $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \
+ $(dis_asm_h) $(gdbcmd_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
@@ -2533,8 +2562,8 @@ gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \
$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
- $(defs_h) $(frame_h) $(value_h) $(target_h) $(breakpoint_h) \
- $(linespec_h)
+ $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \
+ $(block_h) $(dictionary_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
@@ -2575,7 +2604,8 @@ mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
- $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h)
+ $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) $(stack_h) \
+ $(dictionary_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)
@@ -2673,7 +2703,7 @@ tuiDataWin.o: $(srcdir)/tui/tuiDataWin.c $(config_h) $(defs_h) $(tui_h) \
tuiDisassem.o: $(srcdir)/tui/tuiDisassem.c $(config_h) $(defs_h) $(symtab_h) \
$(breakpoint_h) $(frame_h) $(value_h) $(tui_h) $(tuiData_h) \
$(tuiWin_h) $(tuiLayout_h) $(tuiSourceWin_h) $(tuiStack_h) \
- $(tui_file_h)
+ $(tui_file_h) $(disasm_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDisassem.c
tuiGeneralWin.o: $(srcdir)/tui/tuiGeneralWin.c $(config_h) $(defs_h) \
$(tui_h) $(tuiData_h) $(tuiGeneralWin_h) $(tuiWin_h)
diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c
index d3a9c2e82df..543f70213f4 100644
--- a/gdb/abug-rom.c
+++ b/gdb/abug-rom.c
@@ -164,6 +164,8 @@ abug_open (char *args, int from_tty)
monitor_open (args, &abug_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_abug_rom; /* -Wmissing-prototypes */
+
void
_initialize_abug_rom (void)
{
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index a9bf0a48048..a7d25e84bd5 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -95,6 +95,9 @@
/* Define if using Solaris thread debugging. */
#undef HAVE_THREAD_DB_LIB
+/* Define if you support the tkill syscall. */
+#undef HAVE_TKILL_SYSCALL
+
/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */
#undef START_INFERIOR_TRAPS_EXPECTED
#undef sys_quotactl
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index d3c00aeca26..a85ce024f2f 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -943,3 +943,56 @@ AC_DEFUN([AC_DEFINE_DIR], [
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
+dnl See whether we need a declaration for a function.
+dnl The result is highly dependent on the INCLUDES passed in, so make sure
+dnl to use a different cache variable name in this macro if it is invoked
+dnl in a different context somewhere else.
+dnl gcc_AC_CHECK_DECL(SYMBOL,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECL,
+[AC_MSG_CHECKING([whether $1 is declared])
+AC_CACHE_VAL(gcc_cv_have_decl_$1,
+[AC_TRY_COMPILE([$4],
+[#ifndef $1
+char *(*pfn) = (char *(*)) $1 ;
+#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
+dnl gcc_AC_CHECK_DECLS(SYMBOLS,
+dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECLS,
+[for ac_func in $1
+do
+changequote(, )dnl
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+gcc_AC_CHECK_DECL($ac_func,
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
+dnl It is possible that the include files passed in here are local headers
+dnl which supply a backup declaration for the relevant prototype based on
+dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
+dnl will always return success. E.g. see libiberty.h's handling of
+dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
+dnl 1 so that any local headers used do not provide their own prototype
+dnl during this test.
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $4
+)
+done
+dnl Automatically generate config.h entries via autoheader.
+if test x = y ; then
+ patsubst(translit([$1], [a-z], [A-Z]), [\w+],
+ [AC_DEFINE([HAVE_DECL_\&], 1,
+ [Define to 1 if we found this declaration otherwise define to 0.])])dnl
+fi
+])
+
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index 51e94f29ee4..40399a65d09 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -951,6 +951,59 @@ AC_DEFUN([AC_DEFINE_DIR], [
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
+dnl See whether we need a declaration for a function.
+dnl The result is highly dependent on the INCLUDES passed in, so make sure
+dnl to use a different cache variable name in this macro if it is invoked
+dnl in a different context somewhere else.
+dnl gcc_AC_CHECK_DECL(SYMBOL,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECL,
+[AC_MSG_CHECKING([whether $1 is declared])
+AC_CACHE_VAL(gcc_cv_have_decl_$1,
+[AC_TRY_COMPILE([$4],
+[#ifndef $1
+char *(*pfn) = (char *(*)) $1 ;
+#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
+dnl gcc_AC_CHECK_DECLS(SYMBOLS,
+dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECLS,
+[for ac_func in $1
+do
+changequote(, )dnl
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+gcc_AC_CHECK_DECL($ac_func,
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
+dnl It is possible that the include files passed in here are local headers
+dnl which supply a backup declaration for the relevant prototype based on
+dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
+dnl will always return success. E.g. see libiberty.h's handling of
+dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
+dnl 1 so that any local headers used do not provide their own prototype
+dnl during this test.
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $4
+)
+done
+dnl Automatically generate config.h entries via autoheader.
+if test x = y ; then
+ patsubst(translit([$1], [a-z], [A-Z]), [\w+],
+ [AC_DEFINE([HAVE_DECL_\&], 1,
+ [Define to 1 if we found this declaration otherwise define to 0.])])dnl
+fi
+])
+
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 12bda8049cf..eaa528124f7 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -40,6 +40,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "ui-out.h"
#include "block.h"
#include "infcall.h"
+#include "dictionary.h"
struct cleanup *unresolved_names;
@@ -3181,8 +3182,7 @@ static struct symbol *
standard_lookup (const char *name, domain_enum domain)
{
struct symbol *sym;
- struct symtab *symtab;
- sym = lookup_symbol (name, (struct block *) NULL, domain, 0, &symtab);
+ sym = lookup_symbol (name, (struct block *) NULL, domain, 0, NULL);
return sym;
}
@@ -3434,7 +3434,8 @@ symtab_for_sym (struct symbol *sym)
struct objfile *objfile;
struct block *b;
struct symbol *tmp_sym;
- int i, j;
+ struct dict_iterator iter;
+ int j;
ALL_SYMTABS (objfile, s)
{
@@ -3448,10 +3449,10 @@ symtab_for_sym (struct symbol *sym)
case LOC_BLOCK:
case LOC_CONST_BYTES:
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym)
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
return s;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym)
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
return s;
break;
default:
@@ -3475,7 +3476,7 @@ symtab_for_sym (struct symbol *sym)
j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
{
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j);
- ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym)
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
return s;
}
break;
@@ -3948,13 +3949,12 @@ ada_add_block_symbols (struct block *block, const char *name,
domain_enum domain, struct objfile *objfile,
int wild)
{
- int i;
+ struct dict_iterator iter;
int name_len = strlen (name);
/* A matching argument symbol, if any. */
struct symbol *arg_sym;
/* Set true when we find a matching non-argument symbol */
int found_sym;
- int is_sorted = BLOCK_SHOULD_SORT (block);
struct symbol *sym;
arg_sym = NULL;
@@ -3962,7 +3962,7 @@ ada_add_block_symbols (struct block *block, const char *name,
if (wild)
{
struct symbol *sym;
- ALL_BLOCK_SYMBOLS (block, i, sym)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
if (SYMBOL_DOMAIN (sym) == domain &&
wild_match (name, name_len, DEPRECATED_SYMBOL_NAME (sym)))
@@ -3991,45 +3991,14 @@ ada_add_block_symbols (struct block *block, const char *name,
}
else
{
- if (is_sorted)
- {
- int U;
- i = 0;
- U = BLOCK_NSYMS (block) - 1;
- while (U - i > 4)
- {
- int M = (U + i) >> 1;
- struct symbol *sym = BLOCK_SYM (block, M);
- if (DEPRECATED_SYMBOL_NAME (sym)[0] < name[0])
- i = M + 1;
- else if (DEPRECATED_SYMBOL_NAME (sym)[0] > name[0])
- U = M - 1;
- else if (strcmp (DEPRECATED_SYMBOL_NAME (sym), name) < 0)
- i = M + 1;
- else
- U = M;
- }
- }
- else
- i = 0;
-
- for (; i < BLOCK_BUCKETS (block); i += 1)
- for (sym = BLOCK_BUCKET (block, i); sym != NULL; sym = sym->hash_next)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
if (SYMBOL_DOMAIN (sym) == domain)
{
int cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym), name_len);
- if (cmp < 0)
- {
- if (is_sorted)
- {
- i = BLOCK_BUCKETS (block);
- break;
- }
- }
- else if (cmp == 0
- && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len))
+ if (cmp == 0
+ && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len))
{
switch (SYMBOL_CLASS (sym))
{
@@ -4066,30 +4035,8 @@ ada_add_block_symbols (struct block *block, const char *name,
{
arg_sym = NULL;
found_sym = 0;
- if (is_sorted)
- {
- int U;
- i = 0;
- U = BLOCK_NSYMS (block) - 1;
- while (U - i > 4)
- {
- int M = (U + i) >> 1;
- struct symbol *sym = BLOCK_SYM (block, M);
- if (DEPRECATED_SYMBOL_NAME (sym)[0] < '_')
- i = M + 1;
- else if (DEPRECATED_SYMBOL_NAME (sym)[0] > '_')
- U = M - 1;
- else if (strcmp (DEPRECATED_SYMBOL_NAME (sym), "_ada_") < 0)
- i = M + 1;
- else
- U = M;
- }
- }
- else
- i = 0;
- for (; i < BLOCK_BUCKETS (block); i += 1)
- for (sym = BLOCK_BUCKET (block, i); sym != NULL; sym = sym->hash_next)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
struct symbol *sym = BLOCK_SYM (block, i);
@@ -4105,16 +4052,8 @@ ada_add_block_symbols (struct block *block, const char *name,
cmp = strncmp (name, DEPRECATED_SYMBOL_NAME (sym) + 5, name_len);
}
- if (cmp < 0)
- {
- if (is_sorted)
- {
- i = BLOCK_BUCKETS (block);
- break;
- }
- }
- else if (cmp == 0
- && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len + 5))
+ if (cmp == 0
+ && is_name_suffix (DEPRECATED_SYMBOL_NAME (sym) + name_len + 5))
{
switch (SYMBOL_CLASS (sym))
{
@@ -4161,7 +4100,7 @@ fill_in_ada_prototype (struct symbol *func)
{
struct block *b;
int nargs, nsyms;
- int i;
+ struct dict_iterator iter;
struct type *ftype;
struct type *rtype;
size_t max_fields;
@@ -4187,7 +4126,7 @@ fill_in_ada_prototype (struct symbol *func)
max_fields = 8;
TYPE_FIELDS (ftype) =
(struct field *) xmalloc (sizeof (struct field) * max_fields);
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
GROW_VECT (TYPE_FIELDS (ftype), max_fields, nargs + 1);
@@ -4760,8 +4699,8 @@ debug_print_lines (struct linetable *lt)
static void
debug_print_block (struct block *b)
{
- int i;
- struct symbol *i;
+ struct dict_iterator iter;
+ struct symbol *sym;
fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]",
b, BLOCK_START (b), BLOCK_END (b));
@@ -4770,10 +4709,8 @@ debug_print_block (struct block *b)
fprintf (stderr, "\n");
fprintf (stderr, "\t Superblock: %p\n", BLOCK_SUPERBLOCK (b));
fprintf (stderr, "\t Symbols:");
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- if (i > 0 && i % 4 == 0)
- fprintf (stderr, "\n\t\t ");
fprintf (stderr, " %s", DEPRECATED_SYMBOL_NAME (sym));
}
fprintf (stderr, "\n");
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index c5d7481fbf9..de53b3e71b3 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -20,96 +20,125 @@
#include "defs.h"
#include "frame.h"
-#include "gdbcore.h"
-#include "value.h"
+#include "gdb_assert.h"
#include "osabi.h"
#include "alpha-tdep.h"
-/* Under GNU/Linux, signal handler invocations can be identified by the
- designated code sequence that is used to return from a signal
+/* Under GNU/Linux, signal handler invocations can be identified by
+ the designated code sequence that is used to return from a signal
handler. In particular, the return address of a signal handler
- points to the following sequence (the first instruction is quadword
- aligned):
-
- bis $30,$30,$16
- addq $31,0x67,$0
- call_pal callsys
-
- Each instruction has a unique encoding, so we simply attempt to
- match the instruction the pc is pointing to with any of the above
- instructions. If there is a hit, we know the offset to the start
- of the designated sequence and can then check whether we really are
- executing in a designated sequence. If not, -1 is returned,
- otherwise the offset from the start of the desingated sequence is
- returned.
-
- There is a slight chance of false hits: code could jump into the
- middle of the designated sequence, in which case there is no
- guarantee that we are in the middle of a sigreturn syscall. Don't
- think this will be a problem in praxis, though. */
-LONGEST
-alpha_linux_sigtramp_offset (CORE_ADDR pc)
+ points to a sequence that copies $sp to $16, loads $0 with the
+ appropriate syscall number, and finally enters the kernel.
+
+ This is somewhat complicated in that:
+ (1) the expansion of the "mov" assembler macro has changed over
+ time, from "bis src,src,dst" to "bis zero,src,dst",
+ (2) the kernel has changed from using "addq" to "lda" to load the
+ syscall number,
+ (3) there is a "normal" sigreturn and an "rt" sigreturn which
+ has a different stack layout.
+*/
+
+static long
+alpha_linux_sigtramp_offset_1 (CORE_ADDR pc)
{
- unsigned int i[3], w;
- long off;
+ switch (alpha_read_insn (pc))
+ {
+ case 0x47de0410: /* bis $30,$30,$16 */
+ case 0x47fe0410: /* bis $31,$30,$16 */
+ return 0;
- if (read_memory_nobpt (pc, (char *) &w, 4) != 0)
- return -1;
+ case 0x43ecf400: /* addq $31,103,$0 */
+ case 0x201f0067: /* lda $0,103($31) */
+ case 0x201f015f: /* lda $0,351($31) */
+ return 4;
+
+ case 0x00000083: /* call_pal callsys */
+ return 8;
- off = -1;
- switch (w)
- {
- case 0x47de0410:
- off = 0;
- break; /* bis $30,$30,$16 */
- case 0x43ecf400:
- off = 4;
- break; /* addq $31,0x67,$0 */
- case 0x00000083:
- off = 8;
- break; /* call_pal callsys */
default:
return -1;
}
+}
+
+static LONGEST
+alpha_linux_sigtramp_offset (CORE_ADDR pc)
+{
+ long i, off;
+
+ if (pc & 3)
+ return -1;
+
+ /* Guess where we might be in the sequence. */
+ off = alpha_linux_sigtramp_offset_1 (pc);
+ if (off < 0)
+ return -1;
+
+ /* Verify that the other two insns of the sequence are as we expect. */
pc -= off;
- if (pc & 0x7)
+ for (i = 0; i < 12; i += 4)
{
- /* designated sequence is not quadword aligned */
- return -1;
+ if (i == off)
+ continue;
+ if (alpha_linux_sigtramp_offset_1 (pc + i) != i)
+ return -1;
}
- if (read_memory_nobpt (pc, (char *) i, sizeof (i)) != 0)
- return -1;
-
- if (i[0] == 0x47de0410 && i[1] == 0x43ecf400 && i[2] == 0x00000083)
- return off;
- return -1;
+ return off;
}
static int
alpha_linux_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (alpha_linux_sigtramp_offset (pc) >= 0);
+ return alpha_linux_sigtramp_offset (pc) >= 0;
}
static CORE_ADDR
-alpha_linux_sigcontext_addr (struct frame_info *frame)
+alpha_linux_sigcontext_addr (struct frame_info *next_frame)
{
- return (get_frame_base (frame) - 0x298); /* sizeof(struct sigcontext) */
+ CORE_ADDR pc;
+ ULONGEST sp;
+ long off;
+
+ pc = frame_pc_unwind (next_frame);
+ frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &sp);
+
+ off = alpha_linux_sigtramp_offset (pc);
+ gdb_assert (off >= 0);
+
+ /* __NR_rt_sigreturn has a couple of structures on the stack. This is:
+
+ struct rt_sigframe {
+ struct siginfo info;
+ struct ucontext uc;
+ };
+
+ offsetof (struct rt_sigframe, uc.uc_mcontext);
+ */
+ if (alpha_read_insn (pc - off + 4) == 0x201f015f)
+ return sp + 176;
+
+ /* __NR_sigreturn has the sigcontext structure at the top of the stack. */
+ return sp;
}
static void
-alpha_linux_init_abi (struct gdbarch_info info,
- struct gdbarch *gdbarch)
+alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ struct gdbarch_tdep *tdep;
+
+ /* Hook into the DWARF CFI frame unwinder. */
+ alpha_dwarf2_init_abi (info, gdbarch);
+
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, alpha_linux_pc_in_sigtramp);
+ tdep = gdbarch_tdep (gdbarch);
tdep->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
-
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
}
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
new file mode 100644
index 00000000000..d481986b8c3
--- /dev/null
+++ b/gdb/alpha-mdebug-tdep.c
@@ -0,0 +1,384 @@
+/* Target-dependent mdebug code for the ALPHA architecture.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ 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 "frame-unwind.h"
+#include "frame-base.h"
+#include "symtab.h"
+#include "gdbcore.h"
+#include "block.h"
+#include "gdb_assert.h"
+
+#include "alpha-tdep.h"
+
+/* FIXME: Some of this code should perhaps be merged with mips. */
+
+/* *INDENT-OFF* */
+/* Layout of a stack frame on the alpha:
+
+ | |
+ pdr members: | 7th ... nth arg, |
+ | `pushed' by caller. |
+ | |
+----------------|-------------------------------|<-- old_sp == vfp
+ ^ ^ ^ ^ | |
+ | | | | | |
+ | |localoff | Copies of 1st .. 6th |
+ | | | | | argument if necessary. |
+ | | | v | |
+ | | | --- |-------------------------------|<-- FRAME_LOCALS_ADDRESS
+ | | | | |
+ | | | | Locals and temporaries. |
+ | | | | |
+ | | | |-------------------------------|
+ | | | | |
+ |-fregoffset | Saved float registers. |
+ | | | | F9 |
+ | | | | . |
+ | | | | . |
+ | | | | F2 |
+ | | v | |
+ | | -------|-------------------------------|
+ | | | |
+ | | | Saved registers. |
+ | | | S6 |
+ |-regoffset | . |
+ | | | . |
+ | | | S0 |
+ | | | pdr.pcreg |
+ | v | |
+ | ----------|-------------------------------|
+ | | |
+ frameoffset | Argument build area, gets |
+ | | 7th ... nth arg for any |
+ | | called procedure. |
+ v | |
+ -------------|-------------------------------|<-- sp
+ | |
+*/
+/* *INDENT-ON* */
+
+#define PROC_LOW_ADDR(proc) ((proc)->pdr.adr)
+#define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
+#define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
+#define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
+#define PROC_FREG_MASK(proc) ((proc)->pdr.fregmask)
+#define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
+#define PROC_FREG_OFFSET(proc) ((proc)->pdr.fregoffset)
+#define PROC_PC_REG(proc) ((proc)->pdr.pcreg)
+#define PROC_LOCALOFF(proc) ((proc)->pdr.localoff)
+
+/* Locate the mdebug PDR for the given PC. Return null if one can't
+ be found; you'll have to fall back to other methods in that case. */
+
+static alpha_extra_func_info_t
+find_proc_desc (CORE_ADDR pc)
+{
+ struct block *b = block_for_pc (pc);
+ alpha_extra_func_info_t proc_desc = NULL;
+ struct symbol *sym = NULL;
+
+ if (b)
+ {
+ CORE_ADDR startaddr;
+ find_pc_partial_function (pc, NULL, &startaddr, NULL);
+
+ if (startaddr > BLOCK_START (b))
+ /* This is the "pathological" case referred to in a comment in
+ print_frame_info. It might be better to move this check into
+ symbol reading. */
+ sym = NULL;
+ else
+ sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL);
+ }
+
+ if (sym)
+ {
+ proc_desc = (alpha_extra_func_info_t) SYMBOL_VALUE (sym);
+
+ /* If we never found a PDR for this function in symbol reading,
+ then examine prologues to find the information. */
+ if (proc_desc->pdr.framereg == -1)
+ proc_desc = NULL;
+ }
+
+ return proc_desc;
+}
+
+/* This returns the PC of the first inst after the prologue. If we can't
+ find the prologue, then return 0. */
+
+static CORE_ADDR
+alpha_mdebug_after_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+{
+ if (proc_desc)
+ {
+ /* If function is frameless, then we need to do it the hard way. I
+ strongly suspect that frameless always means prologueless... */
+ if (PROC_FRAME_REG (proc_desc) == ALPHA_SP_REGNUM
+ && PROC_FRAME_OFFSET (proc_desc) == 0)
+ return 0;
+ }
+
+ return alpha_after_prologue (pc);
+}
+
+/* Return non-zero if we *might* be in a function prologue. Return zero
+ if we are definitively *not* in a function prologue. */
+
+static int
+alpha_mdebug_in_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+{
+ CORE_ADDR after_prologue_pc = alpha_mdebug_after_prologue (pc, proc_desc);
+ return (after_prologue_pc == 0 || pc < after_prologue_pc);
+}
+
+
+/* Frame unwinder that reads mdebug PDRs. */
+
+struct alpha_mdebug_unwind_cache
+{
+ alpha_extra_func_info_t proc_desc;
+ CORE_ADDR vfp;
+ CORE_ADDR *saved_regs;
+};
+
+/* Extract all of the information about the frame from PROC_DESC
+ and store the resulting register save locations in the structure. */
+
+static struct alpha_mdebug_unwind_cache *
+alpha_mdebug_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info;
+ alpha_extra_func_info_t proc_desc;
+ ULONGEST vfp;
+ CORE_ADDR pc, reg_position;
+ unsigned long mask;
+ int ireg, returnreg;
+
+ if (*this_prologue_cache)
+ return *this_prologue_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
+ *this_prologue_cache = info;
+ pc = frame_pc_unwind (next_frame);
+
+ /* ??? We don't seem to be able to cache the lookup of the PDR
+ from alpha_mdebug_frame_p. It'd be nice if we could change
+ the arguments to that function. Oh well. */
+ proc_desc = find_proc_desc (pc);
+ info->proc_desc = proc_desc;
+ gdb_assert (proc_desc != NULL);
+
+ info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+
+ /* The VFP of the frame is at FRAME_REG+FRAME_OFFSET. */
+ frame_unwind_unsigned_register (next_frame, PROC_FRAME_REG (proc_desc), &vfp);
+ vfp += PROC_FRAME_OFFSET (info->proc_desc);
+ info->vfp = vfp;
+
+ /* Fill in the offsets for the registers which gen_mask says were saved. */
+
+ reg_position = vfp + PROC_REG_OFFSET (proc_desc);
+ mask = PROC_REG_MASK (proc_desc);
+ returnreg = PROC_PC_REG (proc_desc);
+
+ /* Note that RA is always saved first, regardless of its actual
+ register number. */
+ if (mask & (1 << returnreg))
+ {
+ /* Clear bit for RA so we don't save it again later. */
+ mask &= ~(1 << returnreg);
+
+ info->saved_regs[returnreg] = reg_position;
+ reg_position += 8;
+ }
+
+ for (ireg = 0; ireg <= 31; ++ireg)
+ if (mask & (1 << ireg))
+ {
+ info->saved_regs[ireg] = reg_position;
+ reg_position += 8;
+ }
+
+ reg_position = vfp + PROC_FREG_OFFSET (proc_desc);
+ mask = PROC_FREG_MASK (proc_desc);
+
+ for (ireg = 0; ireg <= 31; ++ireg)
+ if (mask & (1 << ireg))
+ {
+ info->saved_regs[ALPHA_FP0_REGNUM + ireg] = reg_position;
+ reg_position += 8;
+ }
+
+ return info;
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
+
+static void
+alpha_mdebug_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ *this_id = frame_id_build (info->vfp, frame_func_unwind (next_frame));
+}
+
+/* Retrieve the value of REGNUM in FRAME. Don't give up! */
+
+static void
+alpha_mdebug_frame_prev_register (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ /* The PC of the previous frame is stored in the link register of
+ the current frame. Frob regnum so that we pull the value from
+ the correct place. */
+ if (regnum == ALPHA_PC_REGNUM)
+ regnum = PROC_PC_REG (info->proc_desc);
+
+ /* For all registers known to be saved in the current frame,
+ do the obvious and pull the value out. */
+ if (info->saved_regs[regnum])
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = info->saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ get_frame_memory (next_frame, *addrp, bufferp, ALPHA_REGISTER_SIZE);
+ return;
+ }
+
+ /* The stack pointer of the previous frame is computed by popping
+ the current stack frame. */
+ if (regnum == ALPHA_SP_REGNUM)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_unsigned_integer (bufferp, ALPHA_REGISTER_SIZE, info->vfp);
+ return;
+ }
+
+ /* Otherwise assume the next frame has the same register value. */
+ frame_register (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+static const struct frame_unwind alpha_mdebug_frame_unwind = {
+ NORMAL_FRAME,
+ alpha_mdebug_frame_this_id,
+ alpha_mdebug_frame_prev_register
+};
+
+const struct frame_unwind *
+alpha_mdebug_frame_p (CORE_ADDR pc)
+{
+ alpha_extra_func_info_t proc_desc;
+
+ /* If this PC does not map to a PDR, then clearly this isn't an
+ mdebug frame. */
+ proc_desc = find_proc_desc (pc);
+ if (proc_desc == NULL)
+ return NULL;
+
+ /* If we're in the prologue, the PDR for this frame is not yet valid.
+ Say no here and we'll fall back on the heuristic unwinder. */
+ if (alpha_mdebug_in_prologue (pc, proc_desc))
+ return NULL;
+
+ return &alpha_mdebug_frame_unwind;
+}
+
+static CORE_ADDR
+alpha_mdebug_frame_base_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ return info->vfp;
+}
+
+static CORE_ADDR
+alpha_mdebug_frame_locals_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ return info->vfp - PROC_LOCALOFF (info->proc_desc);
+}
+
+static CORE_ADDR
+alpha_mdebug_frame_args_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ return info->vfp - ALPHA_NUM_ARG_REGS * 8;
+}
+
+static const struct frame_base alpha_mdebug_frame_base = {
+ &alpha_mdebug_frame_unwind,
+ alpha_mdebug_frame_base_address,
+ alpha_mdebug_frame_locals_address,
+ alpha_mdebug_frame_args_address
+};
+
+static const struct frame_base *
+alpha_mdebug_frame_base_p (CORE_ADDR pc)
+{
+ alpha_extra_func_info_t proc_desc;
+
+ /* If this PC does not map to a PDR, then clearly this isn't an
+ mdebug frame. */
+ proc_desc = find_proc_desc (pc);
+ if (proc_desc == NULL)
+ return NULL;
+
+ return &alpha_mdebug_frame_base;
+}
+
+
+void
+alpha_mdebug_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ frame_unwind_append_predicate (gdbarch, alpha_mdebug_frame_p);
+ frame_base_append_predicate (gdbarch, alpha_mdebug_frame_base_p);
+}
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index af0a336cf6a..342deff22b4 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -68,7 +68,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
OSF/1.2 core files. OSF5 uses different names for the register
enum list, need to handle two cases. The actual values are the
same. */
- static int core_reg_mapping[ALPHA_NUM_REGS] =
+ static int const core_reg_mapping[ALPHA_NUM_REGS] =
{
#ifdef NCF_REGS
#define EFL NCF_REGS
@@ -94,19 +94,23 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
EF_PC, -1
#endif
};
- static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
- {0};
- for (regno = 0; regno < NUM_REGS; regno++)
+ for (regno = 0; regno < ALPHA_NUM_REGS; regno++)
{
if (CANNOT_FETCH_REGISTER (regno))
{
- supply_register (regno, zerobuf);
+ supply_register (regno, NULL);
continue;
}
addr = 8 * core_reg_mapping[regno];
if (addr < 0 || addr >= core_reg_size)
{
+ /* ??? UNIQUE is a new addition. Don't generate an error. */
+ if (regno == ALPHA_UNIQUE_REGNUM)
+ {
+ supply_register (regno, NULL);
+ continue;
+ }
if (bad_reg < 0)
bad_reg = regno;
}
@@ -131,31 +135,22 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
return;
}
- if (which == 2)
+ switch (which)
{
- /* The FPU Registers. */
- memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
- core_reg_sect, 31 * 8);
- memset (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 31)], 0, 8);
- memset (&deprecated_register_valid[FP0_REGNUM], 1, 32);
- }
- else
- {
- /* The General Registers. */
- memcpy (&deprecated_registers[REGISTER_BYTE (ALPHA_V0_REGNUM)],
- core_reg_sect, 31 * 8);
- memcpy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
- core_reg_sect + 31 * 8, 8);
- memset (&deprecated_registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
- memset (&deprecated_register_valid[ALPHA_V0_REGNUM], 1, 32);
- deprecated_register_valid[PC_REGNUM] = 1;
-
- if (core_reg_size >= 33 * 8)
- {
- memcpy (&deprecated_registers[REGISTER_BYTE (ALPHA_UNIQUE_REGNUM)],
- core_reg_sect + 32 * 8, 8);
- deprecated_register_valid[ALPHA_UNIQUE_REGNUM] = 1;
- }
+ case 0: /* integer registers */
+ /* PC is in slot 32; UNIQUE is in slot 33, if present. */
+ alpha_supply_int_regs (-1, core_reg_sect, core_reg_sect + 31*8,
+ (core_reg_size >= 33 * 8
+ ? core_reg_sect + 32*8 : NULL));
+ break;
+
+ case 2: /* floating-point registers */
+ /* FPCR is in slot 32. */
+ alpha_supply_fp_regs (-1, core_reg_sect, core_reg_sect + 31*8);
+ break;
+
+ default:
+ break;
}
}
@@ -193,6 +188,11 @@ kernel_u_size (void)
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
+/* Locate the UNIQUE value within the gregset_t. */
+#ifndef ALPHA_REGSET_UNIQUE
+#define ALPHA_REGSET_UNIQUE(ptr) NULL
+#endif
+
/*
* See the comment in m68k-tdep.c regarding the utility of these functions.
*/
@@ -200,33 +200,21 @@ kernel_u_size (void)
void
supply_gregset (gdb_gregset_t *gregsetp)
{
- register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
- static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
- {0};
+ void *unique = ALPHA_REGSET_UNIQUE (gregsetp);
- for (regi = 0; regi < 31; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (PC_REGNUM, (char *) (regp + 31));
-
- /* Fill inaccessible registers with zero. */
- supply_register (ALPHA_ZERO_REGNUM, zerobuf);
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
+ /* PC is in slot 32. */
+ alpha_supply_int_regs (-1, regp, regp + 31, unique);
}
void
fill_gregset (gdb_gregset_t *gregsetp, int regno)
{
- int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
+ void *unique = ALPHA_REGSET_UNIQUE (gregsetp);
- for (regi = 0; regi < 31; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + 31) = *(long *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
+ /* PC is in slot 32. */
+ alpha_fill_int_regs (regno, regp, regp + 31, unique);
}
/*
@@ -237,27 +225,19 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
void
supply_fpregset (gdb_fpregset_t *fpregsetp)
{
- register int regi;
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
- for (regi = 0; regi < 32; regi++)
- supply_register (regi + FP0_REGNUM, (char *) (regp + regi));
+ /* FPCR is in slot 32. */
+ alpha_supply_fp_regs (-1, regp, regp + 31);
}
void
fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
- int regi;
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
- for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- *(regp + regi - FP0_REGNUM) =
- *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
- }
- }
+ /* FPCR is in slot 32. */
+ alpha_fill_fp_regs (regno, regp, regp + 31);
}
#endif
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index 4eaa3c4013c..ca757de660f 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -24,22 +24,10 @@
#include "value.h"
#include "osabi.h"
#include "gdb_string.h"
+#include "objfiles.h"
#include "alpha-tdep.h"
-/* Under OSF/1, the __sigtramp routine is frameless and has a frame
- size of zero, but we are able to backtrace through it. */
-static CORE_ADDR
-alpha_osf1_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
-{
- char *name;
-
- find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (PC_IN_SIGTRAMP (pc, name))
- return frame->frame;
- return 0;
-}
-
static int
alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
@@ -49,8 +37,36 @@ alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
static CORE_ADDR
alpha_osf1_sigcontext_addr (struct frame_info *frame)
{
- return (read_memory_integer (frame->next ? frame->next->frame
- : frame->frame, 8));
+ struct frame_info *next_frame = get_next_frame (frame);
+
+ if (next_frame != NULL)
+ return (read_memory_integer (get_frame_base (next_frame), 8));
+ else
+ return (read_memory_integer (get_frame_base (frame), 8));
+}
+
+/* This is the definition of CALL_DUMMY_ADDRESS. It's a heuristic that is used
+ to find a convenient place in the text segment to stick a breakpoint to
+ detect the completion of a target function call (ala call_function_by_hand).
+ */
+
+static CORE_ADDR
+alpha_call_dummy_address (void)
+{
+ CORE_ADDR entry;
+ struct minimal_symbol *sym;
+
+ entry = entry_point_address ();
+
+ if (entry != 0)
+ return entry;
+
+ sym = lookup_minimal_symbol ("_Prelude", NULL, symfile_objfile);
+
+ if (!sym || MSYMBOL_TYPE (sym) != mst_text)
+ return 0;
+ else
+ return SYMBOL_VALUE_ADDRESS (sym) + 4;
}
static void
@@ -59,13 +75,20 @@ alpha_osf1_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
+
set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
/* The next/step support via procfs on OSF1 is broken when running
on multi-processor machines. We need to use software single stepping
instead. */
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
- tdep->skip_sigtramp_frame = alpha_osf1_skip_sigtramp_frame;
+ /* Alpha OSF/1 inhibits execution of code on the stack. But there is
+ no need for a dummy on the Alpha. PUSH_ARGUMENTS takes care of all
+ argument handling and bp_call_dummy takes care of stopping the dummy. */
+ set_gdbarch_call_dummy_address (gdbarch, alpha_call_dummy_address);
+
tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
tdep->jb_pc = 2;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 6157fe3ebaf..d5235779bd6 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -20,7 +20,11 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "doublest.h"
#include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "dwarf2-frame.h"
#include "inferior.h"
#include "symtab.h"
#include "value.h"
@@ -32,7 +36,7 @@
#include "gdb_string.h"
#include "linespec.h"
#include "regcache.h"
-#include "doublest.h"
+#include "reggroups.h"
#include "arch-utils.h"
#include "osabi.h"
#include "block.h"
@@ -41,234 +45,11 @@
#include "alpha-tdep.h"
-static gdbarch_init_ftype alpha_gdbarch_init;
-
-static gdbarch_register_name_ftype alpha_register_name;
-static gdbarch_register_raw_size_ftype alpha_register_raw_size;
-static gdbarch_register_virtual_size_ftype alpha_register_virtual_size;
-static gdbarch_register_virtual_type_ftype alpha_register_virtual_type;
-static gdbarch_register_byte_ftype alpha_register_byte;
-static gdbarch_cannot_fetch_register_ftype alpha_cannot_fetch_register;
-static gdbarch_cannot_store_register_ftype alpha_cannot_store_register;
-static gdbarch_register_convertible_ftype alpha_register_convertible;
-static gdbarch_register_convert_to_virtual_ftype
- alpha_register_convert_to_virtual;
-static gdbarch_register_convert_to_raw_ftype alpha_register_convert_to_raw;
-static gdbarch_deprecated_extract_return_value_ftype alpha_extract_return_value;
-static gdbarch_deprecated_extract_struct_value_address_ftype
- alpha_extract_struct_value_address;
-static gdbarch_use_struct_convention_ftype alpha_use_struct_convention;
-
-static gdbarch_breakpoint_from_pc_ftype alpha_breakpoint_from_pc;
-
-static gdbarch_frame_args_address_ftype alpha_frame_args_address;
-static gdbarch_frame_locals_address_ftype alpha_frame_locals_address;
-
-static gdbarch_skip_prologue_ftype alpha_skip_prologue;
-
-static gdbarch_get_longjmp_target_ftype alpha_get_longjmp_target;
-
-struct frame_extra_info
- {
- alpha_extra_func_info_t proc_desc;
- int localoff;
- int pc_reg;
- };
-
-/* FIXME: Some of this code should perhaps be merged with mips-tdep.c. */
-
-/* Prototypes for local functions. */
-
-static void alpha_find_saved_regs (struct frame_info *);
-
-static alpha_extra_func_info_t push_sigtramp_desc (CORE_ADDR low_addr);
-
-static CORE_ADDR read_next_frame_reg (struct frame_info *, int);
-
-static CORE_ADDR heuristic_proc_start (CORE_ADDR);
-
-static alpha_extra_func_info_t heuristic_proc_desc (CORE_ADDR,
- CORE_ADDR,
- struct frame_info *);
-
-static alpha_extra_func_info_t find_proc_desc (CORE_ADDR,
- struct frame_info *);
-
-#if 0
-static int alpha_in_lenient_prologue (CORE_ADDR, CORE_ADDR);
-#endif
-
-static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *);
-
-static CORE_ADDR after_prologue (CORE_ADDR pc,
- alpha_extra_func_info_t proc_desc);
-
-static int alpha_in_prologue (CORE_ADDR pc,
- alpha_extra_func_info_t proc_desc);
-
-static int alpha_about_to_return (CORE_ADDR pc);
-
-void _initialize_alpha_tdep (void);
-
-/* Heuristic_proc_start may hunt through the text section for a long
- time across a 2400 baud serial line. Allows the user to limit this
- search. */
-static unsigned int heuristic_fence_post = 0;
-/* *INDENT-OFF* */
-/* Layout of a stack frame on the alpha:
-
- | |
- pdr members: | 7th ... nth arg, |
- | `pushed' by caller. |
- | |
-----------------|-------------------------------|<-- old_sp == vfp
- ^ ^ ^ ^ | |
- | | | | | |
- | |localoff | Copies of 1st .. 6th |
- | | | | | argument if necessary. |
- | | | v | |
- | | | --- |-------------------------------|<-- FRAME_LOCALS_ADDRESS
- | | | | |
- | | | | Locals and temporaries. |
- | | | | |
- | | | |-------------------------------|
- | | | | |
- |-fregoffset | Saved float registers. |
- | | | | F9 |
- | | | | . |
- | | | | . |
- | | | | F2 |
- | | v | |
- | | -------|-------------------------------|
- | | | |
- | | | Saved registers. |
- | | | S6 |
- |-regoffset | . |
- | | | . |
- | | | S0 |
- | | | pdr.pcreg |
- | v | |
- | ----------|-------------------------------|
- | | |
- frameoffset | Argument build area, gets |
- | | 7th ... nth arg for any |
- | | called procedure. |
- v | |
- -------------|-------------------------------|<-- sp
- | |
-*/
-/* *INDENT-ON* */
-
-#define PROC_LOW_ADDR(proc) ((proc)->pdr.adr) /* least address */
-/* These next two fields are kind of being hijacked. I wonder if
- iline is too small for the values it needs to hold, if GDB is
- running on a 32-bit host. */
-#define PROC_HIGH_ADDR(proc) ((proc)->pdr.iline) /* upper address bound */
-#define PROC_DUMMY_FRAME(proc) ((proc)->pdr.cbLineOffset) /*CALL_DUMMY frame */
-#define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
-#define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
-#define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
-#define PROC_FREG_MASK(proc) ((proc)->pdr.fregmask)
-#define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
-#define PROC_FREG_OFFSET(proc) ((proc)->pdr.fregoffset)
-#define PROC_PC_REG(proc) ((proc)->pdr.pcreg)
-#define PROC_LOCALOFF(proc) ((proc)->pdr.localoff)
-#define PROC_SYMBOL(proc) (*(struct symbol**)&(proc)->pdr.isym)
-#define _PROC_MAGIC_ 0x0F0F0F0F
-#define PROC_DESC_IS_DUMMY(proc) ((proc)->pdr.isym == _PROC_MAGIC_)
-#define SET_PROC_DESC_IS_DUMMY(proc) ((proc)->pdr.isym = _PROC_MAGIC_)
-
-struct linked_proc_info
- {
- struct alpha_extra_func_info info;
- struct linked_proc_info *next;
- }
- *linked_proc_desc_table = NULL;
-
-static CORE_ADDR
-alpha_frame_past_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep->skip_sigtramp_frame != NULL)
- return (tdep->skip_sigtramp_frame (frame, pc));
-
- return (0);
-}
-
-static LONGEST
-alpha_dynamic_sigtramp_offset (CORE_ADDR pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- /* Must be provided by OS/ABI variant code if supported. */
- if (tdep->dynamic_sigtramp_offset != NULL)
- return (tdep->dynamic_sigtramp_offset (pc));
-
- return (-1);
-}
-
-#define ALPHA_PROC_SIGTRAMP_MAGIC 0x0e0f0f0f
-
-/* Return TRUE if the procedure descriptor PROC is a procedure
- descriptor that refers to a dynamically generated signal
- trampoline routine. */
-static int
-alpha_proc_desc_is_dyn_sigtramp (struct alpha_extra_func_info *proc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep->dynamic_sigtramp_offset != NULL)
- return (proc->pdr.isym == ALPHA_PROC_SIGTRAMP_MAGIC);
-
- return (0);
-}
-
-static void
-alpha_set_proc_desc_is_dyn_sigtramp (struct alpha_extra_func_info *proc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep->dynamic_sigtramp_offset != NULL)
- proc->pdr.isym = ALPHA_PROC_SIGTRAMP_MAGIC;
-}
-
-/* Dynamically create a signal-handler caller procedure descriptor for
- the signal-handler return code starting at address LOW_ADDR. The
- descriptor is added to the linked_proc_desc_table. */
-
-static alpha_extra_func_info_t
-push_sigtramp_desc (CORE_ADDR low_addr)
-{
- struct linked_proc_info *link;
- alpha_extra_func_info_t proc_desc;
-
- link = (struct linked_proc_info *)
- xmalloc (sizeof (struct linked_proc_info));
- link->next = linked_proc_desc_table;
- linked_proc_desc_table = link;
-
- proc_desc = &link->info;
-
- proc_desc->numargs = 0;
- PROC_LOW_ADDR (proc_desc) = low_addr;
- PROC_HIGH_ADDR (proc_desc) = low_addr + 3 * 4;
- PROC_DUMMY_FRAME (proc_desc) = 0;
- PROC_FRAME_OFFSET (proc_desc) = 0x298; /* sizeof(struct sigcontext_struct) */
- PROC_FRAME_REG (proc_desc) = SP_REGNUM;
- PROC_REG_MASK (proc_desc) = 0xffff;
- PROC_FREG_MASK (proc_desc) = 0xffff;
- PROC_PC_REG (proc_desc) = 26;
- PROC_LOCALOFF (proc_desc) = 0;
- alpha_set_proc_desc_is_dyn_sigtramp (proc_desc);
- return (proc_desc);
-}
-
static const char *
alpha_register_name (int regno)
{
- static char *register_names[] =
+ static const char * const register_names[] =
{
"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
"t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
@@ -278,832 +59,236 @@ alpha_register_name (int regno)
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr",
- "pc", "vfp", "unique",
+ "pc", "", "unique"
};
if (regno < 0)
- return (NULL);
+ return NULL;
if (regno >= (sizeof(register_names) / sizeof(*register_names)))
- return (NULL);
- return (register_names[regno]);
+ return NULL;
+ return register_names[regno];
}
static int
alpha_cannot_fetch_register (int regno)
{
- return (regno == DEPRECATED_FP_REGNUM || regno == ALPHA_ZERO_REGNUM);
+ return regno == ALPHA_ZERO_REGNUM;
}
static int
alpha_cannot_store_register (int regno)
{
- return (regno == DEPRECATED_FP_REGNUM || regno == ALPHA_ZERO_REGNUM);
-}
-
-static int
-alpha_register_convertible (int regno)
-{
- return (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31);
+ return regno == ALPHA_ZERO_REGNUM;
}
static struct type *
-alpha_register_virtual_type (int regno)
+alpha_register_type (struct gdbarch *gdbarch, int regno)
{
- return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31))
- ? builtin_type_double : builtin_type_long);
-}
+ if (regno == ALPHA_SP_REGNUM || regno == ALPHA_GP_REGNUM)
+ return builtin_type_void_data_ptr;
+ if (regno == ALPHA_PC_REGNUM)
+ return builtin_type_void_func_ptr;
-static int
-alpha_register_byte (int regno)
-{
- return (regno * 8);
-}
-
-static int
-alpha_register_raw_size (int regno)
-{
- return 8;
-}
+ /* Don't need to worry about little vs big endian until
+ some jerk tries to port to alpha-unicosmk. */
+ if (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31)
+ return builtin_type_ieee_double_little;
-static int
-alpha_register_virtual_size (int regno)
-{
- return 8;
+ return builtin_type_int64;
}
-
-
-static CORE_ADDR
-alpha_sigcontext_addr (struct frame_info *fi)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- if (tdep->sigcontext_addr)
- return (tdep->sigcontext_addr (fi));
+/* Is REGNUM a member of REGGROUP? */
- return (0);
-}
-
-/* Guaranteed to set frame->saved_regs to some values (it never leaves it
- NULL). */
-
-static void
-alpha_find_saved_regs (struct frame_info *frame)
+static int
+alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *group)
{
- int ireg;
- CORE_ADDR reg_position;
- unsigned long mask;
- alpha_extra_func_info_t proc_desc;
- int returnreg;
-
- frame_saved_regs_zalloc (frame);
-
- /* If it is the frame for __sigtramp, the saved registers are located
- in a sigcontext structure somewhere on the stack. __sigtramp
- passes a pointer to the sigcontext structure on the stack.
- If the stack layout for __sigtramp changes, or if sigcontext offsets
- change, we might have to update this code. */
-#ifndef SIGFRAME_PC_OFF
-#define SIGFRAME_PC_OFF (2 * 8)
-#define SIGFRAME_REGSAVE_OFF (4 * 8)
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_REGSAVE_OFF + 32 * 8 + 8)
-#endif
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- {
- CORE_ADDR sigcontext_addr;
-
- sigcontext_addr = alpha_sigcontext_addr (frame);
- if (sigcontext_addr == 0)
- {
- /* Don't know where the sigcontext is; just bail. */
- return;
- }
- for (ireg = 0; ireg < 32; ireg++)
- {
- reg_position = sigcontext_addr + SIGFRAME_REGSAVE_OFF + ireg * 8;
- get_frame_saved_regs (frame)[ireg] = reg_position;
- }
- for (ireg = 0; ireg < 32; ireg++)
- {
- reg_position = sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + ireg * 8;
- get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
- }
- get_frame_saved_regs (frame)[PC_REGNUM] = sigcontext_addr + SIGFRAME_PC_OFF;
- return;
- }
-
- proc_desc = get_frame_extra_info (frame)->proc_desc;
- if (proc_desc == NULL)
- /* I'm not sure how/whether this can happen. Normally when we can't
- find a proc_desc, we "synthesize" one using heuristic_proc_desc
- and set the saved_regs right away. */
- return;
-
- /* Fill in the offsets for the registers which gen_mask says
- were saved. */
-
- reg_position = get_frame_base (frame) + PROC_REG_OFFSET (proc_desc);
- mask = PROC_REG_MASK (proc_desc);
-
- returnreg = PROC_PC_REG (proc_desc);
-
- /* Note that RA is always saved first, regardless of its actual
- register number. */
- if (mask & (1 << returnreg))
- {
- get_frame_saved_regs (frame)[returnreg] = reg_position;
- reg_position += 8;
- mask &= ~(1 << returnreg); /* Clear bit for RA so we
- don't save again later. */
- }
-
- for (ireg = 0; ireg <= 31; ++ireg)
- if (mask & (1 << ireg))
- {
- get_frame_saved_regs (frame)[ireg] = reg_position;
- reg_position += 8;
- }
+ /* Filter out any registers eliminated, but whose regnum is
+ reserved for backward compatibility, e.g. the vfp. */
+ if (REGISTER_NAME (regnum) == NULL || *REGISTER_NAME (regnum) == '\0')
+ return 0;
- /* Fill in the offsets for the registers which float_mask says
- were saved. */
+ if (group == all_reggroup)
+ return 1;
- reg_position = get_frame_base (frame) + PROC_FREG_OFFSET (proc_desc);
- mask = PROC_FREG_MASK (proc_desc);
+ /* Zero should not be saved or restored. Technically it is a general
+ register (just as $f31 would be a float if we represented it), but
+ there's no point displaying it during "info regs", so leave it out
+ of all groups except for "all". */
+ if (regnum == ALPHA_ZERO_REGNUM)
+ return 0;
- for (ireg = 0; ireg <= 31; ++ireg)
- if (mask & (1 << ireg))
- {
- get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
- reg_position += 8;
- }
+ /* All other registers are saved and restored. */
+ if (group == save_reggroup || group == restore_reggroup)
+ return 1;
- get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_saved_regs (frame)[returnreg];
-}
+ /* All other groups are non-overlapping. */
-static void
-alpha_frame_init_saved_regs (struct frame_info *fi)
-{
- if (get_frame_saved_regs (fi) == NULL)
- alpha_find_saved_regs (fi);
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi);
-}
+ /* Since this is really a PALcode memory slot... */
+ if (regnum == ALPHA_UNIQUE_REGNUM)
+ return group == system_reggroup;
-static CORE_ADDR
-alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev)
-{
- return (fromleaf
- ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev))
- : get_next_frame (prev)
- ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev))
- : read_pc ());
-}
+ /* Force the FPCR to be considered part of the floating point state. */
+ if (regnum == ALPHA_FPCR_REGNUM)
+ return group == float_reggroup;
-static CORE_ADDR
-read_next_frame_reg (struct frame_info *fi, int regno)
-{
- for (; fi; fi = get_next_frame (fi))
- {
- /* We have to get the saved sp from the sigcontext
- if it is a signal handler frame. */
- if (regno == SP_REGNUM && !(get_frame_type (fi) == SIGTRAMP_FRAME))
- return get_frame_base (fi);
- else
- {
- if (get_frame_saved_regs (fi) == NULL)
- alpha_find_saved_regs (fi);
- if (get_frame_saved_regs (fi)[regno])
- return read_memory_integer (get_frame_saved_regs (fi)[regno], 8);
- }
- }
- return read_register (regno);
+ if (regnum >= ALPHA_FP0_REGNUM && regnum < ALPHA_FP0_REGNUM + 31)
+ return group == float_reggroup;
+ else
+ return group == general_reggroup;
}
-static CORE_ADDR
-alpha_frame_saved_pc (struct frame_info *frame)
+static int
+alpha_register_byte (int regno)
{
- alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
- /* We have to get the saved pc from the sigcontext
- if it is a signal handler frame. */
- int pcreg = ((get_frame_type (frame) == SIGTRAMP_FRAME)
- ? PC_REGNUM
- : get_frame_extra_info (frame)->pc_reg);
-
- if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
- return read_memory_integer (get_frame_base (frame) - 8, 8);
-
- return read_next_frame_reg (frame, pcreg);
+ return (regno * 8);
}
-static CORE_ADDR
-alpha_saved_pc_after_call (struct frame_info *frame)
+static int
+alpha_register_raw_size (int regno)
{
- CORE_ADDR pc = get_frame_pc (frame);
- CORE_ADDR tmp;
- alpha_extra_func_info_t proc_desc;
- int pcreg;
-
- /* Skip over shared library trampoline if necessary. */
- tmp = SKIP_TRAMPOLINE_CODE (pc);
- if (tmp != 0)
- pc = tmp;
-
- proc_desc = find_proc_desc (pc, get_next_frame (frame));
- pcreg = proc_desc ? PROC_PC_REG (proc_desc) : ALPHA_RA_REGNUM;
-
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return alpha_frame_saved_pc (frame);
- else
- return read_register (pcreg);
+ return 8;
}
-
-static struct alpha_extra_func_info temp_proc_desc;
-static CORE_ADDR temp_saved_regs[ALPHA_NUM_REGS];
-
-/* Nonzero if instruction at PC is a return instruction. "ret
- $zero,($ra),1" on alpha. */
-
static int
-alpha_about_to_return (CORE_ADDR pc)
+alpha_register_virtual_size (int regno)
{
- return read_memory_integer (pc, 4) == 0x6bfa8001;
+ return 8;
}
+/* The following represents exactly the conversion performed by
+ the LDS instruction. This applies to both single-precision
+ floating point and 32-bit integers. */
-
-/* This fencepost looks highly suspicious to me. Removing it also
- seems suspicious as it could affect remote debugging across serial
- lines. */
-
-static CORE_ADDR
-heuristic_proc_start (CORE_ADDR pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR start_pc = pc;
- CORE_ADDR fence = start_pc - heuristic_fence_post;
-
- if (start_pc == 0)
- return 0;
-
- if (heuristic_fence_post == UINT_MAX
- || fence < tdep->vm_min_address)
- fence = tdep->vm_min_address;
-
- /* search back for previous return */
- for (start_pc -= 4;; start_pc -= 4)
- if (start_pc < fence)
- {
- /* It's not clear to me why we reach this point when
- stop_soon, but with this test, at least we
- don't print out warnings for every child forked (eg, on
- decstation). 22apr93 rich@cygnus.com. */
- if (stop_soon == NO_STOP_QUIETLY)
- {
- static int blurb_printed = 0;
-
- if (fence == tdep->vm_min_address)
- warning ("Hit beginning of text section without finding");
- else
- warning ("Hit heuristic-fence-post without finding");
-
- warning ("enclosing function for address 0x%s", paddr_nz (pc));
- if (!blurb_printed)
- {
- printf_filtered ("\
-This warning occurs if you are debugging a function without any symbols\n\
-(for example, in a stripped executable). In that case, you may wish to\n\
-increase the size of the search with the `set heuristic-fence-post' command.\n\
-\n\
-Otherwise, you told GDB there was a function where there isn't one, or\n\
-(more likely) you have encountered a bug in GDB.\n");
- blurb_printed = 1;
- }
- }
-
- return 0;
- }
- else if (alpha_about_to_return (start_pc))
- break;
-
- start_pc += 4; /* skip return */
- return start_pc;
-}
-
-static alpha_extra_func_info_t
-heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
- struct frame_info *next_frame)
+static void
+alpha_lds (void *out, const void *in)
{
- CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
- CORE_ADDR vfp = sp;
- CORE_ADDR cur_pc;
- int frame_size;
- int has_frame_reg = 0;
- unsigned long reg_mask = 0;
- int pcreg = -1;
- int regno;
-
- if (start_pc == 0)
- return NULL;
- memset (&temp_proc_desc, '\0', sizeof (temp_proc_desc));
- memset (&temp_saved_regs, '\0', SIZEOF_FRAME_SAVED_REGS);
- PROC_LOW_ADDR (&temp_proc_desc) = start_pc;
-
- if (start_pc + 200 < limit_pc)
- limit_pc = start_pc + 200;
- frame_size = 0;
- for (cur_pc = start_pc; cur_pc < limit_pc; cur_pc += 4)
+ ULONGEST mem = extract_unsigned_integer (in, 4);
+ ULONGEST frac = (mem >> 0) & 0x7fffff;
+ ULONGEST sign = (mem >> 31) & 1;
+ ULONGEST exp_msb = (mem >> 30) & 1;
+ ULONGEST exp_low = (mem >> 23) & 0x7f;
+ ULONGEST exp, reg;
+
+ exp = (exp_msb << 10) | exp_low;
+ if (exp_msb)
{
- char buf[4];
- unsigned long word;
- int status;
-
- status = read_memory_nobpt (cur_pc, buf, 4);
- if (status)
- memory_error (status, cur_pc);
- word = extract_unsigned_integer (buf, 4);
-
- if ((word & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
- {
- if (word & 0x8000)
- {
- /* Consider only the first stack allocation instruction
- to contain the static size of the frame. */
- if (frame_size == 0)
- frame_size += (-word) & 0xffff;
- }
- else
- /* Exit loop if a positive stack adjustment is found, which
- usually means that the stack cleanup code in the function
- epilogue is reached. */
- break;
- }
- else if ((word & 0xfc1f0000) == 0xb41e0000 /* stq reg,n($sp) */
- && (word & 0xffff0000) != 0xb7fe0000) /* reg != $zero */
- {
- int reg = (word & 0x03e00000) >> 21;
- reg_mask |= 1 << reg;
-
- /* Do not compute the address where the register was saved yet,
- because we don't know yet if the offset will need to be
- relative to $sp or $fp (we can not compute the address relative
- to $sp if $sp is updated during the execution of the current
- subroutine, for instance when doing some alloca). So just store
- the offset for the moment, and compute the address later
- when we know whether this frame has a frame pointer or not.
- */
- temp_saved_regs[reg] = (short) word;
-
- /* Starting with OSF/1-3.2C, the system libraries are shipped
- without local symbols, but they still contain procedure
- descriptors without a symbol reference. GDB is currently
- unable to find these procedure descriptors and uses
- heuristic_proc_desc instead.
- As some low level compiler support routines (__div*, __add*)
- use a non-standard return address register, we have to
- add some heuristics to determine the return address register,
- or stepping over these routines will fail.
- Usually the return address register is the first register
- saved on the stack, but assembler optimization might
- rearrange the register saves.
- So we recognize only a few registers (t7, t9, ra) within
- the procedure prologue as valid return address registers.
- If we encounter a return instruction, we extract the
- the return address register from it.
-
- FIXME: Rewriting GDB to access the procedure descriptors,
- e.g. via the minimal symbol table, might obviate this hack. */
- if (pcreg == -1
- && cur_pc < (start_pc + 80)
- && (reg == ALPHA_T7_REGNUM || reg == ALPHA_T9_REGNUM
- || reg == ALPHA_RA_REGNUM))
- pcreg = reg;
- }
- else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
- pcreg = (word >> 16) & 0x1f;
- else if (word == 0x47de040f || word == 0x47fe040f) /* bis sp,sp fp */
- {
- /* ??? I am not sure what instruction is 0x47fe040f, and I
- am suspecting that there was a typo and should have been
- 0x47fe040f. I'm keeping it in the test above until further
- investigation */
- has_frame_reg = 1;
- vfp = read_next_frame_reg (next_frame, ALPHA_GCC_FP_REGNUM);
- }
+ if (exp_low == 0x7f)
+ exp = 0x7ff;
}
- if (pcreg == -1)
- {
- /* If we haven't found a valid return address register yet,
- keep searching in the procedure prologue. */
- while (cur_pc < (limit_pc + 80) && cur_pc < (start_pc + 80))
- {
- char buf[4];
- unsigned long word;
-
- if (read_memory_nobpt (cur_pc, buf, 4))
- break;
- cur_pc += 4;
- word = extract_unsigned_integer (buf, 4);
-
- if ((word & 0xfc1f0000) == 0xb41e0000 /* stq reg,n($sp) */
- && (word & 0xffff0000) != 0xb7fe0000) /* reg != $zero */
- {
- int reg = (word & 0x03e00000) >> 21;
- if (reg == ALPHA_T7_REGNUM || reg == ALPHA_T9_REGNUM
- || reg == ALPHA_RA_REGNUM)
- {
- pcreg = reg;
- break;
- }
- }
- else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
- {
- pcreg = (word >> 16) & 0x1f;
- break;
- }
- }
- }
-
- if (has_frame_reg)
- PROC_FRAME_REG (&temp_proc_desc) = ALPHA_GCC_FP_REGNUM;
else
- PROC_FRAME_REG (&temp_proc_desc) = SP_REGNUM;
-
- /* At this point, we know which of the Stack Pointer or the Frame Pointer
- to use as the reference address to compute the saved registers address.
- But in both cases, the processing above has set vfp to this reference
- address, so just need to increment the offset of each saved register
- by this address. */
- for (regno = 0; regno < NUM_REGS; regno++)
{
- if (reg_mask & 1 << regno)
- temp_saved_regs[regno] += vfp;
+ if (exp_low != 0x00)
+ exp |= 0x380;
}
- PROC_FRAME_OFFSET (&temp_proc_desc) = frame_size;
- PROC_REG_MASK (&temp_proc_desc) = reg_mask;
- PROC_PC_REG (&temp_proc_desc) = (pcreg == -1) ? ALPHA_RA_REGNUM : pcreg;
- PROC_LOCALOFF (&temp_proc_desc) = 0; /* XXX - bogus */
- return &temp_proc_desc;
+ reg = (sign << 63) | (exp << 52) | (frac << 29);
+ store_unsigned_integer (out, 8, reg);
}
-/* This returns the PC of the first inst after the prologue. If we can't
- find the prologue, then return 0. */
+/* Similarly, this represents exactly the conversion performed by
+ the STS instruction. */
-static CORE_ADDR
-after_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+static inline void
+alpha_sts (void *out, const void *in)
{
- struct symtab_and_line sal;
- CORE_ADDR func_addr, func_end;
-
- if (!proc_desc)
- proc_desc = find_proc_desc (pc, NULL);
-
- if (proc_desc)
- {
- if (alpha_proc_desc_is_dyn_sigtramp (proc_desc))
- return PROC_LOW_ADDR (proc_desc); /* "prologue" is in kernel */
-
- /* If function is frameless, then we need to do it the hard way. I
- strongly suspect that frameless always means prologueless... */
- if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
- && PROC_FRAME_OFFSET (proc_desc) == 0)
- return 0;
- }
-
- if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- return 0; /* Unknown */
-
- sal = find_pc_line (func_addr, 0);
-
- if (sal.end < func_end)
- return sal.end;
+ ULONGEST reg, mem;
- /* The line after the prologue is after the end of the function. In this
- case, tell the caller to find the prologue the hard way. */
-
- return 0;
+ reg = extract_unsigned_integer (in, 8);
+ mem = ((reg >> 32) & 0xc0000000) | ((reg >> 29) & 0x3fffffff);
+ store_unsigned_integer (out, 4, mem);
}
-/* Return non-zero if we *might* be in a function prologue. Return zero if we
- are definitively *not* in a function prologue. */
+/* 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 or memory format is an integer with 4
+ bytes or less, as the representation of integers in floating point
+ registers is different. */
static int
-alpha_in_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+alpha_convert_register_p (int regno)
{
- CORE_ADDR after_prologue_pc;
-
- after_prologue_pc = after_prologue (pc, proc_desc);
-
- if (after_prologue_pc == 0
- || pc < after_prologue_pc)
- return 1;
- else
- return 0;
+ return (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31);
}
-static alpha_extra_func_info_t
-find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame)
+static void
+alpha_register_to_value (int regnum, struct type *valtype, char *in, char *out)
{
- alpha_extra_func_info_t proc_desc;
- struct block *b;
- struct symbol *sym;
- CORE_ADDR startaddr;
-
- /* Try to get the proc_desc from the linked call dummy proc_descs
- if the pc is in the call dummy.
- This is hairy. In the case of nested dummy calls we have to find the
- right proc_desc, but we might not yet know the frame for the dummy
- as it will be contained in the proc_desc we are searching for.
- So we have to find the proc_desc whose frame is closest to the current
- stack pointer. */
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
- {
- struct linked_proc_info *link;
- CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
- alpha_extra_func_info_t found_proc_desc = NULL;
- long min_distance = LONG_MAX;
-
- for (link = linked_proc_desc_table; link; link = link->next)
- {
- long distance = (CORE_ADDR) PROC_DUMMY_FRAME (&link->info) - sp;
- if (distance > 0 && distance < min_distance)
- {
- min_distance = distance;
- found_proc_desc = &link->info;
- }
- }
- if (found_proc_desc != NULL)
- return found_proc_desc;
- }
-
- b = block_for_pc (pc);
-
- find_pc_partial_function (pc, NULL, &startaddr, NULL);
- if (b == NULL)
- sym = NULL;
- else
- {
- if (startaddr > BLOCK_START (b))
- /* This is the "pathological" case referred to in a comment in
- print_frame_info. It might be better to move this check into
- symbol reading. */
- sym = NULL;
- else
- sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN,
- 0, NULL);
- }
-
- /* If we never found a PDR for this function in symbol reading, then
- examine prologues to find the information. */
- if (sym && ((mips_extra_func_info_t) SYMBOL_VALUE (sym))->pdr.framereg == -1)
- sym = NULL;
-
- if (sym)
- {
- /* IF this is the topmost frame AND
- * (this proc does not have debugging information OR
- * the PC is in the procedure prologue)
- * THEN create a "heuristic" proc_desc (by analyzing
- * the actual code) to replace the "official" proc_desc.
- */
- proc_desc = (alpha_extra_func_info_t) SYMBOL_VALUE (sym);
- if (next_frame == NULL)
- {
- if (PROC_DESC_IS_DUMMY (proc_desc) || alpha_in_prologue (pc, proc_desc))
- {
- alpha_extra_func_info_t found_heuristic =
- heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
- pc, next_frame);
- if (found_heuristic)
- {
- PROC_LOCALOFF (found_heuristic) =
- PROC_LOCALOFF (proc_desc);
- PROC_PC_REG (found_heuristic) = PROC_PC_REG (proc_desc);
- proc_desc = found_heuristic;
- }
- }
- }
- }
- else
+ switch (TYPE_LENGTH (valtype))
{
- long offset;
-
- /* Is linked_proc_desc_table really necessary? It only seems to be used
- by procedure call dummys. However, the procedures being called ought
- to have their own proc_descs, and even if they don't,
- heuristic_proc_desc knows how to create them! */
-
- register struct linked_proc_info *link;
- for (link = linked_proc_desc_table; link; link = link->next)
- if (PROC_LOW_ADDR (&link->info) <= pc
- && PROC_HIGH_ADDR (&link->info) > pc)
- return &link->info;
-
- /* If PC is inside a dynamically generated sigtramp handler,
- create and push a procedure descriptor for that code: */
- offset = alpha_dynamic_sigtramp_offset (pc);
- if (offset >= 0)
- return push_sigtramp_desc (pc - offset);
-
- /* If heuristic_fence_post is non-zero, determine the procedure
- start address by examining the instructions.
- This allows us to find the start address of static functions which
- have no symbolic information, as startaddr would have been set to
- the preceding global function start address by the
- find_pc_partial_function call above. */
- if (startaddr == 0 || heuristic_fence_post != 0)
- startaddr = heuristic_proc_start (pc);
-
- proc_desc =
- heuristic_proc_desc (startaddr, pc, next_frame);
+ case 4:
+ alpha_sts (out, in);
+ break;
+ case 8:
+ memcpy (out, in, 8);
+ break;
+ default:
+ error ("Cannot retrieve value from floating point register");
}
- return proc_desc;
-}
-
-alpha_extra_func_info_t cached_proc_desc;
-
-static CORE_ADDR
-alpha_frame_chain (struct frame_info *frame)
-{
- alpha_extra_func_info_t proc_desc;
- CORE_ADDR saved_pc = DEPRECATED_FRAME_SAVED_PC (frame);
-
- if (saved_pc == 0 || inside_entry_file (saved_pc))
- return 0;
-
- proc_desc = find_proc_desc (saved_pc, frame);
- if (!proc_desc)
- return 0;
-
- cached_proc_desc = proc_desc;
-
- /* Fetch the frame pointer for a dummy frame from the procedure
- descriptor. */
- if (PROC_DESC_IS_DUMMY (proc_desc))
- return (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc);
-
- /* If no frame pointer and frame size is zero, we must be at end
- of stack (or otherwise hosed). If we don't check frame size,
- we loop forever if we see a zero size frame. */
- if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
- && PROC_FRAME_OFFSET (proc_desc) == 0
- /* The previous frame from a sigtramp frame might be frameless
- and have frame size zero. */
- && !(get_frame_type (frame) == SIGTRAMP_FRAME))
- return alpha_frame_past_sigtramp_frame (frame, saved_pc);
- else
- return read_next_frame_reg (frame, PROC_FRAME_REG (proc_desc))
- + PROC_FRAME_OFFSET (proc_desc);
-}
-
-void
-alpha_print_extra_frame_info (struct frame_info *fi)
-{
- if (fi
- && get_frame_extra_info (fi)
- && get_frame_extra_info (fi)->proc_desc
- && get_frame_extra_info (fi)->proc_desc->pdr.framereg < NUM_REGS)
- printf_filtered (" frame pointer is at %s+%s\n",
- REGISTER_NAME (get_frame_extra_info (fi)->proc_desc->pdr.framereg),
- paddr_d (get_frame_extra_info (fi)->proc_desc->pdr.frameoffset));
}
static void
-alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
+alpha_value_to_register (struct type *valtype, int regnum, char *in, char *out)
{
- /* Use proc_desc calculated in frame_chain */
- alpha_extra_func_info_t proc_desc =
- get_next_frame (frame)
- ? cached_proc_desc
- : find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
-
- frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
-
- /* NOTE: cagney/2003-01-03: No need to set saved_regs to NULL,
- always NULL by default. */
- /* frame->saved_regs = NULL; */
- get_frame_extra_info (frame)->localoff = 0;
- get_frame_extra_info (frame)->pc_reg = ALPHA_RA_REGNUM;
- get_frame_extra_info (frame)->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc;
- if (proc_desc)
+ switch (TYPE_LENGTH (valtype))
{
- /* Get the locals offset and the saved pc register from the
- procedure descriptor, they are valid even if we are in the
- middle of the prologue. */
- get_frame_extra_info (frame)->localoff = PROC_LOCALOFF (proc_desc);
- get_frame_extra_info (frame)->pc_reg = PROC_PC_REG (proc_desc);
-
- /* Fixup frame-pointer - only needed for top frame */
-
- /* Fetch the frame pointer for a dummy frame from the procedure
- descriptor. */
- if (PROC_DESC_IS_DUMMY (proc_desc))
- deprecated_update_frame_base_hack (frame, (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc));
-
- /* This may not be quite right, if proc has a real frame register.
- Get the value of the frame relative sp, procedure might have been
- interrupted by a signal at it's very start. */
- else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc)
- && !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
- deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), SP_REGNUM));
- else
- deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), PROC_FRAME_REG (proc_desc))
- + PROC_FRAME_OFFSET (proc_desc));
-
- if (proc_desc == &temp_proc_desc)
- {
- char *name;
-
- /* Do not set the saved registers for a sigtramp frame,
- alpha_find_saved_registers will do that for us. We can't
- use (get_frame_type (frame) == SIGTRAMP_FRAME), it is not
- yet set. */
- /* FIXME: cagney/2002-11-18: This problem will go away once
- frame.c:get_prev_frame() is modified to set the frame's
- type before calling functions like this. */
- find_pc_partial_function (get_frame_pc (frame), &name,
- (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (!PC_IN_SIGTRAMP (get_frame_pc (frame), name))
- {
- frame_saved_regs_zalloc (frame);
- memcpy (get_frame_saved_regs (frame), temp_saved_regs,
- SIZEOF_FRAME_SAVED_REGS);
- get_frame_saved_regs (frame)[PC_REGNUM]
- = get_frame_saved_regs (frame)[ALPHA_RA_REGNUM];
- }
- }
+ case 4:
+ alpha_lds (out, in);
+ break;
+ case 8:
+ memcpy (out, in, 8);
+ break;
+ default:
+ error ("Cannot store value in floating point register");
}
}
-static CORE_ADDR
-alpha_frame_locals_address (struct frame_info *fi)
-{
- return (get_frame_base (fi) - get_frame_extra_info (fi)->localoff);
-}
-
-static CORE_ADDR
-alpha_frame_args_address (struct frame_info *fi)
-{
- return (get_frame_base (fi) - (ALPHA_NUM_ARG_REGS * 8));
-}
-
-/* ALPHA stack frames are almost impenetrable. When execution stops,
- we basically have to look at symbol information for the function
- that we stopped in, which tells us *which* register (if any) is
- the base of the frame pointer, and what offset from that register
- the frame itself is at.
-
- This presents a problem when trying to examine a stack in memory
- (that isn't executing at the moment), using the "frame" command. We
- don't have a PC, nor do we have any registers except SP.
-
- This routine takes two arguments, SP and PC, and tries to make the
- cached frames look as if these two arguments defined a frame on the
- cache. This allows the rest of info frame to extract the important
- arguments without difficulty. */
-
-struct frame_info *
-alpha_setup_arbitrary_frame (int argc, CORE_ADDR *argv)
-{
- if (argc != 2)
- error ("ALPHA frame specifications require two arguments: sp and pc");
+
+/* The alpha passes the first six arguments in the registers, the rest on
+ the stack. The register arguments are stored in ARG_REG_BUFFER, and
+ then moved into the register file; this simplifies the passing of a
+ large struct which extends from the registers to the stack, plus avoids
+ three ptrace invocations per word.
- return create_new_frame (argv[0], argv[1]);
-}
+ We don't bother tracking which register values should go in integer
+ regs or fp regs; we load the same values into both.
-/* The alpha passes the first six arguments in the registers, the rest on
- the stack. The register arguments are eventually transferred to the
- argument transfer area immediately below the stack by the called function
- anyway. So we `push' at least six arguments on the stack, `reload' the
- argument registers and then adjust the stack pointer to point past the
- sixth argument. This algorithm simplifies the passing of a large struct
- which extends from the registers to the stack.
If the called function is returning a structure, the address of the
structure to be returned is passed as a hidden first argument. */
static CORE_ADDR
-alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr,
+ int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
int i;
int accumulate_size = struct_return ? 8 : 0;
- int arg_regs_size = ALPHA_NUM_ARG_REGS * 8;
struct alpha_arg
{
char *contents;
int len;
int offset;
};
- struct alpha_arg *alpha_args =
- (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg));
+ struct alpha_arg *alpha_args
+ = (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg));
register struct alpha_arg *m_arg;
- char raw_buffer[sizeof (CORE_ADDR)];
+ char arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS];
int required_arg_regs;
+ /* The ABI places the address of the called function in T12. */
+ regcache_cooked_write_signed (regcache, ALPHA_T12_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point
+ of the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, ALPHA_RA_REGNUM, bp_addr);
+
+ /* Lay out the arguments in memory. */
for (i = 0, m_arg = alpha_args; i < nargs; i++, m_arg++)
{
struct value *arg = args[i];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+
/* Cast argument to long if necessary as the compiler does it too. */
switch (TYPE_CODE (arg_type))
{
@@ -1112,12 +297,66 @@ alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
case TYPE_CODE_CHAR:
case TYPE_CODE_RANGE:
case TYPE_CODE_ENUM:
- if (TYPE_LENGTH (arg_type) < TYPE_LENGTH (builtin_type_long))
+ if (TYPE_LENGTH (arg_type) == 4)
+ {
+ /* 32-bit values must be sign-extended to 64 bits
+ even if the base data type is unsigned. */
+ arg_type = builtin_type_int32;
+ arg = value_cast (arg_type, arg);
+ }
+ if (TYPE_LENGTH (arg_type) < ALPHA_REGISTER_SIZE)
+ {
+ arg_type = builtin_type_int64;
+ arg = value_cast (arg_type, arg);
+ }
+ break;
+
+ case TYPE_CODE_FLT:
+ /* "float" arguments loaded in registers must be passed in
+ register format, aka "double". */
+ if (accumulate_size < sizeof (arg_reg_buffer)
+ && TYPE_LENGTH (arg_type) == 4)
{
- arg_type = builtin_type_long;
+ arg_type = builtin_type_ieee_double_little;
arg = value_cast (arg_type, arg);
}
+ /* Tru64 5.1 has a 128-bit long double, and passes this by
+ invisible reference. No one else uses this data type. */
+ else if (TYPE_LENGTH (arg_type) == 16)
+ {
+ /* Allocate aligned storage. */
+ sp = (sp & -16) - 16;
+
+ /* Write the real data into the stack. */
+ write_memory (sp, VALUE_CONTENTS (arg), 16);
+
+ /* Construct the indirection. */
+ arg_type = lookup_pointer_type (arg_type);
+ arg = value_from_pointer (arg_type, sp);
+ }
+ break;
+
+ case TYPE_CODE_COMPLEX:
+ /* ??? The ABI says that complex values are passed as two
+ separate scalar values. This distinction only matters
+ for complex float. However, GCC does not implement this. */
+
+ /* Tru64 5.1 has a 128-bit long double, and passes this by
+ invisible reference. */
+ if (TYPE_LENGTH (arg_type) == 32)
+ {
+ /* Allocate aligned storage. */
+ sp = (sp & -16) - 16;
+
+ /* Write the real data into the stack. */
+ write_memory (sp, VALUE_CONTENTS (arg), 32);
+
+ /* Construct the indirection. */
+ arg_type = lookup_pointer_type (arg_type);
+ arg = value_from_pointer (arg_type, sp);
+ }
break;
+
default:
break;
}
@@ -1134,225 +373,268 @@ alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
required_arg_regs = ALPHA_NUM_ARG_REGS;
/* Make room for the arguments on the stack. */
- if (accumulate_size < arg_regs_size)
- accumulate_size = arg_regs_size;
+ if (accumulate_size < sizeof(arg_reg_buffer))
+ accumulate_size = 0;
+ else
+ accumulate_size -= sizeof(arg_reg_buffer);
sp -= accumulate_size;
- /* Keep sp aligned to a multiple of 16 as the compiler does it too. */
+ /* Keep sp aligned to a multiple of 16 as the ABI requires. */
sp &= ~15;
/* `Push' arguments on the stack. */
for (i = nargs; m_arg--, --i >= 0;)
- write_memory (sp + m_arg->offset, m_arg->contents, m_arg->len);
- if (struct_return)
{
- /* NOTE: cagney/2003-05-09: Using sizeof CORE_ADDR here is just
- wrong. */
- store_unsigned_integer (raw_buffer, sizeof (CORE_ADDR), struct_addr);
- write_memory (sp, raw_buffer, sizeof (CORE_ADDR));
+ char *contents = m_arg->contents;
+ int offset = m_arg->offset;
+ int len = m_arg->len;
+
+ /* Copy the bytes destined for registers into arg_reg_buffer. */
+ if (offset < sizeof(arg_reg_buffer))
+ {
+ if (offset + len <= sizeof(arg_reg_buffer))
+ {
+ memcpy (arg_reg_buffer + offset, contents, len);
+ continue;
+ }
+ else
+ {
+ int tlen = sizeof(arg_reg_buffer) - offset;
+ memcpy (arg_reg_buffer + offset, contents, tlen);
+ offset += tlen;
+ contents += tlen;
+ len -= tlen;
+ }
+ }
+
+ /* Everything else goes to the stack. */
+ write_memory (sp + offset - sizeof(arg_reg_buffer), contents, len);
}
+ if (struct_return)
+ store_unsigned_integer (arg_reg_buffer, ALPHA_REGISTER_SIZE, struct_addr);
/* Load the argument registers. */
for (i = 0; i < required_arg_regs; i++)
{
- LONGEST val;
-
- val = read_memory_integer (sp + i * 8, 8);
- write_register (ALPHA_A0_REGNUM + i, val);
- write_register (ALPHA_FPA0_REGNUM + i, val);
+ regcache_cooked_write (regcache, ALPHA_A0_REGNUM + i,
+ arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
+ regcache_cooked_write (regcache, ALPHA_FPA0_REGNUM + i,
+ arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
}
- return sp + arg_regs_size;
-}
+ /* Finally, update the stack pointer. */
+ regcache_cooked_write_signed (regcache, ALPHA_SP_REGNUM, sp);
-static void
-alpha_push_dummy_frame (void)
-{
- int ireg;
- struct linked_proc_info *link;
- alpha_extra_func_info_t proc_desc;
- CORE_ADDR sp = read_register (SP_REGNUM);
- CORE_ADDR save_address;
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
- unsigned long mask;
-
- link = (struct linked_proc_info *) xmalloc (sizeof (struct linked_proc_info));
- link->next = linked_proc_desc_table;
- linked_proc_desc_table = link;
-
- proc_desc = &link->info;
-
- /*
- * The registers we must save are all those not preserved across
- * procedure calls.
- * In addition, we must save the PC and RA.
- *
- * Dummy frame layout:
- * (high memory)
- * Saved PC
- * Saved F30
- * ...
- * Saved F0
- * Saved R29
- * ...
- * Saved R0
- * Saved R26 (RA)
- * Parameter build area
- * (low memory)
- */
-
-/* MASK(i,j) == (1<<i) + (1<<(i+1)) + ... + (1<<j)). Assume i<=j<31. */
-#define MASK(i,j) ((((LONGEST)1 << ((j)+1)) - 1) ^ (((LONGEST)1 << (i)) - 1))
-#define GEN_REG_SAVE_MASK (MASK(0,8) | MASK(16,29))
-#define GEN_REG_SAVE_COUNT 24
-#define FLOAT_REG_SAVE_MASK (MASK(0,1) | MASK(10,30))
-#define FLOAT_REG_SAVE_COUNT 23
- /* The special register is the PC as we have no bit for it in the save masks.
- alpha_frame_saved_pc knows where the pc is saved in a dummy frame. */
-#define SPECIAL_REG_SAVE_COUNT 1
-
- PROC_REG_MASK (proc_desc) = GEN_REG_SAVE_MASK;
- PROC_FREG_MASK (proc_desc) = FLOAT_REG_SAVE_MASK;
- /* PROC_REG_OFFSET is the offset from the dummy frame to the saved RA,
- but keep SP aligned to a multiple of 16. */
- PROC_REG_OFFSET (proc_desc) =
- -((8 * (SPECIAL_REG_SAVE_COUNT
- + GEN_REG_SAVE_COUNT
- + FLOAT_REG_SAVE_COUNT)
- + 15) & ~15);
- PROC_FREG_OFFSET (proc_desc) =
- PROC_REG_OFFSET (proc_desc) + 8 * GEN_REG_SAVE_COUNT;
-
- /* Save general registers.
- The return address register is the first saved register, all other
- registers follow in ascending order.
- The PC is saved immediately below the SP. */
- save_address = sp + PROC_REG_OFFSET (proc_desc);
- store_unsigned_integer (raw_buffer, 8, read_register (ALPHA_RA_REGNUM));
- write_memory (save_address, raw_buffer, 8);
- save_address += 8;
- mask = PROC_REG_MASK (proc_desc) & 0xffffffffL;
- for (ireg = 0; mask; ireg++, mask >>= 1)
- if (mask & 1)
- {
- if (ireg == ALPHA_RA_REGNUM)
- continue;
- store_unsigned_integer (raw_buffer, 8, read_register (ireg));
- write_memory (save_address, raw_buffer, 8);
- save_address += 8;
- }
-
- store_unsigned_integer (raw_buffer, 8, read_register (PC_REGNUM));
- write_memory (sp - 8, raw_buffer, 8);
-
- /* Save floating point registers. */
- save_address = sp + PROC_FREG_OFFSET (proc_desc);
- mask = PROC_FREG_MASK (proc_desc) & 0xffffffffL;
- for (ireg = 0; mask; ireg++, mask >>= 1)
- if (mask & 1)
- {
- store_unsigned_integer (raw_buffer, 8, read_register (ireg + FP0_REGNUM));
- write_memory (save_address, raw_buffer, 8);
- save_address += 8;
- }
-
- /* Set and save the frame address for the dummy.
- This is tricky. The only registers that are suitable for a frame save
- are those that are preserved across procedure calls (s0-s6). But if
- a read system call is interrupted and then a dummy call is made
- (see testsuite/gdb.t17/interrupt.exp) the dummy call hangs till the read
- is satisfied. Then it returns with the s0-s6 registers set to the values
- on entry to the read system call and our dummy frame pointer would be
- destroyed. So we save the dummy frame in the proc_desc and handle the
- retrieval of the frame pointer of a dummy specifically. The frame register
- is set to the virtual frame (pseudo) register, it's value will always
- be read as zero and will help us to catch any errors in the dummy frame
- retrieval code. */
- PROC_DUMMY_FRAME (proc_desc) = sp;
- PROC_FRAME_REG (proc_desc) = DEPRECATED_FP_REGNUM;
- PROC_FRAME_OFFSET (proc_desc) = 0;
- sp += PROC_REG_OFFSET (proc_desc);
- write_register (SP_REGNUM, sp);
-
- PROC_LOW_ADDR (proc_desc) = CALL_DUMMY_ADDRESS ();
- PROC_HIGH_ADDR (proc_desc) = PROC_LOW_ADDR (proc_desc) + 4;
-
- SET_PROC_DESC_IS_DUMMY (proc_desc);
- PROC_PC_REG (proc_desc) = ALPHA_RA_REGNUM;
+ return sp;
}
+/* Extract from REGCACHE the value about to be returned from a function
+ and copy it into VALBUF. */
+
static void
-alpha_pop_frame (void)
+alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
+ void *valbuf)
{
- register int regnum;
- struct frame_info *frame = get_current_frame ();
- CORE_ADDR new_sp = get_frame_base (frame);
+ int length = TYPE_LENGTH (valtype);
+ char raw_buffer[ALPHA_REGISTER_SIZE];
+ ULONGEST l;
+
+ switch (TYPE_CODE (valtype))
+ {
+ case TYPE_CODE_FLT:
+ switch (length)
+ {
+ case 4:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, raw_buffer);
+ alpha_sts (valbuf, raw_buffer);
+ break;
- alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+ case 8:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
- /* we need proc_desc to know how to restore the registers;
- if it is NULL, construct (a temporary) one */
- if (proc_desc == NULL)
- proc_desc = find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
+ case 16:
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
+ read_memory (l, valbuf, 16);
+ break;
- /* Question: should we copy this proc_desc and save it in
- frame->proc_desc? If we do, who will free it?
- For now, we don't save a copy... */
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
- write_register (PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
- if (get_frame_saved_regs (frame) == NULL)
- alpha_find_saved_regs (frame);
- if (proc_desc)
- {
- for (regnum = 32; --regnum >= 0;)
- if (PROC_REG_MASK (proc_desc) & (1 << regnum))
- write_register (regnum,
- read_memory_integer (get_frame_saved_regs (frame)[regnum],
- 8));
- for (regnum = 32; --regnum >= 0;)
- if (PROC_FREG_MASK (proc_desc) & (1 << regnum))
- write_register (regnum + FP0_REGNUM,
- read_memory_integer (get_frame_saved_regs (frame)[regnum + FP0_REGNUM], 8));
+ case TYPE_CODE_COMPLEX:
+ switch (length)
+ {
+ case 8:
+ /* ??? This isn't correct wrt the ABI, but it's what GCC does. */
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
+
+ case 16:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM+1,
+ (char *)valbuf + 8);
+ break;
+
+ case 32:
+ regcache_cooked_read_signed (regcache, ALPHA_V0_REGNUM, &l);
+ read_memory (l, valbuf, 32);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
+
+ default:
+ /* Assume everything else degenerates to an integer. */
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
+ store_unsigned_integer (valbuf, length, l);
+ break;
}
- write_register (SP_REGNUM, new_sp);
- flush_cached_frames ();
+}
- if (proc_desc && (PROC_DESC_IS_DUMMY (proc_desc)
- || alpha_proc_desc_is_dyn_sigtramp (proc_desc)))
- {
- struct linked_proc_info *pi_ptr, *prev_ptr;
+/* Extract from REGCACHE the address of a structure about to be returned
+ from a function. */
+
+static CORE_ADDR
+alpha_extract_struct_value_address (struct regcache *regcache)
+{
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &addr);
+ return addr;
+}
+
+/* Insert the given value into REGCACHE as if it was being
+ returned by a function. */
+
+static void
+alpha_store_return_value (struct type *valtype, struct regcache *regcache,
+ const void *valbuf)
+{
+ int length = TYPE_LENGTH (valtype);
+ char raw_buffer[ALPHA_REGISTER_SIZE];
+ ULONGEST l;
- for (pi_ptr = linked_proc_desc_table, prev_ptr = NULL;
- pi_ptr != NULL;
- prev_ptr = pi_ptr, pi_ptr = pi_ptr->next)
+ switch (TYPE_CODE (valtype))
+ {
+ case TYPE_CODE_FLT:
+ switch (length)
{
- if (&pi_ptr->info == proc_desc)
- break;
+ case 4:
+ alpha_lds (raw_buffer, valbuf);
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, raw_buffer);
+ break;
+
+ case 8:
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
+
+ case 16:
+ /* FIXME: 128-bit long doubles are returned like structures:
+ by writing into indirect storage provided by the caller
+ as the first argument. */
+ error ("Cannot set a 128-bit long double return value.");
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
}
+ break;
- if (pi_ptr == NULL)
- error ("Can't locate dummy extra frame info\n");
+ case TYPE_CODE_COMPLEX:
+ switch (length)
+ {
+ case 8:
+ /* ??? This isn't correct wrt the ABI, but it's what GCC does. */
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
- if (prev_ptr != NULL)
- prev_ptr->next = pi_ptr->next;
- else
- linked_proc_desc_table = pi_ptr->next;
+ case 16:
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, valbuf);
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM+1,
+ (const char *)valbuf + 8);
+ break;
+
+ case 32:
+ /* FIXME: 128-bit long doubles are returned like structures:
+ by writing into indirect storage provided by the caller
+ as the first argument. */
+ error ("Cannot set a 128-bit long double return value.");
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
- xfree (pi_ptr);
+ default:
+ /* Assume everything else degenerates to an integer. */
+ /* 32-bit values must be sign-extended to 64 bits
+ even if the base data type is unsigned. */
+ if (length == 4)
+ valtype = builtin_type_int32;
+ l = unpack_long (valtype, valbuf);
+ regcache_cooked_write_unsigned (regcache, ALPHA_V0_REGNUM, l);
+ break;
}
}
+
+
+static const unsigned char *
+alpha_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+ static const unsigned char alpha_breakpoint[] =
+ { 0x80, 0, 0, 0 }; /* call_pal bpt */
+
+ *lenptr = sizeof(alpha_breakpoint);
+ return (alpha_breakpoint);
+}
+
+/* This returns the PC of the first insn after the prologue.
+ If we can't find the prologue, then return 0. */
+
+CORE_ADDR
+alpha_after_prologue (CORE_ADDR pc)
+{
+ struct symtab_and_line sal;
+ CORE_ADDR func_addr, func_end;
+
+ if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+ return 0;
+
+ sal = find_pc_line (func_addr, 0);
+ if (sal.end < func_end)
+ return sal.end;
+
+ /* The line after the prologue is after the end of the function. In this
+ case, tell the caller to find the prologue the hard way. */
+ return 0;
+}
+
+/* Read an instruction from memory at PC, looking through breakpoints. */
+
+unsigned int
+alpha_read_insn (CORE_ADDR pc)
+{
+ char buf[4];
+ int status;
+
+ status = read_memory_nobpt (pc, buf, 4);
+ if (status)
+ memory_error (status, pc);
+ return extract_unsigned_integer (buf, 4);
+}
+
/* To skip prologues, I use this predicate. Returns either PC itself
if the code at PC does not look like a function prologue; otherwise
returns an address that (if we're lucky) follows the prologue. If
LENIENT, then we must skip everything which is involved in setting
up the frame (it's OK to skip more, just so long as we don't skip
- anything which might clobber the registers which are being saved.
- Currently we must not skip more on the alpha, but we might need the
- lenient stuff some day. */
+ anything which might clobber the registers which are being saved. */
static CORE_ADDR
-alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
+alpha_skip_prologue (CORE_ADDR pc)
{
unsigned long inst;
int offset;
@@ -1373,8 +655,7 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
If so, then return either PC, or the PC after the prologue, whichever
is greater. */
- post_prologue_pc = after_prologue (pc, NULL);
-
+ post_prologue_pc = alpha_after_prologue (pc);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
@@ -1386,17 +667,7 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
or in the gcc frame. */
for (offset = 0; offset < 100; offset += 4)
{
- int status;
-
- status = read_memory_nobpt (pc + offset, buf, 4);
- if (status)
- memory_error (status, pc + offset);
- inst = extract_unsigned_integer (buf, 4);
-
- /* The alpha has no delay slots. But let's keep the lenient stuff,
- we might need it for something else in the future. */
- if (lenient && 0)
- continue;
+ inst = alpha_read_insn (pc + offset);
if ((inst & 0xffff0000) == 0x27bb0000) /* ldah $gp,n($t12) */
continue;
@@ -1407,15 +678,14 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
if ((inst & 0xffe01fff) == 0x43c0153e) /* subq $sp,n,$sp */
continue;
- if ((inst & 0xfc1f0000) == 0xb41e0000
- && (inst & 0xffff0000) != 0xb7fe0000)
- continue; /* stq reg,n($sp) */
- /* reg != $zero */
- if ((inst & 0xfc1f0000) == 0x9c1e0000
- && (inst & 0xffff0000) != 0x9ffe0000)
- continue; /* stt reg,n($sp) */
- /* reg != $zero */
- if (inst == 0x47de040f) /* bis sp,sp,fp */
+ if (((inst & 0xfc1f0000) == 0xb41e0000 /* stq reg,n($sp) */
+ || (inst & 0xfc1f0000) == 0x9c1e0000) /* stt reg,n($sp) */
+ && (inst & 0x03e00000) != 0x03e00000) /* reg != $zero */
+ continue;
+
+ if (inst == 0x47de040f) /* bis sp,sp,fp */
+ continue;
+ if (inst == 0x47fe040f) /* bis zero,sp,fp */
continue;
break;
@@ -1423,135 +693,534 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
return pc + offset;
}
-static CORE_ADDR
-alpha_skip_prologue (CORE_ADDR addr)
+
+/* Figure out where the longjmp will land.
+ We expect the first arg to be a pointer to the jmp_buf structure from
+ which we extract the PC (JB_PC) that we will land at. The PC is copied
+ into the "pc". This routine returns true on success. */
+
+static int
+alpha_get_longjmp_target (CORE_ADDR *pc)
{
- return (alpha_skip_prologue_internal (addr, 0));
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR jb_addr;
+ char raw_buffer[ALPHA_REGISTER_SIZE];
+
+ jb_addr = read_register (ALPHA_A0_REGNUM);
+
+ if (target_read_memory (jb_addr + (tdep->jb_pc * tdep->jb_elt_size),
+ raw_buffer, tdep->jb_elt_size))
+ return 0;
+
+ *pc = extract_unsigned_integer (raw_buffer, tdep->jb_elt_size);
+ return 1;
}
-#if 0
-/* Is address PC in the prologue (loosely defined) for function at
- STARTADDR? */
+
+/* Frame unwinder for signal trampolines. We use alpha tdep bits that
+ describe the location and shape of the sigcontext structure. After
+ that, all registers are in memory, so it's easy. */
+/* ??? Shouldn't we be able to do this generically, rather than with
+ OSABI data specific to Alpha? */
+
+struct alpha_sigtramp_unwind_cache
+{
+ CORE_ADDR sigcontext_addr;
+};
-static int
-alpha_in_lenient_prologue (CORE_ADDR startaddr, CORE_ADDR pc)
+static struct alpha_sigtramp_unwind_cache *
+alpha_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache)
{
- CORE_ADDR end_prologue = alpha_skip_prologue_internal (startaddr, 1);
- return pc >= startaddr && pc < end_prologue;
+ struct alpha_sigtramp_unwind_cache *info;
+ struct gdbarch_tdep *tdep;
+
+ if (*this_prologue_cache)
+ return *this_prologue_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
+ *this_prologue_cache = info;
+
+ tdep = gdbarch_tdep (current_gdbarch);
+ info->sigcontext_addr = tdep->sigcontext_addr (next_frame);
+
+ return info;
}
+
+/* Return the address of REGNO in a sigtramp frame. Since this is all
+ arithmetic, it doesn't seem worthwhile to cache it. */
+
+#ifndef SIGFRAME_PC_OFF
+#define SIGFRAME_PC_OFF (2 * 8)
+#define SIGFRAME_REGSAVE_OFF (4 * 8)
+#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_REGSAVE_OFF + 32 * 8 + 8)
#endif
-/* 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
- or
- memory format is an integer with 4 bytes or less, as the representation
- of integers in floating point registers is different. */
+static CORE_ADDR
+alpha_sigtramp_register_address (CORE_ADDR sigcontext_addr, unsigned int regno)
+{
+ if (regno < 32)
+ return sigcontext_addr + SIGFRAME_REGSAVE_OFF + regno * 8;
+ if (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 32)
+ return sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + regno * 8;
+ if (regno == ALPHA_PC_REGNUM)
+ return sigcontext_addr + SIGFRAME_PC_OFF;
+
+ return 0;
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
+
static void
-alpha_register_convert_to_virtual (int regnum, struct type *valtype,
- char *raw_buffer, char *virtual_buffer)
+alpha_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
{
- if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
- {
- memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (regnum));
- return;
- }
+ struct alpha_sigtramp_unwind_cache *info
+ = alpha_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ struct gdbarch_tdep *tdep;
+ CORE_ADDR stack_addr, code_addr;
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
- {
- double d = deprecated_extract_floating (raw_buffer, REGISTER_RAW_SIZE (regnum));
- deprecated_store_floating (virtual_buffer, TYPE_LENGTH (valtype), d);
- }
- else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4)
+ /* If the OSABI couldn't locate the sigcontext, give up. */
+ if (info->sigcontext_addr == 0)
+ return;
+
+ /* If we have dynamic signal trampolines, find their start.
+ If we do not, then we must assume there is a symbol record
+ that can provide the start address. */
+ tdep = gdbarch_tdep (current_gdbarch);
+ if (tdep->dynamic_sigtramp_offset)
{
- ULONGEST l;
- l = extract_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum));
- l = ((l >> 32) & 0xc0000000) | ((l >> 29) & 0x3fffffff);
- store_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype), l);
+ int offset;
+ code_addr = frame_pc_unwind (next_frame);
+ offset = tdep->dynamic_sigtramp_offset (code_addr);
+ if (offset >= 0)
+ code_addr -= offset;
+ else
+ code_addr = 0;
}
else
- error ("Cannot retrieve value from floating point register");
+ code_addr = frame_func_unwind (next_frame);
+
+ /* The stack address is trivially read from the sigcontext. */
+ stack_addr = alpha_sigtramp_register_address (info->sigcontext_addr,
+ ALPHA_SP_REGNUM);
+ stack_addr = get_frame_memory_unsigned (next_frame, stack_addr,
+ ALPHA_REGISTER_SIZE);
+
+ *this_id = frame_id_build (stack_addr, code_addr);
}
+/* Retrieve the value of REGNUM in FRAME. Don't give up! */
+
static void
-alpha_register_convert_to_raw (struct type *valtype, int regnum,
- char *virtual_buffer, char *raw_buffer)
+alpha_sigtramp_frame_prev_register (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
{
- if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
+ struct alpha_sigtramp_unwind_cache *info
+ = alpha_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ CORE_ADDR addr;
+
+ if (info->sigcontext_addr != 0)
{
- memcpy (raw_buffer, virtual_buffer, REGISTER_RAW_SIZE (regnum));
- return;
+ /* All integer and fp registers are stored in memory. */
+ addr = alpha_sigtramp_register_address (info->sigcontext_addr, regnum);
+ if (addr != 0)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = addr;
+ *realnump = -1;
+ if (bufferp != NULL)
+ get_frame_memory (next_frame, addr, bufferp, ALPHA_REGISTER_SIZE);
+ return;
+ }
}
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
+ /* This extra register may actually be in the sigcontext, but our
+ current description of it in alpha_sigtramp_frame_unwind_cache
+ doesn't include it. Too bad. Fall back on whatever's in the
+ outer frame. */
+ frame_register (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+static const struct frame_unwind alpha_sigtramp_frame_unwind = {
+ SIGTRAMP_FRAME,
+ alpha_sigtramp_frame_this_id,
+ alpha_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+alpha_sigtramp_frame_p (CORE_ADDR pc)
+{
+ char *name;
+
+ /* We shouldn't even bother to try if the OSABI didn't register
+ a sigcontext_addr handler. */
+ if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr)
+ return NULL;
+
+ /* Otherwise we should be in a signal frame. */
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return &alpha_sigtramp_frame_unwind;
+
+ return NULL;
+}
+
+/* Fallback alpha frame unwinder. Uses instruction scanning and knows
+ something about the traditional layout of alpha stack frames. */
+
+struct alpha_heuristic_unwind_cache
+{
+ CORE_ADDR *saved_regs;
+ CORE_ADDR vfp;
+ CORE_ADDR start_pc;
+ int return_reg;
+};
+
+/* Heuristic_proc_start may hunt through the text section for a long
+ time across a 2400 baud serial line. Allows the user to limit this
+ search. */
+static unsigned int heuristic_fence_post = 0;
+
+/* Attempt to locate the start of the function containing PC. We assume that
+ the previous function ends with an about_to_return insn. Not foolproof by
+ any means, since gcc is happy to put the epilogue in the middle of a
+ function. But we're guessing anyway... */
+
+static CORE_ADDR
+alpha_heuristic_proc_start (CORE_ADDR pc)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR last_non_nop = pc;
+ CORE_ADDR fence = pc - heuristic_fence_post;
+ CORE_ADDR orig_pc = pc;
+ CORE_ADDR func;
+
+ if (pc == 0)
+ return 0;
+
+ /* First see if we can find the start of the function from minimal
+ symbol information. This can succeed with a binary that doesn't
+ have debug info, but hasn't been stripped. */
+ func = get_pc_function_start (pc);
+ if (func)
+ return func;
+
+ if (heuristic_fence_post == UINT_MAX
+ || fence < tdep->vm_min_address)
+ fence = tdep->vm_min_address;
+
+ /* Search back for previous return; also stop at a 0, which might be
+ seen for instance before the start of a code section. Don't include
+ nops, since this usually indicates padding between functions. */
+ for (pc -= 4; pc >= fence; pc -= 4)
{
- double d = deprecated_extract_floating (virtual_buffer, TYPE_LENGTH (valtype));
- deprecated_store_floating (raw_buffer, REGISTER_RAW_SIZE (regnum), d);
+ unsigned int insn = alpha_read_insn (pc);
+ switch (insn)
+ {
+ case 0: /* invalid insn */
+ case 0x6bfa8001: /* ret $31,($26),1 */
+ return last_non_nop;
+
+ case 0x2ffe0000: /* unop: ldq_u $31,0($30) */
+ case 0x47ff041f: /* nop: bis $31,$31,$31 */
+ break;
+
+ default:
+ last_non_nop = pc;
+ break;
+ }
}
- else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4)
+
+ /* It's not clear to me why we reach this point when stopping quietly,
+ but with this test, at least we don't print out warnings for every
+ child forked (eg, on decstation). 22apr93 rich@cygnus.com. */
+ if (stop_soon == NO_STOP_QUIETLY)
{
- ULONGEST l;
- if (TYPE_UNSIGNED (valtype))
- l = extract_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype));
+ static int blurb_printed = 0;
+
+ if (fence == tdep->vm_min_address)
+ warning ("Hit beginning of text section without finding");
else
- l = extract_signed_integer (virtual_buffer, TYPE_LENGTH (valtype));
- l = ((l & 0xc0000000) << 32) | ((l & 0x3fffffff) << 29);
- store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), l);
+ warning ("Hit heuristic-fence-post without finding");
+ warning ("enclosing function for address 0x%s", paddr_nz (orig_pc));
+
+ if (!blurb_printed)
+ {
+ printf_filtered ("\
+This warning occurs if you are debugging a function without any symbols\n\
+(for example, in a stripped executable). In that case, you may wish to\n\
+increase the size of the search with the `set heuristic-fence-post' command.\n\
+\n\
+Otherwise, you told GDB there was a function where there isn't one, or\n\
+(more likely) you have encountered a bug in GDB.\n");
+ blurb_printed = 1;
+ }
}
- else
- error ("Cannot store value in floating point register");
+
+ return 0;
}
-static const unsigned char *
-alpha_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+static struct alpha_heuristic_unwind_cache *
+alpha_heuristic_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ CORE_ADDR start_pc)
{
- static const unsigned char alpha_breakpoint[] =
- { 0x80, 0, 0, 0 }; /* call_pal bpt */
+ struct alpha_heuristic_unwind_cache *info;
+ ULONGEST val;
+ CORE_ADDR limit_pc, cur_pc;
+ int frame_reg, frame_size, return_reg, reg;
- *lenptr = sizeof(alpha_breakpoint);
- return (alpha_breakpoint);
+ if (*this_prologue_cache)
+ return *this_prologue_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache);
+ *this_prologue_cache = info;
+ info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+
+ limit_pc = frame_pc_unwind (next_frame);
+ if (start_pc == 0)
+ start_pc = alpha_heuristic_proc_start (limit_pc);
+ info->start_pc = start_pc;
+
+ frame_reg = ALPHA_SP_REGNUM;
+ frame_size = 0;
+ return_reg = -1;
+
+ /* If we've identified a likely place to start, do code scanning. */
+ if (start_pc != 0)
+ {
+ /* Limit the forward search to 50 instructions. */
+ if (start_pc + 200 < limit_pc)
+ limit_pc = start_pc + 200;
+
+ for (cur_pc = start_pc; cur_pc < limit_pc; cur_pc += 4)
+ {
+ unsigned int word = alpha_read_insn (cur_pc);
+
+ if ((word & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
+ {
+ if (word & 0x8000)
+ {
+ /* Consider only the first stack allocation instruction
+ to contain the static size of the frame. */
+ if (frame_size == 0)
+ frame_size = (-word) & 0xffff;
+ }
+ else
+ {
+ /* Exit loop if a positive stack adjustment is found, which
+ usually means that the stack cleanup code in the function
+ epilogue is reached. */
+ break;
+ }
+ }
+ else if ((word & 0xfc1f0000) == 0xb41e0000) /* stq reg,n($sp) */
+ {
+ reg = (word & 0x03e00000) >> 21;
+
+ if (reg == 31)
+ continue;
+
+ /* Do not compute the address where the register was saved yet,
+ because we don't know yet if the offset will need to be
+ relative to $sp or $fp (we can not compute the address
+ relative to $sp if $sp is updated during the execution of
+ the current subroutine, for instance when doing some alloca).
+ So just store the offset for the moment, and compute the
+ address later when we know whether this frame has a frame
+ pointer or not. */
+ /* Hack: temporarily add one, so that the offset is non-zero
+ and we can tell which registers have save offsets below. */
+ info->saved_regs[reg] = (word & 0xffff) + 1;
+
+ /* Starting with OSF/1-3.2C, the system libraries are shipped
+ without local symbols, but they still contain procedure
+ descriptors without a symbol reference. GDB is currently
+ unable to find these procedure descriptors and uses
+ heuristic_proc_desc instead.
+ As some low level compiler support routines (__div*, __add*)
+ use a non-standard return address register, we have to
+ add some heuristics to determine the return address register,
+ or stepping over these routines will fail.
+ Usually the return address register is the first register
+ saved on the stack, but assembler optimization might
+ rearrange the register saves.
+ So we recognize only a few registers (t7, t9, ra) within
+ the procedure prologue as valid return address registers.
+ If we encounter a return instruction, we extract the
+ the return address register from it.
+
+ FIXME: Rewriting GDB to access the procedure descriptors,
+ e.g. via the minimal symbol table, might obviate this hack. */
+ if (return_reg == -1
+ && cur_pc < (start_pc + 80)
+ && (reg == ALPHA_T7_REGNUM
+ || reg == ALPHA_T9_REGNUM
+ || reg == ALPHA_RA_REGNUM))
+ return_reg = reg;
+ }
+ else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
+ return_reg = (word >> 16) & 0x1f;
+ else if (word == 0x47de040f) /* bis sp,sp,fp */
+ frame_reg = ALPHA_GCC_FP_REGNUM;
+ else if (word == 0x47fe040f) /* bis zero,sp,fp */
+ frame_reg = ALPHA_GCC_FP_REGNUM;
+ }
+
+ /* If we haven't found a valid return address register yet, keep
+ searching in the procedure prologue. */
+ if (return_reg == -1)
+ {
+ while (cur_pc < (limit_pc + 80) && cur_pc < (start_pc + 80))
+ {
+ unsigned int word = alpha_read_insn (cur_pc);
+
+ if ((word & 0xfc1f0000) == 0xb41e0000) /* stq reg,n($sp) */
+ {
+ reg = (word & 0x03e00000) >> 21;
+ if (reg == ALPHA_T7_REGNUM
+ || reg == ALPHA_T9_REGNUM
+ || reg == ALPHA_RA_REGNUM)
+ {
+ return_reg = reg;
+ break;
+ }
+ }
+ else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
+ {
+ return_reg = (word >> 16) & 0x1f;
+ break;
+ }
+
+ cur_pc += 4;
+ }
+ }
+ }
+
+ /* Failing that, do default to the customary RA. */
+ if (return_reg == -1)
+ return_reg = ALPHA_RA_REGNUM;
+ info->return_reg = return_reg;
+
+ frame_unwind_unsigned_register (next_frame, frame_reg, &val);
+ info->vfp = val + frame_size;
+
+ /* Convert offsets to absolute addresses. See above about adding
+ one to the offsets to make all detected offsets non-zero. */
+ for (reg = 0; reg < ALPHA_NUM_REGS; ++reg)
+ if (info->saved_regs[reg])
+ info->saved_regs[reg] += val - 1;
+
+ return info;
}
-/* Given a return value in `regbuf' with a type `valtype',
- extract and copy its value into `valbuf'. */
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
static void
-alpha_extract_return_value (struct type *valtype,
- char regbuf[ALPHA_REGISTER_BYTES], char *valbuf)
+alpha_heuristic_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
{
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
- alpha_register_convert_to_virtual (FP0_REGNUM, valtype,
- regbuf + REGISTER_BYTE (FP0_REGNUM),
- valbuf);
- else
- memcpy (valbuf, regbuf + REGISTER_BYTE (ALPHA_V0_REGNUM),
- TYPE_LENGTH (valtype));
+ struct alpha_heuristic_unwind_cache *info
+ = alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
+
+ /* This is meant to halt the backtrace at "_start". Make sure we
+ don't halt it at a generic dummy frame. */
+ if (inside_entry_file (info->start_pc))
+ return;
+
+ *this_id = frame_id_build (info->vfp, info->start_pc);
}
-/* Given a return value in `regbuf' with a type `valtype',
- write its value into the appropriate register. */
+/* Retrieve the value of REGNUM in FRAME. Don't give up! */
static void
-alpha_store_return_value (struct type *valtype, char *valbuf)
+alpha_heuristic_frame_prev_register (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
{
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
- int regnum = ALPHA_V0_REGNUM;
- int length = TYPE_LENGTH (valtype);
+ struct alpha_heuristic_unwind_cache *info
+ = alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
+
+ /* The PC of the previous frame is stored in the link register of
+ the current frame. Frob regnum so that we pull the value from
+ the correct place. */
+ if (regnum == ALPHA_PC_REGNUM)
+ regnum = info->return_reg;
+
+ /* For all registers known to be saved in the current frame,
+ do the obvious and pull the value out. */
+ if (info->saved_regs[regnum])
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = info->saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ get_frame_memory (next_frame, *addrp, bufferp, ALPHA_REGISTER_SIZE);
+ return;
+ }
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
+ /* The stack pointer of the previous frame is computed by popping
+ the current stack frame. */
+ if (regnum == ALPHA_SP_REGNUM)
{
- regnum = FP0_REGNUM;
- length = REGISTER_RAW_SIZE (regnum);
- alpha_register_convert_to_raw (valtype, regnum, valbuf, raw_buffer);
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_unsigned_integer (bufferp, ALPHA_REGISTER_SIZE, info->vfp);
+ return;
}
- else
- memcpy (raw_buffer, valbuf, length);
- deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, length);
+ /* Otherwise assume the next frame has the same register value. */
+ frame_register (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+static const struct frame_unwind alpha_heuristic_frame_unwind = {
+ NORMAL_FRAME,
+ alpha_heuristic_frame_this_id,
+ alpha_heuristic_frame_prev_register
+};
+
+static const struct frame_unwind *
+alpha_heuristic_frame_p (CORE_ADDR pc)
+{
+ return &alpha_heuristic_frame_unwind;
+}
+
+static CORE_ADDR
+alpha_heuristic_frame_base_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_heuristic_unwind_cache *info
+ = alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
+
+ return info->vfp;
}
+static const struct frame_base alpha_heuristic_frame_base = {
+ &alpha_heuristic_frame_unwind,
+ alpha_heuristic_frame_base_address,
+ alpha_heuristic_frame_base_address,
+ alpha_heuristic_frame_base_address
+};
+
/* Just like reinit_frame_cache, but with the right arguments to be
- callable as an sfunc. */
+ callable as an sfunc. Used by the "set heuristic-fence-post" command. */
static void
reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
@@ -1559,83 +1228,120 @@ reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
reinit_frame_cache ();
}
-/* This is the definition of CALL_DUMMY_ADDRESS. It's a heuristic that is used
- to find a convenient place in the text segment to stick a breakpoint to
- detect the completion of a target function call (ala call_function_by_hand).
- */
-
-CORE_ADDR
-alpha_call_dummy_address (void)
-{
- CORE_ADDR entry;
- struct minimal_symbol *sym;
+
+/* ALPHA stack frames are almost impenetrable. When execution stops,
+ we basically have to look at symbol information for the function
+ that we stopped in, which tells us *which* register (if any) is
+ the base of the frame pointer, and what offset from that register
+ the frame itself is at.
- entry = entry_point_address ();
+ This presents a problem when trying to examine a stack in memory
+ (that isn't executing at the moment), using the "frame" command. We
+ don't have a PC, nor do we have any registers except SP.
- if (entry != 0)
- return entry;
+ This routine takes two arguments, SP and PC, and tries to make the
+ cached frames look as if these two arguments defined a frame on the
+ cache. This allows the rest of info frame to extract the important
+ arguments without difficulty. */
- sym = lookup_minimal_symbol ("_Prelude", NULL, symfile_objfile);
+struct frame_info *
+alpha_setup_arbitrary_frame (int argc, CORE_ADDR *argv)
+{
+ if (argc != 2)
+ error ("ALPHA frame specifications require two arguments: sp and pc");
- if (!sym || MSYMBOL_TYPE (sym) != mst_text)
- return 0;
- else
- return SYMBOL_VALUE_ADDRESS (sym) + 4;
+ return create_new_frame (argv[0], argv[1]);
}
-static void
-alpha_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
+/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
+ dummy frame. The frame ID's base needs to match the TOS value
+ saved by save_dummy_frame_tos(), and the PC match the dummy frame's
+ breakpoint. */
+
+static struct frame_id
+alpha_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- CORE_ADDR bp_address = CALL_DUMMY_ADDRESS ();
+ ULONGEST base;
+ frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &base);
+ return frame_id_build (base, frame_pc_unwind (next_frame));
+}
- if (bp_address == 0)
- error ("no place to put call");
- write_register (ALPHA_RA_REGNUM, bp_address);
- write_register (ALPHA_T12_REGNUM, fun);
+static CORE_ADDR
+alpha_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ ULONGEST pc;
+ frame_unwind_unsigned_register (next_frame, ALPHA_PC_REGNUM, &pc);
+ return pc;
}
-/* On the Alpha, the call dummy code is nevery copied to user space
- (see alpha_fix_call_dummy() above). The contents of this do not
- matter. */
-LONGEST alpha_call_dummy_words[] = { 0 };
+
+/* Helper routines for alpha*-nat.c files to move register sets to and
+ from core files. The UNIQUE pointer is allowed to be NULL, as most
+ targets don't supply this value in their core files. */
-static void
-alpha_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+void
+alpha_supply_int_regs (int regno, const void *r0_r30,
+ const void *pc, const void *unique)
{
- /* Store the address of the place in which to copy the structure the
- subroutine will return. Handled by alpha_push_arguments. */
+ int i;
+
+ for (i = 0; i < 31; ++i)
+ if (regno == i || regno == -1)
+ supply_register (i, (const char *)r0_r30 + i*8);
+
+ if (regno == ALPHA_ZERO_REGNUM || regno == -1)
+ supply_register (ALPHA_ZERO_REGNUM, NULL);
+
+ if (regno == ALPHA_PC_REGNUM || regno == -1)
+ supply_register (ALPHA_PC_REGNUM, pc);
+
+ if (regno == ALPHA_UNIQUE_REGNUM || regno == -1)
+ supply_register (ALPHA_UNIQUE_REGNUM, unique);
}
-static CORE_ADDR
-alpha_extract_struct_value_address (char *regbuf)
+void
+alpha_fill_int_regs (int regno, void *r0_r30, void *pc, void *unique)
{
- return (extract_address (regbuf + REGISTER_BYTE (ALPHA_V0_REGNUM),
- REGISTER_RAW_SIZE (ALPHA_V0_REGNUM)));
-}
+ int i;
-/* Figure out where the longjmp will land.
- We expect the first arg to be a pointer to the jmp_buf structure from
- which we extract the PC (JB_PC) that we will land at. The PC is copied
- into the "pc". This routine returns true on success. */
+ for (i = 0; i < 31; ++i)
+ if (regno == i || regno == -1)
+ regcache_collect (i, (char *)r0_r30 + i*8);
-static int
-alpha_get_longjmp_target (CORE_ADDR *pc)
+ if (regno == ALPHA_PC_REGNUM || regno == -1)
+ regcache_collect (ALPHA_PC_REGNUM, pc);
+
+ if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1))
+ regcache_collect (ALPHA_UNIQUE_REGNUM, unique);
+}
+
+void
+alpha_supply_fp_regs (int regno, const void *f0_f30, const void *fpcr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR jb_addr;
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
+ int i;
- jb_addr = read_register (ALPHA_A0_REGNUM);
+ for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
+ if (regno == i || regno == -1)
+ supply_register (i, (const char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
- if (target_read_memory (jb_addr + (tdep->jb_pc * tdep->jb_elt_size),
- raw_buffer, tdep->jb_elt_size))
- return 0;
+ if (regno == ALPHA_FPCR_REGNUM || regno == -1)
+ supply_register (ALPHA_FPCR_REGNUM, fpcr);
+}
- *pc = extract_address (raw_buffer, tdep->jb_elt_size);
- return 1;
+void
+alpha_fill_fp_regs (int regno, void *f0_f30, void *fpcr)
+{
+ int i;
+
+ for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
+ if (regno == i || regno == -1)
+ regcache_collect (i, (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
+
+ if (regno == ALPHA_FPCR_REGNUM || regno == -1)
+ regcache_collect (ALPHA_FPCR_REGNUM, fpcr);
}
+
/* alpha_software_single_step() is called just before we want to resume
the inferior, if we want to single-step it but there is no hardware
or kernel single-step support (NetBSD on Alpha, for example). We find
@@ -1652,7 +1358,7 @@ alpha_next_pc (CORE_ADDR pc)
int offset;
LONGEST rav;
- insn = read_memory_unsigned_integer (pc, sizeof (insn));
+ insn = alpha_read_insn (pc);
/* Opcode is top 6 bits. */
op = (insn >> 26) & 0x3f;
@@ -1715,6 +1421,8 @@ alpha_next_pc (CORE_ADDR pc)
if (rav >= 0)
goto branch_taken;
break;
+
+ /* ??? Missing floating-point branches. */
}
}
@@ -1746,7 +1454,6 @@ alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p)
}
-
/* Initialize the current architecture based on INFO. If possible, re-use an
architecture from ARCHES, which is a list of architectures already created
during this debugging session.
@@ -1776,12 +1483,11 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
- /* Lowest text address. This is used by heuristic_proc_start() to
- decide when to stop looking. */
+ /* Lowest text address. This is used by heuristic_proc_start()
+ to decide when to stop looking. */
tdep->vm_min_address = (CORE_ADDR) 0x120000000;
tdep->dynamic_sigtramp_offset = NULL;
- tdep->skip_sigtramp_frame = NULL;
tdep->sigcontext_addr = NULL;
tdep->jb_pc = -1; /* longjmp support not enabled by default */
@@ -1799,76 +1505,48 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Register info */
set_gdbarch_num_regs (gdbarch, ALPHA_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, ALPHA_SP_REGNUM);
- set_gdbarch_deprecated_fp_regnum (gdbarch, ALPHA_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ALPHA_PC_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM);
set_gdbarch_register_name (gdbarch, alpha_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE);
- set_gdbarch_deprecated_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
- set_gdbarch_register_byte (gdbarch, alpha_register_byte);
- set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
- set_gdbarch_register_virtual_size (gdbarch, alpha_register_virtual_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
- ALPHA_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, alpha_register_virtual_type);
+ set_gdbarch_deprecated_register_byte (gdbarch, alpha_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, alpha_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, alpha_register_virtual_size);
+ set_gdbarch_register_type (gdbarch, alpha_register_type);
set_gdbarch_cannot_fetch_register (gdbarch, alpha_cannot_fetch_register);
set_gdbarch_cannot_store_register (gdbarch, alpha_cannot_store_register);
- set_gdbarch_register_convertible (gdbarch, alpha_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- alpha_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, alpha_register_convert_to_raw);
+ set_gdbarch_convert_register_p (gdbarch, alpha_convert_register_p);
+ set_gdbarch_register_to_value (gdbarch, alpha_register_to_value);
+ set_gdbarch_value_to_register (gdbarch, alpha_value_to_register);
+ set_gdbarch_register_reggroup_p (gdbarch, alpha_register_reggroup_p);
+
+ /* Prologue heuristics. */
set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ /* Disassembler. */
+ set_gdbarch_print_insn (gdbarch, print_insn_alpha);
+
+ /* Call info. */
set_gdbarch_frameless_function_invocation (gdbarch,
generic_frameless_function_invocation_not);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, alpha_saved_pc_after_call);
-
- set_gdbarch_deprecated_frame_chain (gdbarch, alpha_frame_chain);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
-
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
- set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
-
- set_gdbarch_deprecated_store_struct_return (gdbarch, alpha_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, alpha_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
+ set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, alpha_store_return_value);
+ set_gdbarch_extract_struct_value_address (gdbarch,
alpha_extract_struct_value_address);
/* Settings for calling functions in the inferior. */
- set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_deprecated_push_arguments (gdbarch, alpha_push_arguments);
- set_gdbarch_deprecated_pop_frame (gdbarch, alpha_pop_frame);
-
- /* On the Alpha, the call dummy code is never copied to user space,
- stopping the user call is achieved via a bp_call_dummy breakpoint.
- But we need a fake CALL_DUMMY definition to enable the proper
- call_function_by_hand and to avoid zero length array warnings. */
- set_gdbarch_deprecated_call_dummy_words (gdbarch, alpha_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_frame_args_address (gdbarch, alpha_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, alpha_frame_locals_address);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, alpha_init_extra_frame_info);
-
- /* Alpha OSF/1 inhibits execution of code on the stack. But there is
- no need for a dummy on the Alpha. PUSH_ARGUMENTS takes care of all
- argument handling and bp_call_dummy takes care of stopping the dummy. */
- set_gdbarch_call_dummy_address (gdbarch, alpha_call_dummy_address);
- set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
- set_gdbarch_deprecated_init_frame_pc_first (gdbarch, alpha_init_frame_pc_first);
+ set_gdbarch_push_dummy_call (gdbarch, alpha_push_dummy_call);
+
+ /* Methods for saving / extracting a dummy frame's ID. */
+ set_gdbarch_unwind_dummy_id (gdbarch, alpha_unwind_dummy_id);
+
+ /* Return the unwound PC value. */
+ set_gdbarch_unwind_pc (gdbarch, alpha_unwind_pc);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
@@ -1888,37 +1566,30 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (tdep->jb_pc >= 0)
set_gdbarch_get_longjmp_target (gdbarch, alpha_get_longjmp_target);
+ frame_unwind_append_predicate (gdbarch, alpha_sigtramp_frame_p);
+ frame_unwind_append_predicate (gdbarch, alpha_heuristic_frame_p);
+
+ frame_base_set_default (gdbarch, &alpha_heuristic_frame_base);
+
return gdbarch;
}
-static void
-alpha_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+void
+alpha_dwarf2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep == NULL)
- return;
-
- fprintf_unfiltered (file,
- "alpha_dump_tdep: vm_min_address = 0x%lx\n",
- (long) tdep->vm_min_address);
-
- fprintf_unfiltered (file,
- "alpha_dump_tdep: jb_pc = %d\n",
- tdep->jb_pc);
- fprintf_unfiltered (file,
- "alpha_dump_tdep: jb_elt_size = %ld\n",
- (long) tdep->jb_elt_size);
+ frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
+ frame_base_append_predicate (gdbarch, dwarf2_frame_base_p);
+ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
}
+extern initialize_file_ftype _initialize_alpha_tdep; /* -Wmissing-prototypes */
+
void
_initialize_alpha_tdep (void)
{
struct cmd_list_element *c;
- gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, alpha_dump_tdep);
-
- deprecated_tm_print_insn = print_insn_alpha;
+ gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, NULL);
/* Let the user set the fence post for heuristic_proc_start. */
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 0e8aefbfe16..c0e28e65772 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -34,33 +34,24 @@
register state. */
#define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8)
-/* Largest value REGISTER_RAW_SIZE can have. */
-#define ALPHA_MAX_REGISTER_RAW_SIZE 8
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8
-
/* Register numbers of various important registers. Note that most of
these values are "real" register numbers, and correspond to the
- general registers of the machine, and DEPRECATED_FP_REGNUM is a
- "phony" register number which is too large to be an actual register
- number as far as the user is concerned but serves to get the
- desired value when passed to read_register. */
+ general registers of the machine. */
#define ALPHA_V0_REGNUM 0 /* Function integer return value */
#define ALPHA_T7_REGNUM 8 /* Return address register for OSF/1 __add* */
#define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */
#define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */
#define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */
+#define ALPHA_RA_REGNUM 26 /* Contains return address value */
#define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */
+#define ALPHA_GP_REGNUM 29 /* Contains the global pointer */
#define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */
-#define ALPHA_RA_REGNUM 26 /* Contains return address value */
#define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */
#define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */
#define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */
#define ALPHA_FPCR_REGNUM 63 /* Floating point control register */
#define ALPHA_PC_REGNUM 64 /* Contains program counter */
-#define ALPHA_FP_REGNUM 65 /* Virtual frame pointer */
#define ALPHA_UNIQUE_REGNUM 66 /* PAL_rduniq value */
/* The alpha has two different virtual pointers for arguments and locals.
@@ -80,19 +71,15 @@
/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
- CORE_ADDR vm_min_address; /* used by heuristic_proc_start */
+ CORE_ADDR vm_min_address; /* Used by alpha_heuristic_proc_start. */
/* If PC is inside a dynamically-generated signal trampoline function
(i.e. one copied onto the user stack at run-time), return how many
bytes PC is beyond the start of that function. Otherwise, return -1. */
LONGEST (*dynamic_sigtramp_offset) (CORE_ADDR);
- /* If FRAME refers to a sigtramp frame, return the address of the next
- frame. */
- CORE_ADDR (*skip_sigtramp_frame) (struct frame_info *, CORE_ADDR);
-
- /* Translate a signal handler frame into the address of the sigcontext
- structure for that signal handler. */
+ /* Translate a signal handler stack base address into the address of
+ the sigcontext structure for that signal handler. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
int jb_pc; /* Offset to PC value in jump buffer.
@@ -101,6 +88,17 @@ struct gdbarch_tdep
size_t jb_elt_size; /* And the size of each entry in the buf. */
};
-void alpha_software_single_step (enum target_signal, int);
+extern unsigned int alpha_read_insn (CORE_ADDR pc);
+extern void alpha_software_single_step (enum target_signal, int);
+extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc);
+
+extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *);
+extern void alpha_dwarf2_init_abi (struct gdbarch_info, struct gdbarch *);
+
+extern void alpha_supply_int_regs (int, const void *, const void *,
+ const void *);
+extern void alpha_fill_int_regs (int, void *, void *, void *);
+extern void alpha_supply_fp_regs (int, const void *, const void *);
+extern void alpha_fill_fp_regs (int, void *, void *);
#endif /* ALPHA_TDEP_H */
diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c
index a20b36f575e..0781698710f 100644
--- a/gdb/alphabsd-nat.c
+++ b/gdb/alphabsd-nat.c
@@ -75,7 +75,6 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
static int
getregs_supplies (int regno)
{
-
return ((regno >= ALPHA_V0_REGNUM && regno <= ALPHA_ZERO_REGNUM)
|| regno >= PC_REGNUM);
}
@@ -87,7 +86,6 @@ getregs_supplies (int regno)
void
fetch_inferior_registers (int regno)
{
-
if (regno == -1 || getregs_supplies (regno))
{
struct reg gregs;
@@ -111,9 +109,6 @@ fetch_inferior_registers (int regno)
alphabsd_supply_fpreg ((char *) &fpregs, regno);
}
-
- /* Reset virtual frame pointer. */
- supply_register (DEPRECATED_FP_REGNUM, NULL);
}
/* Store register REGNO back into the inferior. If REGNO is -1, do
@@ -122,7 +117,6 @@ fetch_inferior_registers (int regno)
void
store_inferior_registers (int regno)
{
-
if (regno == -1 || getregs_supplies (regno))
{
struct reg gregs;
diff --git a/gdb/alphabsd-tdep.c b/gdb/alphabsd-tdep.c
index 39a9b1ae77e..3e0f2272787 100644
--- a/gdb/alphabsd-tdep.c
+++ b/gdb/alphabsd-tdep.c
@@ -19,84 +19,37 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "regcache.h"
#include "alpha-tdep.h"
#include "alphabsd-tdep.h"
-/* Number of general-purpose registers. */
-#define NUM_GREGS 32
-
-/* Number of floating-point registers. */
-#define NUM_FPREGS 31
-
/* Conviently, GDB uses the same register numbering as the
ptrace register structure used by BSD on Alpha. */
void
alphabsd_supply_reg (char *regs, int regno)
{
- int i;
-
- for (i = 0; i < NUM_GREGS; i++)
- {
- if (i == regno || regno == -1)
- {
- if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
- else
- supply_register (i, regs + (i * 8));
- }
- }
-
- /* The PC travels in the ZERO slot. */
- if (regno == PC_REGNUM || regno == -1)
- supply_register (PC_REGNUM, regs + (31 * 8));
+ /* PC is at slot 32; UNIQUE not present. */
+ alpha_supply_int_regs (regno, regs, regs + 31*8, NULL);
}
void
alphabsd_fill_reg (char *regs, int regno)
{
- int i;
-
- for (i = 0; i < NUM_GREGS; i++)
- if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, regs + (i * 8));
-
- /* The PC travels in the ZERO slot. */
- if (regno == PC_REGNUM || regno == -1)
- regcache_collect (PC_REGNUM, regs + (31 * 8));
+ /* PC is at slot 32; UNIQUE not present. */
+ alpha_fill_int_regs (regno, regs, regs + 31*8, NULL);
}
void
alphabsd_supply_fpreg (char *fpregs, int regno)
{
- int i;
-
- for (i = FP0_REGNUM; i < FP0_REGNUM + NUM_FPREGS; i++)
- {
- if (i == regno || regno == -1)
- {
- if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
- else
- supply_register (i, fpregs + ((i - FP0_REGNUM) * 8));
- }
- }
-
- if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- supply_register (ALPHA_FPCR_REGNUM, fpregs + (32 * 8));
+ /* FPCR is at slot 33; slot 32 unused. */
+ alpha_supply_fp_regs (regno, fpregs, fpregs + 32*8);
}
void
alphabsd_fill_fpreg (char *fpregs, int regno)
{
- int i;
-
- for (i = FP0_REGNUM; i < FP0_REGNUM + NUM_FPREGS; i++)
- if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, fpregs + ((i - FP0_REGNUM) * 8));
-
- if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_collect (ALPHA_FPCR_REGNUM, fpregs + (32 * 8));
+ /* FPCR is at slot 33; slot 32 unused. */
+ alpha_fill_fp_regs (regno, fpregs, fpregs + 32*8);
}
diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c
index 3d8eafb2927..680e303f587 100644
--- a/gdb/alphafbsd-tdep.c
+++ b/gdb/alphafbsd-tdep.c
@@ -68,6 +68,12 @@ alphafbsd_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* Hook into the DWARF CFI frame unwinder. */
+ alpha_dwarf2_init_abi (info, gdbarch);
+
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
+
set_gdbarch_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index a4a77c1c00c..efb7ab9b47d 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -70,7 +70,6 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
for (regno = 0; regno < ALPHA_ZERO_REGNUM; regno++)
supply_register (regno, regs + (regmap[regno] * 8));
supply_register (ALPHA_ZERO_REGNUM, NULL);
- supply_register (DEPRECATED_FP_REGNUM, NULL);
supply_register (PC_REGNUM, regs + (28 * 8));
/* Floating point registers. */
@@ -190,21 +189,7 @@ alphanbsd_sigcontext_addr (struct frame_info *frame)
/* FIXME: This is not correct for all versions of NetBSD/alpha.
We will probably need to disassemble the trampoline to figure
out which trampoline frame type we have. */
- return frame->frame;
-}
-
-static CORE_ADDR
-alphanbsd_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
-{
- char *name;
-
- /* FIXME: This is not correct for all versions of NetBSD/alpha.
- We will probably need to disassemble the trampoline to figure
- out which trampoline frame type we have. */
- find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (PC_IN_SIGTRAMP (pc, name))
- return frame->frame;
- return 0;
+ return get_frame_base (frame);
}
static void
@@ -213,6 +198,12 @@ alphanbsd_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* Hook into the DWARF CFI frame unwinder. */
+ alpha_dwarf2_init_abi (info, gdbarch);
+
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
+
set_gdbarch_pc_in_sigtramp (gdbarch, alphanbsd_pc_in_sigtramp);
/* NetBSD/alpha does not provide single step support via ptrace(2); we
@@ -222,7 +213,6 @@ alphanbsd_init_abi (struct gdbarch_info info,
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
- tdep->skip_sigtramp_frame = alphanbsd_skip_sigtramp_frame;
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 8d31ffe41de..9fa9ceade9d 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -239,14 +239,7 @@ default_double_format (struct gdbarch *gdbarch)
/* Misc helper functions for targets. */
int
-frame_num_args_unknown (struct frame_info *fi)
-{
- return -1;
-}
-
-
-int
-generic_register_convertible_not (int num)
+deprecated_register_convertible_not (int num)
{
return 0;
}
@@ -375,12 +368,6 @@ cannot_register_not (int regnum)
return 0;
}
-CORE_ADDR
-generic_bfd_entry_point (struct gdbarch *gdbarch, bfd *abfd)
-{
- return bfd_get_start_address (abfd);
-}
-
/* Legacy version of target_virtual_frame_pointer(). Assumes that
there is an DEPRECATED_FP_REGNUM and that it is the same, cooked or
raw. */
@@ -455,21 +442,21 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
int
legacy_convert_register_p (int regnum)
{
- return REGISTER_CONVERTIBLE (regnum);
+ return DEPRECATED_REGISTER_CONVERTIBLE (regnum);
}
void
legacy_register_to_value (int regnum, struct type *type,
char *from, char *to)
{
- REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
}
void
legacy_value_to_register (struct type *type, int regnum,
char *from, char *to)
{
- REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
+ DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
}
@@ -895,7 +882,7 @@ gdbarch_info_init (struct gdbarch_info *info)
/* */
-extern initialize_file_ftype _initialize_gdbarch_utils;
+extern initialize_file_ftype _initialize_gdbarch_utils; /* -Wmissing-prototypes */
void
_initialize_gdbarch_utils (void)
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index f62fa97df62..8fce25236fe 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -32,14 +32,10 @@ struct gdbarch_info;
extern int gdbarch_debug;
/* Fallback for register convertible. */
-extern gdbarch_register_convertible_ftype generic_register_convertible_not;
+extern gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible_not;
extern CORE_ADDR generic_cannot_extract_struct_value_address (char *dummy);
-/* Helper function for targets that don't know how my arguments are
- being passed */
-extern gdbarch_frame_num_args_ftype frame_num_args_unknown;
-
/* Implementation of extract return value that grubs around in the
register cache. */
extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
@@ -85,15 +81,6 @@ extern int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs);
extern const struct floatformat *default_float_format (struct gdbarch *gdbarch);
extern const struct floatformat *default_double_format (struct gdbarch *gdbarch);
-/* Helper function for targets that don't know how my arguments are
- being passed */
-extern int frame_num_args_unknown (struct frame_info *fi);
-
-/* Return the start address of ABFD. This is exactly like
- bfd_get_start_address, except that it's a gdbarch function. */
-extern CORE_ADDR generic_bfd_entry_point (struct gdbarch *gdbarch, bfd *abfd);
-
-
/* The following DEPRECATED interfaces are for pre- multi-arch legacy
targets. */
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index a2ea4935303..5ea3ef2f982 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -27,6 +27,7 @@
#include "frame.h"
#include "regcache.h"
#include "doublest.h"
+#include "solib-svr4.h"
#include "osabi.h"
#include "arm-tdep.h"
@@ -193,7 +194,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
&& NULL != target_type
&& TYPE_CODE_FUNC == TYPE_CODE (target_type))
{
- CORE_ADDR regval = extract_address (val, len);
+ CORE_ADDR regval = extract_unsigned_integer (val, len);
if (arm_pc_is_thumb (regval))
store_unsigned_integer (val, len, MAKE_THUMB_ADDR (regval));
}
@@ -208,7 +209,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (argreg <= ARM_LAST_ARG_REGNUM)
{
/* It's an argument being passed in a general register. */
- regval = extract_address (val, partial_len);
+ regval = extract_unsigned_integer (val, partial_len);
write_register (argreg++, regval);
}
else
@@ -376,6 +377,49 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
}
+/* Fetch, and possibly build, an appropriate link_map_offsets structure
+ for ARM linux targets using the struct offsets defined in <link.h>.
+ Note, however, that link.h is not actually referred to in this file.
+ Instead, the relevant structs offsets were obtained from examining
+ link.h. (We can't refer to link.h from this file because the host
+ system won't necessarily have it, or if it does, the structs which
+ it defines will refer to the host system, not the target). */
+
+static struct link_map_offsets *
+arm_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = 0;
+
+ if (lmp == 0)
+ {
+ lmp = &lmo;
+
+ lmo.r_debug_size = 8; /* Actual size is 20, but this is all we
+ need. */
+
+ lmo.r_map_offset = 4;
+ lmo.r_map_size = 4;
+
+ lmo.link_map_size = 20; /* Actual size is 552, but this is all we
+ need. */
+
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 4;
+
+ lmo.l_name_offset = 4;
+ lmo.l_name_size = 4;
+
+ lmo.l_next_offset = 12;
+ lmo.l_next_size = 4;
+
+ lmo.l_prev_offset = 16;
+ lmo.l_prev_size = 4;
+ }
+
+ return lmp;
+}
+
static CORE_ADDR
skip_hurd_resolver (CORE_ADDR pc)
{
@@ -530,6 +574,9 @@ arm_linux_init_abi (struct gdbarch_info info,
tdep->jb_pc = ARM_LINUX_JB_PC;
tdep->jb_elt_size = ARM_LINUX_JB_ELEMENT_SIZE;
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, arm_linux_svr4_fetch_link_map_offsets);
+
set_gdbarch_deprecated_call_dummy_words (gdbarch, arm_linux_call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (arm_linux_call_dummy_words));
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index c0e2408c886..3f2f13c3bb6 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -33,7 +33,6 @@
#include "doublest.h"
#include "value.h"
#include "arch-utils.h"
-#include "solib-svr4.h"
#include "osabi.h"
#include "arm-tdep.h"
@@ -306,28 +305,6 @@ arm_frameless_function_invocation (struct frame_info *fi)
return frameless;
}
-/* The address of the arguments in the frame. */
-static CORE_ADDR
-arm_frame_args_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-/* The address of the local variables in the frame. */
-static CORE_ADDR
-arm_frame_locals_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-/* The number of arguments being passed in the frame. */
-static int
-arm_frame_num_args (struct frame_info *fi)
-{
- /* We have no way of knowing. */
- return -1;
-}
-
/* A typical Thumb prologue looks like this:
push {r7, lr}
add sp, sp, #-28
@@ -1405,19 +1382,20 @@ pop_stack_item (struct stack_item *si)
we should probably support some of them based on the selected ABI. */
static CORE_ADDR
-arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
- CORE_ADDR dummy_addr, int nargs, struct value **args,
- CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+arm_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argnum;
int argreg;
int nstack;
struct stack_item *si = NULL;
- /* Set the return address. For the ARM, the return breakpoint is always
- at DUMMY_ADDR. */
+ /* Set the return address. For the ARM, the return breakpoint is
+ always at BP_ADDR. */
/* XXX Fix for Thumb. */
- regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, dummy_addr);
+ regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, bp_addr);
/* Walk through the list of args and determine how large a temporary
stack is required. Need to take care here as structs may be
@@ -1464,7 +1442,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
&& target_type != NULL
&& TYPE_CODE_FUNC == TYPE_CODE (target_type))
{
- CORE_ADDR regval = extract_address (val, len);
+ CORE_ADDR regval = extract_unsigned_integer (val, len);
if (arm_pc_is_thumb (regval))
{
val = alloca (len);
@@ -1483,7 +1461,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
{
/* The argument is being passed in a general purpose
register. */
- CORE_ADDR regval = extract_address (val, partial_len);
+ CORE_ADDR regval = extract_unsigned_integer (val, partial_len);
if (arm_debug)
fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
argnum, REGISTER_NAME (argreg),
@@ -2493,7 +2471,7 @@ arm_get_longjmp_target (CORE_ADDR *pc)
INT_REGISTER_RAW_SIZE))
return 0;
- *pc = extract_address (buf, INT_REGISTER_RAW_SIZE);
+ *pc = extract_unsigned_integer (buf, INT_REGISTER_RAW_SIZE);
return 1;
}
@@ -2689,49 +2667,6 @@ arm_othernames (char *names, int n)
set_disassembly_style ();
}
-/* Fetch, and possibly build, an appropriate link_map_offsets structure
- for ARM linux targets using the struct offsets defined in <link.h>.
- Note, however, that link.h is not actually referred to in this file.
- Instead, the relevant structs offsets were obtained from examining
- link.h. (We can't refer to link.h from this file because the host
- system won't necessarily have it, or if it does, the structs which
- it defines will refer to the host system, not the target). */
-
-struct link_map_offsets *
-arm_linux_svr4_fetch_link_map_offsets (void)
-{
- static struct link_map_offsets lmo;
- static struct link_map_offsets *lmp = 0;
-
- if (lmp == 0)
- {
- lmp = &lmo;
-
- lmo.r_debug_size = 8; /* Actual size is 20, but this is all we
- need. */
-
- lmo.r_map_offset = 4;
- lmo.r_map_size = 4;
-
- lmo.link_map_size = 20; /* Actual size is 552, but this is all we
- need. */
-
- lmo.l_addr_offset = 0;
- lmo.l_addr_size = 4;
-
- lmo.l_name_offset = 4;
- lmo.l_name_size = 4;
-
- lmo.l_next_offset = 12;
- lmo.l_next_size = 4;
-
- lmo.l_prev_offset = 16;
- lmo.l_prev_size = 4;
- }
-
- return lmp;
-}
-
/* Test whether the coff symbol specific value corresponds to a Thumb
function. */
@@ -2943,9 +2878,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation
(gdbarch, arm_frameless_function_invocation);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, arm_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, arm_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, arm_frame_locals_address);
- set_gdbarch_frame_num_args (gdbarch, arm_frame_num_args);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, arm_frame_init_saved_regs);
set_gdbarch_deprecated_pop_frame (gdbarch, arm_pop_frame);
@@ -2975,17 +2907,17 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_fp_regnum (gdbarch, ARM_FP_REGNUM); /* ??? */
set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM);
- set_gdbarch_register_byte (gdbarch, arm_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, arm_register_byte);
set_gdbarch_deprecated_register_bytes (gdbarch,
(NUM_GREGS * INT_REGISTER_RAW_SIZE
+ NUM_FREGS * FP_REGISTER_RAW_SIZE
+ NUM_SREGS * STATUS_REGISTER_SIZE));
set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SREGS);
- set_gdbarch_register_raw_size (gdbarch, arm_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, arm_register_virtual_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, arm_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, arm_register_virtual_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, FP_REGISTER_RAW_SIZE);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, FP_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, arm_register_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, arm_register_type);
/* Internal <-> external register number maps. */
set_gdbarch_register_sim_regno (gdbarch, arm_register_sim_regno);
@@ -3078,6 +3010,8 @@ arm_init_abi_apcs (struct gdbarch_info info,
/* Place-holder. */
}
+extern initialize_file_ftype _initialize_arm_tdep; /* -Wmissing-prototypes */
+
void
_initialize_arm_tdep (void)
{
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 4ade2ab41ec..df1ffddcc88 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -311,7 +311,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD)
{
store_unsigned_integer (buf, TYPE_LENGTH (type),
- avr_convert_iaddr_to_raw (addr));
+ avr_convert_iaddr_to_raw (addr >> 1));
}
else
{
@@ -324,7 +324,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
static CORE_ADDR
avr_pointer_to_address (struct type *type, const void *buf)
{
- CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
+ CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
if (TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
{
@@ -338,7 +338,7 @@ avr_pointer_to_address (struct type *type, const void *buf)
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
|| TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
- return avr_make_iaddr (addr);
+ return avr_make_iaddr (addr << 1);
else
return avr_make_saddr (addr);
}
@@ -411,15 +411,6 @@ avr_remote_translate_xfer_address (struct gdbarch *gdbarch,
*targ_len = nr_bytes;
}
-/* Function pointers obtained from the target are half of what gdb expects so
- multiply by 2. */
-
-static CORE_ADDR
-avr_convert_from_func_ptr_addr (CORE_ADDR addr)
-{
- return addr * 2;
-}
-
/* avr_scan_prologue is also used as the
deprecated_frame_init_saved_regs().
@@ -1084,7 +1075,7 @@ avr_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
while (len > 0)
{ /* there's room in registers */
len -= wordsize;
- regval = extract_address (val + len, wordsize);
+ regval = extract_unsigned_integer (val + len, wordsize);
write_register (argreg--, regval);
}
}
@@ -1095,7 +1086,7 @@ avr_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
it as a NOP. Thus, it should be ok. Since the avr is currently a remote
only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
-const unsigned char *
+static const unsigned char *
avr_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
{
static unsigned char avr_break_insn [] = { 0x98, 0x95 };
@@ -1172,12 +1163,12 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, avr_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 1);
set_gdbarch_deprecated_register_bytes (gdbarch, AVR_NUM_REG_BYTES);
- set_gdbarch_register_byte (gdbarch, avr_register_byte);
- set_gdbarch_register_raw_size (gdbarch, avr_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, avr_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, avr_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, avr_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, avr_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_type (gdbarch, avr_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, avr_register_virtual_type);
set_gdbarch_print_insn (gdbarch, print_insn_avr);
@@ -1213,10 +1204,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_address (gdbarch, avr_frame_address);
set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, avr_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-
- set_gdbarch_convert_from_func_ptr_addr (gdbarch,
- avr_convert_from_func_ptr_addr);
return gdbarch;
}
@@ -1311,6 +1298,8 @@ avr_io_reg_read_command (char *args, int from_tty)
}
}
+extern initialize_file_ftype _initialize_avr_tdep; /* -Wmissing-prototypes */
+
void
_initialize_avr_tdep (void)
{
diff --git a/gdb/block.c b/gdb/block.c
index 3396c8aa96c..98b6ccbb84b 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -44,7 +44,7 @@ static void block_initialize_namespace (struct block *block,
Return zero otherwise. */
int
-contained_in (struct block *a, struct block *b)
+contained_in (const struct block *a, const struct block *b)
{
if (!a || !b)
return 0;
@@ -57,7 +57,7 @@ contained_in (struct block *a, struct block *b)
lexical block, described by a struct block BL. */
struct symbol *
-block_function (struct block *bl)
+block_function (const struct block *bl)
{
while (BLOCK_FUNCTION (bl) == 0 && BLOCK_SUPERBLOCK (bl) != 0)
bl = BLOCK_SUPERBLOCK (bl);
@@ -71,17 +71,18 @@ block_function (struct block *bl)
is NULL, we don't pass this information back to the caller. */
struct blockvector *
-blockvector_for_pc_sect (register CORE_ADDR pc, struct sec *section,
+blockvector_for_pc_sect (CORE_ADDR pc, struct sec *section,
int *pindex, struct symtab *symtab)
{
- register struct block *b;
- register int bot, top, half;
+ struct block *b;
+ int bot, top, half;
struct blockvector *bl;
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)
+ symtab = find_pc_sect_symtab (pc, section);
+ if (symtab == 0)
return 0;
}
@@ -125,7 +126,7 @@ blockvector_for_pc_sect (register CORE_ADDR pc, struct sec *section,
Backward compatibility, no section. */
struct blockvector *
-blockvector_for_pc (register CORE_ADDR pc, int *pindex)
+blockvector_for_pc (CORE_ADDR pc, int *pindex)
{
return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc),
pindex, NULL);
@@ -135,9 +136,9 @@ blockvector_for_pc (register CORE_ADDR pc, int *pindex)
in the specified section, or 0 if there is none. */
struct block *
-block_for_pc_sect (register CORE_ADDR pc, struct sec *section)
+block_for_pc_sect (CORE_ADDR pc, struct sec *section)
{
- register struct blockvector *bl;
+ struct blockvector *bl;
int index;
bl = blockvector_for_pc_sect (pc, section, &index, NULL);
@@ -150,7 +151,7 @@ block_for_pc_sect (register CORE_ADDR pc, struct sec *section)
or 0 if there is none. Backward compatibility, no section. */
struct block *
-block_for_pc (register CORE_ADDR pc)
+block_for_pc (CORE_ADDR pc)
{
return block_for_pc_sect (pc, find_pc_mapped_section (pc));
}
diff --git a/gdb/block.h b/gdb/block.h
index 442fa4a86e4..aa69a896f6a 100644
--- a/gdb/block.h
+++ b/gdb/block.h
@@ -29,6 +29,7 @@ struct symtab;
struct block_namespace_info;
struct using_direct;
struct obstack;
+struct dictionary;
/* All of the name-scope contours of the program
are represented by `struct block' objects.
@@ -77,6 +78,10 @@ struct block
struct block *superblock;
+ /* This is used to store the symbols in the block. */
+
+ struct dictionary *dict;
+
/* Used for language-specific info. */
union
@@ -104,34 +109,6 @@ struct block
of this flag is undefined. */
unsigned char gcc_compile_flag;
-
- /* The symbols for this block are either in a simple linear list or
- in a simple hashtable. Blocks which correspond to a function
- (which have a list of symbols corresponding to arguments) use
- a linear list, as do some older symbol readers (currently only
- mdebugread and dstread). Other blocks are hashed.
-
- The hashtable uses the same hash function as the minsym hashtables,
- found in minsyms.c:minsym_hash_iw. Symbols are hashed based on
- their demangled name if appropriate, and on their name otherwise.
- The hash function ignores space, and stops at the beginning of the
- argument list if any.
-
- The table is laid out in NSYMS/5 buckets and symbols are chained via
- their hash_next field. */
-
- /* If this is really a hashtable of the symbols, this flag is 1. */
-
- unsigned char hashtable;
-
- /* Number of local symbols. */
-
- int nsyms;
-
- /* The symbols. If some of them are arguments, then they must be
- in the order in which we would like to print them. */
-
- struct symbol *sym[1];
};
#define BLOCK_START(bl) (bl)->startaddr
@@ -139,36 +116,15 @@ struct block
#define BLOCK_FUNCTION(bl) (bl)->function
#define BLOCK_SUPERBLOCK(bl) (bl)->superblock
#define BLOCK_GCC_COMPILED(bl) (bl)->gcc_compile_flag
+#define BLOCK_DICT(bl) (bl)->dict
#define BLOCK_NAMESPACE(bl) (bl)->language_specific.cplus_specific.namespace
-#define BLOCK_HASHTABLE(bl) (bl)->hashtable
-
-/* For blocks without a hashtable (BLOCK_HASHTABLE (bl) == 0) only. */
-#define BLOCK_NSYMS(bl) (bl)->nsyms
-#define BLOCK_SYM(bl, n) (bl)->sym[n]
-
-/* For blocks with a hashtable, but these are valid for non-hashed blocks as
- well - each symbol will appear to be one bucket by itself. */
-#define BLOCK_BUCKETS(bl) (bl)->nsyms
-#define BLOCK_BUCKET(bl, n) (bl)->sym[n]
-
-/* Macro used to set the size of a hashtable for N symbols. */
-#define BLOCK_HASHTABLE_SIZE(n) ((n)/5 + 1)
-
-/* Macro to loop through all symbols in a block BL, in no particular order.
- i counts which bucket we are in, and sym points to the current symbol. */
-
-#define ALL_BLOCK_SYMBOLS(bl, i, sym) \
- for ((i) = 0; (i) < BLOCK_BUCKETS ((bl)); (i)++) \
- for ((sym) = BLOCK_BUCKET ((bl), (i)); (sym); \
- (sym) = (sym)->hash_next)
-/* Nonzero if symbols of block BL should be sorted alphabetically.
- Don't sort a block which corresponds to a function. If we did the
- sorting would have to preserve the order of the symbols for the
- arguments. Also don't sort any block that we chose to hash. */
+/* Macro to loop through all symbols in a block BL, in no particular
+ order. ITER helps keep track of the iteration, and should be a
+ struct dict_iterator. SYM points to the current symbol. */
-#define BLOCK_SHOULD_SORT(bl) (! BLOCK_HASHTABLE (bl) \
- && BLOCK_FUNCTION (bl) == NULL)
+#define ALL_BLOCK_SYMBOLS(block, iter, sym) \
+ ALL_DICT_SYMBOLS (BLOCK_DICT (block), iter, sym)
struct blockvector
{
@@ -187,9 +143,9 @@ struct blockvector
#define STATIC_BLOCK 1
#define FIRST_LOCAL_BLOCK 2
-extern struct symbol *block_function (struct block *);
+extern struct symbol *block_function (const struct block *);
-extern int contained_in (struct block *, struct block *);
+extern int contained_in (const struct block *, const struct block *);
extern struct blockvector *blockvector_for_pc (CORE_ADDR, int *);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 66b319e842b..0739efd2bda 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4607,7 +4607,7 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
addresses found. ADDR_STRING contains a vector of (canonical)
address strings. ARG points to the end of the SAL. */
-void
+static void
parse_breakpoint_sals (char **address,
struct symtabs_and_lines *sals,
char ***addr_string)
@@ -4674,7 +4674,7 @@ parse_breakpoint_sals (char **address,
/* Convert each SAL into a real PC. Verify that the PC can be
inserted as a breakpoint. If it can't throw an error. */
-void
+static void
breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
char *address)
{
@@ -6082,7 +6082,7 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
sals = decode_line_1 (&nameptr, 1, NULL, 0, NULL);
if (sals.nelts == 0)
{
- free (trigger_func_name);
+ xfree (trigger_func_name);
return 0;
}
@@ -6098,7 +6098,7 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
b->disposition = tempflag ? disp_del : disp_donttouch;
b->ops = &gnu_v3_exception_catchpoint_ops;
- free (sals.sals);
+ xfree (sals.sals);
mention (b);
return 1;
}
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index d3c9ddfc175..f0d75ce3f52 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -45,6 +45,7 @@
#include "demangle.h" /* Needed by SYMBOL_INIT_DEMANGLED_NAME. */
#include "block.h"
#include "cp-support.h"
+#include "dictionary.h"
/* Ask buildsym.h to define the vars it normally declares `extern'. */
#define EXTERN
@@ -229,62 +230,22 @@ finish_block (struct symbol *symbol, struct pending **listhead,
register struct block *block;
register struct pending_block *pblock;
struct pending_block *opblock;
- register int i;
- register int j;
-
- /* Count the length of the list of symbols. */
- for (next = *listhead, i = 0;
- next;
- i += next->nsyms, next = next->next)
- {
- /* EMPTY */ ;
- }
-
- /* Copy the symbols into the block. */
+ /* Initialize the block's dictionary. */
if (symbol)
{
block = (struct block *)
- obstack_alloc (&objfile->symbol_obstack,
- (sizeof (struct block) +
- ((i - 1) * sizeof (struct symbol *))));
- BLOCK_NSYMS (block) = i;
- for (next = *listhead; next; next = next->next)
- for (j = next->nsyms - 1; j >= 0; j--)
- {
- BLOCK_SYM (block, --i) = next->symbol[j];
- }
+ obstack_alloc (&objfile->symbol_obstack, sizeof (struct block));
+ BLOCK_DICT (block) = dict_create_linear (&objfile->symbol_obstack,
+ *listhead);
}
else
{
- int htab_size = BLOCK_HASHTABLE_SIZE (i);
-
block = (struct block *)
- obstack_alloc (&objfile->symbol_obstack,
- (sizeof (struct block) +
- ((htab_size - 1) * sizeof (struct symbol *))));
- for (j = 0; j < htab_size; j++)
- {
- BLOCK_BUCKET (block, j) = 0;
- }
- BLOCK_BUCKETS (block) = htab_size;
- for (next = *listhead; next; next = next->next)
- {
- for (j = next->nsyms - 1; j >= 0; j--)
- {
- struct symbol *sym;
- unsigned int hash_index;
- const char *name = SYMBOL_DEMANGLED_NAME (next->symbol[j]);
- if (name == NULL)
- name = DEPRECATED_SYMBOL_NAME (next->symbol[j]);
- hash_index = msymbol_hash_iw (name);
- hash_index = hash_index % BLOCK_BUCKETS (block);
- sym = BLOCK_BUCKET (block, hash_index);
- BLOCK_BUCKET (block, hash_index) = next->symbol[j];
- next->symbol[j]->hash_next = sym;
- }
- }
+ obstack_alloc (&objfile->symbol_obstack, sizeof (struct block));
+ BLOCK_DICT (block) = dict_create_hashed (&objfile->symbol_obstack,
+ *listhead);
}
BLOCK_START (block) = start;
@@ -300,9 +261,9 @@ finish_block (struct symbol *symbol, struct pending **listhead,
if (symbol)
{
struct type *ftype = SYMBOL_TYPE (symbol);
+ struct dict_iterator iter;
SYMBOL_BLOCK_VALUE (symbol) = block;
BLOCK_FUNCTION (block) = symbol;
- BLOCK_HASHTABLE (block) = 0;
if (TYPE_NFIELDS (ftype) <= 0)
{
@@ -311,7 +272,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
parameter symbols. */
int nparams = 0, iparams;
struct symbol *sym;
- ALL_BLOCK_SYMBOLS (block, i, sym)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
switch (SYMBOL_CLASS (sym))
{
@@ -348,9 +309,12 @@ finish_block (struct symbol *symbol, struct pending **listhead,
TYPE_FIELDS (ftype) = (struct field *)
TYPE_ALLOC (ftype, nparams * sizeof (struct field));
- for (i = iparams = 0; iparams < nparams; i++)
+ iparams = 0;
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- sym = BLOCK_SYM (block, i);
+ if (iparams == nparams)
+ break;
+
switch (SYMBOL_CLASS (sym))
{
case LOC_ARG:
@@ -394,7 +358,6 @@ finish_block (struct symbol *symbol, struct pending **listhead,
else
{
BLOCK_FUNCTION (block) = NULL;
- BLOCK_HASHTABLE (block) = 1;
}
/* Now "free" the links of the list, and empty the list. */
@@ -476,6 +439,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
record_pending_block (objfile, block, opblock);
}
+
/* Record BLOCK on the list of all blocks in the file. Put it after
OPBLOCK, or at the beginning if opblock is NULL. This puts the
block in the list after all its subblocks.
@@ -1031,7 +995,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
symtab->dirname = NULL;
}
symtab->free_code = free_linetable;
- symtab->free_ptr = NULL;
+ symtab->free_func = NULL;
/* Use whatever language we have been using for this
subfile, not the one that was deduced in allocate_symtab
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 848f7ac8ade..419b24770b6 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -213,13 +213,12 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
struct value *vt_val;
struct symbol *wsym = (struct symbol *) NULL;
struct type *wtype;
- struct symtab *s;
struct block *block = (struct block *) NULL;
int is_this_fld;
if (msymbol != NULL)
wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
- VAR_DOMAIN, &is_this_fld, &s);
+ VAR_DOMAIN, &is_this_fld, NULL);
if (wsym)
{
diff --git a/gdb/charset.c b/gdb/charset.c
index 0062e281e99..c311447ea44 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -1163,6 +1163,7 @@ target_char_to_host (int target_char, int *host_char)
/* The charset.c module initialization function. */
+extern initialize_file_ftype _initialize_charset; /* -Wmissing-prototype */
void
_initialize_charset (void)
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 108329a50c7..999ae72992d 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -48,18 +48,6 @@
#define GDBINIT_FILENAME ".gdbinit"
#endif
-/* From gdb/top.c */
-
-extern void dont_repeat (void);
-
-extern void set_verbose (char *, int, struct cmd_list_element *);
-
-extern void show_history (char *, int);
-
-extern void set_history (char *, int);
-
-extern void show_commands (char *, int);
-
/* Prototypes for local command functions */
static void complete_command (char *, int);
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 2a6d196930e..be516c9a6f3 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -183,20 +183,6 @@ add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
return c;
}
-/* Same as above, except that the abbrev_flag is set. */
-/* Note: Doesn't seem to be used anywhere currently. */
-
-struct cmd_list_element *
-add_abbrev_cmd (char *name, enum command_class class, void (*fun) (char *, int),
- char *doc, struct cmd_list_element **list)
-{
- register struct cmd_list_element *c
- = add_cmd (name, class, fun, doc, list);
-
- c->abbrev_flag = 1;
- return c;
-}
-
/* Deprecates a command CMD.
REPLACEMENT is the name of the command which should be used in place
of this command, or NULL if no such command exists.
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 6bd40e033b1..7b88975c6d4 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -698,6 +698,8 @@ binary_append_command (char *cmd, int from_tty)
help_list (binary_append_cmdlist, "append binary ", -1, gdb_stdout);
}
+extern initialize_file_ftype _initialize_cli_dump; /* -Wmissing-prototypes */
+
void
_initialize_cli_dump (void)
{
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index e2116e70c58..45679f07b98 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -118,6 +118,8 @@ safe_execute_command (struct ui_out *uiout, char *command, int from_tty)
/* standard gdb initialization hook */
+extern initialize_file_ftype _initialize_cli_interp; /* -Wmissing-prototypes */
+
void
_initialize_cli_interp (void)
{
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index d68c365959d..0f789bb1627 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -34,12 +34,6 @@
#include "cli/cli-decode.h"
#include "cli/cli-script.h"
-/* From gdb/top.c */
-
-extern void dont_repeat (void);
-
-extern void do_restore_instream_cleanup (void *stream);
-
/* Prototypes for local functions */
static struct cleanup *
@@ -216,7 +210,7 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
/* Handle pre-post hooks. */
-void
+static void
clear_hook_in_cleanup (void *data)
{
struct cmd_list_element *c = data;
@@ -248,7 +242,7 @@ execute_cmd_post_hook (struct cmd_list_element *c)
}
/* Execute the command in CMD. */
-void
+static void
do_restore_user_call_depth (void * call_depth)
{
int * depth = call_depth;
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 81def0aac9c..152ec339caf 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -45,6 +45,7 @@
#include "target.h"
#include "gdb_assert.h"
#include "block.h"
+#include "dictionary.h"
#include "coff-pe-read.h"
@@ -605,15 +606,6 @@ coff_symfile_read (struct objfile *objfile, int mainline)
coff_symtab_read ((long) symtab_offset, num_symbols, objfile);
- /* Sort symbols alphabetically within each block. */
-
- {
- struct symtab *s;
-
- for (s = objfile->symtabs; s != NULL; s = s->next)
- sort_symtab_syms (s);
- }
-
/* Install any minimal symbols that have been collected as the current
minimal symbols for this objfile. */
@@ -1423,12 +1415,12 @@ static void
patch_opaque_types (struct symtab *s)
{
register struct block *b;
- register int i;
+ struct dict_iterator iter;
register struct symbol *real_sym;
/* Go through the per-file symbols only */
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, real_sym)
+ ALL_BLOCK_SYMBOLS (b, iter, real_sym)
{
/* Find completed typedefs to use to fix opaque ones.
Remove syms from the chain when their types are stored,
diff --git a/gdb/config.in b/gdb/config.in
index 450051976a4..787afb26ce4 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -257,6 +257,9 @@
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
+/* Define if you have the syscall function. */
+#undef HAVE_SYSCALL
+
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
@@ -438,6 +441,9 @@
Solaris 2.[78] when using GCC. */
#undef _MSE_INT_H
+/* Define to 1 if we found this declaration otherwise define to 0. */
+#undef HAVE_DECL_GETOPT
+
/* Define if sigsetjmp is available. */
#undef HAVE_SIGSETJMP
@@ -513,6 +519,9 @@
/* Define if <thread_db.h> has the TD_NOTALLOC error code. */
#undef THREAD_DB_HAS_TD_NOTALLOC
+/* Define if we can use the tkill syscall. */
+#undef HAVE_TKILL_SYSCALL
+
/* Define to the default OS ABI for this configuration. */
#undef GDB_OSABI_DEFAULT
diff --git a/gdb/config/alpha/alpha-linux.mt b/gdb/config/alpha/alpha-linux.mt
index 25538b34589..8fe98f264b7 100644
--- a/gdb/config/alpha/alpha-linux.mt
+++ b/gdb/config/alpha/alpha-linux.mt
@@ -1,3 +1,4 @@
# Target: Little-endian Alpha
-TDEPFILES= alpha-tdep.o alpha-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
+TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alpha-linux-tdep.o \
+ solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-alphalinux.h
diff --git a/gdb/config/alpha/alpha-osf1.mt b/gdb/config/alpha/alpha-osf1.mt
index 29212c9a957..2a47bd41429 100644
--- a/gdb/config/alpha/alpha-osf1.mt
+++ b/gdb/config/alpha/alpha-osf1.mt
@@ -1,3 +1,3 @@
# Target: Little-endian Alpha
-TDEPFILES= alpha-tdep.o alpha-osf1-tdep.o
+TDEPFILES= alpha-tdep.o alpha-osf1-tdep.o alpha-mdebug-tdep.o
TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/fbsd.mt b/gdb/config/alpha/fbsd.mt
index 4b4ecbf6235..24d2fd80b84 100644
--- a/gdb/config/alpha/fbsd.mt
+++ b/gdb/config/alpha/fbsd.mt
@@ -1,3 +1,3 @@
# Target: FreeBSD/Alpha
-TDEPFILES= alpha-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
+TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
TM_FILE= tm-fbsd.h
diff --git a/gdb/config/alpha/nbsd.mt b/gdb/config/alpha/nbsd.mt
index 7fd9c503255..065a28c9a01 100644
--- a/gdb/config/alpha/nbsd.mt
+++ b/gdb/config/alpha/nbsd.mt
@@ -1,4 +1,4 @@
# Target: Alpha running NetBSD
-TDEPFILES= alpha-tdep.o alphabsd-tdep.o alphanbsd-tdep.o corelow.o \
- nbsd-tdep.o solib.o solib-svr4.o
+TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphanbsd-tdep.o \
+ corelow.o nbsd-tdep.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index 9e99b33cd1f..a6f9a49f9d6 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -45,6 +45,9 @@
pointer to the first register. */
#define ALPHA_REGSET_BASE(regsetp) ((long *) (regsetp))
+/* Given a pointer to a gregset_t, locate the UNIQUE value. */
+#define ALPHA_REGSET_UNIQUE(regsetp) ((long *)(regsetp) + 32)
+
/* The address of UNIQUE for ptrace. */
#define ALPHA_UNIQUE_PTRACE_ADDR 65
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
index feb752a1495..9ced4f238ed 100644
--- a/gdb/config/alpha/tm-alpha.h
+++ b/gdb/config/alpha/tm-alpha.h
@@ -64,11 +64,6 @@ typedef struct alpha_extra_func_info
#define mips_extra_func_info alpha_extra_func_info
#define mips_extra_func_info_t alpha_extra_func_info_t
-
-#define PRINT_EXTRA_FRAME_INFO(fi) alpha_print_extra_frame_info ((fi))
-extern void alpha_print_extra_frame_info (struct frame_info *);
-
-
/* It takes two values to specify a frame on the ALPHA. Sigh.
In fact, at the moment, the *PC* is the primary value that sets up
diff --git a/gdb/config/alpha/tm-alphalinux.h b/gdb/config/alpha/tm-alphalinux.h
index 4858b90eba2..30ae4f756f3 100644
--- a/gdb/config/alpha/tm-alphalinux.h
+++ b/gdb/config/alpha/tm-alphalinux.h
@@ -2,8 +2,8 @@
definitions here are used when the _target_ system is running
GNU/Linux.
- Copyright 1996, 1998, 1999, 2000, 2002 Free Software Foundation,
- Inc.
+ Copyright 1996, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,13 +27,6 @@
#include "alpha/tm-alpha.h"
-/* Get start and end address of sigtramp handler. */
-
-extern LONGEST alpha_linux_sigtramp_offset (CORE_ADDR);
-#define SIGTRAMP_START(pc) (pc - alpha_linux_sigtramp_offset (pc))
-#define SIGTRAMP_END(pc) (SIGTRAMP_START(pc) + 3*4)
-
-
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is 2
on GNU/Linux and most implementations. */
diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h
index bbf566d2d83..51b9d708f32 100644
--- a/gdb/config/arm/tm-linux.h
+++ b/gdb/config/arm/tm-linux.h
@@ -30,10 +30,6 @@
#include "config/tm-linux.h"
-/* Use target-specific function to define link map offsets. */
-extern struct link_map_offsets *arm_linux_svr4_fetch_link_map_offsets (void);
-#define SVR4_FETCH_LINK_MAP_OFFSETS() arm_linux_svr4_fetch_link_map_offsets ()
-
/* Offset to saved PC in sigcontext structure, from <asm/sigcontext.h> */
#define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18)
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 4e600575045..e560c644c8d 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -28,10 +28,11 @@
GDB_TARGET_IS_H8300 in remote-e7000.c */
extern int h8300hmode;
extern int h8300smode;
+extern int h8300sxmode;
#define GDB_TARGET_IS_H8300
/* Needed for remote.c */
-#define REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
+#define DEPRECATED_REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
/* Needed for remote-hms.c */
#define CCR_REGNUM 8
/* Needed for remote-e7000.c */
diff --git a/gdb/config/i386/i386sol2.mt b/gdb/config/i386/i386sol2.mt
index f8fabd494b7..93c2d783538 100644
--- a/gdb/config/i386/i386sol2.mt
+++ b/gdb/config/i386/i386sol2.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running Solaris 2 (SVR4)
-TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o i386bsd-tdep.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o
TM_FILE= tm-i386sol2.h
diff --git a/gdb/config/i386/nm-x86-64linux.h b/gdb/config/i386/nm-x86-64linux.h
index 4430fcba5db..4df2f5ddb09 100644
--- a/gdb/config/i386/nm-x86-64linux.h
+++ b/gdb/config/i386/nm-x86-64linux.h
@@ -1,7 +1,8 @@
/* Native support for GNU/Linux x86-64.
- Copyright 2001, 2002 Free Software Foundation, Inc. Contributed by
- Jiri Smid, SuSE Labs.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -20,15 +21,16 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_X86_64_H
-#define NM_X86_64_H
-
-#include "config/nm-linux.h"
+#ifndef NM_X86_64_LINUX_H
+#define NM_X86_64_LINUX_H
+/* GNU/Linux supports the i386 hardware debugging registers. */
#define I386_USE_GENERIC_WATCHPOINTS
+
#include "i386/nm-i386.h"
+#include "config/nm-linux.h"
-/* Support for 8-byte wide hw watchpoints. */
+/* Support for 8-byte wide hardware watchpoints. */
#define TARGET_HAS_DR_LEN_8 1
/* Provide access to the i386 hardware debugging registers. */
@@ -50,41 +52,17 @@ extern unsigned long x86_64_linux_dr_get_status (void);
x86_64_linux_dr_get_status ()
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = x86_64_register_u_addr ((blockend),(regno));
-CORE_ADDR x86_64_register_u_addr (CORE_ADDR, int);
-
-/* Return the size of the user struct. */
-#define KERNEL_U_SIZE kernel_u_size()
-extern int kernel_u_size (void);
-
-/* Offset of the registers within the user area. */
-#define U_REGS_OFFSET 0
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-#define KERNEL_U_ADDR 0x0
-
-#define PTRACE_ARG3_TYPE void*
-#define PTRACE_XFER_TYPE unsigned long
-
-
-/* We define this if link.h is available, because with ELF we use SVR4 style
- shared libraries. */
+/* Type of the third argument to the `ptrace' system call. */
+#define PTRACE_ARG3_TYPE long
-#ifdef HAVE_LINK_H
-#define SVR4_SHARED_LIBS
-#include "solib.h" /* Support for shared libraries. */
-#endif
+/* Type of the fourth argument to the `ptrace' system call. */
+#define PTRACE_XFER_TYPE long
/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
#define FETCH_INFERIOR_REGISTERS
+
+/* FIXME: kettenis/20030416: Why? */
#undef PREPARE_TO_PROCEED
-#include <signal.h>
-
-extern void lin_thread_get_thread_signals (sigset_t * mask);
-#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
-
-#endif /* NM_X86_64.h */
+#endif /* NM_X86_64_LINUX_H */
diff --git a/gdb/config/i386/tm-x86-64linux.h b/gdb/config/i386/tm-x86-64linux.h
index 11eea93793a..4c16766f3a8 100644
--- a/gdb/config/i386/tm-x86-64linux.h
+++ b/gdb/config/i386/tm-x86-64linux.h
@@ -1,6 +1,6 @@
/* Definitions to target GDB to GNU/Linux on x86-64.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Michal Ludvig, SuSE Labs.
@@ -25,10 +25,10 @@
#define TM_X86_64LINUX_H
/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
- * link.h is available on all linux platforms. For I386 and SH3/4,
- * we hard-code the information rather than use link.h anyway (for
- * the benefit of cross-debugging). We may move to doing that for
- * other architectures as well. */
+ link.h is available on all linux platforms. For I386 and SH3/4, we
+ hard-code the information rather than use link.h anyway (for the
+ benefit of cross-debugging). We may move to doing that for other
+ architectures as well. */
#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
diff --git a/gdb/config/i386/x86-64linux.mh b/gdb/config/i386/x86-64linux.mh
index 7c221ebd807..895d1fb9f3a 100644
--- a/gdb/config/i386/x86-64linux.mh
+++ b/gdb/config/i386/x86-64linux.mh
@@ -4,8 +4,9 @@ XM_FILE= xm-i386.h
NAT_FILE= nm-x86-64linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
- core-aout.o i386-nat.o x86-64-linux-nat.o \
- proc-service.o thread-db.o lin-lwp.o \
- linux-proc.o gcore.o
+ core-regset.o i386-nat.o x86-64-linux-nat.o \
+ proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o
+# The dynamically loaded libthread_db needs access to symbols in the
+# gdb executable.
LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/i386/x86-64linux.mt b/gdb/config/i386/x86-64linux.mt
index d0ffb34f97a..d4484523227 100644
--- a/gdb/config/i386/x86-64linux.mt
+++ b/gdb/config/i386/x86-64linux.mt
@@ -1,6 +1,6 @@
# Target: AMD x86-64 running GNU/Linux
-TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o dwarf2cfi.o \
- i386-tdep.o i387-tdep.o \
+TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o \
+ i386-tdep.o i387-tdep.o i386-linux-tdep.o \
solib.o solib-svr4.o solib-legacy.o
GDB_MULTI_ARCH=GDB_MULTI_ARCH_TM
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index 03172b0dd75..014fc6381e1 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -49,7 +49,7 @@ struct frame_info;
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
&REGBUF[REGISTER_BYTE (FP0_REGNUM)], \
VALBUF); \
else \
@@ -69,7 +69,7 @@ struct frame_info;
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
- REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
+ DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
diff --git a/gdb/config/m68k/tm-m68klynx.h b/gdb/config/m68k/tm-m68klynx.h
index ed1f6f0f05e..71ed690545c 100644
--- a/gdb/config/m68k/tm-m68klynx.h
+++ b/gdb/config/m68k/tm-m68klynx.h
@@ -34,6 +34,6 @@
#include "m68k/tm-m68k.h"
/* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
-#undef REMOTE_BREAKPOINT
+#undef DEPRECATED_REMOTE_BREAKPOINT
#endif /* TM_M68KLYNX_H */
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
index 6e978cf5bdf..f721dcf6fdb 100644
--- a/gdb/config/m68k/tm-sun3.h
+++ b/gdb/config/m68k/tm-sun3.h
@@ -46,7 +46,7 @@
#include "m68k/tm-m68k.h"
/* Disable alternate breakpoint mechanism needed by 68k stub. */
-#undef REMOTE_BREAKPOINT
+#undef DEPRECATED_REMOTE_BREAKPOINT
/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
documented in a comment in <machine/setjmp.h>! */
diff --git a/gdb/config/mips/embed64.mt b/gdb/config/mips/embed64.mt
index ed60fd25031..5df6224f102 100644
--- a/gdb/config/mips/embed64.mt
+++ b/gdb/config/mips/embed64.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
-TM_FILE= tm-embed64.h
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/embedl.mt b/gdb/config/mips/embedl.mt
index 0ed8b8d5021..4d5cea8de90 100644
--- a/gdb/config/mips/embedl.mt
+++ b/gdb/config/mips/embedl.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
-TM_FILE= tm-embedl.h
+TM_FILE= tm-mips.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/embedl64.mt b/gdb/config/mips/embedl64.mt
index 28c41be48fb..5df6224f102 100644
--- a/gdb/config/mips/embedl64.mt
+++ b/gdb/config/mips/embedl64.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
-TM_FILE= tm-embedl64.h
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/mips.mt b/gdb/config/mips/mips.mt
new file mode 100644
index 00000000000..2d08bcb6eff
--- /dev/null
+++ b/gdb/config/mips/mips.mt
@@ -0,0 +1,5 @@
+# Target: Big-endian SIM monitor board.
+TDEPFILES= mips-tdep.o remote-mips.o
+TM_FILE= tm-mips.h
+SIM_OBS = remote-sim.o
+SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/mips64.mt b/gdb/config/mips/mips64.mt
new file mode 100644
index 00000000000..e6a19d8d974
--- /dev/null
+++ b/gdb/config/mips/mips64.mt
@@ -0,0 +1,5 @@
+# Target: Big-endian SIM monitor board.
+TDEPFILES= mips-tdep.o remote-mips.o
+TM_FILE= tm-mips64.h
+SIM_OBS = remote-sim.o
+SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/tm-embed.h b/gdb/config/mips/tm-embed.h
index 44072f4cb38..a7a794807f0 100644
--- a/gdb/config/mips/tm-embed.h
+++ b/gdb/config/mips/tm-embed.h
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
/* Watchpoint support */
diff --git a/gdb/config/mips/tm-irix3.h b/gdb/config/mips/tm-irix3.h
index 03c66bd9fd0..05ab07d89a2 100644
--- a/gdb/config/mips/tm-irix3.h
+++ b/gdb/config/mips/tm-irix3.h
@@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
/* Redefine register numbers for SGI. */
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index d3dfdc46903..3d598c9dae1 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -30,9 +30,6 @@
* Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
*/
-#undef DEPRECATED_REGISTER_BYTES
-#define DEPRECATED_REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
-
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
(((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 812aed5a25d..14de12e4c4f 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips64.h"
+#include "mips/tm-mips64.h"
#include "solib.h"
/* Redefine register numbers for SGI. */
@@ -62,9 +62,6 @@
#define FCRIR_REGNUM 70 /* FP implementation/revision */
-#undef DEPRECATED_REGISTER_BYTES
-#define DEPRECATED_REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
-
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
(((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
@@ -96,9 +93,5 @@
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
#define SIGFRAME_REG_SIZE 8
-/* Select the disassembler */
-#undef TM_PRINT_INSN_MACH
-#define TM_PRINT_INSN_MACH bfd_mach_mips8000
-
/* Undefine those methods which have been multiarched. */
#undef REGISTER_VIRTUAL_TYPE
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 540db163080..7ae05a4b203 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -1,7 +1,7 @@
/* Definitions to make GDB run on a mips box under 4.3bsd.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Per Bothner (bothner@cs.wisc.edu) at U.Wisconsin
and by Alessandro Forin (af@cs.cmu.edu) at CMU..
@@ -45,15 +45,7 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define STEP_SKIPS_DELAY_P (1)
#define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
-/* 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 DEPRECATED_REGISTER_SIZE 4
-
-/* The size of a register. This is predefined in tm-mips64.h. We
- can't use DEPRECATED_REGISTER_SIZE because that is used for various other
- things. */
+/* The size of a register. This is predefined in tm-mips64.h. */
#ifndef MIPS_REGSIZE
#define MIPS_REGSIZE 4
@@ -103,11 +95,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define PRID_REGNUM 89 /* Processor ID */
#define LAST_EMBED_REGNUM 89 /* Last one */
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#define DEPRECATED_REGISTER_BYTES (NUM_REGS*MIPS_REGSIZE)
-
/* Index within `registers' of the first byte of the space for
register N. */
@@ -182,10 +169,6 @@ extern void mips_print_extra_frame_info (struct frame_info *frame);
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
-/* Select the default mips disassembler */
-
-#define TM_PRINT_INSN_MACH 0
-
/* These are defined in mdebugread.c and are used in mips-tdep.c */
extern CORE_ADDR sigtramp_address, sigtramp_end;
extern void fixup_sigtramp (void);
@@ -197,22 +180,12 @@ extern char *mips_read_processor_type (void);
#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_ignore_helper (CORE_ADDR pc);
-#ifndef TARGET_MIPS
-#define TARGET_MIPS
-#endif
-
/* Definitions and declarations used by mips-tdep.c and remote-mips.c */
#define MIPS_INSTLEN 4 /* Length of an instruction */
#define MIPS16_INSTLEN 2 /* Length of an instruction on MIPS16 */
#define MIPS_NUMREGS 32 /* Number of integer or float registers */
typedef unsigned long t_inst; /* Integer big enough to hold an instruction */
-/* MIPS16 function addresses are odd (bit 0 is set). Here are some
- macros to test, set, or clear bit 0 of addresses. */
-#define IS_MIPS16_ADDR(addr) ((addr) & 1)
-#define MAKE_MIPS16_ADDR(addr) ((addr) | 1)
-#define UNMAKE_MIPS16_ADDR(addr) ((addr) & ~1)
-
#endif /* TM_MIPS_H */
/* Command to set the processor type. */
diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h
index ebf671bd54a..37f9e464790 100644
--- a/gdb/config/mips/tm-mipsv4.h
+++ b/gdb/config/mips/tm-mipsv4.h
@@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
#include "config/tm-sysv4.h"
/* The signal handler trampoline is called _sigtramp. */
diff --git a/gdb/config/mips/tm-tx39.h b/gdb/config/mips/tm-tx39.h
index d095db0668f..81f3b6ddc41 100644
--- a/gdb/config/mips/tm-tx39.h
+++ b/gdb/config/mips/tm-tx39.h
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
#undef MIPS_REGISTER_NAMES
#define MIPS_REGISTER_NAMES \
diff --git a/gdb/config/mips/tx39l.mt b/gdb/config/mips/tx39l.mt
index 35083293d45..8b4c1a92c24 100644
--- a/gdb/config/mips/tx39l.mt
+++ b/gdb/config/mips/tx39l.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o dve3900-rom.o monitor.o dsrec.o
-TM_FILE= tm-tx39l.h
+TM_FILE= tm-tx39.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index f8a2a117fa2..74bfa206d85 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -55,8 +55,8 @@
/* While this is for use by threaded programs, it doesn't appear
* to hurt non-threaded ones. This is used in infrun.c: */
-#define PREPARE_TO_PROCEED(select_it) hppa_prepare_to_proceed()
-extern int hppa_prepare_to_proceed (void);
+#define PREPARE_TO_PROCEED(select_it) generic_prepare_to_proceed(select_it)
+extern int generic_prepare_to_proceed (int select_it);
/* In infptrace.c or infttrace.c: */
#define CHILD_PID_TO_EXEC_FILE
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 988b790561f..1ec91d453f6 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -25,7 +25,7 @@
#include "regcache.h"
/* Wonder if this is correct? Should be using push_dummy_call(). */
-#define DEPRECATED_DUMMY_WRITE_SP(SP) generic_target_write_sp (SP)
+#define DEPRECATED_DUMMY_WRITE_SP(SP) deprecated_write_sp (SP)
#ifndef GDB_MULTI_ARCH
#define GDB_MULTI_ARCH 1
@@ -45,19 +45,6 @@ struct value;
struct type;
struct inferior_status;
-/* Get at various relevent fields of an instruction word. */
-
-#define MASK_5 0x1f
-#define MASK_11 0x7ff
-#define MASK_14 0x3fff
-#define MASK_21 0x1fffff
-
-/* This macro gets bit fields using HP's numbering (MSB = 0) */
-#ifndef GET_FIELD
-#define GET_FIELD(X, FROM, TO) \
- ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
-#endif
-
/* Sequence of bytes for breakpoint instruction. */
const unsigned char *hppa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr);
@@ -121,27 +108,6 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
#define ARG2_REGNUM 24 /* The third argument of a callee. */
#define ARG3_REGNUM 23 /* The fourth argument of a callee. */
-/*
- * Processor Status Word Masks
- */
-
-#define PSW_T 0x01000000 /* Taken Branch Trap Enable */
-#define PSW_H 0x00800000 /* Higher-Privilege Transfer Trap Enable */
-#define PSW_L 0x00400000 /* Lower-Privilege Transfer Trap Enable */
-#define PSW_N 0x00200000 /* PC Queue Front Instruction Nullified */
-#define PSW_X 0x00100000 /* Data Memory Break Disable */
-#define PSW_B 0x00080000 /* Taken Branch in Previous Cycle */
-#define PSW_C 0x00040000 /* Code Address Translation Enable */
-#define PSW_V 0x00020000 /* Divide Step Correction */
-#define PSW_M 0x00010000 /* High-Priority Machine Check Disable */
-#define PSW_CB 0x0000ff00 /* Carry/Borrow Bits */
-#define PSW_R 0x00000010 /* Recovery Counter Enable */
-#define PSW_Q 0x00000008 /* Interruption State Collection Enable */
-#define PSW_P 0x00000004 /* Protection ID Validation Enable */
-#define PSW_D 0x00000002 /* Data Address Translation Enable */
-#define PSW_I 0x00000001 /* External, Power Failure, Low-Priority */
- /* Machine Check Interruption Enable */
-
/* When fetching register values from an inferior or a core file,
clean them up using this macro. BUF is a char pointer to
the raw value of the register in the registers[] array. */
@@ -185,9 +151,6 @@ extern void hppa_frame_init_saved_regs (struct frame_info *);
#define INSTRUCTION_SIZE 4
-/* Non-level zero PA's have space registers (but they don't always have
- floating-point, do they???? */
-
/* This sequence of words is the instructions
; Call stack frame has already been built by gdb. Since we could be calling
@@ -250,14 +213,6 @@ extern void hppa_frame_init_saved_regs (struct frame_info *);
avoid the kernel bug. The second NOP is needed to keep the call
dummy 8 byte aligned. */
-/* Define offsets into the call dummy for the target function address */
-#define FUNC_LDIL_OFFSET (INSTRUCTION_SIZE * 9)
-#define FUNC_LDO_OFFSET (INSTRUCTION_SIZE * 10)
-
-/* Define offsets into the call dummy for the _sr4export address */
-#define SR4EXPORT_LDIL_OFFSET (INSTRUCTION_SIZE * 12)
-#define SR4EXPORT_LDO_OFFSET (INSTRUCTION_SIZE * 13)
-
#define CALL_DUMMY {0x4BDA3FB9, 0x4BD93FB1, 0x4BD83FA9, 0x4BD73FA1,\
0x37C13FB9, 0x24201004, 0x2C391005, 0x24311006,\
0x2C291007, 0x22C00000, 0x36D60000, 0x02C010A4,\
@@ -352,25 +307,6 @@ struct unwind_table_entry
"converts" them into normal unwind entries using some of the reserved
fields to store the stub type. */
-struct stub_unwind_entry
- {
- /* The offset within the executable for the associated stub. */
- unsigned stub_offset;
-
- /* The type of stub this unwind entry describes. */
- char type;
-
- /* Unknown. Not needed by GDB at this time. */
- char prs_info;
-
- /* Length (in instructions) of the associated stub. */
- short stub_length;
- };
-
-/* Sizes (in bytes) of the native unwind entries. */
-#define UNWIND_ENTRY_SIZE 16
-#define STUB_UNWIND_ENTRY_SIZE 8
-
/* The gaps represent linker stubs used in MPE and space for future
expansion. */
enum unwind_stub_types
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 6d39ed0c6a4..a8d414e0551 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -35,9 +35,14 @@ struct frame_info;
the conversion for hppa64 hasn't been completed yet. */
#define GDB_MULTI_ARCH 0
-/* FIXME: brobecker 2003-04-21: All the definition from this point until
- the include of pa/tm-hppah.h are extracted from tm-hppa.h. They have
- been temporarily moved here, until hppa64 is multiarched too. */
+/* FIXME: brobecker 2003-05-22: All the definition from this point until
+ the include of pa/tm-hppah.h are extracted from tm-hppa.h and tm-hppah.h.
+ They have been temporarily moved here, until hppa64 is multiarched too. */
+
+#if !GDB_MULTI_ARCH
+extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
+#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
+#endif
#if !GDB_MULTI_ARCH
extern int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
@@ -287,11 +292,6 @@ extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
#endif
#if !GDB_MULTI_ARCH
-extern int hppa_frame_num_args (struct frame_info *frame);
-#define FRAME_NUM_ARGS(fi) hppa_frame_num_args (fi)
-#endif
-
-#if !GDB_MULTI_ARCH
#define FRAME_ARGS_SKIP 0
#endif
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 290f752d0a3..345baafb4dc 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -35,11 +35,6 @@ struct frame_info;
#include "somsolib.h"
#endif
-#if !GDB_MULTI_ARCH
-extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
-#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
-#endif
-
extern void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
CORE_ADDR *tmp);
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 6ae6085d9b7..dfd96c139dd 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -27,7 +27,7 @@
#define REGISTER_TYPE long /* used in standalone.c */
-#define BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } /* Used in remote.c */
-#define LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
+#define DEPRECATED_BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } /* Used in remote.c */
+#define DEPRECATED_LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
/*#define NOP {0x20, 0x0b}*/ /* Who uses this???*/
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index e51eb63217d..4f8acaf4448 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -277,7 +277,7 @@ extern void sparc32_store_return_value (struct type *, struct regcache *,
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGCACHE) \
sparc_extract_struct_value_address (REGCACHE)
-extern CORE_ADDR sparc_extract_struct_value_address (char *);
+extern CORE_ADDR sparc_extract_struct_value_address (struct regcache *);
/* Stack must be aligned on 64-bit boundaries when synthesizing
function calls (128-bit for sparc64). */
@@ -448,10 +448,6 @@ extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
/* 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
- now that the C compiler delays popping them. */
-#define FRAME_NUM_ARGS(FI) (-1)
-
/* Return number of bytes at start of arglist that are not really args. */
#define FRAME_ARGS_SKIP 68
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index 22e60a09fda..f1ed146fe8e 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -24,8 +24,4 @@
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
-/* XXXJRT not yet under gdbarch control */
-#define FRAME_ARGS_ADDRESS_CORRECT(fi) vax_frame_args_address_correct ((fi))
-extern CORE_ADDR vax_frame_args_address_correct (struct frame_info *);
-
#endif /* TM_VAX_H */
diff --git a/gdb/configure b/gdb/configure
index 207381adefb..e27294cf577 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -5304,17 +5304,74 @@ fi
done
+# ------------------------- #
+# Checks for declarations. #
+# ------------------------- #
+
+for ac_func in getopt
+do
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
+echo "configure:5316: checking whether $ac_func is declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5321 "configure"
+#include "confdefs.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+
+
+int main() {
+#ifndef $ac_func
+char *(*pfn) = (char *(*)) $ac_func ;
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "gcc_cv_have_decl_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "gcc_cv_have_decl_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 0
+EOF
+
+fi
+
+done
+if test x = y ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_DECL_GETOPT 1
+EOF
+fi
+
+
# ------------------ #
# Checks for types. #
# ------------------ #
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5313: checking return type of signal handlers" >&5
+echo "configure:5370: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5318 "configure"
+#line 5375 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -5331,7 +5388,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -5355,12 +5412,12 @@ EOF
# ------------------------------------- #
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5359: checking for working const" >&5
+echo "configure:5416: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5364 "configure"
+#line 5421 "configure"
#include "confdefs.h"
int main() {
@@ -5409,7 +5466,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -5430,21 +5487,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:5434: checking for inline" >&5
+echo "configure:5491: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 5441 "configure"
+#line 5498 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:5448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -5477,19 +5534,19 @@ esac
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:5481: checking for working alloca.h" >&5
+echo "configure:5538: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5486 "configure"
+#line 5543 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -5510,12 +5567,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5514: checking for alloca" >&5
+echo "configure:5571: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5519 "configure"
+#line 5576 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -5543,7 +5600,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -5575,12 +5632,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5579: checking whether alloca needs Cray hooks" >&5
+echo "configure:5636: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5584 "configure"
+#line 5641 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5605,12 +5662,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5609: checking for $ac_func" >&5
+echo "configure:5666: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5614 "configure"
+#line 5671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5633,7 +5690,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5660,7 +5717,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5664: checking stack direction for C alloca" >&5
+echo "configure:5721: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5668,7 +5725,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 5672 "configure"
+#line 5729 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -5687,7 +5744,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -5712,17 +5769,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5716: checking for $ac_hdr" >&5
+echo "configure:5773: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5721 "configure"
+#line 5778 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5751,12 +5808,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5755: checking for $ac_func" >&5
+echo "configure:5812: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
+#line 5817 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5779,7 +5836,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5804,7 +5861,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5808: checking for working mmap" >&5
+echo "configure:5865: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5812,7 +5869,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 5816 "configure"
+#line 5873 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -5952,7 +6009,7 @@ main()
}
EOF
-if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -5975,12 +6032,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5979: checking for pid_t" >&5
+echo "configure:6036: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5984 "configure"
+#line 6041 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -6009,17 +6066,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:6013: checking for vfork.h" >&5
+echo "configure:6070: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6018 "configure"
+#line 6075 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6044,18 +6101,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:6048: checking for working vfork" >&5
+echo "configure:6105: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:6054: checking for vfork" >&5
+echo "configure:6111: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6059 "configure"
+#line 6116 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -6078,7 +6135,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -6100,7 +6157,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 6104 "configure"
+#line 6161 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -6195,7 +6252,7 @@ main() {
}
}
EOF
-if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -6220,12 +6277,12 @@ fi
for ac_func in canonicalize_file_name realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6224: checking for $ac_func" >&5
+echo "configure:6281: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6229 "configure"
+#line 6286 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6248,7 +6305,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6275,12 +6332,12 @@ done
for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6279: checking for $ac_func" >&5
+echo "configure:6336: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6284 "configure"
+#line 6341 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6303,7 +6360,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6330,12 +6387,12 @@ done
for ac_func in pread64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6334: checking for $ac_func" >&5
+echo "configure:6391: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6339 "configure"
+#line 6396 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6358,7 +6415,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6385,12 +6442,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6389: checking for $ac_func" >&5
+echo "configure:6446: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6394 "configure"
+#line 6451 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6413,7 +6470,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6440,12 +6497,12 @@ done
for ac_func in setpgid setpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6444: checking for $ac_func" >&5
+echo "configure:6501: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6449 "configure"
+#line 6506 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6468,7 +6525,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6495,12 +6552,12 @@ done
for ac_func in sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6499: checking for $ac_func" >&5
+echo "configure:6556: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6504 "configure"
+#line 6561 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6523,7 +6580,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6550,12 +6607,12 @@ done
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6554: checking for $ac_func" >&5
+echo "configure:6611: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6559 "configure"
+#line 6616 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6578,7 +6635,62 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in syscall
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6666: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6671 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6605,7 +6717,7 @@ done
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6609: checking whether setpgrp takes no argument" >&5
+echo "configure:6721: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6613,7 +6725,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 6617 "configure"
+#line 6729 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -6633,7 +6745,7 @@ main()
}
EOF
-if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -6658,12 +6770,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6662: checking whether setpgrp takes no argument" >&5
+echo "configure:6774: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6667 "configure"
+#line 6779 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -6677,7 +6789,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -6701,12 +6813,12 @@ fi
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:6705: checking for sigsetjmp" >&5
+echo "configure:6817: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6710 "configure"
+#line 6822 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -6715,7 +6827,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:6719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -6741,12 +6853,12 @@ gdb_use_included_regex=yes
# However, if the system regex is GNU regex, then default to *not*
# using the included regex.
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6745: checking for GNU regex" >&5
+echo "configure:6857: checking for GNU regex" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6750 "configure"
+#line 6862 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
int main() {
@@ -6756,7 +6868,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:6760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6791,19 +6903,19 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:6795: checking for r_fs in struct reg" >&5
+echo "configure:6907: checking for r_fs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6800 "configure"
+#line 6912 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:6807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -6823,19 +6935,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:6827: checking for r_gs in struct reg" >&5
+echo "configure:6939: checking for r_gs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6832 "configure"
+#line 6944 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:6839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -6857,19 +6969,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:6861: checking for PTRACE_GETREGS" >&5
+echo "configure:6973: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6866 "configure"
+#line 6978 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -6891,19 +7003,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:6895: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:7007: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6900 "configure"
+#line 7012 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:6907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -6925,12 +7037,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:6929: checking for PT_GETDBREGS" >&5
+echo "configure:7041: checking for PT_GETDBREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6934 "configure"
+#line 7046 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -6938,7 +7050,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:6942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -6960,12 +7072,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:6964: checking for PT_GETXMMREGS" >&5
+echo "configure:7076: checking for PT_GETXMMREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6969 "configure"
+#line 7081 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -6973,7 +7085,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:6977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -6996,19 +7108,19 @@ fi
# See if stdint.h provides the uintptr_t type.
# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
-echo "configure:7000: checking for uintptr_t in stdint.h" >&5
+echo "configure:7112: checking for uintptr_t in stdint.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7005 "configure"
+#line 7117 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
uintptr_t foo = 0;
; return 0; }
EOF
-if { (eval echo configure:7012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_uintptr_t=yes
else
@@ -7030,12 +7142,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:7034: checking whether malloc must be declared" >&5
+echo "configure:7146: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7039 "configure"
+#line 7151 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7056,7 +7168,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:7060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -7077,12 +7189,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:7081: checking whether realloc must be declared" >&5
+echo "configure:7193: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7086 "configure"
+#line 7198 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7103,7 +7215,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:7107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -7124,12 +7236,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:7128: checking whether free must be declared" >&5
+echo "configure:7240: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7133 "configure"
+#line 7245 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7150,7 +7262,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:7154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -7171,12 +7283,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:7175: checking whether strerror must be declared" >&5
+echo "configure:7287: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7180 "configure"
+#line 7292 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7197,7 +7309,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -7218,12 +7330,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:7222: checking whether strdup must be declared" >&5
+echo "configure:7334: checking whether strdup must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7227 "configure"
+#line 7339 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7244,7 +7356,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:7248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -7265,12 +7377,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:7269: checking whether strstr must be declared" >&5
+echo "configure:7381: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7274 "configure"
+#line 7386 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7291,7 +7403,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:7295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -7312,12 +7424,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:7316: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:7428: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7321 "configure"
+#line 7433 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7338,7 +7450,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:7342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -7364,9 +7476,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:7368: checking for HPUX save_state structure" >&5
+echo "configure:7480: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 7370 "configure"
+#line 7482 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7381,7 +7493,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 7385 "configure"
+#line 7497 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7451,12 +7563,12 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7455: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:7567: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7460 "configure"
+#line 7572 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7465,7 +7577,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:7469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -7487,12 +7599,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7491: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:7603: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7496 "configure"
+#line 7608 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7501,7 +7613,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:7505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -7523,12 +7635,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7527: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:7639: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7532 "configure"
+#line 7644 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7537,7 +7649,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -7559,12 +7671,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7563: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:7675: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7568 "configure"
+#line 7680 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7573,7 +7685,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -7595,12 +7707,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7599: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:7711: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7604 "configure"
+#line 7716 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7609,7 +7721,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -7631,12 +7743,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7635: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:7747: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7640 "configure"
+#line 7752 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7645,7 +7757,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -7667,12 +7779,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7671: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:7783: checking for prgregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7676 "configure"
+#line 7788 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7681,7 +7793,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -7703,12 +7815,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7707: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:7819: checking for prfpregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7712 "configure"
+#line 7824 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7717,7 +7829,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -7739,12 +7851,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7743: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:7855: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7748 "configure"
+#line 7860 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7753,7 +7865,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:7757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -7775,12 +7887,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7779: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:7891: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7784 "configure"
+#line 7896 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7789,7 +7901,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:7793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -7811,12 +7923,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7815: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:7927: checking for prsysent_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7820 "configure"
+#line 7932 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7825,7 +7937,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:7829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -7847,12 +7959,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7851: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:7963: checking for pr_sigset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7856 "configure"
+#line 7968 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7861,7 +7973,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:7865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -7883,12 +7995,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7887: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:7999: checking for pr_sigaction64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7892 "configure"
+#line 8004 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7897,7 +8009,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:7901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -7919,12 +8031,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7923: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:8035: checking for pr_siginfo64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7928 "configure"
+#line 8040 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7933,7 +8045,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:7937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -7960,7 +8072,7 @@ EOF
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:7964: checking whether prfpregset_t type is broken" >&5
+echo "configure:8076: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7968,7 +8080,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 7972 "configure"
+#line 8084 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -7978,7 +8090,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
@@ -8003,12 +8115,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:8007: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:8119: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8012 "configure"
+#line 8124 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -8021,7 +8133,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -8045,19 +8157,19 @@ fi
if test ${host} = ${target} ; then
echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:8049: checking for member l_addr in struct link_map" >&5
+echo "configure:8161: checking for member l_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8054 "configure"
+#line 8166 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -8079,12 +8191,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:8083: checking for member lm_addr in struct link_map" >&5
+echo "configure:8195: checking for member lm_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8088 "configure"
+#line 8200 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -8092,7 +8204,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:8096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -8114,12 +8226,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:8118: checking for member som_addr in struct so_map" >&5
+echo "configure:8230: checking for member som_addr in struct so_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8123 "configure"
+#line 8235 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -8130,7 +8242,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -8152,12 +8264,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:8156: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:8268: checking for struct link_map32 in sys/link.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8161 "configure"
+#line 8273 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -8165,7 +8277,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:8169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -8192,12 +8304,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:8196: checking for long long support in compiler" >&5
+echo "configure:8308: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8201 "configure"
+#line 8313 "configure"
#include "confdefs.h"
int main() {
@@ -8207,7 +8319,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -8229,7 +8341,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:8233: checking for long long support in printf" >&5
+echo "configure:8345: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8237,7 +8349,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 8241 "configure"
+#line 8353 "configure"
#include "confdefs.h"
int main () {
@@ -8251,7 +8363,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -8275,19 +8387,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:8279: checking for long double support in compiler" >&5
+echo "configure:8391: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8284 "configure"
+#line 8396 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:8291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -8309,7 +8421,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:8313: checking for long double support in printf" >&5
+echo "configure:8425: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8317,7 +8429,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8321 "configure"
+#line 8433 "configure"
#include "confdefs.h"
int main () {
@@ -8327,7 +8439,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -8351,7 +8463,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:8355: checking for long double support in scanf" >&5
+echo "configure:8467: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8359,7 +8471,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8363 "configure"
+#line 8475 "configure"
#include "confdefs.h"
int main () {
@@ -8369,7 +8481,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -8394,7 +8506,7 @@ echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:8398: checking for -bbigtoc option" >&5
+echo "configure:8510: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8408,14 +8520,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 8412 "configure"
+#line 8524 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -8438,7 +8550,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:8442: checking for HPUX/OSF thread support" >&5
+echo "configure:8554: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -8461,7 +8573,7 @@ EOF
# because version 0 (present on Solaris 2.4 or earlier) doesn't have
# the same API.
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:8465: checking for Solaris thread debugging library" >&5
+echo "configure:8577: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -8471,7 +8583,7 @@ EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:8475: checking for dlopen in -ldl" >&5
+echo "configure:8587: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -8479,7 +8591,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8483 "configure"
+#line 8595 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -8490,7 +8602,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -8522,17 +8634,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:8526: checking for the ld -export-dynamic flag" >&5
+echo "configure:8638: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 8529 "configure"
+#line 8641 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -8551,13 +8663,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:8555: checking if <proc_service.h> is old" >&5
+echo "configure:8667: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8561 "configure"
+#line 8673 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -8568,7 +8680,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -8594,12 +8706,12 @@ EOF
;;
aix*)
echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:8598: checking for AiX thread debugging library" >&5
+echo "configure:8710: checking for AiX thread debugging library" >&5
if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8603 "configure"
+#line 8715 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
@@ -8608,7 +8720,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:8612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
@@ -8633,19 +8745,19 @@ fi
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:8637: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:8749: checking whether <thread_db.h> has TD_NOTALLOC" >&5
if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8642 "configure"
+#line 8754 "configure"
#include "confdefs.h"
#include <thread_db.h>
int main() {
int i = TD_NOTALLOC;
; return 0; }
EOF
-if { (eval echo configure:8649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_thread_db_h_has_td_notalloc=yes
else
@@ -8668,6 +8780,43 @@ EOF
fi
+if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+ echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
+echo "configure:8786: checking whether <sys/syscall.h> has __NR_tkill" >&5
+if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 8791 "configure"
+#include "confdefs.h"
+#include <sys/syscall.h>
+int main() {
+int i = __NR_tkill;
+; return 0; }
+EOF
+if { (eval echo configure:8798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_sys_syscall_h_has_tkill=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_sys_syscall_h_has_tkill=no
+
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
+fi
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TKILL_SYSCALL 1
+EOF
+
+fi
+
# Check whether --with-sysroot or --without-sysroot was given.
if test "${with_sysroot+set}" = set; then
@@ -8756,7 +8905,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:8760: checking compiler warning flags" >&5
+echo "configure:8909: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -8766,14 +8915,14 @@ echo "configure:8760: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 8770 "configure"
+#line 8919 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:8777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -8821,12 +8970,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:8825: checking for cygwin" >&5
+echo "configure:8974: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8830 "configure"
+#line 8979 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -8904,7 +9053,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:8908: checking for Tcl configuration" >&5
+echo "configure:9057: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9013,7 +9162,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:9017: checking for Tk configuration" >&5
+echo "configure:9166: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9122,7 +9271,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:9126: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:9275: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -9188,17 +9337,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:9192: checking for tclInt.h" >&5
+echo "configure:9341: checking for tclInt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9197 "configure"
+#line 9346 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -9258,7 +9407,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:9262: checking for Tk private headers" >&5
+echo "configure:9411: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -9324,17 +9473,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:9328: checking for tk.h" >&5
+echo "configure:9477: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9333 "configure"
+#line 9482 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -9380,7 +9529,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9384: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:9533: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
@@ -9403,7 +9552,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9407: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:9556: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
@@ -9458,7 +9607,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9462: checking for Itcl configuration" >&5
+echo "configure:9611: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9561,7 +9710,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:9565: checking for Itk configuration" >&5
+echo "configure:9714: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9704,7 +9853,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:9708: checking for X" >&5
+echo "configure:9857: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -9766,12 +9915,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 9770 "configure"
+#line 9919 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -9840,14 +9989,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9844 "configure"
+#line 9993 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -10095,7 +10244,7 @@ fi
# We only build gdbserver automatically if host and target are the same.
if test "x$target" = "x$host"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:10099: checking whether gdbserver is supported on this host" >&5
+echo "configure:10248: checking whether gdbserver is supported on this host" >&5
if test "x$build_gdbserver" = xyes; then
configdirs="$configdirs gdbserver"
echo "$ac_t""yes" 1>&6
@@ -10159,12 +10308,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:10163: checking for Cygwin environment" >&5
+echo "configure:10312: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10168 "configure"
+#line 10317 "configure"
#include "confdefs.h"
int main() {
@@ -10175,7 +10324,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -10192,19 +10341,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:10196: checking for mingw32 environment" >&5
+echo "configure:10345: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10201 "configure"
+#line 10350 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:10208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -10223,7 +10372,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:10227: checking for executable suffix" >&5
+echo "configure:10376: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10233,7 +10382,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:10237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -10275,7 +10424,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10279: checking for iconv" >&5
+echo "configure:10428: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10283,7 +10432,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 10287 "configure"
+#line 10436 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10293,7 +10442,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -10305,7 +10454,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 10309 "configure"
+#line 10458 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10315,7 +10464,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -10336,13 +10485,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10340: checking for iconv declaration" >&5
+echo "configure:10489: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10346 "configure"
+#line 10495 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -10361,7 +10510,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:10365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.host b/gdb/configure.host
index 0268a871af0..0c88533f785 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -13,7 +13,7 @@ case "${host_cpu}" in
alpha*) gdb_host_cpu=alpha ;;
arm*) gdb_host_cpu=arm ;;
hppa*) gdb_host_cpu=pa ;;
-i[3456]86*) gdb_host_cpu=i386 ;;
+i[34567]86*) gdb_host_cpu=i386 ;;
m68*) gdb_host_cpu=m68k ;;
mips*) gdb_host_cpu=mips ;;
powerpc*) gdb_host_cpu=powerpc ;;
@@ -48,34 +48,34 @@ hppa*-*-hpux11*) gdb_host=hpux11 ;;
hppa*-*-hpux*) gdb_host=hppahpux ;;
# OBSOLETE hppa*-*-osf*) gdb_host=hppaosf ;;
-i[3456]86-ncr-*) gdb_host=ncr3000 ;;
+i[34567]86-ncr-*) gdb_host=ncr3000 ;;
# OBSOLETE i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
# OBSOLETE i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
# OBSOLETE i[3456]86-sequent-sysv*) gdb_host=ptx ;;
-i[3456]86-*-bsd*) gdb_host=i386bsd ;;
-i[3456]86-*-dgux*) gdb_host=i386v4 ;;
-i[3456]86-*-freebsd*) gdb_host=fbsd ;;
-i[3456]86-*-netbsdelf*) gdb_host=nbsdelf ;;
-i[3456]86-*-netbsdaout*) gdb_host=nbsdaout ;;
-i[3456]86-*-netbsd*) gdb_host=nbsdaout ;;
-i[3456]86-*-go32*) gdb_host=go32 ;;
-i[3456]86-*-msdosdjgpp*) gdb_host=go32 ;;
-i[3456]86-*-linux*) gdb_host=linux ;;
-i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
-i[3456]86-*-gnu*) gdb_host=i386gnu ;;
-i[3456]86-*-openbsd*) gdb_host=obsd ;;
-i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
-i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
-i[3456]86-*-sco*) gdb_host=i386sco ;;
-i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
-i[3456]86-*-sysv4.2*) gdb_host=i386v42mp ;;
-i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
-i[3456]86-*-sysv5*) gdb_host=i386v42mp ;;
-i[3456]86-*-unixware2*) gdb_host=i386v42mp ;;
-i[3456]86-*-unixware*) gdb_host=i386v4 ;;
-i[3456]86-*-sysv*) gdb_host=i386v ;;
-i[3456]86-*-isc*) gdb_host=i386v ;;
-i[3456]86-*-cygwin*) gdb_host=cygwin ;;
+i[34567]86-*-bsd*) gdb_host=i386bsd ;;
+i[34567]86-*-dgux*) gdb_host=i386v4 ;;
+i[34567]86-*-freebsd*) gdb_host=fbsd ;;
+i[34567]86-*-netbsdelf*) gdb_host=nbsdelf ;;
+i[34567]86-*-netbsdaout*) gdb_host=nbsdaout ;;
+i[34567]86-*-netbsd*) gdb_host=nbsdaout ;;
+i[34567]86-*-go32*) gdb_host=go32 ;;
+i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;;
+i[34567]86-*-linux*) gdb_host=linux ;;
+i[34567]86-*-lynxos*) gdb_host=i386lynx ;;
+i[34567]86-*-gnu*) gdb_host=i386gnu ;;
+i[34567]86-*-openbsd*) gdb_host=obsd ;;
+i[34567]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
+i[34567]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
+i[34567]86-*-sco*) gdb_host=i386sco ;;
+i[34567]86-*-solaris*) gdb_host=i386sol2 ;;
+i[34567]86-*-sysv4.2*) gdb_host=i386v42mp ;;
+i[34567]86-*-sysv4*) gdb_host=i386v4 ;;
+i[34567]86-*-sysv5*) gdb_host=i386v42mp ;;
+i[34567]86-*-unixware2*) gdb_host=i386v42mp ;;
+i[34567]86-*-unixware*) gdb_host=i386v4 ;;
+i[34567]86-*-sysv*) gdb_host=i386v ;;
+i[34567]86-*-isc*) gdb_host=i386v ;;
+i[34567]86-*-cygwin*) gdb_host=cygwin ;;
ia64-*-aix*) gdb_host=aix ;;
ia64-*-linux*) gdb_host=linux ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 07aab351423..38792e03396 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -357,6 +357,12 @@ AC_CHECK_HEADERS(curses.h ncurses.h term.h)
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
+# ------------------------- #
+# Checks for declarations. #
+# ------------------------- #
+
+gcc_AC_CHECK_DECLS(getopt)
+
# ------------------ #
# Checks for types. #
# ------------------ #
@@ -384,6 +390,7 @@ AC_CHECK_FUNCS(sbrk)
AC_CHECK_FUNCS(setpgid setpgrp)
AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
AC_CHECK_FUNCS(socketpair)
+AC_CHECK_FUNCS(syscall)
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
@@ -911,6 +918,24 @@ if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
[Define if <thread_db.h> has the TD_NOTALLOC error code.])
fi
+dnl See if we have a sys/syscall header file that has __NR_tkill.
+if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+ AC_CACHE_CHECK([whether <sys/syscall.h> has __NR_tkill],
+ gdb_cv_sys_syscall_h_has_tkill,
+ AC_TRY_COMPILE(
+ [#include <sys/syscall.h>],
+ [int i = __NR_tkill;],
+ gdb_cv_sys_syscall_h_has_tkill=yes,
+ gdb_cv_sys_syscall_h_has_tkill=no
+ )
+ )
+fi
+dnl See if we can issue tkill syscall.
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+ AC_DEFINE(HAVE_TKILL_SYSCALL, 1,
+ [Define if we can use the tkill syscall.])
+fi
+
dnl Handle optional features that can be enabled.
AC_ARG_WITH(sysroot,
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 0b59b0f41d4..21945c5f314 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -16,7 +16,7 @@ alpha*) gdb_target_cpu=alpha ;;
arm*) gdb_target_cpu=arm ;;
avr*) gdb_target_cpu=avr ;;
hppa*) gdb_target_cpu=pa ;;
-i[3456]86*) gdb_target_cpu=i386 ;;
+i[34567]86*) gdb_target_cpu=i386 ;;
m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;;
m68*) gdb_target_cpu=m68k ;;
mips*) gdb_target_cpu=mips ;;
@@ -85,27 +85,27 @@ hppa*-*-*) gdb_target=hppa ;;
# OBSOLETE i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
# OBSOLETE i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
# OBSOLETE i[3456]86-sequent-sysv*) gdb_target=ptx ;;
-i[3456]86-ncr-*) gdb_target=ncr3000 ;;
-i[3456]86-*-bsd*) gdb_target=i386bsd ;;
-i[3456]86-*-netbsd*) gdb_target=nbsd ;;
-i[3456]86-*-openbsd*) gdb_target=obsd ;;
-i[3456]86-*-go32*) gdb_target=i386aout ;;
-i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
-i[3456]86-*-nto*) gdb_target=nto ;;
-i[3456]86-*-lynxos*) gdb_target=i386lynx ;;
-i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
-i[3456]86-*-sco*) gdb_target=i386v ;;
-i[3456]86-*-sysv*) gdb_target=i386v ;;
-i[3456]86-*-linux*) gdb_target=linux
+i[34567]86-ncr-*) gdb_target=ncr3000 ;;
+i[34567]86-*-bsd*) gdb_target=i386bsd ;;
+i[34567]86-*-netbsd*) gdb_target=nbsd ;;
+i[34567]86-*-openbsd*) gdb_target=obsd ;;
+i[34567]86-*-go32*) gdb_target=i386aout ;;
+i[34567]86-*-msdosdjgpp*) gdb_target=go32 ;;
+i[34567]86-*-nto*) gdb_target=nto ;;
+i[34567]86-*-lynxos*) gdb_target=i386lynx ;;
+i[34567]86-*-solaris*) gdb_target=i386sol2 ;;
+i[34567]86-*-sco*) gdb_target=i386v ;;
+i[34567]86-*-sysv*) gdb_target=i386v ;;
+i[34567]86-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-i[3456]86-*-isc*) gdb_target=i386v ;;
-i[3456]86-*-gnu*) gdb_target=i386gnu ;;
-i[3456]86-*-netware*) gdb_target=i386nw
+i[34567]86-*-isc*) gdb_target=i386v ;;
+i[34567]86-*-gnu*) gdb_target=i386gnu ;;
+i[34567]86-*-netware*) gdb_target=i386nw
configdirs="${configdirs} nlm" ;;
-i[3456]86-*-cygwin*) gdb_target=cygwin ;;
-i[3456]86-*-vxworks*) gdb_target=vxworks ;;
-i[3456]86-*-*) gdb_target=embed ;;
+i[34567]86-*-cygwin*) gdb_target=cygwin ;;
+i[34567]86-*-vxworks*) gdb_target=vxworks ;;
+i[34567]86-*-*) gdb_target=embed ;;
ia64-*-aix*) gdb_target=aix ;;
ia64-*-linux*) gdb_target=linux
@@ -142,21 +142,13 @@ m68*-*-sysv4*) gdb_target=m68kv4 ;;
m68*-*-vxworks*) gdb_target=vxworks68 ;;
mcore*-*-*) gdb_target=mcore ;;
-mips64*-big-*) gdb_target=bigmips64 ;;
-mips*-big-*) gdb_target=bigmips ;;
-mips*-dec-*) gdb_target=decstation ;;
+mips64*-big-*) gdb_target=mips64 ;;
+mips*-big-*) gdb_target=mips ;;
+mips*-dec-*) gdb_target=mips ;;
mips*-*-pe) gdb_target=wince ;;
mips64*el-*-ecoff*) gdb_target=embedl64 ;;
mips64*-*-ecoff*) gdb_target=embed64 ;;
-mips64*vr4xxx*el-*-elf*)gdb_target=vr4xxxel ;;
-mips64*vr4xxx*-*-elf*) gdb_target=vr4xxx ;;
-mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
-mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
-mips64*vr4100*el-*-elf*) gdb_target=vr4300el ;;
-mips64*vr4100*-*-elf*) gdb_target=vr4100 ;;
-mips64*vr5000*el-*-elf*) gdb_target=vr5000el ;;
-mips64*vr5000*-*-elf*) gdb_target=vr5000 ;;
-mips*tx39*el*-elf*) gdb_target=tx39l ;;
+mips64*vr*-*-elf*) gdb_target=mips64 ;;
mips*tx39*-elf*) gdb_target=tx39 ;;
mips64*el-*-elf*) gdb_target=embedl64 ;;
mips64*-*-elf*) gdb_target=embed64 ;;
@@ -165,20 +157,20 @@ mips*el-*-ecoff*) gdb_target=embedl ;;
mips*-*-ecoff*) gdb_target=embed ;;
mips*el-*-elf*) gdb_target=embedl ;;
mips*-*-elf*) gdb_target=embed ;;
-mips*-little-*) gdb_target=littlemips ;;
+mips*-little-*) gdb_target=mips ;;
mips*-*-lnews*) gdb_target=embedl ;;
mips*-sgi-irix5*) gdb_target=irix5 ;;
mips*-sgi-irix6*) gdb_target=irix6 ;;
mips*-sgi-*) gdb_target=irix3 ;;
-mips*-sony-*) gdb_target=bigmips ;;
+mips*-sony-*) gdb_target=mips64 ;;
mips*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
mips*-*-netbsd*) gdb_target=nbsd ;;
# OBSOLETE mips*-*-mach3*) gdb_target=mipsm3 ;;
mips*-*-sysv4*) gdb_target=mipsv4 ;;
-mips*-*-sysv*) gdb_target=bigmips ;;
-mips*-*-riscos*) gdb_target=bigmips ;;
+mips*-*-sysv*) gdb_target=mips ;;
+mips*-*-riscos*) gdb_target=mips ;;
mips*-*-vxworks*) gdb_target=vxmips ;;
mips*-*-*) gdb_target=embed ;;
@@ -194,9 +186,7 @@ powerpc-*-aix*) gdb_target=aix ;;
powerpc-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-powerpc64-*-linux*) gdb_target=linux
- build_gdbserver=yes
- ;;
+powerpc64-*-linux*) gdb_target=linux ;;
powerpc-*-vxworks*) gdb_target=vxworks ;;
powerpc*-*-*) if test -f ../sim/ppc/Makefile; then
gdb_target=ppc-sim
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index 3aa9966433f..43361fca2ea 100644
--- a/gdb/cp-abi.c
+++ b/gdb/cp-abi.c
@@ -234,6 +234,8 @@ show_cp_abi_cmd (char *args, int from_tty)
ui_out_text (uiout, ").\n");
}
+extern initialize_file_ftype _initialize_cp_abi; /* -Wmissing-prototypes */
+
void
_initialize_cp_abi (void)
{
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index a4c7b8d3570..db0839fb837 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -38,6 +38,9 @@ unsigned char processing_has_namespace_info;
contain the name of the current namespace. The string is
temporary; copy it if you need it. */
+/* FIXME: carlton/2003-06-12: This isn't entirely reliable: currently,
+ we get mislead by DW_AT_specification. */
+
const char *processing_current_namespace;
/* List of using directives that are active in the current file. */
@@ -187,6 +190,12 @@ cp_set_block_scope (const struct symbol *symbol,
if (SYMBOL_CPLUS_DEMANGLED_NAME (symbol) != NULL)
{
+#if 0
+ /* FIXME: carlton/2003-06-12: As mentioned above,
+ 'processing_has_namespace_info' currently isn't entirely
+ reliable, so let's always use demangled names to get this
+ information for now. */
+
if (processing_has_namespace_info)
{
block_set_scope
@@ -196,6 +205,7 @@ cp_set_block_scope (const struct symbol *symbol,
obstack);
}
else
+#endif
{
/* Try to figure out the appropriate namespace from the
demangled name. */
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 14456f8938f..64b3f89ab53 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -27,6 +27,21 @@
#include "demangle.h"
#include "gdb_assert.h"
#include "gdbcmd.h"
+#include "dictionary.h"
+#include "objfiles.h"
+#include "frame.h"
+#include "symtab.h"
+#include "block.h"
+
+/* Functions/variables related to overload resolution. */
+
+static int sym_return_val_size;
+static int sym_return_val_index;
+static struct symbol **sym_return_val;
+
+static char *remove_params (const char *demangled_name);
+
+static void overload_list_add_symbol (struct symbol *sym, char *oload_name);
/* The list of "maint cplus" commands. */
@@ -324,6 +339,204 @@ cp_entire_prefix_len (const char *name)
return previous_len;
}
+/* Overload resolution functions. */
+
+static char *
+remove_params (const char *demangled_name)
+{
+ const char *argp;
+ char *new_name;
+ int depth;
+
+ if (demangled_name == NULL)
+ return NULL;
+
+ /* First find the end of the arg list. */
+ argp = strrchr (demangled_name, ')');
+ if (argp == NULL)
+ return NULL;
+
+ /* Back up to the beginning. */
+ depth = 1;
+
+ while (argp-- > demangled_name)
+ {
+ if (*argp == ')')
+ depth ++;
+ else if (*argp == '(')
+ {
+ depth --;
+
+ if (depth == 0)
+ break;
+ }
+ }
+ if (depth != 0)
+ internal_error (__FILE__, __LINE__,
+ "bad demangled name %s\n", demangled_name);
+ while (argp[-1] == ' ' && argp > demangled_name)
+ argp --;
+
+ new_name = xmalloc (argp - demangled_name + 1);
+ memcpy (new_name, demangled_name, argp - demangled_name);
+ new_name[argp - demangled_name] = '\0';
+ return new_name;
+}
+
+/* Test to see if the symbol specified by SYMNAME (which is already
+ demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
+ characters. If so, add it to the current completion list. */
+
+static void
+overload_list_add_symbol (struct symbol *sym, char *oload_name)
+{
+ int newsize;
+ int i;
+ char *sym_name;
+
+ /* If there is no type information, we can't do anything, so skip */
+ if (SYMBOL_TYPE (sym) == NULL)
+ return;
+
+ /* skip any symbols that we've already considered. */
+ for (i = 0; i < sym_return_val_index; ++i)
+ if (!strcmp (DEPRECATED_SYMBOL_NAME (sym), DEPRECATED_SYMBOL_NAME (sym_return_val[i])))
+ return;
+
+ /* Get the demangled name without parameters */
+ sym_name = remove_params (SYMBOL_DEMANGLED_NAME (sym));
+ if (!sym_name)
+ return;
+
+ /* skip symbols that cannot match */
+ if (strcmp (sym_name, oload_name) != 0)
+ {
+ xfree (sym_name);
+ return;
+ }
+
+ xfree (sym_name);
+
+ /* We have a match for an overload instance, so add SYM to the current list
+ * of overload instances */
+ if (sym_return_val_index + 3 > sym_return_val_size)
+ {
+ newsize = (sym_return_val_size *= 2) * sizeof (struct symbol *);
+ sym_return_val = (struct symbol **) xrealloc ((char *) sym_return_val, newsize);
+ }
+ sym_return_val[sym_return_val_index++] = sym;
+ sym_return_val[sym_return_val_index] = NULL;
+}
+
+/* Return a null-terminated list of pointers to function symbols that
+ * match name of the supplied symbol FSYM.
+ * This is used in finding all overloaded instances of a function name.
+ * This has been modified from make_symbol_completion_list. */
+
+
+struct symbol **
+make_symbol_overload_list (struct symbol *fsym)
+{
+ register struct symbol *sym;
+ register struct symtab *s;
+ register struct partial_symtab *ps;
+ register struct objfile *objfile;
+ register struct block *b, *surrounding_static_block = 0;
+ struct dict_iterator iter;
+ /* The name we are completing on. */
+ char *oload_name = NULL;
+ /* Length of name. */
+ int oload_name_len = 0;
+
+ /* Look for the symbol we are supposed to complete on. */
+
+ oload_name = remove_params (SYMBOL_DEMANGLED_NAME (fsym));
+ if (!oload_name)
+ {
+ sym_return_val_size = 1;
+ sym_return_val = (struct symbol **) xmalloc (2 * sizeof (struct symbol *));
+ sym_return_val[0] = fsym;
+ sym_return_val[1] = NULL;
+
+ return sym_return_val;
+ }
+ oload_name_len = strlen (oload_name);
+
+ sym_return_val_size = 100;
+ sym_return_val_index = 0;
+ sym_return_val = (struct symbol **) xmalloc ((sym_return_val_size + 1) * sizeof (struct symbol *));
+ sym_return_val[0] = NULL;
+
+ /* Read in all partial symtabs containing a partial symbol named
+ OLOAD_NAME. */
+
+ ALL_PSYMTABS (objfile, ps)
+ {
+ struct partial_symbol **psym;
+
+ /* If the psymtab's been read in we'll get it when we search
+ through the blockvector. */
+ if (ps->readin)
+ continue;
+
+ if ((lookup_partial_symbol (ps, oload_name, NULL, 1, VAR_DOMAIN)
+ != NULL)
+ || (lookup_partial_symbol (ps, oload_name, NULL, 0, VAR_DOMAIN)
+ != NULL))
+ PSYMTAB_TO_SYMTAB (ps);
+ }
+
+ /* Search upwards from currently selected frame (so that we can
+ complete on local vars. */
+
+ for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b))
+ {
+ if (!BLOCK_SUPERBLOCK (b))
+ {
+ surrounding_static_block = b; /* For elimination of dups */
+ }
+
+ /* Also catch fields of types defined in this places which match our
+ text string. Only complete on types visible from current context. */
+
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
+ {
+ overload_list_add_symbol (sym, oload_name);
+ }
+ }
+
+ /* Go through the symtabs and check the externs and statics for
+ symbols which match. */
+
+ ALL_SYMTABS (objfile, s)
+ {
+ QUIT;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
+ {
+ overload_list_add_symbol (sym, oload_name);
+ }
+ }
+
+ ALL_SYMTABS (objfile, s)
+ {
+ QUIT;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+ /* Don't do this block twice. */
+ if (b == surrounding_static_block)
+ continue;
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
+ {
+ overload_list_add_symbol (sym, oload_name);
+ }
+ }
+
+ xfree (oload_name);
+
+ return (sym_return_val);
+}
+
+
/* Don't allow just "maintenance cplus". */
static void
@@ -349,6 +562,8 @@ first_component_command (char *arg, int from_tty)
printf_unfiltered ("%s\n", prefix);
}
+extern initialize_file_ftype _initialize_cp_support; /* -Wmissing-prototypes */
+
void
_initialize_cp_support (void)
{
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 952d6a2b17b..339981c537e 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -30,6 +30,7 @@
/* Opaque declarations. */
+struct symbol;
struct obstack;
struct block;
@@ -57,6 +58,7 @@ extern unsigned int cp_find_first_component (const char *name);
extern unsigned int cp_entire_prefix_len (const char *name);
+extern struct symbol **make_symbol_overload_list (struct symbol *);
/* Functions/variables from cp-namespace.c. */
@@ -70,7 +72,7 @@ extern void cp_add_using_directive (const char *name,
unsigned int outer_length,
unsigned int inner_length);
-extern void cp_initialize_namespace ();
+extern void cp_initialize_namespace (void);
extern void cp_finalize_namespace (struct block *static_block,
struct obstack *obstack);
diff --git a/gdb/cpu32bug-rom.c b/gdb/cpu32bug-rom.c
index 4341789e165..03b31321577 100644
--- a/gdb/cpu32bug-rom.c
+++ b/gdb/cpu32bug-rom.c
@@ -162,6 +162,8 @@ cpu32bug_open (char *args, int from_tty)
monitor_open (args, &cpu32bug_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_cpu32bug_rom; /* -Wmissing-prototypes */
+
void
_initialize_cpu32bug_rom (void)
{
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 8ffb441c581..0da68c0f33d 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -464,7 +464,7 @@ static CORE_ADDR bfd_lookup_symbol (bfd *, const char *);
the entire prologue is examined (0) or just enough instructions to
determine that it is a prologue (1). */
-CORE_ADDR
+static CORE_ADDR
cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
int frameless_p)
{
@@ -712,7 +712,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
/* Advance pc beyond any function entry prologue instructions at pc
to reach some "real" code. */
-CORE_ADDR
+static CORE_ADDR
cris_skip_prologue (CORE_ADDR pc)
{
return cris_skip_prologue_main (pc, 0);
@@ -722,7 +722,7 @@ cris_skip_prologue (CORE_ADDR pc)
has a frame. Its result is equal to its input pc if the function is
frameless, unequal otherwise. */
-CORE_ADDR
+static CORE_ADDR
cris_skip_prologue_frameless_p (CORE_ADDR pc)
{
return cris_skip_prologue_main (pc, 1);
@@ -731,7 +731,7 @@ cris_skip_prologue_frameless_p (CORE_ADDR pc)
/* Given a PC value corresponding to the start of a function, return the PC
of the first instruction after the function prologue. */
-CORE_ADDR
+static CORE_ADDR
cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
{
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
@@ -763,7 +763,7 @@ cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
adjusts pcptr (if necessary) to point to the actual memory location where
the breakpoint should be inserted. */
-const unsigned char *
+static const unsigned char *
cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x38, 0xe9};
@@ -784,7 +784,7 @@ cris_saved_pc_after_call (struct frame_info *frame)
/* Returns 1 if spec_reg is applicable to the current gdbarch's CRIS version,
0 otherwise. */
-int
+static int
cris_spec_reg_applicable (struct cris_spec_reg spec_reg)
{
int version = cris_version ();
@@ -818,7 +818,7 @@ cris_spec_reg_applicable (struct cris_spec_reg spec_reg)
/* Returns the register size in unit byte. Returns 0 for an unimplemented
register, -1 for an invalid register. */
-int
+static int
cris_register_size (int regno)
{
int i;
@@ -857,7 +857,7 @@ cris_register_size (int regno)
/* Nonzero if regno should not be fetched from the target. This is the case
for unimplemented (size 0) and non-existant registers. */
-int
+static int
cris_cannot_fetch_register (int regno)
{
return ((regno < 0 || regno >= NUM_REGS)
@@ -867,7 +867,7 @@ cris_cannot_fetch_register (int regno)
/* Nonzero if regno should not be written to the target, for various
reasons. */
-int
+static int
cris_cannot_store_register (int regno)
{
/* There are three kinds of registers we refuse to write to.
@@ -903,7 +903,7 @@ cris_cannot_store_register (int regno)
in the saved register state. Returns -1 for an invalid or unimplemented
register. */
-int
+static int
cris_register_offset (int regno)
{
int i;
@@ -929,7 +929,7 @@ cris_register_offset (int regno)
/* Return the GDB type (defined in gdbtypes.c) for the "standard" data type
of data in register regno. */
-struct type *
+static struct type *
cris_register_virtual_type (int regno)
{
if (regno == SP_REGNUM || regno == PC_REGNUM
@@ -966,7 +966,7 @@ cris_register_virtual_type (int regno)
/* In the original CRIS ABI, R10 is used to store return values. */
-void
+static void
cris_abi_original_store_return_value (struct type *type, char *valbuf)
{
int len = TYPE_LENGTH (type);
@@ -979,7 +979,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf)
/* In the CRIS ABI V2, R10 and R11 are used to store return values. */
-void
+static void
cris_abi_v2_store_return_value (struct type *type, char *valbuf)
{
int len = TYPE_LENGTH (type);
@@ -997,7 +997,7 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
/* Return the name of register regno as a string. Return NULL for an invalid or
unimplemented register. */
-const char *
+static const char *
cris_register_name (int regno)
{
static char *cris_genreg_names[] =
@@ -1039,7 +1039,7 @@ cris_register_name (int regno)
}
}
-int
+static int
cris_register_bytes_ok (long bytes)
{
return (bytes == DEPRECATED_REGISTER_BYTES);
@@ -1051,7 +1051,7 @@ cris_register_bytes_ok (long bytes)
/* In the original CRIS ABI, R10 is used to return values. */
-void
+static void
cris_abi_original_extract_return_value (struct type *type, char *regbuf,
char *valbuf)
{
@@ -1065,7 +1065,7 @@ cris_abi_original_extract_return_value (struct type *type, char *regbuf,
/* In the CRIS ABI V2, R10 and R11 are used to store return values. */
-void
+static void
cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
char *valbuf)
{
@@ -1083,7 +1083,7 @@ cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
be stored. R9 is call-clobbered, which means we must save it here for
later use. */
-void
+static void
cris_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (STR_REGNUM, addr);
@@ -1094,7 +1094,7 @@ cris_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
structure value. It's not there in the CRIS ABI, so we must do it another
way. */
-CORE_ADDR
+static CORE_ADDR
cris_extract_struct_value_address (char *regbuf)
{
return struct_return_address;
@@ -1106,7 +1106,7 @@ cris_extract_struct_value_address (char *regbuf)
/* In the original CRIS ABI, arguments shorter than or equal to 32 bits are
passed by value. */
-int
+static int
cris_abi_original_reg_struct_has_addr (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 4);
@@ -1115,7 +1115,7 @@ cris_abi_original_reg_struct_has_addr (int gcc_p, struct type *type)
/* In the CRIS ABI V2, arguments shorter than or equal to 64 bits are passed
by value. */
-int
+static int
cris_abi_v2_reg_struct_has_addr (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
@@ -1124,7 +1124,7 @@ cris_abi_v2_reg_struct_has_addr (int gcc_p, struct type *type)
/* Returns 1 if the function invocation represented by fi does not have a
stack frame associated with it. Otherwise return 0. */
-int
+static int
cris_frameless_function_invocation (struct frame_info *fi)
{
if ((get_frame_type (fi) == SIGTRAMP_FRAME))
@@ -1138,7 +1138,7 @@ cris_frameless_function_invocation (struct frame_info *fi)
frame->saved_regs shall be allocated by
DEPRECATED_FRAME_INIT_SAVED_REGS using frame_saved_regs_zalloc. */
-void
+static void
cris_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR ip;
@@ -1185,7 +1185,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
When the call is from get_prev_frame_info, fromleaf is determined by
cris_frameless_function_invocation. */
-void
+static void
cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
if (get_next_frame (fi))
@@ -1239,7 +1239,7 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Return the content of the frame pointer in the present frame. In other
words, determine the address of the calling function's frame. */
-CORE_ADDR
+static CORE_ADDR
cris_frame_chain (struct frame_info *fi)
{
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
@@ -1260,7 +1260,7 @@ cris_frame_chain (struct frame_info *fi)
/* Return the saved PC (which equals the return address) of this frame. */
-CORE_ADDR
+static CORE_ADDR
cris_frame_saved_pc (struct frame_info *fi)
{
return get_frame_extra_info (fi)->return_pc;
@@ -1268,7 +1268,7 @@ cris_frame_saved_pc (struct frame_info *fi)
/* Setup the function arguments for calling a function in the inferior. */
-CORE_ADDR
+static CORE_ADDR
cris_abi_original_push_arguments (int nargs, struct value **args,
CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
@@ -1354,7 +1354,7 @@ cris_abi_original_push_arguments (int nargs, struct value **args,
return sp;
}
-CORE_ADDR
+static CORE_ADDR
cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -1486,7 +1486,7 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
by the called function unless it is a leaf-function. Due to the BRP
register the PC will change when continue is sent. */
-CORE_ADDR
+static CORE_ADDR
cris_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (SRP_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -1497,7 +1497,7 @@ cris_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
was created. Discard the innermost frame from the stack and restore
all saved registers. */
-void
+static void
cris_pop_frame (void)
{
register struct frame_info *fi = get_current_frame ();
@@ -1759,7 +1759,7 @@ find_step_target (inst_env_type *inst_env)
digs through the opcodes in order to find all possible targets.
Either one ordinary target or two targets for branches may be found. */
-void
+static void
cris_software_single_step (enum target_signal ignore, int insert_breakpoints)
{
inst_env_type inst_env;
@@ -1803,7 +1803,7 @@ cris_software_single_step (enum target_signal ignore, int insert_breakpoints)
/* Calculates the prefix value for quick offset addressing mode. */
-void
+static void
quick_mode_bdap_prefix (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to be in a delay slot. You can't have a prefix to this
@@ -1827,7 +1827,7 @@ quick_mode_bdap_prefix (unsigned short inst, inst_env_type *inst_env)
from the size of the operation. The PC is always kept aligned on even
word addresses. */
-void
+static void
process_autoincrement (int size, unsigned short inst, inst_env_type *inst_env)
{
if (size == INST_BYTE_SIZE)
@@ -1858,12 +1858,13 @@ process_autoincrement (int size, unsigned short inst, inst_env_type *inst_env)
/* Just a forward declaration. */
-unsigned long get_data_from_address (unsigned short *inst, CORE_ADDR address);
+static unsigned long get_data_from_address (unsigned short *inst,
+ CORE_ADDR address);
/* Calculates the prefix value for the general case of offset addressing
mode. */
-void
+static void
bdap_prefix (unsigned short inst, inst_env_type *inst_env)
{
@@ -1899,7 +1900,7 @@ bdap_prefix (unsigned short inst, inst_env_type *inst_env)
/* Calculates the prefix value for the index addressing mode. */
-void
+static void
biap_prefix (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to be in a delay slot. I can't see that it's possible to
@@ -1934,7 +1935,7 @@ biap_prefix (unsigned short inst, inst_env_type *inst_env)
/* Calculates the prefix value for the double indirect addressing mode. */
-void
+static void
dip_prefix (unsigned short inst, inst_env_type *inst_env)
{
@@ -1967,7 +1968,7 @@ dip_prefix (unsigned short inst, inst_env_type *inst_env)
/* Finds the destination for a branch with 8-bits offset. */
-void
+static void
eight_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
{
@@ -2004,7 +2005,7 @@ eight_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
/* Finds the destination for a branch with 16-bits offset. */
-void
+static void
sixteen_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
{
short offset;
@@ -2035,7 +2036,7 @@ sixteen_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ABS instruction. */
-void
+static void
abs_op (unsigned short inst, inst_env_type *inst_env)
{
@@ -2077,7 +2078,7 @@ abs_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ADDI instruction. */
-void
+static void
addi_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as base register. And ADDI can't have
@@ -2096,7 +2097,7 @@ addi_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ASR instruction. */
-void
+static void
asr_op (unsigned short inst, inst_env_type *inst_env)
{
int shift_steps;
@@ -2173,7 +2174,7 @@ asr_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ASRQ instruction. */
-void
+static void
asrq_op (unsigned short inst, inst_env_type *inst_env)
{
@@ -2220,7 +2221,7 @@ asrq_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the AX, EI and SETF instruction. */
-void
+static void
ax_ei_setf_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2246,7 +2247,7 @@ ax_ei_setf_op (unsigned short inst, inst_env_type *inst_env)
register. Note that check_assign assumes that the caller has checked that
there is a prefix to this instruction. The mode check depends on this. */
-void
+static void
check_assign (unsigned short inst, inst_env_type *inst_env)
{
/* Check if it's an assign addressing mode. */
@@ -2259,7 +2260,7 @@ check_assign (unsigned short inst, inst_env_type *inst_env)
/* Handles the 2-operand BOUND instruction. */
-void
+static void
two_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as the index operand. */
@@ -2292,7 +2293,7 @@ two_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the 3-operand BOUND instruction. */
-void
+static void
three_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we haven't got a prefix. And it's also an error
@@ -2310,7 +2311,7 @@ three_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
/* Clears the status flags in inst_env. */
-void
+static void
btst_nop_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we have got a prefix. */
@@ -2328,7 +2329,7 @@ btst_nop_op (unsigned short inst, inst_env_type *inst_env)
/* Clears the status flags in inst_env. */
-void
+static void
clearf_di_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we have got a prefix. */
@@ -2346,7 +2347,7 @@ clearf_di_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the CLEAR instruction if it's in register mode. */
-void
+static void
reg_mode_clear_op (unsigned short inst, inst_env_type *inst_env)
{
/* Check if the target is the PC. */
@@ -2383,7 +2384,7 @@ reg_mode_clear_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the TEST instruction if it's in register mode. */
-void
+static void
reg_mode_test_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we have got a prefix. */
@@ -2402,7 +2403,7 @@ reg_mode_test_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the CLEAR and TEST instruction if the instruction isn't
in register mode. */
-void
+static void
none_reg_mode_clear_test_op (unsigned short inst, inst_env_type *inst_env)
{
/* Check if we are in a prefix mode. */
@@ -2427,7 +2428,7 @@ none_reg_mode_clear_test_op (unsigned short inst, inst_env_type *inst_env)
/* Checks that the PC isn't the destination register or the instructions has
a prefix. */
-void
+static void
dstep_logshift_mstep_neg_not_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as the destination. The instruction can't
@@ -2446,7 +2447,7 @@ dstep_logshift_mstep_neg_not_op (unsigned short inst, inst_env_type *inst_env)
/* Checks that the instruction doesn't have a prefix. */
-void
+static void
break_op (unsigned short inst, inst_env_type *inst_env)
{
/* The instruction can't have a prefix. */
@@ -2465,7 +2466,7 @@ break_op (unsigned short inst, inst_env_type *inst_env)
/* Checks that the PC isn't the destination register and that the instruction
doesn't have a prefix. */
-void
+static void
scc_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as the destination. The instruction can't
@@ -2484,7 +2485,7 @@ scc_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the register mode JUMP instruction. */
-void
+static void
reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to do a JUMP in a delay slot. The mode is register, so
@@ -2505,7 +2506,8 @@ reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the JUMP instruction for all modes except register. */
-void none_reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
+static void
+none_reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
{
unsigned long newpc;
CORE_ADDR address;
@@ -2549,7 +2551,7 @@ void none_reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves to special registers (aka P-register) for all modes. */
-void
+static void
move_to_preg_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2604,7 +2606,7 @@ move_to_preg_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves from special registers (aka P-register) for all modes
except register. */
-void
+static void
none_reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2659,7 +2661,7 @@ none_reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves from special registers (aka P-register) when the mode
is register. */
-void
+static void
reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
{
/* Register mode move from special register can't have a prefix. */
@@ -2694,7 +2696,7 @@ reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MOVEM from memory to general register instruction. */
-void
+static void
move_mem_to_reg_movem_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2751,7 +2753,7 @@ move_mem_to_reg_movem_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MOVEM to memory from general register instruction. */
-void
+static void
move_reg_to_mem_movem_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2790,7 +2792,7 @@ move_reg_to_mem_movem_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the pop instruction to a general register.
POP is a assembler macro for MOVE.D [SP+], Rd. */
-void
+static void
reg_pop_op (unsigned short inst, inst_env_type *inst_env)
{
/* POP can't have a prefix. */
@@ -2818,7 +2820,7 @@ reg_pop_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves from register to memory. */
-void
+static void
move_reg_to_mem_index_inc_op (unsigned short inst, inst_env_type *inst_env)
{
/* Check if we have a prefix. */
@@ -2847,7 +2849,7 @@ move_reg_to_mem_index_inc_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the intructions that's not yet implemented, by setting
inst_env->invalid to true. */
-void
+static void
not_implemented_op (unsigned short inst, inst_env_type *inst_env)
{
inst_env->invalid = 1;
@@ -2855,7 +2857,7 @@ not_implemented_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the XOR instruction. */
-void
+static void
xor_op (unsigned short inst, inst_env_type *inst_env)
{
/* XOR can't have a prefix. */
@@ -2884,7 +2886,7 @@ xor_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MULS instruction. */
-void
+static void
muls_op (unsigned short inst, inst_env_type *inst_env)
{
/* MULS/U can't have a prefix. */
@@ -2908,7 +2910,7 @@ muls_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MULU instruction. */
-void
+static void
mulu_op (unsigned short inst, inst_env_type *inst_env)
{
/* MULS/U can't have a prefix. */
@@ -2933,7 +2935,7 @@ mulu_op (unsigned short inst, inst_env_type *inst_env)
/* Calculate the result of the instruction for ADD, SUB, CMP AND, OR and MOVE.
The MOVE instruction is the move from source to register. */
-void
+static void
add_sub_cmp_and_or_move_action (unsigned short inst, inst_env_type *inst_env,
unsigned long source1, unsigned long source2)
{
@@ -3015,7 +3017,7 @@ add_sub_cmp_and_or_move_action (unsigned short inst, inst_env_type *inst_env,
is zero extend then the value is extended with zero. If instead the mode
is signed extend the sign bit of the value is taken into consideration. */
-unsigned long
+static unsigned long
do_sign_or_zero_extend (unsigned long value, unsigned short *inst)
{
/* The size can be either byte or word, check which one it is.
@@ -3053,7 +3055,7 @@ do_sign_or_zero_extend (unsigned long value, unsigned short *inst)
/* Handles the register mode for the ADD, SUB, CMP, AND, OR and MOVE
instruction. The MOVE instruction is the move from source to register. */
-void
+static void
reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3098,7 +3100,7 @@ reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
the size of the operation. If the instruction is a zero or signed
extend instruction, the size field is changed in instruction. */
-unsigned long
+static unsigned long
get_data_from_address (unsigned short *inst, CORE_ADDR address)
{
int size = cris_get_size (*inst);
@@ -3126,7 +3128,7 @@ get_data_from_address (unsigned short *inst, CORE_ADDR address)
/* Handles the assign addresing mode for the ADD, SUB, CMP, AND, OR and MOVE
instructions. The MOVE instruction is the move from source to register. */
-void
+static void
handle_prefix_assign_mode_for_aritm_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3155,7 +3157,7 @@ handle_prefix_assign_mode_for_aritm_op (unsigned short inst,
OR instructions. Note that for this to work as expected, the calling
function must have made sure that there is a prefix to this instruction. */
-void
+static void
three_operand_add_sub_cmp_and_or_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3183,7 +3185,7 @@ three_operand_add_sub_cmp_and_or_op (unsigned short inst,
/* Handles the index addresing mode for the ADD, SUB, CMP, AND, OR and MOVE
instructions. The MOVE instruction is the move from source to register. */
-void
+static void
handle_prefix_index_mode_for_aritm_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3211,7 +3213,7 @@ handle_prefix_index_mode_for_aritm_op (unsigned short inst,
CMP, AND OR and MOVE instruction. The MOVE instruction is the move from
source to register. */
-void
+static void
handle_inc_and_index_mode_for_aritm_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3261,7 +3263,7 @@ handle_inc_and_index_mode_for_aritm_op (unsigned short inst,
/* Handles the two-operand addressing mode, all modes except register, for
the ADD, SUB CMP, AND and OR instruction. */
-void
+static void
none_reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3290,7 +3292,7 @@ none_reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
/* Handles the quick addressing mode for the ADD and SUB instruction. */
-void
+static void
quick_mode_add_sub_op (unsigned short inst, inst_env_type *inst_env)
{
unsigned long operand1;
@@ -3330,7 +3332,7 @@ quick_mode_add_sub_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the quick addressing mode for the CMP, AND and OR instruction. */
-void
+static void
quick_mode_and_cmp_move_or_op (unsigned short inst, inst_env_type *inst_env)
{
unsigned long operand1;
@@ -3376,8 +3378,9 @@ quick_mode_and_cmp_move_or_op (unsigned short inst, inst_env_type *inst_env)
/* Translate op_type to a function and call it. */
-static void cris_gdb_func (enum cris_op_type op_type, unsigned short inst,
- inst_env_type *inst_env)
+static void
+cris_gdb_func (enum cris_op_type op_type, unsigned short inst,
+ inst_env_type *inst_env)
{
switch (op_type)
{
@@ -3549,7 +3552,7 @@ typedef elf_greg_t elf_gregset_t[35];
/* Unpack an elf_gregset_t into GDB's register cache. */
-void
+static void
supply_gregset (elf_gregset_t *gregsetp)
{
int i;
@@ -3614,7 +3617,7 @@ static struct core_fns cris_elf_core_fns =
See gdb/solib-svr4.h for an explanation of these fields. */
-struct link_map_offsets *
+static struct link_map_offsets *
cris_linux_svr4_fetch_link_map_offsets (void)
{
static struct link_map_offsets lmo;
@@ -3842,6 +3845,8 @@ cris_fpless_backtrace (char *noargs, int from_tty)
}
}
+extern initialize_file_ftype _initialize_cris_tdep; /* -Wmissing-prototypes */
+
void
_initialize_cris_tdep (void)
{
@@ -4226,21 +4231,21 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Returns the register offset for the first byte of register regno's space
in the saved register state. */
- set_gdbarch_register_byte (gdbarch, cris_register_offset);
+ set_gdbarch_deprecated_register_byte (gdbarch, cris_register_offset);
/* The length of the registers in the actual machine representation. */
- set_gdbarch_register_raw_size (gdbarch, cris_register_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, cris_register_size);
/* The largest value REGISTER_RAW_SIZE can have. */
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 32);
/* The length of the registers in the program's representation. */
- set_gdbarch_register_virtual_size (gdbarch, cris_register_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, cris_register_size);
/* The largest value REGISTER_VIRTUAL_SIZE can have. */
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 32);
- set_gdbarch_register_virtual_type (gdbarch, cris_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, cris_register_virtual_type);
/* Use generic dummy frames. */
@@ -4254,9 +4259,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
- /* No register requires conversion from raw format to virtual format. */
- set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
-
set_gdbarch_deprecated_push_return_address (gdbarch, cris_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, cris_pop_frame);
@@ -4292,13 +4294,11 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_saved_pc (gdbarch, cris_frame_saved_pc);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, cris_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-
/* Helpful for backtracing and returning in a call dummy. */
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
/* Use target_specific function to define link map offsets. */
set_solib_svr4_fetch_link_map_offsets
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index c184b4457e7..d522580c76c 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -44,6 +44,7 @@
#include "gdb/sim-d10v.h"
#include "sim-regno.h"
#include "disasm.h"
+#include "trad-frame.h"
#include "gdb_assert.h"
@@ -85,13 +86,13 @@ enum
RET1_REGNUM = R0_REGNUM,
};
-int
+static int
nr_dmap_regs (struct gdbarch *gdbarch)
{
return gdbarch_tdep (gdbarch)->nr_dmap_regs;
}
-int
+static int
a0_regnum (struct gdbarch *gdbarch)
{
return gdbarch_tdep (gdbarch)->a0_regnum;
@@ -101,8 +102,6 @@ a0_regnum (struct gdbarch *gdbarch)
extern void _initialize_d10v_tdep (void);
-static CORE_ADDR d10v_read_sp (void);
-
static void d10v_eva_prepare_to_trace (void);
static void d10v_eva_get_trace_data (void);
@@ -563,21 +562,20 @@ d10v_skip_prologue (CORE_ADDR pc)
struct d10v_unwind_cache
{
- CORE_ADDR return_pc;
/* The previous frame's inner most stack address. Used as this
frame ID's stack_addr. */
CORE_ADDR prev_sp;
/* The frame's base, optionally used by the high-level debug info. */
CORE_ADDR base;
int size;
- CORE_ADDR *saved_regs;
/* How far the SP and r11 (FP) have been offset from the start of
the stack frame (as defined by the previous frame's stack
pointer). */
LONGEST sp_offset;
LONGEST r11_offset;
int uses_frame;
- void **regs;
+ /* Table indicating the location of each and every register. */
+ struct trad_frame_saved_reg *saved_regs;
};
static int
@@ -591,7 +589,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
{
n = (op & 0x1E0) >> 5;
info->sp_offset -= 2;
- info->saved_regs[n] = info->sp_offset;
+ info->saved_regs[n].addr = info->sp_offset;
return 1;
}
@@ -600,8 +598,8 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
{
n = (op & 0x1E0) >> 5;
info->sp_offset -= 4;
- info->saved_regs[n] = info->sp_offset;
- info->saved_regs[n + 1] = info->sp_offset + 2;
+ info->saved_regs[n + 0].addr = info->sp_offset + 0;
+ info->saved_regs[n + 1].addr = info->sp_offset + 2;
return 1;
}
@@ -627,7 +625,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
if ((op & 0x7E1F) == 0x6816)
{
n = (op & 0x1E0) >> 5;
- info->saved_regs[n] = info->r11_offset;
+ info->saved_regs[n].addr = info->r11_offset;
return 1;
}
@@ -639,7 +637,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
if ((op & 0x7E1F) == 0x681E)
{
n = (op & 0x1E0) >> 5;
- info->saved_regs[n] = info->sp_offset;
+ info->saved_regs[n].addr = info->sp_offset;
return 1;
}
@@ -647,8 +645,8 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
if ((op & 0x7E3F) == 0x3A1E)
{
n = (op & 0x1E0) >> 5;
- info->saved_regs[n] = info->sp_offset;
- info->saved_regs[n + 1] = info->sp_offset + 2;
+ info->saved_regs[n + 0].addr = info->sp_offset + 0;
+ info->saved_regs[n + 1].addr = info->sp_offset + 2;
return 1;
}
@@ -661,10 +659,11 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-struct d10v_unwind_cache *
+static struct d10v_unwind_cache *
d10v_frame_unwind_cache (struct frame_info *next_frame,
void **this_prologue_cache)
{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
CORE_ADDR pc;
ULONGEST prev_sp;
ULONGEST this_base;
@@ -678,10 +677,9 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
info = FRAME_OBSTACK_ZALLOC (struct d10v_unwind_cache);
(*this_prologue_cache) = info;
- info->saved_regs = FRAME_OBSTACK_CALLOC (NUM_REGS, CORE_ADDR);
+ info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
info->size = 0;
- info->return_pc = 0;
info->sp_offset = 0;
info->uses_frame = 0;
@@ -689,7 +687,7 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
pc > 0 && pc < frame_pc_unwind (next_frame);
pc += 4)
{
- op = (unsigned long) read_memory_integer (pc, 4);
+ op = get_frame_memory_unsigned (next_frame, pc, 4);
if ((op & 0xC0000000) == 0xC0000000)
{
/* long instruction */
@@ -704,15 +702,15 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
/* st rn, @(offset,sp) */
short offset = op & 0xFFFF;
short n = (op >> 20) & 0xF;
- info->saved_regs[n] = info->sp_offset + offset;
+ info->saved_regs[n].addr = info->sp_offset + offset;
}
else if ((op & 0x3F1F0000) == 0x350F0000)
{
/* st2w rn, @(offset,sp) */
short offset = op & 0xFFFF;
short n = (op >> 20) & 0xF;
- info->saved_regs[n] = info->sp_offset + offset;
- info->saved_regs[n + 1] = info->sp_offset + offset + 2;
+ info->saved_regs[n + 0].addr = info->sp_offset + offset + 0;
+ info->saved_regs[n + 1].addr = info->sp_offset + offset + 2;
}
else
break;
@@ -738,7 +736,8 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
info->size = -info->sp_offset;
- /* Compute the frame's base, and the previous frame's SP. */
+ /* Compute the previous frame's stack pointer (which is also the
+ frame's ID's stack address), and this frame's base pointer. */
if (info->uses_frame)
{
/* The SP was moved to the FP. This indicates that a new frame
@@ -749,15 +748,6 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
to before the first saved register giving the SP. */
prev_sp = this_base + info->size;
}
- else if (info->saved_regs[D10V_SP_REGNUM])
- {
- /* The SP was saved (which is very unusual), the frame base is
- just the PREV's frame's TOP-OF-STACK. */
- this_base = read_memory_unsigned_integer (info->saved_regs[D10V_SP_REGNUM],
- register_size (current_gdbarch,
- D10V_SP_REGNUM));
- prev_sp = this_base;
- }
else
{
/* Assume that the FP is this frame's SP but with that pushed
@@ -766,34 +756,28 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
prev_sp = this_base + info->size;
}
+ /* Convert that SP/BASE into real addresses. */
+ info->prev_sp = d10v_make_daddr (prev_sp);
info->base = d10v_make_daddr (this_base);
- info->prev_sp = d10v_make_daddr (prev_sp);
/* Adjust all the saved registers so that they contain addresses and
not offsets. */
for (i = 0; i < NUM_REGS - 1; i++)
- if (info->saved_regs[i])
+ if (info->saved_regs[i].addr)
{
- info->saved_regs[i] = (info->prev_sp + info->saved_regs[i]);
+ info->saved_regs[i].addr = (info->prev_sp + info->saved_regs[i].addr);
}
- if (info->saved_regs[LR_REGNUM])
- {
- CORE_ADDR return_pc
- = read_memory_unsigned_integer (info->saved_regs[LR_REGNUM],
- register_size (current_gdbarch, LR_REGNUM));
- info->return_pc = d10v_make_iaddr (return_pc);
- }
- else
- {
- ULONGEST return_pc;
- frame_unwind_unsigned_register (next_frame, LR_REGNUM, &return_pc);
- info->return_pc = d10v_make_iaddr (return_pc);
- }
+ /* The call instruction moves the caller's PC in the callee's LR.
+ Since this is an unwind, do the reverse. Copy the location of LR
+ into PC (the address / regnum) so that a request for PC will be
+ converted into a request for the LR. */
+ info->saved_regs[D10V_PC_REGNUM] = info->saved_regs[LR_REGNUM];
- /* The D10V_SP_REGNUM is special. Instead of the address of the SP, the
- previous frame's SP value is saved. */
- info->saved_regs[D10V_SP_REGNUM] = info->prev_sp;
+ /* The previous frame's SP needed to be computed. Save the computed
+ value. */
+ trad_frame_register_value (info->saved_regs, D10V_SP_REGNUM,
+ d10v_make_daddr (prev_sp));
return info;
}
@@ -873,7 +857,7 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
int i;
fprintf_filtered (file, " ");
frame_read_register (frame, a, num);
- for (i = 0; i < register_size (current_gdbarch, a); i++)
+ for (i = 0; i < register_size (gdbarch, a); i++)
{
fprintf_filtered (file, "%02x", (num[i] & 0xff));
}
@@ -916,9 +900,11 @@ d10v_write_pc (CORE_ADDR val, ptid_t ptid)
}
static CORE_ADDR
-d10v_read_sp (void)
+d10v_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return (d10v_make_daddr (read_register (D10V_SP_REGNUM)));
+ ULONGEST sp;
+ frame_unwind_unsigned_register (next_frame, D10V_SP_REGNUM, &sp);
+ return d10v_make_daddr (sp);
}
/* When arguments must be pushed onto the stack, they go on in reverse
@@ -977,9 +963,10 @@ d10v_push_dummy_code (struct gdbarch *gdbarch,
}
static CORE_ADDR
-d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
- CORE_ADDR dummy_addr, int nargs, struct value **args,
- CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr,
+ int nargs, struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int i;
int regnum = ARG1_REGNUM;
@@ -987,9 +974,9 @@ d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
long val;
/* Set the return address. For the d10v, the return breakpoint is
- always at DUMMY_ADDR. */
+ always at BP_ADDR. */
regcache_cooked_write_unsigned (regcache, LR_REGNUM,
- d10v_convert_iaddr_to_raw (dummy_addr));
+ d10v_convert_iaddr_to_raw (bp_addr));
/* If STRUCT_RETURN is true, then the struct return address (in
STRUCT_ADDR) will consume the first argument-passing register.
@@ -1443,54 +1430,6 @@ d10v_frame_this_id (struct frame_info *next_frame,
}
static void
-saved_regs_unwinder (struct frame_info *next_frame,
- CORE_ADDR *this_saved_regs,
- int regnum, int *optimizedp,
- enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *bufferp)
-{
- if (this_saved_regs[regnum] != 0)
- {
- if (regnum == D10V_SP_REGNUM)
- {
- /* SP register treated specially. */
- *optimizedp = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnump = -1;
- if (bufferp != NULL)
- store_unsigned_integer (bufferp,
- register_size (current_gdbarch, regnum),
- this_saved_regs[regnum]);
- }
- else
- {
- /* Any other register is saved in memory, fetch it but cache
- a local copy of its value. */
- *optimizedp = 0;
- *lvalp = lval_memory;
- *addrp = this_saved_regs[regnum];
- *realnump = -1;
- if (bufferp != NULL)
- {
- /* Read the value in from memory. */
- read_memory (this_saved_regs[regnum], bufferp,
- register_size (current_gdbarch, regnum));
- }
- }
- return;
- }
-
- /* No luck, assume this and the next frame have the same register
- value. If a value is needed, pass the request on down the chain;
- otherwise just return an indication that the value is in the same
- register as the next frame. */
- frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
- realnump, bufferp);
-}
-
-
-static void
d10v_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache,
int regnum, int *optimizedp,
@@ -1499,19 +1438,8 @@ d10v_frame_prev_register (struct frame_info *next_frame,
{
struct d10v_unwind_cache *info
= d10v_frame_unwind_cache (next_frame, this_prologue_cache);
- if (regnum == D10V_PC_REGNUM)
- {
- /* The call instruction saves the caller's PC in LR. The
- function prologue of the callee may then save the LR on the
- stack. Find that possibly saved LR value and return it. */
- saved_regs_unwinder (next_frame, info->saved_regs, LR_REGNUM, optimizedp,
- lvalp, addrp, realnump, bufferp);
- }
- else
- {
- saved_regs_unwinder (next_frame, info->saved_regs, regnum, optimizedp,
- lvalp, addrp, realnump, bufferp);
- }
+ trad_frame_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind d10v_frame_unwind = {
@@ -1520,7 +1448,7 @@ static const struct frame_unwind d10v_frame_unwind = {
d10v_frame_prev_register
};
-const struct frame_unwind *
+static const struct frame_unwind *
d10v_frame_p (CORE_ADDR pc)
{
return &d10v_frame_unwind;
@@ -1549,9 +1477,8 @@ static const struct frame_base d10v_frame_base = {
static struct frame_id
d10v_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- ULONGEST base;
- frame_unwind_unsigned_register (next_frame, D10V_SP_REGNUM, &base);
- return frame_id_build (d10v_make_daddr (base), frame_pc_unwind (next_frame));
+ return frame_id_build (d10v_unwind_sp (gdbarch, next_frame),
+ frame_pc_unwind (next_frame));
}
static gdbarch_init_ftype d10v_gdbarch_init;
@@ -1600,7 +1527,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_pc (gdbarch, d10v_read_pc);
set_gdbarch_write_pc (gdbarch, d10v_write_pc);
- set_gdbarch_read_sp (gdbarch, d10v_read_sp);
+ set_gdbarch_unwind_sp (gdbarch, d10v_unwind_sp);
set_gdbarch_num_regs (gdbarch, d10v_num_regs);
set_gdbarch_sp_regnum (gdbarch, D10V_SP_REGNUM);
@@ -1656,7 +1583,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_align (gdbarch, d10v_frame_align);
set_gdbarch_register_sim_regno (gdbarch, d10v_register_sim_regno);
@@ -1666,9 +1592,10 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_unwind_append_predicate (gdbarch, d10v_frame_p);
frame_base_set_default (gdbarch, &d10v_frame_base);
- /* Methods for saving / extracting a dummy frame's ID. */
+ /* Methods for saving / extracting a dummy frame's ID. The ID's
+ stack address must match the SP value returned by
+ PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */
set_gdbarch_unwind_dummy_id (gdbarch, d10v_unwind_dummy_id);
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
/* Return the unwound PC value. */
set_gdbarch_unwind_pc (gdbarch, d10v_unwind_pc);
diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c
index aadab6f5b06..a592334ea05 100644
--- a/gdb/dbug-rom.c
+++ b/gdb/dbug-rom.c
@@ -160,6 +160,8 @@ dbug_open (char *args, int from_tty)
monitor_open (args, &dbug_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_dbug_rom; /* -Wmissing-prototypes */
+
void
_initialize_dbug_rom (void)
{
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 752efdd7ed7..fbfd1a987b6 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1232,7 +1232,7 @@ read_dbx_dynamic_symtab (struct objfile *objfile)
}
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
-CORE_ADDR
+static CORE_ADDR
find_stab_function_addr (char *namestring, char *filename,
struct objfile *objfile)
{
@@ -2484,7 +2484,6 @@ dbx_psymtab_to_symtab_1 (struct partial_symtab *pst)
/* Read in this file's symbols */
bfd_seek (pst->objfile->obfd, SYMBOL_OFFSET (pst), SEEK_SET);
read_ofile_symtab (pst);
- sort_symtab_syms (pst->symtab);
do_cleanups (old_chain);
}
diff --git a/gdb/defs.h b/gdb/defs.h
index a90ef9ef7c0..eb7ae082a89 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -405,6 +405,8 @@ extern void reinitialize_more_filter (void);
/* Normal results */
extern struct ui_file *gdb_stdout;
+/* Input stream */
+extern struct ui_file *gdb_stdin;
/* Serious error notifications */
extern struct ui_file *gdb_stderr;
/* Log/debug/trace messages that should bypass normal stdout/stderr
@@ -417,6 +419,8 @@ extern struct ui_file *gdb_stdlog;
very near future that restriction shall be removed - either call
shall be unfiltered. (cagney 1999-07-02). */
extern struct ui_file *gdb_stdtarg;
+extern struct ui_file *gdb_stdtargerr;
+extern struct ui_file *gdb_stdtargin;
#if defined(TUI)
#include "tui.h"
@@ -881,6 +885,9 @@ extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (pri
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
+/* Initialize the error buffer. */
+extern void error_init (void);
+
/* Returns a freshly allocate buffer containing the last error
message. */
extern char *error_last_message (void);
@@ -1126,8 +1133,6 @@ extern ULONGEST extract_unsigned_integer (const void *, int);
extern int extract_long_unsigned_integer (const void *, int, LONGEST *);
-extern CORE_ADDR extract_address (const void *, int);
-
extern CORE_ADDR extract_typed_address (const void *buf, struct type *type);
extern void store_signed_integer (void *, int, LONGEST);
diff --git a/gdb/dictionary.c b/gdb/dictionary.c
new file mode 100644
index 00000000000..38020007637
--- /dev/null
+++ b/gdb/dictionary.c
@@ -0,0 +1,836 @@
+/* Routines for name->symbol lookups in GDB.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
+ 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 "gdb_obstack.h"
+#include "symtab.h"
+#include "buildsym.h"
+#include "gdb_assert.h"
+#include "dictionary.h"
+
+/* This file implements dictionaries, which are tables that associate
+ symbols to names. They are represented by an opaque type 'struct
+ dictionary'. That type has various internal implementations, which
+ you can choose between depending on what properties you need
+ (e.g. fast lookup, order-preserving, expandable).
+
+ Each dictionary starts with a 'virtual function table' that
+ contains the functions that actually implement the various
+ operations that dictionaries provide. (Note, however, that, for
+ the sake of client code, we also provide some functions that can be
+ implemented generically in terms of the functions in the vtable.)
+
+ To add a new dictionary implementation <impl>, what you should do
+ is:
+
+ * Add a new element DICT_<IMPL> to dict_type.
+
+ * Create a new structure dictionary_<impl>. If your new
+ implementation is a variant of an existing one, make sure that
+ their structs have the same initial data members. Define accessor
+ macros for your new data members.
+
+ * Implement all the functions in dict_vector as static functions,
+ whose name is the same as the corresponding member of dict_vector
+ plus _<impl>. You don't have to do this for those members where
+ you can reuse existing generic functions
+ (e.g. add_symbol_nonexpandable, free_obstack) or in the case where
+ your new implementation is a variant of an existing implementation
+ and where the variant doesn't affect the member function in
+ question.
+
+ * Define a static const struct dict_vector dict_<impl>_vector.
+
+ * Define a function dict_create_<impl> to create these
+ gizmos. Add its declaration to dictionary.h.
+
+ To add a new operation <op> on all existing implementations, what
+ you should do is:
+
+ * Add a new member <op> to struct dict_vector.
+
+ * If there is useful generic behavior <op>, define a static
+ function <op>_something_informative that implements that behavior.
+ (E.g. add_symbol_nonexpandable, free_obstack.)
+
+ * For every implementation <impl> that should have its own specific
+ behavior for <op>, define a static function <op>_<impl>
+ implementing it.
+
+ * Modify all existing dict_vector_<impl>'s to include the appropriate
+ member.
+
+ * Define a function dict_<op> that looks up <op> in the dict_vector
+ and calls the appropriate function. Add a declaration for
+ dict_<op> to dictionary.h.
+
+*/
+
+/* An enum representing the various implementations of dictionaries.
+ Used only for debugging. */
+
+enum dict_type
+ {
+ /* Symbols are stored in a fixed-size hash table. */
+ DICT_HASHED,
+ /* Symbols are stored in an expandable hash table. */
+ DICT_HASHED_EXPANDABLE,
+ /* Symbols are stored in a fixed-size array. */
+ DICT_LINEAR,
+ /* Symbols are stored in an expandable array. */
+ DICT_LINEAR_EXPANDABLE,
+ };
+
+/* The virtual function table. */
+
+struct dict_vector
+{
+ /* The type of the dictionary. This is only here to make debugging
+ a bit easier; it's not actually used. */
+ enum dict_type type;
+ /* The function to free a dictionary. */
+ void (*free) (struct dictionary *dict);
+ /* Add a symbol to a dictionary, if possible. */
+ void (*add_symbol) (struct dictionary *dict, struct symbol *sym);
+ /* Iterator functions. */
+ struct symbol *(*iterator_first) (const struct dictionary *dict,
+ struct dict_iterator *iterator);
+ struct symbol *(*iterator_next) (struct dict_iterator *iterator);
+ /* Functions to iterate over symbols with a given name. */
+ struct symbol *(*iter_name_first) (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator);
+ struct symbol *(*iter_name_next) (const char *name,
+ struct dict_iterator *iterator);
+ /* A size function, for maint print symtabs. */
+ int (*size) (const struct dictionary *dict);
+};
+
+/* Now comes the structs used to store the data for different
+ implementations. If two implementations have data in common, put
+ the common data at the top of their structs, ordered in the same
+ way. */
+
+struct dictionary_hashed
+{
+ int nbuckets;
+ struct symbol **buckets;
+};
+
+struct dictionary_hashed_expandable
+{
+ /* How many buckets we currently have. */
+ int nbuckets;
+ struct symbol **buckets;
+ /* How many syms we currently have; we need this so we will know
+ when to add more buckets. */
+ int nsyms;
+};
+
+struct dictionary_linear
+{
+ int nsyms;
+ struct symbol **syms;
+};
+
+struct dictionary_linear_expandable
+{
+ /* How many symbols we currently have. */
+ int nsyms;
+ struct symbol **syms;
+ /* How many symbols we can store before needing to reallocate. */
+ int capacity;
+};
+
+/* And now, the star of our show. */
+
+struct dictionary
+{
+ const struct dict_vector *vector;
+ union
+ {
+ struct dictionary_hashed hashed;
+ struct dictionary_hashed_expandable hashed_expandable;
+ struct dictionary_linear linear;
+ struct dictionary_linear_expandable linear_expandable;
+ }
+ data;
+};
+
+/* Accessor macros. */
+
+#define DICT_VECTOR(d) (d)->vector
+
+/* These can be used for DICT_HASHED_EXPANDABLE, too. */
+
+#define DICT_HASHED_NBUCKETS(d) (d)->data.hashed.nbuckets
+#define DICT_HASHED_BUCKETS(d) (d)->data.hashed.buckets
+#define DICT_HASHED_BUCKET(d,i) DICT_HASHED_BUCKETS (d) [i]
+
+#define DICT_HASHED_EXPANDABLE_NSYMS(d) (d)->data.hashed_expandable.nsyms
+
+/* These can be used for DICT_LINEAR_EXPANDABLEs, too. */
+
+#define DICT_LINEAR_NSYMS(d) (d)->data.linear.nsyms
+#define DICT_LINEAR_SYMS(d) (d)->data.linear.syms
+#define DICT_LINEAR_SYM(d,i) DICT_LINEAR_SYMS (d) [i]
+
+#define DICT_LINEAR_EXPANDABLE_CAPACITY(d) \
+ (d)->data.linear_expandable.capacity
+
+/* The initial size of a DICT_*_EXPANDABLE dictionary. */
+
+#define DICT_EXPANDABLE_INITIAL_CAPACITY 10
+
+/* This calculates the number of buckets we'll use in a hashtable,
+ given the number of symbols that it will contain. */
+
+#define DICT_HASHTABLE_SIZE(n) ((n)/5 + 1)
+
+/* Accessor macros for dict_iterators; they're here rather than
+ dictionary.h because code elsewhere should treat dict_iterators as
+ opaque. */
+
+/* The dictionary that the iterator is associated to. */
+#define DICT_ITERATOR_DICT(iter) (iter)->dict
+/* For linear dictionaries, the index of the last symbol returned; for
+ hashed dictionaries, the bucket of the last symbol returned. */
+#define DICT_ITERATOR_INDEX(iter) (iter)->index
+/* For hashed dictionaries, this points to the last symbol returned;
+ otherwise, this is unused. */
+#define DICT_ITERATOR_CURRENT(iter) (iter)->current
+
+/* Declarations of functions for vectors. */
+
+/* Functions that might work across a range of dictionary types. */
+
+static void add_symbol_nonexpandable (struct dictionary *dict,
+ struct symbol *sym);
+
+static void free_obstack (struct dictionary *dict);
+
+/* Functions for DICT_HASHED and DICT_HASHED_EXPANDABLE
+ dictionaries. */
+
+static struct symbol *iterator_first_hashed (const struct dictionary *dict,
+ struct dict_iterator *iterator);
+
+static struct symbol *iterator_next_hashed (struct dict_iterator *iterator);
+
+static struct symbol *iter_name_first_hashed (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator);
+
+static struct symbol *iter_name_next_hashed (const char *name,
+ struct dict_iterator *iterator);
+
+/* Functions only for DICT_HASHED. */
+
+static int size_hashed (const struct dictionary *dict);
+
+/* Functions only for DICT_HASHED_EXPANDABLE. */
+
+static void free_hashed_expandable (struct dictionary *dict);
+
+static void add_symbol_hashed_expandable (struct dictionary *dict,
+ struct symbol *sym);
+
+static int size_hashed_expandable (const struct dictionary *dict);
+
+/* Functions for DICT_LINEAR and DICT_LINEAR_EXPANDABLE
+ dictionaries. */
+
+static struct symbol *iterator_first_linear (const struct dictionary *dict,
+ struct dict_iterator *iterator);
+
+static struct symbol *iterator_next_linear (struct dict_iterator *iterator);
+
+static struct symbol *iter_name_first_linear (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator);
+
+static struct symbol *iter_name_next_linear (const char *name,
+ struct dict_iterator *iterator);
+
+static int size_linear (const struct dictionary *dict);
+
+/* Functions only for DICT_LINEAR_EXPANDABLE. */
+
+static void free_linear_expandable (struct dictionary *dict);
+
+static void add_symbol_linear_expandable (struct dictionary *dict,
+ struct symbol *sym);
+
+/* Various vectors that we'll actually use. */
+
+static const struct dict_vector dict_hashed_vector =
+ {
+ DICT_HASHED, /* type */
+ free_obstack, /* free */
+ add_symbol_nonexpandable, /* add_symbol */
+ iterator_first_hashed, /* iteractor_first */
+ iterator_next_hashed, /* iterator_next */
+ iter_name_first_hashed, /* iter_name_first */
+ iter_name_next_hashed, /* iter_name_next */
+ size_hashed, /* size */
+ };
+
+static const struct dict_vector dict_hashed_expandable_vector =
+ {
+ DICT_HASHED_EXPANDABLE, /* type */
+ free_hashed_expandable, /* free */
+ add_symbol_hashed_expandable, /* add_symbol */
+ iterator_first_hashed, /* iteractor_first */
+ iterator_next_hashed, /* iterator_next */
+ iter_name_first_hashed, /* iter_name_first */
+ iter_name_next_hashed, /* iter_name_next */
+ size_hashed_expandable, /* size */
+ };
+
+static const struct dict_vector dict_linear_vector =
+ {
+ DICT_LINEAR, /* type */
+ free_obstack, /* free */
+ add_symbol_nonexpandable, /* add_symbol */
+ iterator_first_linear, /* iteractor_first */
+ iterator_next_linear, /* iterator_next */
+ iter_name_first_linear, /* iter_name_first */
+ iter_name_next_linear, /* iter_name_next */
+ size_linear, /* size */
+ };
+
+static const struct dict_vector dict_linear_expandable_vector =
+ {
+ DICT_LINEAR_EXPANDABLE, /* type */
+ free_linear_expandable, /* free */
+ add_symbol_linear_expandable, /* add_symbol */
+ iterator_first_linear, /* iteractor_first */
+ iterator_next_linear, /* iterator_next */
+ iter_name_first_linear, /* iter_name_first */
+ iter_name_next_linear, /* iter_name_next */
+ size_linear, /* size */
+ };
+
+/* Declarations of helper functions (i.e. ones that don't go into
+ vectors). */
+
+static struct symbol *iterator_hashed_advance (struct dict_iterator *iter);
+
+static void insert_symbol_hashed (struct dictionary *dict,
+ struct symbol *sym);
+
+static void expand_hashtable (struct dictionary *dict);
+
+/* The creation functions. */
+
+/* Create a dictionary implemented via a fixed-size hashtable. All
+ memory it uses is allocated on OBSTACK; the environment is
+ initialized from SYMBOL_LIST. */
+
+struct dictionary *
+dict_create_hashed (struct obstack *obstack,
+ const struct pending *symbol_list)
+{
+ struct dictionary *retval;
+ int nsyms = 0, nbuckets, i;
+ struct symbol **buckets;
+ const struct pending *list_counter;
+
+ retval = obstack_alloc (obstack, sizeof (struct dictionary));
+ DICT_VECTOR (retval) = &dict_hashed_vector;
+
+ /* Calculate the number of symbols, and allocate space for them. */
+ for (list_counter = symbol_list;
+ list_counter != NULL;
+ list_counter = list_counter->next)
+ {
+ nsyms += list_counter->nsyms;
+ }
+ nbuckets = DICT_HASHTABLE_SIZE (nsyms);
+ DICT_HASHED_NBUCKETS (retval) = nbuckets;
+ buckets = obstack_alloc (obstack, nbuckets * sizeof (struct symbol *));
+ memset (buckets, 0, nbuckets * sizeof (struct symbol *));
+ DICT_HASHED_BUCKETS (retval) = buckets;
+
+ /* Now fill the buckets. */
+ for (list_counter = symbol_list;
+ list_counter != NULL;
+ list_counter = list_counter->next)
+ {
+ for (i = list_counter->nsyms - 1; i >= 0; --i)
+ {
+ insert_symbol_hashed (retval, list_counter->symbol[i]);
+ }
+ }
+
+ return retval;
+}
+
+/* Create a dictionary implemented via a hashtable that grows as
+ necessary. The dictionary is initially empty; to add symbols to
+ it, call dict_add_symbol(). Call dict_free() when you're done with
+ it. */
+
+extern struct dictionary *
+dict_create_hashed_expandable (void)
+{
+ struct dictionary *retval;
+
+ retval = xmalloc (sizeof (struct dictionary));
+ DICT_VECTOR (retval) = &dict_hashed_expandable_vector;
+ DICT_HASHED_NBUCKETS (retval) = DICT_EXPANDABLE_INITIAL_CAPACITY;
+ DICT_HASHED_BUCKETS (retval) = xcalloc (DICT_EXPANDABLE_INITIAL_CAPACITY,
+ sizeof (struct symbol *));
+ DICT_HASHED_EXPANDABLE_NSYMS (retval) = 0;
+
+ return retval;
+}
+
+/* Create a dictionary implemented via a fixed-size array. All memory
+ it uses is allocated on OBSTACK; the environment is initialized
+ from the SYMBOL_LIST. The symbols are ordered in the same order
+ that they're found in SYMBOL_LIST. */
+
+struct dictionary *
+dict_create_linear (struct obstack *obstack,
+ const struct pending *symbol_list)
+{
+ struct dictionary *retval;
+ int nsyms = 0, i, j;
+ struct symbol **syms;
+ const struct pending *list_counter;
+
+ retval = obstack_alloc (obstack, sizeof (struct dictionary));
+ DICT_VECTOR (retval) = &dict_linear_vector;
+
+ /* Calculate the number of symbols, and allocate space for them. */
+ for (list_counter = symbol_list;
+ list_counter != NULL;
+ list_counter = list_counter->next)
+ {
+ nsyms += list_counter->nsyms;
+ }
+ DICT_LINEAR_NSYMS (retval) = nsyms;
+ syms = obstack_alloc (obstack, nsyms * sizeof (struct symbol *));
+ DICT_LINEAR_SYMS (retval) = syms;
+
+ /* Now fill in the symbols. Start filling in from the back, so as
+ to preserve the original order of the symbols. */
+ for (list_counter = symbol_list, j = nsyms - 1;
+ list_counter != NULL;
+ list_counter = list_counter->next)
+ {
+ for (i = list_counter->nsyms - 1;
+ i >= 0;
+ --i, --j)
+ {
+ syms[j] = list_counter->symbol[i];
+ }
+ }
+
+ return retval;
+}
+
+/* Create a dictionary implemented via an array that grows as
+ necessary. The dictionary is initially empty; to add symbols to
+ it, call dict_add_symbol(). Call dict_free() when you're done with
+ it. */
+
+struct dictionary *
+dict_create_linear_expandable (void)
+{
+ struct dictionary *retval;
+
+ retval = xmalloc (sizeof (struct dictionary));
+ DICT_VECTOR (retval) = &dict_linear_expandable_vector;
+ DICT_LINEAR_NSYMS (retval) = 0;
+ DICT_LINEAR_EXPANDABLE_CAPACITY (retval)
+ = DICT_EXPANDABLE_INITIAL_CAPACITY;
+ DICT_LINEAR_SYMS (retval)
+ = xmalloc (DICT_LINEAR_EXPANDABLE_CAPACITY (retval)
+ * sizeof (struct symbol *));
+
+ return retval;
+}
+
+/* The functions providing the dictionary interface. */
+
+/* Free the memory used by a dictionary that's not on an obstack. (If
+ any.) */
+
+void
+dict_free (struct dictionary *dict)
+{
+ (DICT_VECTOR (dict))->free (dict);
+}
+
+/* Add SYM to DICT. DICT had better be expandable. */
+
+void
+dict_add_symbol (struct dictionary *dict, struct symbol *sym)
+{
+ (DICT_VECTOR (dict))->add_symbol (dict, sym);
+}
+
+/* Initialize ITERATOR to point at the first symbol in DICT, and
+ return that first symbol, or NULL if DICT is empty. */
+
+struct symbol *
+dict_iterator_first (const struct dictionary *dict,
+ struct dict_iterator *iterator)
+{
+ return (DICT_VECTOR (dict))->iterator_first (dict, iterator);
+}
+
+/* Advance ITERATOR, and return the next symbol, or NULL if there are
+ no more symbols. */
+
+struct symbol *
+dict_iterator_next (struct dict_iterator *iterator)
+{
+ return (DICT_VECTOR (DICT_ITERATOR_DICT (iterator)))
+ ->iterator_next (iterator);
+}
+
+struct symbol *
+dict_iter_name_first (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator)
+{
+ return (DICT_VECTOR (dict))->iter_name_first (dict, name, iterator);
+}
+
+struct symbol *
+dict_iter_name_next (const char *name, struct dict_iterator *iterator)
+{
+ return (DICT_VECTOR (DICT_ITERATOR_DICT (iterator)))
+ ->iter_name_next (name, iterator);
+}
+
+int
+dict_size (const struct dictionary *dict)
+{
+ return (DICT_VECTOR (dict))->size (dict);
+}
+
+/* Now come functions (well, one function, currently) that are
+ implemented generically by means of the vtable. Typically, they're
+ rarely used. */
+
+/* Test to see if DICT is empty. */
+
+int
+dict_empty (struct dictionary *dict)
+{
+ struct dict_iterator iter;
+
+ return (dict_iterator_first (dict, &iter) == NULL);
+}
+
+
+/* The functions implementing the dictionary interface. */
+
+/* Generic functions, where appropriate. */
+
+static void
+free_obstack (struct dictionary *dict)
+{
+ /* Do nothing! */
+}
+
+static void
+add_symbol_nonexpandable (struct dictionary *dict, struct symbol *sym)
+{
+ internal_error (__FILE__, __LINE__,
+ "dict_add_symbol: non-expandable dictionary");
+}
+
+/* Functions for DICT_HASHED and DICT_HASHED_EXPANDABLE. */
+
+static struct symbol *
+iterator_first_hashed (const struct dictionary *dict,
+ struct dict_iterator *iterator)
+{
+ DICT_ITERATOR_DICT (iterator) = dict;
+ DICT_ITERATOR_INDEX (iterator) = -1;
+ return iterator_hashed_advance (iterator);
+}
+
+static struct symbol *
+iterator_next_hashed (struct dict_iterator *iterator)
+{
+ const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
+ struct symbol *next;
+
+ next = DICT_ITERATOR_CURRENT (iterator)->hash_next;
+
+ if (next == NULL)
+ return iterator_hashed_advance (iterator);
+ else
+ {
+ DICT_ITERATOR_CURRENT (iterator) = next;
+ return next;
+ }
+}
+
+static struct symbol *
+iterator_hashed_advance (struct dict_iterator *iterator)
+{
+ const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
+ int nbuckets = DICT_HASHED_NBUCKETS (dict);
+ int i;
+
+ for (i = DICT_ITERATOR_INDEX (iterator) + 1; i < nbuckets; ++i)
+ {
+ struct symbol *sym = DICT_HASHED_BUCKET (dict, i);
+
+ if (sym != NULL)
+ {
+ DICT_ITERATOR_INDEX (iterator) = i;
+ DICT_ITERATOR_CURRENT (iterator) = sym;
+ return sym;
+ }
+ }
+
+ return NULL;
+}
+
+static struct symbol *
+iter_name_first_hashed (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator)
+{
+ unsigned int hash_index
+ = msymbol_hash_iw (name) % DICT_HASHED_NBUCKETS (dict);
+ struct symbol *sym;
+
+ DICT_ITERATOR_DICT (iterator) = dict;
+
+ /* Loop through the symbols in the given bucket, breaking when SYM
+ first matches. If SYM never matches, it will be set to NULL;
+ either way, we have the right return value. */
+
+ for (sym = DICT_HASHED_BUCKET (dict, hash_index);
+ sym != NULL;
+ sym = sym->hash_next)
+ {
+ /* Warning: the order of arguments to strcmp_iw matters! */
+ if (strcmp_iw (SYMBOL_NATURAL_NAME (sym), name) == 0)
+ {
+ break;
+ }
+
+ }
+
+ DICT_ITERATOR_CURRENT (iterator) = sym;
+ return sym;
+}
+
+static struct symbol *
+iter_name_next_hashed (const char *name, struct dict_iterator *iterator)
+{
+ struct symbol *next;
+
+ for (next = DICT_ITERATOR_CURRENT (iterator)->hash_next;
+ next != NULL;
+ next = next->hash_next)
+ {
+ if (strcmp_iw (SYMBOL_NATURAL_NAME (next), name) == 0)
+ break;
+ }
+
+ DICT_ITERATOR_CURRENT (iterator) = next;
+
+ return next;
+}
+
+/* Insert SYM into DICT. */
+
+static void
+insert_symbol_hashed (struct dictionary *dict,
+ struct symbol *sym)
+{
+ unsigned int hash_index;
+ struct symbol **buckets = DICT_HASHED_BUCKETS (dict);
+
+ hash_index = (msymbol_hash_iw (SYMBOL_NATURAL_NAME (sym))
+ % DICT_HASHED_NBUCKETS (dict));
+ sym->hash_next = buckets[hash_index];
+ buckets[hash_index] = sym;
+}
+
+static int
+size_hashed (const struct dictionary *dict)
+{
+ return DICT_HASHED_NBUCKETS (dict);
+}
+
+/* Functions only for DICT_HASHED_EXPANDABLE. */
+
+static void
+free_hashed_expandable (struct dictionary *dict)
+{
+ xfree (DICT_HASHED_BUCKETS (dict));
+ xfree (dict);
+}
+
+static void
+add_symbol_hashed_expandable (struct dictionary *dict,
+ struct symbol *sym)
+{
+ int nsyms = ++DICT_HASHED_EXPANDABLE_NSYMS (dict);
+
+ if (DICT_HASHTABLE_SIZE (nsyms) > DICT_HASHED_NBUCKETS (dict))
+ expand_hashtable (dict);
+
+ insert_symbol_hashed (dict, sym);
+ DICT_HASHED_EXPANDABLE_NSYMS (dict) = nsyms;
+}
+
+static int
+size_hashed_expandable (const struct dictionary *dict)
+{
+ return DICT_HASHED_EXPANDABLE_NSYMS (dict);
+}
+
+static void
+expand_hashtable (struct dictionary *dict)
+{
+ int old_nbuckets = DICT_HASHED_NBUCKETS (dict);
+ struct symbol **old_buckets = DICT_HASHED_BUCKETS (dict);
+ int new_nbuckets = 2*old_nbuckets + 1;
+ struct symbol **new_buckets = xcalloc (new_nbuckets,
+ sizeof (struct symbol *));
+ int i;
+
+ DICT_HASHED_NBUCKETS (dict) = new_nbuckets;
+ DICT_HASHED_BUCKETS (dict) = new_buckets;
+
+ for (i = 0; i < old_nbuckets; ++i) {
+ struct symbol *sym, *next_sym;
+
+ sym = old_buckets[i];
+ if (sym != NULL) {
+ for (next_sym = sym->hash_next;
+ next_sym != NULL;
+ next_sym = sym->hash_next) {
+ insert_symbol_hashed (dict, sym);
+ sym = next_sym;
+ }
+
+ insert_symbol_hashed (dict, sym);
+ }
+ }
+
+ xfree (old_buckets);
+}
+
+/* Functions for DICT_LINEAR and DICT_LINEAR_EXPANDABLE. */
+
+static struct symbol *
+iterator_first_linear (const struct dictionary *dict,
+ struct dict_iterator *iterator)
+{
+ DICT_ITERATOR_DICT (iterator) = dict;
+ DICT_ITERATOR_INDEX (iterator) = 0;
+ return DICT_LINEAR_NSYMS (dict) ? DICT_LINEAR_SYM (dict, 0) : NULL;
+}
+
+static struct symbol *
+iterator_next_linear (struct dict_iterator *iterator)
+{
+ const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
+
+ if (++DICT_ITERATOR_INDEX (iterator) >= DICT_LINEAR_NSYMS (dict))
+ return NULL;
+ else
+ return DICT_LINEAR_SYM (dict, DICT_ITERATOR_INDEX (iterator));
+}
+
+static struct symbol *
+iter_name_first_linear (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator)
+{
+ DICT_ITERATOR_DICT (iterator) = dict;
+ DICT_ITERATOR_INDEX (iterator) = -1;
+
+ return iter_name_next_linear (name, iterator);
+}
+
+static struct symbol *
+iter_name_next_linear (const char *name, struct dict_iterator *iterator)
+{
+ const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
+ int i, nsyms = DICT_LINEAR_NSYMS (dict);
+ struct symbol *sym, *retval = NULL;
+
+ for (i = DICT_ITERATOR_INDEX (iterator) + 1; i < nsyms; ++i)
+ {
+ sym = DICT_LINEAR_SYM (dict, i);
+ if (strcmp_iw (SYMBOL_NATURAL_NAME (sym), name) == 0)
+ {
+ retval = sym;
+ break;
+ }
+ }
+
+ DICT_ITERATOR_INDEX (iterator) = i;
+
+ return retval;
+}
+
+static int
+size_linear (const struct dictionary *dict)
+{
+ return DICT_LINEAR_NSYMS (dict);
+}
+
+/* Functions only for DICT_LINEAR_EXPANDABLE. */
+
+static void
+free_linear_expandable (struct dictionary *dict)
+{
+ xfree (DICT_LINEAR_SYMS (dict));
+ xfree (dict);
+}
+
+
+static void
+add_symbol_linear_expandable (struct dictionary *dict,
+ struct symbol *sym)
+{
+ int nsyms = ++DICT_LINEAR_NSYMS (dict);
+
+ /* Do we have enough room? If not, grow it. */
+ if (nsyms > DICT_LINEAR_EXPANDABLE_CAPACITY (dict)) {
+ DICT_LINEAR_EXPANDABLE_CAPACITY (dict) *= 2;
+ DICT_LINEAR_SYMS (dict)
+ = xrealloc (DICT_LINEAR_SYMS (dict),
+ DICT_LINEAR_EXPANDABLE_CAPACITY (dict)
+ * sizeof (struct symbol *));
+ }
+
+ DICT_LINEAR_SYM (dict, nsyms - 1) = sym;
+}
diff --git a/gdb/dictionary.h b/gdb/dictionary.h
new file mode 100644
index 00000000000..75edd7fb67a
--- /dev/null
+++ b/gdb/dictionary.h
@@ -0,0 +1,156 @@
+/* Routines for name->symbol lookups in GDB.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
+ 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. */
+
+#ifndef DICTIONARY_H
+#define DICTIONARY_H
+
+/* An opaque type for dictionaries; only dictionary.c should know
+ about its innards. */
+
+struct dictionary;
+
+/* Other types needed for declarations. */
+
+struct symbol;
+struct obstack;
+struct pending;
+
+
+/* The creation functions for various implementations of
+ dictionaries. */
+
+/* Create a dictionary implemented via a fixed-size hashtable. All
+ memory it uses is allocated on OBSTACK; the environment is
+ initialized from SYMBOL_LIST. */
+
+extern struct dictionary *dict_create_hashed (struct obstack *obstack,
+ const struct pending
+ *symbol_list);
+
+/* Create a dictionary implemented via a hashtable that grows as
+ necessary. The dictionary is initially empty; to add symbols to
+ it, call dict_add_symbol(). Call dict_free() when you're done with
+ it. */
+
+extern struct dictionary *dict_create_hashed_expandable (void);
+
+/* Create a dictionary implemented via a fixed-size array. All memory
+ it uses is allocated on OBSTACK; the environment is initialized
+ from the SYMBOL_LIST. The symbols are ordered in the same order
+ that they're found in SYMBOL_LIST. */
+
+extern struct dictionary *dict_create_linear (struct obstack *obstack,
+ const struct pending
+ *symbol_list);
+
+/* Create a dictionary implemented via an array that grows as
+ necessary. The dictionary is initially empty; to add symbols to
+ it, call dict_add_symbol(). Call dict_free() when you're done with
+ it. */
+
+extern struct dictionary *dict_create_linear_expandable (void);
+
+
+/* The functions providing the interface to dictionaries. Note that
+ the most common parts of the interface, namely symbol lookup, are
+ only provided via iterator functions. */
+
+/* Free the memory used by a dictionary that's not on an obstack. (If
+ any.) */
+
+extern void dict_free (struct dictionary *dict);
+
+/* Add a symbol to an expandable dictionary. */
+
+extern void dict_add_symbol (struct dictionary *dict, struct symbol *sym);
+
+/* Is the dictionary empty? */
+
+extern int dict_empty (struct dictionary *dict);
+
+/* A type containing data that is used when iterating over all symbols
+ in a dictionary. Don't ever look at its innards; this type would
+ be opaque if we didn't need to be able to allocate it on the
+ stack. */
+
+struct dict_iterator
+{
+ /* The dictionary that this iterator is associated to. */
+ const struct dictionary *dict;
+ /* The next two members are data that is used in a way that depends
+ on DICT's implementation type. */
+ int index;
+ struct symbol *current;
+};
+
+/* Initialize ITERATOR to point at the first symbol in DICT, and
+ return that first symbol, or NULL if DICT is empty. */
+
+extern struct symbol *dict_iterator_first (const struct dictionary *dict,
+ struct dict_iterator *iterator);
+
+/* Advance ITERATOR, and return the next symbol, or NULL if there are
+ no more symbols. Don't call this if you've previously received
+ NULL from dict_iterator_first or dict_iterator_next on this
+ iteration. */
+
+extern struct symbol *dict_iterator_next (struct dict_iterator *iterator);
+
+/* Initialize ITERATOR to point at the first symbol in DICT whose
+ SYMBOL_BEST_NAME is NAME (as tested using strcmp_iw), and return
+ that first symbol, or NULL if there are no such symbols. */
+
+extern struct symbol *dict_iter_name_first (const struct dictionary *dict,
+ const char *name,
+ struct dict_iterator *iterator);
+
+/* Advance ITERATOR to point at the next symbol in DICT whose
+ SYMBOL_BEST_NAME is NAME (as tested using strcmp_iw), or NULL if
+ there are no more such symbols. Don't call this if you've
+ previously received NULL from dict_iterator_first or
+ dict_iterator_next on this iteration. And don't call it unless
+ ITERATOR was created by a previous call to dict_iter_name_first
+ with the same NAME. */
+
+extern struct symbol *dict_iter_name_next (const char *name,
+ struct dict_iterator *iterator);
+
+/* Return some notion of the size of the dictionary: the number of
+ symbols if we have that, the number of hash buckets otherwise. */
+
+extern int dict_size (const struct dictionary *dict);
+
+/* Macro to loop through all symbols in a dictionary DICT, in no
+ particular order. ITER is a struct dict_iterator (NOTE: __not__ a
+ struct dict_iterator *), and SYM points to the current symbol.
+
+ It's implemented as a single loop, so you can terminate the loop
+ early by a break if you desire. */
+
+#define ALL_DICT_SYMBOLS(dict, iter, sym) \
+ for ((sym) = dict_iterator_first ((dict), &(iter)); \
+ (sym); \
+ (sym) = dict_iterator_next (&(iter)))
+
+#endif /* DICTIONARY_H */
diff --git a/gdb/dink32-rom.c b/gdb/dink32-rom.c
index f62e7129c36..3b10c7caa2e 100644
--- a/gdb/dink32-rom.c
+++ b/gdb/dink32-rom.c
@@ -142,6 +142,8 @@ dink32_open (char *args, int from_tty)
monitor_open (args, &dink32_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_dink32_rom; /* -Wmissing-prototypes */
+
void
_initialize_dink32_rom (void)
{
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2cd0984205b..7dcda46c57a 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,32 @@
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT, and
+ BIG_REMOTE_BREAKPOINT. Cross reference BREAKPOINT_FROM_PC.
+
+2003-06-09 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (Separate Debug Files): Remove extra semicolon.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation on FRAME_ARGS_ADDRESS_CORRECT.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ "unwind_sp". Cross reference "unwind_sp" and TARGET_READ_SP.
+
+2003-06-07 Adam Fedor <fedor@gnu.org>
+
+ * gdb.texinfo: Add Objective-C documentation.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Add "func_addr"
+ parameter to "push_dummy_call". Rename "dummy_addr" to "bp_addr".
+
2003-05-21 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9136e653773..95fd5a0ac9b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -210,6 +210,9 @@ syntax.
it may be necessary to refer to some variables with a trailing
underscore.
+@value{GDBN} can be used to debug programs written in Objective-C,
+using either the Apple/NeXT or the GNU Objective-C runtime.
+
@menu
* Free Software:: Freely redistributable software
* Contributors:: Contributors to GDB
@@ -3180,7 +3183,8 @@ end
@cindex overloading
@cindex symbol overloading
-Some programming languages (notably C@t{++}) permit a single function name
+Some programming languages (notably C@t{++} and Objective-C) permit a
+single function name
to be defined several times, for application in different contexts.
This is called @dfn{overloading}. When a function name is overloaded,
@samp{break @var{function}} is not enough to tell @value{GDBN} where you want
@@ -7487,6 +7491,9 @@ C source file
@itemx .c++
C@t{++} source file
+@item .m
+Objective-C source file
+
@item .f
@itemx .F
Fortran source file
@@ -7762,7 +7769,7 @@ being set automatically by @value{GDBN}.
@node Support
@section Supported languages
-@value{GDBN} supports C, C@t{++}, Fortran, Java, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Objective-C, Fortran, Java, assembly, and Modula-2.
@c This is false ...
Some @value{GDBN} features may be used in expressions regardless of the
language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -7779,8 +7786,9 @@ books written on each of these languages; please look to these for a
language reference or tutorial.
@menu
-* C:: C and C@t{++}
-* Modula-2:: Modula-2
+* C:: C and C@t{++}
+* Objective-C:: Objective-C
+* Modula-2:: Modula-2
@end menu
@node C
@@ -8297,7 +8305,101 @@ available choices, or to finish the type list for you.
@xref{Completion,, Command completion}, for details on how to do this.
@end table
-@node Modula-2
+@node Objective-C
+@subsection Objective-C
+
+@cindex Objective-C
+This section provides information about some commands and command
+options that are useful for debugging Objective-C code.
+
+@menu
+* Method Names in Commands::
+* The Print Command with Objective-C::
+@end menu
+
+@node Method Names in Commands, The Print Command with Objective-C, Objective-C, Objective-C
+@subsubsection Method Names in Commands
+
+The following commands have been extended to accept Objective-C method
+names as line specifications:
+
+@kindex clear@r{, and Objective-C}
+@kindex break@r{, and Objective-C}
+@kindex info line@r{, and Objective-C}
+@kindex jump@r{, and Objective-C}
+@kindex list@r{, and Objective-C}
+@itemize
+@item @code{clear}
+@item @code{break}
+@item @code{info line}
+@item @code{jump}
+@item @code{list}
+@end itemize
+
+A fully qualified Objective-C method name is specified as
+
+@smallexample
+-[@var{Class} @var{methodName}]
+@end smallexample
+
+where the minus sign is used to indicate an instance method and a plus
+sign (not shown) is used to indicate a class method. The
+class name @var{Class} and method name @var{methoName} are enclosed in
+brackets, similar to the way messages are specified in Objective-C source
+code. For example, to set a breakpoint at the @code{create} instance method of
+class @code{Fruit} in the program currently being debugged, enter:
+
+@smallexample
+break -[Fruit create]
+@end smallexample
+
+To list ten program lines around the @code{initialize} class method,
+enter:
+
+@smallexample
+list +[NSText initialize]
+@end smallexample
+
+In the current version of GDB, the plus or minus sign is required. In
+future versions of GDB, the plus or minus sign will be optional, but you
+can use it to narrow the search. It is also possible to specify just a
+method name:
+
+@smallexample
+break create
+@end smallexample
+
+You must specify the complete method name, including any colons. If
+your program's source files contain more than one @code{create} method,
+you'll be presented with a numbered list of classes that implement that
+method. Indicate your choice by number, or type @samp{0} to exit if
+none apply.
+
+As another example, to clear a breakpoint established at the
+@code{makeKeyAndOrderFront:} method of the @code{NSWindow} class, enter:
+
+@smallexample
+clear -[NSWindow makeKeyAndOrderFront:]
+@end smallexample
+
+@node The Print Command with Objective-C
+@subsubsection The Print Command With Objective-C
+
+The print command has also been extended to accept methods. For example:
+
+@smallexample
+print -[object hash]
+@end smallexample
+
+@cindex print an Objective-C object description
+will tell gdb to send the -hash message to object and print the
+result. Also an additional command has been added, @code{print-object}
+or @code{po} for short, which is meant to print the description of an
+object. However, this command may only work with certain Objective-C
+libraries that have a particular hook function, called
+@code{_NSPrintForDebugger} defined.
+
+@node Modula-2, , Objective-C, Support
@subsection Modula-2
@cindex Modula-2, @value{GDBN} support
@@ -8937,6 +9039,20 @@ Print the names and data types of all variables (except for local
variables) whose names contain a match for regular expression
@var{regexp}.
+@kindex info classes
+@item info classes
+@itemx info classes @var{regexp}
+Display all Objective-C classes in your program, or
+(with the @var{regexp} argument) all those matching a particular regular
+expression.
+
+@kindex info selectors
+@item info selectors
+@itemx info selectors @var{regexp}
+Display all Objective-C selectors in your program, or
+(with the @var{regexp} argument) all those matching a particular regular
+expression.
+
@ignore
This was never implemented.
@kindex info methods
@@ -10011,7 +10127,7 @@ gnu_debuglink_crc32 (unsigned long crc,
crc = ~crc & 0xffffffff;
for (end = buf + len; buf < end; ++buf)
crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
- return ~crc & 0xffffffff;;
+ return ~crc & 0xffffffff;
@}
@end smallexample
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 2bbd29fe01e..9c651ed7797 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -41,7 +41,7 @@ Software Foundation raise funds for GNU development.''
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.147 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.151 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Solutions\par
\hfill \manvers\par
@@ -3012,24 +3012,26 @@ Similar to BREAKPOINT, but used for bi-endian targets.
@code{BIG_BREAKPOINT} and @code{LITTLE_BREAKPOINT} have been deprecated in
favor of @code{BREAKPOINT_FROM_PC}.
-@item REMOTE_BREAKPOINT
-@itemx LITTLE_REMOTE_BREAKPOINT
-@itemx BIG_REMOTE_BREAKPOINT
-@findex BIG_REMOTE_BREAKPOINT
-@findex LITTLE_REMOTE_BREAKPOINT
-@findex REMOTE_BREAKPOINT
-Similar to BREAKPOINT, but used for remote targets.
-
-@code{BIG_REMOTE_BREAKPOINT} and @code{LITTLE_REMOTE_BREAKPOINT} have been
-deprecated in favor of @code{BREAKPOINT_FROM_PC}.
+@item DEPRECATED_REMOTE_BREAKPOINT
+@itemx DEPRECATED_LITTLE_REMOTE_BREAKPOINT
+@itemx DEPRECATED_BIG_REMOTE_BREAKPOINT
+@findex DEPRECATED_BIG_REMOTE_BREAKPOINT
+@findex DEPRECATED_LITTLE_REMOTE_BREAKPOINT
+@findex DEPRECATED_REMOTE_BREAKPOINT
+Specify the breakpoint instruction sequence for a remote target.
+@code{DEPRECATED_REMOTE_BREAKPOINT},
+@code{DEPRECATED_BIG_REMOTE_BREAKPOINT} and
+@code{DEPRECATED_LITTLE_REMOTE_BREAKPOINT} have been deprecated in
+favor of @code{BREAKPOINT_FROM_PC} (@pxref{BREAKPOINT_FROM_PC}).
@item BREAKPOINT_FROM_PC (@var{pcptr}, @var{lenptr})
@findex BREAKPOINT_FROM_PC
-Use the program counter to determine the contents and size of a
-breakpoint instruction. It returns a pointer to a string of bytes
-that encode a breakpoint instruction, stores the length of the string
-to *@var{lenptr}, and adjusts pc (if necessary) to point to the actual
-memory location where the breakpoint should be inserted.
+@anchor{BREAKPOINT_FROM_PC} Use the program counter to determine the
+contents and size of a breakpoint instruction. It returns a pointer to
+a string of bytes that encode a breakpoint instruction, stores the
+length of the string to @code{*@var{lenptr}}, and adjusts the program
+counter (if necessary) to point to the actual memory location where the
+breakpoint should be inserted.
Although it is common to use a trap instruction for a breakpoint, it's
not required; for instance, the bit pattern could be an invalid
@@ -3233,10 +3235,6 @@ the direction of stack growth.
By default, no frame based stack alignment is performed.
-@item FRAME_ARGS_ADDRESS_CORRECT
-@findex FRAME_ARGS_ADDRESS_CORRECT
-See @file{stack.c}.
-
@item DEPRECATED_FRAME_CHAIN(@var{frame})
@findex DEPRECATED_FRAME_CHAIN
Given @var{frame}, return a pointer to the calling frame.
@@ -3291,6 +3289,23 @@ return d10v_make_iaddr (pc);
@noindent
@xref{DEPRECATED_FRAME_SAVED_PC}, which this method replaces.
+@item CORE_ADDR unwind_sp (struct frame_info *@var{this_frame})
+@findex unwind_sp
+@anchor{unwind_sp} Return the frame's inner most stack address. This is
+commonly refered to as the frame's @dfn{stack pointer}.
+
+The implementation, which must be frame agnostic (work with any frame),
+is typically no more than:
+
+@smallexample
+ULONGEST sp;
+frame_unwind_unsigned_register (this_frame, D10V_SP_REGNUM, &sp);
+return d10v_make_daddr (sp);
+@end smallexample
+
+@noindent
+@xref{TARGET_READ_SP}, which this method replaces.
+
@item FUNCTION_EPILOGUE_SIZE
@findex FUNCTION_EPILOGUE_SIZE
For some COFF targets, the @code{x_sym.x_misc.x_fsize} field of the
@@ -3678,14 +3693,13 @@ definition is only used in generic code when parsing "$ps".)
If defined, used by @code{frame_pop} to remove a stack frame. This
method has been superseeded by generic code.
-@item push_dummy_call (@var{gdbarch}, @var{regcache}, @var{dummy_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
+@item push_dummy_call (@var{gdbarch}, @var{func_addr}, @var{regcache}, @var{pc_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
@findex push_dummy_call
@findex DEPRECATED_PUSH_ARGUMENTS.
-@anchor{push_dummy_call}
-Define this to push the dummy frame's call to the inferior function onto
-the stack. In addition to pushing @var{nargs}, the code should push
-@var{struct_addr} (when @var{struct_return}), and the return value (in
-the call dummy at @var{dummy_addr}).
+@anchor{push_dummy_call} Define this to push the dummy frame's call to
+the inferior function onto the stack. In addition to pushing
+@var{nargs}, the code should push @var{struct_addr} (when
+@var{struct_return}), and the return address (@var{bp_addr}).
Returns the updated top-of-stack pointer.
@@ -3891,15 +3905,17 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
@findex write_pc
@findex read_sp
@findex read_fp
-These change the behavior of @code{read_pc}, @code{write_pc},
-@code{read_sp} and @code{deprecated_read_fp}. For most targets, these
-may be left undefined. @value{GDBN} will call the read and write
-register functions with the relevant @code{_REGNUM} argument.
+@anchor{TARGET_READ_SP} These change the behavior of @code{read_pc},
+@code{write_pc}, @code{read_sp} and @code{deprecated_read_fp}. For most
+targets, these may be left undefined. @value{GDBN} will call the read
+and write register functions with the relevant @code{_REGNUM} argument.
These macros are useful when a target keeps one of these registers in a
hard to get at place; for example, part in a segment register and part
in an ordinary register.
+@xref{unwind_sp}, which replaces @code{TARGET_READ_SP}.
+
@item TARGET_VIRTUAL_FRAME_POINTER(@var{pc}, @var{regp}, @var{offsetp})
@findex TARGET_VIRTUAL_FRAME_POINTER
Returns a @code{(register, offset)} pair representing the virtual frame
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 101240b5b6d..09bb15502ba 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -404,7 +404,15 @@ convert_doublest_to_floatformat (CONST struct floatformat *fmt,
{
mant_long <<= 1;
mant_long &= 0xffffffffL;
- mant_bits -= 1;
+ /* If we are processing the top 32 mantissa bits of a doublest
+ so as to convert to a float value with implied integer bit,
+ we will only be putting 31 of those 32 bits into the
+ final value due to the discarding of the top bit. In the
+ case of a small float value where the number of mantissa
+ bits is less than 32, discarding the top bit does not alter
+ the number of bits we will be adding to the result. */
+ if (mant_bits == 32)
+ mant_bits -= 1;
}
if (mant_bits < 32)
@@ -625,7 +633,7 @@ floatformat_from_doublest (const struct floatformat *fmt,
target-dependent code, the format of floating-point types is known,
but not passed on by GDB. This should be fixed. */
-const struct floatformat *
+static const struct floatformat *
floatformat_from_length (int len)
{
if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 94413f4baef..c395c936e70 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -360,10 +360,6 @@ dummy_frame_this_id (struct frame_info *next_frame,
just asking for trouble. */
if (gdbarch_unwind_dummy_id_p (current_gdbarch))
{
- /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
- previously saved the dummy frame's ID. Things only work if
- the two return the same value. */
- gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
/* Use an architecture specific method to extract the prev's
dummy ID from the next frame. Note that this method uses
frame_register_unwind to obtain the register values needed to
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
new file mode 100644
index 00000000000..999cef7e6cd
--- /dev/null
+++ b/gdb/dwarf2-frame.c
@@ -0,0 +1,1336 @@
+/* Frame unwinder for frames with DWARF Call Frame Information.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Mark Kettenis.
+
+ 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 "dwarf2expr.h"
+#include "elf/dwarf2.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "gdbtypes.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "regcache.h"
+
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
+#include "dwarf2-frame.h"
+
+/* Call Frame Information (CFI). */
+
+/* Common Information Entry (CIE). */
+
+struct dwarf2_cie
+{
+ /* Offset into the .debug_frame section where this CIE was found.
+ Used to identify this CIE. */
+ ULONGEST cie_pointer;
+
+ /* Constant that is factored out of all advance location
+ instructions. */
+ ULONGEST code_alignment_factor;
+
+ /* Constants that is factored out of all offset instructions. */
+ LONGEST data_alignment_factor;
+
+ /* Return address column. */
+ ULONGEST return_address_register;
+
+ /* Instruction sequence to initialize a register set. */
+ unsigned char *initial_instructions;
+ unsigned char *end;
+
+ /* Encoding of addresses. */
+ unsigned char encoding;
+
+ /* True if a 'z' augmentation existed. */
+ unsigned char saw_z_augmentation;
+
+ struct dwarf2_cie *next;
+};
+
+/* Frame Description Entry (FDE). */
+
+struct dwarf2_fde
+{
+ /* CIE for this FDE. */
+ struct dwarf2_cie *cie;
+
+ /* First location associated with this FDE. */
+ CORE_ADDR initial_location;
+
+ /* Number of bytes of program instructions described by this FDE. */
+ CORE_ADDR address_range;
+
+ /* Instruction sequence. */
+ unsigned char *instructions;
+ unsigned char *end;
+
+ struct dwarf2_fde *next;
+};
+
+static struct dwarf2_fde *dwarf2_frame_find_fde (CORE_ADDR *pc);
+
+
+/* Structure describing a frame state. */
+
+struct dwarf2_frame_state
+{
+ /* Each register save state can be described in terms of a CFA slot,
+ another register, or a location expression. */
+ struct dwarf2_frame_state_reg_info
+ {
+ struct dwarf2_frame_state_reg
+ {
+ union {
+ LONGEST offset;
+ ULONGEST reg;
+ unsigned char *exp;
+ } loc;
+ ULONGEST exp_len;
+ enum {
+ REG_UNSAVED,
+ REG_SAVED_OFFSET,
+ REG_SAVED_REG,
+ REG_SAVED_EXP,
+ REG_UNMODIFIED
+ } how;
+ } *reg;
+ int num_regs;
+
+ /* Used to implement DW_CFA_remember_state. */
+ struct dwarf2_frame_state_reg_info *prev;
+ } regs;
+
+ LONGEST cfa_offset;
+ ULONGEST cfa_reg;
+ unsigned char *cfa_exp;
+ enum {
+ CFA_UNSET,
+ CFA_REG_OFFSET,
+ CFA_EXP
+ } cfa_how;
+
+ /* The PC described by the current frame state. */
+ CORE_ADDR pc;
+
+ /* Initial register set from the CIE.
+ Used to implement DW_CFA_restore. */
+ struct dwarf2_frame_state_reg_info initial;
+
+ /* The information we care about from the CIE. */
+ LONGEST data_align;
+ ULONGEST code_align;
+ ULONGEST retaddr_column;
+};
+
+/* Store the length the expression for the CFA in the `cfa_reg' field,
+ which is unused in that case. */
+#define cfa_exp_len cfa_reg
+
+/* Assert that the register set RS is large enough to store NUM_REGS
+ columns. If necessary, enlarge the register set. */
+
+static void
+dwarf2_frame_state_alloc_regs (struct dwarf2_frame_state_reg_info *rs,
+ int num_regs)
+{
+ size_t size = sizeof (struct dwarf2_frame_state_reg);
+
+ if (num_regs <= rs->num_regs)
+ return;
+
+ rs->reg = (struct dwarf2_frame_state_reg *)
+ xrealloc (rs->reg, num_regs * size);
+
+ /* Initialize newly allocated registers. */
+ memset (rs->reg + rs->num_regs, 0, (num_regs - rs->num_regs) * size);
+ rs->num_regs = num_regs;
+}
+
+/* Copy the register columns in register set RS into newly allocated
+ memory and return a pointer to this newly created copy. */
+
+static struct dwarf2_frame_state_reg *
+dwarf2_frame_state_copy_regs (struct dwarf2_frame_state_reg_info *rs)
+{
+ size_t size = rs->num_regs * sizeof (struct dwarf2_frame_state_reg_info);
+ struct dwarf2_frame_state_reg *reg;
+
+ reg = (struct dwarf2_frame_state_reg *) xmalloc (size);
+ memcpy (reg, rs->reg, size);
+
+ return reg;
+}
+
+/* Release the memory allocated to register set RS. */
+
+static void
+dwarf2_frame_state_free_regs (struct dwarf2_frame_state_reg_info *rs)
+{
+ if (rs)
+ {
+ dwarf2_frame_state_free_regs (rs->prev);
+
+ xfree (rs->reg);
+ xfree (rs);
+ }
+}
+
+/* Release the memory allocated to the frame state FS. */
+
+static void
+dwarf2_frame_state_free (void *p)
+{
+ struct dwarf2_frame_state *fs = p;
+
+ dwarf2_frame_state_free_regs (fs->initial.prev);
+ dwarf2_frame_state_free_regs (fs->regs.prev);
+ xfree (fs->initial.reg);
+ xfree (fs->regs.reg);
+ xfree (fs);
+}
+
+
+/* Helper functions for execute_stack_op. */
+
+static CORE_ADDR
+read_reg (void *baton, int reg)
+{
+ struct frame_info *next_frame = (struct frame_info *) baton;
+ int regnum;
+ char *buf;
+
+ regnum = DWARF2_REG_TO_REGNUM (reg);
+
+ buf = (char *) alloca (register_size (current_gdbarch, regnum));
+ frame_unwind_register (next_frame, regnum, buf);
+ return extract_typed_address (buf, builtin_type_void_data_ptr);
+}
+
+static void
+read_mem (void *baton, char *buf, CORE_ADDR addr, size_t len)
+{
+ read_memory (addr, buf, len);
+}
+
+static void
+no_get_frame_base (void *baton, unsigned char **start, size_t *length)
+{
+ internal_error (__FILE__, __LINE__,
+ "Support for DW_OP_fbreg is unimplemented");
+}
+
+static CORE_ADDR
+no_get_tls_address (void *baton, CORE_ADDR offset)
+{
+ internal_error (__FILE__, __LINE__,
+ "Support for DW_OP_GNU_push_tls_address is unimplemented");
+}
+
+static CORE_ADDR
+execute_stack_op (unsigned char *exp, ULONGEST len,
+ struct frame_info *next_frame, CORE_ADDR initial)
+{
+ struct dwarf_expr_context *ctx;
+ CORE_ADDR result;
+
+ ctx = new_dwarf_expr_context ();
+ ctx->baton = next_frame;
+ ctx->read_reg = read_reg;
+ ctx->read_mem = read_mem;
+ ctx->get_frame_base = no_get_frame_base;
+ ctx->get_tls_address = no_get_tls_address;
+
+ dwarf_expr_push (ctx, initial);
+ dwarf_expr_eval (ctx, exp, len);
+ result = dwarf_expr_fetch (ctx, 0);
+
+ if (ctx->in_reg)
+ result = read_reg (next_frame, result);
+
+ free_dwarf_expr_context (ctx);
+
+ return result;
+}
+
+
+static void
+execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
+ struct frame_info *next_frame,
+ struct dwarf2_frame_state *fs)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ int bytes_read;
+
+ while (insn_ptr < insn_end && fs->pc <= pc)
+ {
+ unsigned char insn = *insn_ptr++;
+ ULONGEST utmp, reg;
+ LONGEST offset;
+
+ if ((insn & 0xc0) == DW_CFA_advance_loc)
+ fs->pc += (insn & 0x3f) * fs->code_align;
+ else if ((insn & 0xc0) == DW_CFA_offset)
+ {
+ reg = insn & 0x3f;
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ offset = utmp * fs->data_align;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_SAVED_OFFSET;
+ fs->regs.reg[reg].loc.offset = offset;
+ }
+ else if ((insn & 0xc0) == DW_CFA_restore)
+ {
+ gdb_assert (fs->initial.reg);
+ reg = insn & 0x3f;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg] = fs->initial.reg[reg];
+ }
+ else
+ {
+ switch (insn)
+ {
+ case DW_CFA_set_loc:
+ fs->pc = dwarf2_read_address (insn_ptr, insn_end, &bytes_read);
+ insn_ptr += bytes_read;
+ break;
+
+ case DW_CFA_advance_loc1:
+ utmp = extract_unsigned_integer (insn_ptr, 1);
+ fs->pc += utmp * fs->code_align;
+ insn_ptr++;
+ break;
+ case DW_CFA_advance_loc2:
+ utmp = extract_unsigned_integer (insn_ptr, 2);
+ fs->pc += utmp * fs->code_align;
+ insn_ptr += 2;
+ break;
+ case DW_CFA_advance_loc4:
+ utmp = extract_unsigned_integer (insn_ptr, 4);
+ fs->pc += utmp * fs->code_align;
+ insn_ptr += 4;
+ break;
+
+ case DW_CFA_offset_extended:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ offset = utmp * fs->data_align;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_SAVED_OFFSET;
+ fs->regs.reg[reg].loc.offset = offset;
+ break;
+
+ case DW_CFA_restore_extended:
+ gdb_assert (fs->initial.reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg] = fs->initial.reg[reg];
+ break;
+
+ case DW_CFA_undefined:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_UNSAVED;
+ break;
+
+ case DW_CFA_same_value:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_UNMODIFIED;
+ break;
+
+ case DW_CFA_register:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].loc.reg = utmp;
+ break;
+
+ case DW_CFA_remember_state:
+ {
+ struct dwarf2_frame_state_reg_info *new_rs;
+
+ new_rs = XMALLOC (struct dwarf2_frame_state_reg_info);
+ *new_rs = fs->regs;
+ fs->regs.reg = dwarf2_frame_state_copy_regs (&fs->regs);
+ fs->regs.prev = new_rs;
+ }
+ break;
+
+ case DW_CFA_restore_state:
+ {
+ struct dwarf2_frame_state_reg_info *old_rs = fs->regs.prev;
+
+ gdb_assert (old_rs);
+
+ xfree (fs->regs.reg);
+ fs->regs = *old_rs;
+ xfree (old_rs);
+ }
+ break;
+
+ case DW_CFA_def_cfa:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ fs->cfa_offset = utmp;
+ fs->cfa_how = CFA_REG_OFFSET;
+ break;
+
+ case DW_CFA_def_cfa_register:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_reg);
+ fs->cfa_how = CFA_REG_OFFSET;
+ break;
+
+ case DW_CFA_def_cfa_offset:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_offset);
+ /* cfa_how deliberately not set. */
+ break;
+
+ case DW_CFA_def_cfa_expression:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_exp_len);
+ fs->cfa_exp = insn_ptr;
+ fs->cfa_how = CFA_EXP;
+ insn_ptr += fs->cfa_exp_len;
+ break;
+
+ case DW_CFA_expression:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ fs->regs.reg[reg].loc.exp = insn_ptr;
+ fs->regs.reg[reg].exp_len = utmp;
+ fs->regs.reg[reg].how = REG_SAVED_EXP;
+ insn_ptr += utmp;
+ break;
+
+ case DW_CFA_nop:
+ break;
+
+ case DW_CFA_GNU_args_size:
+ /* Ignored. */
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "Unknown CFI encountered.");
+ }
+ }
+ }
+
+ /* Don't allow remember/restore between CIE and FDE programs. */
+ dwarf2_frame_state_free_regs (fs->regs.prev);
+ fs->regs.prev = NULL;
+}
+
+struct dwarf2_frame_cache
+{
+ /* DWARF Call Frame Address. */
+ CORE_ADDR cfa;
+
+ /* Saved registers, indexed by GDB register number, not by DWARF
+ register number. */
+ struct dwarf2_frame_state_reg *reg;
+};
+
+static struct dwarf2_frame_cache *
+dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct cleanup *old_chain;
+ int num_regs = NUM_REGS + NUM_PSEUDO_REGS;
+ struct dwarf2_frame_cache *cache;
+ struct dwarf2_frame_state *fs;
+ struct dwarf2_fde *fde;
+ int reg;
+
+ if (*this_cache)
+ return *this_cache;
+
+ /* Allocate a new cache. */
+ cache = FRAME_OBSTACK_ZALLOC (struct dwarf2_frame_cache);
+ cache->reg = FRAME_OBSTACK_CALLOC (num_regs, struct dwarf2_frame_state_reg);
+
+ /* Allocate and initialize the frame state. */
+ fs = XMALLOC (struct dwarf2_frame_state);
+ memset (fs, 0, sizeof (struct dwarf2_frame_state));
+ old_chain = make_cleanup (dwarf2_frame_state_free, fs);
+
+ /* Unwind the PC.
+
+ Note that if NEXT_FRAME is never supposed to return (i.e. a call
+ to abort), the compiler might optimize away the instruction at
+ NEXT_FRAME's return address. As a result the return address will
+ point at some random instruction, and the CFI for that
+ instruction is probably wortless to us. GCC's unwinder solves
+ this problem by substracting 1 from the return address to get an
+ address in the middle of a presumed call instruction (or the
+ instruction in the associated delay slot). This should only be
+ done for "normal" frames and not for resume-type frames (signal
+ handlers, sentinel frames, dummy frames).
+
+ We don't do what GCC's does here (yet). It's not clear how
+ reliable the method is. There's also a problem with finding the
+ right FDE; see the comment in dwarf_frame_p. If dwarf_frame_p
+ selected this frame unwinder because it found the FDE for the
+ next function, using the adjusted return address might not yield
+ a FDE at all. The problem isn't specific to DWARF CFI; other
+ unwinders loose in similar ways. Therefore it's probably
+ acceptable to leave things slightly broken for now. */
+ fs->pc = frame_pc_unwind (next_frame);
+
+ /* Find the correct FDE. */
+ fde = dwarf2_frame_find_fde (&fs->pc);
+ gdb_assert (fde != NULL);
+
+ /* Extract any interesting information from the CIE. */
+ fs->data_align = fde->cie->data_alignment_factor;
+ fs->code_align = fde->cie->code_alignment_factor;
+ fs->retaddr_column = fde->cie->return_address_register;
+
+ /* First decode all the insns in the CIE. */
+ execute_cfa_program (fde->cie->initial_instructions,
+ fde->cie->end, next_frame, fs);
+
+ /* Save the initialized register set. */
+ fs->initial = fs->regs;
+ fs->initial.reg = dwarf2_frame_state_copy_regs (&fs->regs);
+
+ /* Then decode the insns in the FDE up to our target PC. */
+ execute_cfa_program (fde->instructions, fde->end, next_frame, fs);
+
+ /* Caclulate the CFA. */
+ switch (fs->cfa_how)
+ {
+ case CFA_REG_OFFSET:
+ cache->cfa = read_reg (next_frame, fs->cfa_reg);
+ cache->cfa += fs->cfa_offset;
+ break;
+
+ case CFA_EXP:
+ cache->cfa =
+ execute_stack_op (fs->cfa_exp, fs->cfa_exp_len, next_frame, 0);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "Unknown CFA rule.");
+ }
+
+ /* Save the register info in the cache. */
+ for (reg = 0; reg < fs->regs.num_regs; reg++)
+ {
+ int regnum;
+
+ /* Skip the return address column. */
+ if (reg == fs->retaddr_column)
+ /* NOTE: cagney/2003-06-07: Is this right? What if the
+ RETADDR_COLUM corresponds to a real register (and, worse,
+ that isn't the PC_REGNUM)? I'm guessing that the PC_REGNUM
+ further down is trying to handle this. That can't be right
+ though - PC_REGNUM may not be valid (it can be -ve). I
+ think, instead when RETADDR_COLUM isn't a real register, it
+ should map itself onto frame_pc_unwind. */
+ continue;
+
+ /* Use the GDB register number as index. */
+ regnum = DWARF2_REG_TO_REGNUM (reg);
+
+ if (regnum >= 0 && regnum < num_regs)
+ cache->reg[regnum] = fs->regs.reg[reg];
+ }
+
+ /* Store the location of the return addess. If the return address
+ column (adjusted) is not the same as gdb's PC_REGNUM, then this
+ implies a copy from the ra column register. */
+ if (fs->retaddr_column < fs->regs.num_regs
+ && fs->regs.reg[fs->retaddr_column].how != REG_UNSAVED)
+ {
+ /* See comment above about a possibly -ve PC_REGNUM. If this
+ assertion fails, it's a problem with this code and not the
+ architecture. */
+ gdb_assert (PC_REGNUM >= 0);
+ cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
+ }
+ else
+ {
+ reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
+ if (reg != PC_REGNUM)
+ {
+ /* See comment above about PC_REGNUM being -ve. If this
+ assertion fails, it's a problem with this code and not
+ the architecture. */
+ gdb_assert (PC_REGNUM >= 0);
+ cache->reg[PC_REGNUM].loc.reg = reg;
+ cache->reg[PC_REGNUM].how = REG_SAVED_REG;
+ }
+ }
+
+ do_cleanups (old_chain);
+
+ *this_cache = cache;
+ return cache;
+}
+
+static void
+dwarf2_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct dwarf2_frame_cache *cache =
+ dwarf2_frame_cache (next_frame, this_cache);
+
+ (*this_id) = frame_id_build (cache->cfa, frame_func_unwind (next_frame));
+}
+
+static void
+dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ struct dwarf2_frame_cache *cache =
+ dwarf2_frame_cache (next_frame, this_cache);
+
+ switch (cache->reg[regnum].how)
+ {
+ case REG_UNSAVED:
+ *optimizedp = 1;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (regnum == SP_REGNUM)
+ {
+ /* GCC defines the CFA as the value of the stack pointer
+ just before the call instruction is executed. Do other
+ compilers use the same definition? */
+ /* DWARF V3 Draft 7 p102: Typically, the CFA is defined to
+ be the value of the stack pointer at the call site in the
+ previous frame (which may be different from its value on
+ entry to the current frame). */
+ /* DWARF V3 Draft 7 p103: The first column of the rules
+ defines the rule which computes the CFA value; it may be
+ either a register and a signed offset that are added
+ together or a DWARF expression that is evaluated. */
+ /* FIXME: cagney/2003-07-07: I don't understand this. The
+ CFI info should have provided unwind information for the
+ SP register and then pointed ->cfa_reg at it, not the
+ reverse. Assuming that SP_REGNUM is !-ve, there is a
+ very real posibility that CFA is an offset from some
+ other register, having nothing to do with the unwound SP
+ value. */
+ *optimizedp = 0;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_typed_address (valuep, builtin_type_void_data_ptr,
+ cache->cfa);
+ }
+ }
+ else if (valuep)
+ {
+ /* In some cases, for example %eflags on the i386, we have
+ to provide a sane value, even though this register wasn't
+ saved. Assume we can get it from NEXT_FRAME. */
+ frame_unwind_register (next_frame, regnum, valuep);
+ }
+ break;
+
+ case REG_SAVED_OFFSET:
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->cfa + cache->reg[regnum].loc.offset;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ break;
+
+ case REG_SAVED_REG:
+ regnum = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+ break;
+
+ case REG_SAVED_EXP:
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = execute_stack_op (cache->reg[regnum].loc.exp,
+ cache->reg[regnum].exp_len,
+ next_frame, cache->cfa);
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ break;
+
+ case REG_UNMODIFIED:
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "Unknown register rule.");
+ }
+}
+
+static const struct frame_unwind dwarf2_frame_unwind =
+{
+ NORMAL_FRAME,
+ dwarf2_frame_this_id,
+ dwarf2_frame_prev_register
+};
+
+const struct frame_unwind *
+dwarf2_frame_p (CORE_ADDR pc)
+{
+ /* The way GDB works, this function can be called with PC just after
+ the last instruction of the function we're supposed to return the
+ unwind methods for. In that case we won't find the correct FDE;
+ instead we find the FDE for the next function, or we won't find
+ an FDE at all. There is a possible solution (see the comment in
+ dwarf2_frame_cache), GDB doesn't pass us enough information to
+ implement it. */
+ if (dwarf2_frame_find_fde (&pc))
+ return &dwarf2_frame_unwind;
+
+ return NULL;
+}
+
+
+/* There is no explicitly defined relationship between the CFA and the
+ location of frame's local variables and arguments/parameters.
+ Therefore, frame base methods on this page should probably only be
+ used as a last resort, just to avoid printing total garbage as a
+ response to the "info frame" command. */
+
+static CORE_ADDR
+dwarf2_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct dwarf2_frame_cache *cache =
+ dwarf2_frame_cache (next_frame, this_cache);
+
+ return cache->cfa;
+}
+
+static const struct frame_base dwarf2_frame_base =
+{
+ &dwarf2_frame_unwind,
+ dwarf2_frame_base_address,
+ dwarf2_frame_base_address,
+ dwarf2_frame_base_address
+};
+
+const struct frame_base *
+dwarf2_frame_base_p (CORE_ADDR pc)
+{
+ if (dwarf2_frame_find_fde (&pc))
+ return &dwarf2_frame_base;
+
+ return NULL;
+}
+
+/* A minimal decoding of DWARF2 compilation units. We only decode
+ what's needed to get to the call frame information. */
+
+struct comp_unit
+{
+ /* Keep the bfd convenient. */
+ bfd *abfd;
+
+ struct objfile *objfile;
+
+ /* Linked list of CIEs for this object. */
+ struct dwarf2_cie *cie;
+
+ /* Address size for this unit - from unit header. */
+ unsigned char addr_size;
+
+ /* Pointer to the .debug_frame section loaded into memory. */
+ char *dwarf_frame_buffer;
+
+ /* Length of the loaded .debug_frame section. */
+ unsigned long dwarf_frame_size;
+
+ /* Pointer to the .debug_frame section. */
+ asection *dwarf_frame_section;
+
+ /* Base for DW_EH_PE_datarel encodings. */
+ bfd_vma dbase;
+};
+
+static unsigned int
+read_1_byte (bfd *bfd, char *buf)
+{
+ return bfd_get_8 (abfd, (bfd_byte *) buf);
+}
+
+static unsigned int
+read_4_bytes (bfd *abfd, char *buf)
+{
+ return bfd_get_32 (abfd, (bfd_byte *) buf);
+}
+
+static ULONGEST
+read_8_bytes (bfd *abfd, char *buf)
+{
+ return bfd_get_64 (abfd, (bfd_byte *) buf);
+}
+
+static ULONGEST
+read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
+{
+ ULONGEST result;
+ unsigned int num_read;
+ int shift;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+
+ do
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf++;
+ num_read++;
+ result |= ((byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+
+ *bytes_read_ptr = num_read;
+
+ return result;
+}
+
+static LONGEST
+read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
+{
+ LONGEST result;
+ int shift;
+ unsigned int num_read;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+
+ do
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf++;
+ num_read++;
+ result |= ((byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+
+ if ((shift < 32) && (byte & 0x40))
+ result |= -(1 << shift);
+
+ *bytes_read_ptr = num_read;
+
+ return result;
+}
+
+static ULONGEST
+read_initial_length (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
+{
+ LONGEST result;
+
+ result = bfd_get_32 (abfd, (bfd_byte *) buf);
+ if (result == 0xffffffff)
+ {
+ result = bfd_get_64 (abfd, (bfd_byte *) buf + 4);
+ *bytes_read_ptr = 12;
+ }
+ else
+ *bytes_read_ptr = 4;
+
+ return result;
+}
+
+
+/* Pointer encoding helper functions. */
+
+/* GCC supports exception handling based on DWARF2 CFI. However, for
+ technical reasons, it encodes addresses in its FDE's in a different
+ way. Several "pointer encodings" are supported. The encoding
+ that's used for a particular FDE is determined by the 'R'
+ augmentation in the associated CIE. The argument of this
+ augmentation is a single byte.
+
+ The address can be encoded as 2 bytes, 4 bytes, 8 bytes, or as a
+ LEB128. This is encoded in bits 0, 1 and 2. Bit 3 encodes whether
+ the address is signed or unsigned. Bits 4, 5 and 6 encode how the
+ address should be interpreted (absolute, relative to the current
+ position in the FDE, ...). Bit 7, indicates that the address
+ should be dereferenced. */
+
+static unsigned char
+encoding_for_size (unsigned int size)
+{
+ switch (size)
+ {
+ case 2:
+ return DW_EH_PE_udata2;
+ case 4:
+ return DW_EH_PE_udata4;
+ case 8:
+ return DW_EH_PE_udata8;
+ default:
+ internal_error (__FILE__, __LINE__, "Unsupported address size");
+ }
+}
+
+static unsigned int
+size_of_encoded_value (unsigned char encoding)
+{
+ if (encoding == DW_EH_PE_omit)
+ return 0;
+
+ switch (encoding & 0x07)
+ {
+ case DW_EH_PE_absptr:
+ return TYPE_LENGTH (builtin_type_void_data_ptr);
+ case DW_EH_PE_udata2:
+ return 2;
+ case DW_EH_PE_udata4:
+ return 4;
+ case DW_EH_PE_udata8:
+ return 8;
+ default:
+ internal_error (__FILE__, __LINE__, "Invalid or unsupported encoding");
+ }
+}
+
+static CORE_ADDR
+read_encoded_value (struct comp_unit *unit, unsigned char encoding,
+ char *buf, unsigned int *bytes_read_ptr)
+{
+ CORE_ADDR base;
+
+ /* GCC currently doesn't generate DW_EH_PE_indirect encodings for
+ FDE's. */
+ if (encoding & DW_EH_PE_indirect)
+ internal_error (__FILE__, __LINE__,
+ "Unsupported encoding: DW_EH_PE_indirect");
+
+ switch (encoding & 0x70)
+ {
+ case DW_EH_PE_absptr:
+ base = 0;
+ break;
+ case DW_EH_PE_pcrel:
+ base = bfd_get_section_vma (unit->bfd, unit->dwarf_frame_section);
+ base += (buf - unit->dwarf_frame_buffer);
+ break;
+ case DW_EH_PE_datarel:
+ base = unit->dbase;
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "Invalid or unsupported encoding");
+ }
+
+ if ((encoding & 0x0f) == 0x00)
+ encoding |= encoding_for_size (TYPE_LENGTH(builtin_type_void_data_ptr));
+
+ switch (encoding & 0x0f)
+ {
+ case DW_EH_PE_udata2:
+ *bytes_read_ptr = 2;
+ return (base + bfd_get_16 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_udata4:
+ *bytes_read_ptr = 4;
+ return (base + bfd_get_32 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_udata8:
+ *bytes_read_ptr = 8;
+ return (base + bfd_get_64 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_sdata2:
+ *bytes_read_ptr = 2;
+ return (base + bfd_get_signed_16 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_sdata4:
+ *bytes_read_ptr = 4;
+ return (base + bfd_get_signed_32 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_sdata8:
+ *bytes_read_ptr = 8;
+ return (base + bfd_get_signed_64 (unit->abfd, (bfd_byte *) buf));
+ default:
+ internal_error (__FILE__, __LINE__, "Invalid or unsupported encoding");
+ }
+}
+
+
+/* GCC uses a single CIE for all FDEs in a .debug_frame section.
+ That's why we use a simple linked list here. */
+
+static struct dwarf2_cie *
+find_cie (struct comp_unit *unit, ULONGEST cie_pointer)
+{
+ struct dwarf2_cie *cie = unit->cie;
+
+ while (cie)
+ {
+ if (cie->cie_pointer == cie_pointer)
+ return cie;
+
+ cie = cie->next;
+ }
+
+ return NULL;
+}
+
+static void
+add_cie (struct comp_unit *unit, struct dwarf2_cie *cie)
+{
+ cie->next = unit->cie;
+ unit->cie = cie;
+}
+
+/* Find the FDE for *PC. Return a pointer to the FDE, and store the
+ inital location associated with it into *PC. */
+
+static struct dwarf2_fde *
+dwarf2_frame_find_fde (CORE_ADDR *pc)
+{
+ struct objfile *objfile;
+
+ ALL_OBJFILES (objfile)
+ {
+ struct dwarf2_fde *fde;
+ CORE_ADDR offset;
+
+ offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+
+ fde = objfile->sym_private;
+ while (fde)
+ {
+ if (*pc >= fde->initial_location + offset
+ && *pc < fde->initial_location + offset + fde->address_range)
+ {
+ *pc = fde->initial_location + offset;
+ return fde;
+ }
+
+ fde = fde->next;
+ }
+ }
+
+ return NULL;
+}
+
+static void
+add_fde (struct comp_unit *unit, struct dwarf2_fde *fde)
+{
+ fde->next = unit->objfile->sym_private;
+ unit->objfile->sym_private = fde;
+}
+
+#ifdef CC_HAS_LONG_LONG
+#define DW64_CIE_ID 0xffffffffffffffffULL
+#else
+#define DW64_CIE_ID ~0
+#endif
+
+/* Read a CIE or FDE in BUF and decode it. */
+
+static char *
+decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
+{
+ LONGEST length;
+ unsigned int bytes_read;
+ int dwarf64_p = 0;
+ ULONGEST cie_id = DW_CIE_ID;
+ ULONGEST cie_pointer;
+ char *start = buf;
+ char *end;
+
+ length = read_initial_length (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+ end = buf + length;
+
+ if (length == 0)
+ return end;
+
+ if (bytes_read == 12)
+ dwarf64_p = 1;
+
+ /* In a .eh_frame section, zero is used to distinguish CIEs from
+ FDEs. */
+ if (eh_frame_p)
+ cie_id = 0;
+ else if (dwarf64_p)
+ cie_id = DW64_CIE_ID;
+
+ if (dwarf64_p)
+ {
+ cie_pointer = read_8_bytes (unit->abfd, buf);
+ buf += 8;
+ }
+ else
+ {
+ cie_pointer = read_4_bytes (unit->abfd, buf);
+ buf += 4;
+ }
+
+ if (cie_pointer == cie_id)
+ {
+ /* This is a CIE. */
+ struct dwarf2_cie *cie;
+ char *augmentation;
+
+ /* Record the offset into the .debug_frame section of this CIE. */
+ cie_pointer = start - unit->dwarf_frame_buffer;
+
+ /* Check whether we've already read it. */
+ if (find_cie (unit, cie_pointer))
+ return end;
+
+ cie = (struct dwarf2_cie *)
+ obstack_alloc (&unit->objfile->psymbol_obstack,
+ sizeof (struct dwarf2_cie));
+ cie->initial_instructions = NULL;
+ cie->cie_pointer = cie_pointer;
+
+ /* The encoding for FDE's in a normal .debug_frame section
+ depends on the target address size as specified in the
+ Compilation Unit Header. */
+ cie->encoding = encoding_for_size (unit->addr_size);
+
+ /* Check version number. */
+ gdb_assert (read_1_byte (unit->abfd, buf) == DW_CIE_VERSION);
+ buf += 1;
+
+ /* Interpret the interesting bits of the augmentation. */
+ augmentation = buf;
+ buf = augmentation + strlen (augmentation) + 1;
+
+ /* The GCC 2.x "eh" augmentation has a pointer immediately
+ following the augmentation string, so it must be handled
+ first. */
+ if (augmentation[0] == 'e' && augmentation[1] == 'h')
+ {
+ /* Skip. */
+ buf += TYPE_LENGTH (builtin_type_void_data_ptr);
+ augmentation += 2;
+ }
+
+ cie->code_alignment_factor =
+ read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+
+ cie->data_alignment_factor =
+ read_signed_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+
+ cie->return_address_register = read_1_byte (unit->abfd, buf);
+ buf += 1;
+
+ cie->saw_z_augmentation = (*augmentation == 'z');
+ if (cie->saw_z_augmentation)
+ {
+ ULONGEST length;
+
+ length = read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+ cie->initial_instructions = buf + length;
+ augmentation++;
+ }
+
+ while (*augmentation)
+ {
+ /* "L" indicates a byte showing how the LSDA pointer is encoded. */
+ if (*augmentation == 'L')
+ {
+ /* Skip. */
+ buf++;
+ augmentation++;
+ }
+
+ /* "R" indicates a byte indicating how FDE addresses are encoded. */
+ else if (*augmentation == 'R')
+ {
+ cie->encoding = *buf++;
+ augmentation++;
+ }
+
+ /* "P" indicates a personality routine in the CIE augmentation. */
+ else if (*augmentation == 'P')
+ {
+ /* Skip. */
+ buf += size_of_encoded_value (*buf++);
+ augmentation++;
+ }
+
+ /* Otherwise we have an unknown augmentation.
+ Bail out unless we saw a 'z' prefix. */
+ else
+ {
+ if (cie->initial_instructions == NULL)
+ return end;
+
+ /* Skip unknown augmentations. */
+ buf = cie->initial_instructions;
+ break;
+ }
+ }
+
+ cie->initial_instructions = buf;
+ cie->end = end;
+
+ add_cie (unit, cie);
+ }
+ else
+ {
+ /* This is a FDE. */
+ struct dwarf2_fde *fde;
+
+ if (eh_frame_p)
+ {
+ /* In an .eh_frame section, the CIE pointer is the delta
+ between the address within the FDE where the CIE pointer
+ is stored and the address of the CIE. Convert it to an
+ offset into the .eh_frame section. */
+ cie_pointer = buf - unit->dwarf_frame_buffer - cie_pointer;
+ cie_pointer -= (dwarf64_p ? 8 : 4);
+ }
+
+ fde = (struct dwarf2_fde *)
+ obstack_alloc (&unit->objfile->psymbol_obstack,
+ sizeof (struct dwarf2_fde));
+ fde->cie = find_cie (unit, cie_pointer);
+ if (fde->cie == NULL)
+ {
+ decode_frame_entry (unit, unit->dwarf_frame_buffer + cie_pointer,
+ eh_frame_p);
+ fde->cie = find_cie (unit, cie_pointer);
+ }
+
+ gdb_assert (fde->cie != NULL);
+
+ fde->initial_location =
+ read_encoded_value (unit, fde->cie->encoding, buf, &bytes_read);
+ buf += bytes_read;
+
+ fde->address_range =
+ read_encoded_value (unit, fde->cie->encoding & 0x0f, buf, &bytes_read);
+ buf += bytes_read;
+
+ /* A 'z' augmentation in the CIE implies the presence of an
+ augmentation field in the FDE as well. The only thing known
+ to be in here at present is the LSDA entry for EH. So we
+ can skip the whole thing. */
+ if (fde->cie->saw_z_augmentation)
+ {
+ ULONGEST length;
+
+ length = read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read + length;
+ }
+
+ fde->instructions = buf;
+ fde->end = end;
+
+ add_fde (unit, fde);
+ }
+
+ return end;
+}
+
+
+/* FIXME: kettenis/20030504: This still needs to be integrated with
+ dwarf2read.c in a better way. */
+
+/* Imported from dwarf2read.c. */
+extern file_ptr dwarf_frame_offset;
+extern unsigned int dwarf_frame_size;
+extern asection *dwarf_frame_section;
+extern file_ptr dwarf_eh_frame_offset;
+extern unsigned int dwarf_eh_frame_size;
+extern asection *dwarf_eh_frame_section;
+
+/* Imported from dwarf2read.c. */
+extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
+ unsigned int size, asection *sectp);
+
+void
+dwarf2_build_frame_info (struct objfile *objfile)
+{
+ struct comp_unit unit;
+ char *frame_ptr;
+
+ /* Build a minimal decoding of the DWARF2 compilation unit. */
+ unit.abfd = objfile->obfd;
+ unit.objfile = objfile;
+ unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8;
+ unit.dbase = 0;
+
+ /* First add the information from the .eh_frame section. That way,
+ the FDEs from that section are searched last. */
+ if (dwarf_eh_frame_offset)
+ {
+ asection *got;
+
+ unit.cie = NULL;
+ unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
+ dwarf_eh_frame_offset,
+ dwarf_eh_frame_size,
+ dwarf_eh_frame_section);
+
+ unit.dwarf_frame_size = dwarf_eh_frame_size;
+ unit.dwarf_frame_section = dwarf_eh_frame_section;
+
+ /* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
+ that for the i386/amd64 target, which currently is the only
+ target in GCC that supports/uses the DW_EH_PE_datarel
+ encoding. */
+ got = bfd_get_section_by_name (unit.abfd, ".got");
+ if (got)
+ unit.dbase = got->vma;
+
+ frame_ptr = unit.dwarf_frame_buffer;
+ while (frame_ptr < unit.dwarf_frame_buffer + unit.dwarf_frame_size)
+ frame_ptr = decode_frame_entry (&unit, frame_ptr, 1);
+ }
+
+ if (dwarf_frame_offset)
+ {
+ unit.cie = NULL;
+ unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
+ dwarf_frame_offset,
+ dwarf_frame_size,
+ dwarf_frame_section);
+ unit.dwarf_frame_size = dwarf_frame_size;
+ unit.dwarf_frame_section = dwarf_frame_section;
+
+ frame_ptr = unit.dwarf_frame_buffer;
+ while (frame_ptr < unit.dwarf_frame_buffer + unit.dwarf_frame_size)
+ frame_ptr = decode_frame_entry (&unit, frame_ptr, 0);
+ }
+}
diff --git a/gdb/dwarf2-frame.h b/gdb/dwarf2-frame.h
new file mode 100644
index 00000000000..4b4c1a5ab2f
--- /dev/null
+++ b/gdb/dwarf2-frame.h
@@ -0,0 +1,43 @@
+/* Frame unwinder for frames with DWARF Call Frame Information.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Mark Kettenis.
+
+ 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. */
+
+#ifndef DWARF2_FRAME_H
+#define DWARF2_FRAME_H 1
+
+struct objfile;
+
+/* Return the frame unwind methods for the function that contains PC,
+ or NULL if it can't be handled by DWARF CFI frame unwinder. */
+
+const struct frame_unwind *dwarf2_frame_p (CORE_ADDR pc);
+
+/* Return the frame base methods for the function that contains PC, or
+ NULL if it can't be handled by the DWARF CFI frame unwinder. */
+
+const struct frame_base *dwarf2_frame_base_p (CORE_ADDR pc);
+
+/* Register the DWARF CFI for OBJFILE. */
+
+void dwarf2_frame_build_info (struct objfile *objfile);
+
+#endif /* dwarf2-frame.h */
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
index 9e6fe808789..0a60edb8237 100644
--- a/gdb/dwarf2expr.h
+++ b/gdb/dwarf2expr.h
@@ -76,7 +76,7 @@ struct dwarf_expr_context
int in_reg;
};
-struct dwarf_expr_context *new_dwarf_expr_context ();
+struct dwarf_expr_context *new_dwarf_expr_context (void);
void free_dwarf_expr_context (struct dwarf_expr_context *ctx);
void dwarf_expr_push (struct dwarf_expr_context *ctx, CORE_ADDR value);
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8f927f0f0ea..55b335da9d9 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1740,7 +1740,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
}
pst->symtab = symtab;
pst->readin = 1;
- sort_symtab_syms (pst->symtab);
do_cleanups (back_to);
}
@@ -1768,6 +1767,8 @@ process_die (struct die_info *die, struct objfile *objfile,
of a function and make GDB `next' properly over inlined functions. */
break;
case DW_TAG_lexical_block:
+ case DW_TAG_try_block:
+ case DW_TAG_catch_block:
read_lexical_block_scope (die, objfile, cu_header);
break;
case DW_TAG_class_type:
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index bbfecbc29f5..0856b899dc5 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -701,7 +701,7 @@ static void
read_lexical_block_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct objfile *objfile)
{
- register struct context_stack *new;
+ struct context_stack *new;
push_context (0, dip->at_low_pc);
process_dies (thisdie + dip->die_length, enddie, objfile);
@@ -862,7 +862,8 @@ decode_die_type (struct dieinfo *dip)
}
else if (dip->at_user_def_type)
{
- if ((type = lookup_utype (dip->at_user_def_type)) == NULL)
+ type = lookup_utype (dip->at_user_def_type);
+ if (type == NULL)
{
type = alloc_utype (dip->at_user_def_type, NULL);
}
@@ -916,7 +917,8 @@ struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
char *nextdie;
int anonymous_size;
- if ((type = lookup_utype (dip->die_ref)) == NULL)
+ type = lookup_utype (dip->die_ref);
+ if (type == NULL)
{
/* No forward references created an empty type, so install one now */
type = alloc_utype (dip->die_ref, NULL);
@@ -1149,7 +1151,8 @@ decode_array_element_type (char *scan)
attribute = target_to_host (scan, SIZEOF_ATTRIBUTE, GET_UNSIGNED,
current_objfile);
scan += SIZEOF_ATTRIBUTE;
- if ((nbytes = attribute_size (attribute)) == -1)
+ nbytes = attribute_size (attribute);
+ if (nbytes == -1)
{
bad_array_element_type_complaint (DIE_ID, DIE_NAME, attribute);
typep = dwarf_fundamental_type (current_objfile, FT_INTEGER);
@@ -1169,7 +1172,8 @@ decode_array_element_type (char *scan)
case AT_user_def_type:
die_ref = target_to_host (scan, nbytes, GET_UNSIGNED,
current_objfile);
- if ((typep = lookup_utype (die_ref)) == NULL)
+ typep = lookup_utype (die_ref);
+ if (typep == NULL)
{
typep = alloc_utype (die_ref, NULL);
}
@@ -1334,14 +1338,16 @@ dwarf_read_array_type (struct dieinfo *dip)
"DIE @ 0x%x \"%s\", array not row major; not handled correctly",
DIE_ID, DIE_NAME);
}
- if ((sub = dip->at_subscr_data) != NULL)
+ sub = dip->at_subscr_data;
+ if (sub != NULL)
{
nbytes = attribute_size (AT_subscr_data);
blocksz = target_to_host (sub, nbytes, GET_UNSIGNED, current_objfile);
subend = sub + nbytes + blocksz;
sub += nbytes;
type = decode_subscript_data_item (sub, subend);
- if ((utype = lookup_utype (dip->die_ref)) == NULL)
+ utype = lookup_utype (dip->die_ref);
+ if (utype == NULL)
{
/* Install user defined type that has not been referenced yet. */
alloc_utype (dip->die_ref, type);
@@ -1390,7 +1396,8 @@ read_tag_pointer_type (struct dieinfo *dip)
struct type *utype;
type = decode_die_type (dip);
- if ((utype = lookup_utype (dip->die_ref)) == NULL)
+ utype = lookup_utype (dip->die_ref);
+ if (utype == NULL)
{
utype = lookup_pointer_type (type);
alloc_utype (dip->die_ref, utype);
@@ -1509,7 +1516,8 @@ read_subroutine_type (struct dieinfo *dip, char *thisdie, char *enddie)
/* Check to see if we already have a partially constructed user
defined type for this DIE, from a forward reference. */
- if ((ftype = lookup_utype (dip->die_ref)) == NULL)
+ ftype = lookup_utype (dip->die_ref);
+ if (ftype == NULL)
{
/* This is the first reference to one of these types. Make
a new one and place it in the user defined types. */
@@ -1623,7 +1631,8 @@ enum_type (struct dieinfo *dip, struct objfile *objfile)
int nbytes;
int unsigned_enum = 1;
- if ((type = lookup_utype (dip->die_ref)) == NULL)
+ type = lookup_utype (dip->die_ref);
+ if (type == NULL)
{
/* No forward references created an empty type, so install one now */
type = alloc_utype (dip->die_ref, NULL);
@@ -1643,7 +1652,8 @@ enum_type (struct dieinfo *dip, struct objfile *objfile)
{
TYPE_LENGTH (type) = dip->at_byte_size;
}
- if ((scan = dip->at_element_list) != NULL)
+ scan = dip->at_element_list;
+ if (scan != NULL)
{
if (dip->short_element_list)
{
@@ -1734,7 +1744,7 @@ static void
read_func_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct objfile *objfile)
{
- register struct context_stack *new;
+ struct context_stack *new;
/* AT_name is absent if the function is described with an
AT_abstract_origin tag.
@@ -2338,7 +2348,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
wrap_here ("");
gdb_flush (gdb_stdout);
}
- sort_symtab_syms (pst->symtab);
do_cleanups (old_chain);
}
pst->readin = 1;
@@ -2431,7 +2440,8 @@ add_enum_psymbol (struct dieinfo *dip, struct objfile *objfile)
unsigned short blocksz;
int nbytes;
- if ((scan = dip->at_element_list) != NULL)
+ scan = dip->at_element_list;
+ if (scan != NULL)
{
if (dip->short_element_list)
{
@@ -3144,7 +3154,8 @@ decode_modified_type (char *modifiers, unsigned int modcount, int mtype)
nbytes = attribute_size (AT_user_def_type);
die_ref = target_to_host (modifiers, nbytes, GET_UNSIGNED,
current_objfile);
- if ((typep = lookup_utype (die_ref)) == NULL)
+ typep = lookup_utype (die_ref);
+ if (typep == NULL)
{
typep = alloc_utype (die_ref, NULL);
}
@@ -3493,7 +3504,8 @@ completedieinfo (struct dieinfo *dip, struct objfile *objfile)
{
attr = target_to_host (diep, SIZEOF_ATTRIBUTE, GET_UNSIGNED, objfile);
diep += SIZEOF_ATTRIBUTE;
- if ((nbytes = attribute_size (attr)) == -1)
+ nbytes = attribute_size (attr);
+ if (nbytes == -1)
{
complaint (&symfile_complaints,
"DIE @ 0x%x \"%s\", unknown attribute length, skipped remaining attributes",
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 7aee37cc5db..ff766fb7c26 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -177,7 +177,6 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
asymbol **symbol_table;
long number_of_symbols;
long i;
- int index;
struct cleanup *back_to;
CORE_ADDR symaddr;
CORE_ADDR offset;
@@ -372,34 +371,40 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
}
else if (sym->flags & BSF_LOCAL)
{
- /* Named Local variable in a Data section. Check its
- name for stabs-in-elf. The STREQ macro checks the
- first character inline, so we only actually do a
- strcmp function call on names that start with 'B'
- or 'D' */
- index = SECT_OFF_MAX;
- if (STREQ ("Bbss.bss", sym->name))
- {
- index = SECT_OFF_BSS (objfile);
- }
- else if (STREQ ("Ddata.data", sym->name))
- {
- index = SECT_OFF_DATA (objfile);
- }
- else if (STREQ ("Drodata.rodata", sym->name))
- {
- index = SECT_OFF_RODATA (objfile);
- }
- if (index != SECT_OFF_MAX)
+ /* Named Local variable in a Data section.
+ Check its name for stabs-in-elf. The STREQ
+ macro checks the first character inline, so
+ we only actually do a strcmp function call on
+ names that start with 'B' or 'D'. */
+ int special_local_sect;
+ if (strcmp ("Bbss.bss", sym->name) == 0)
+ special_local_sect = SECT_OFF_BSS (objfile);
+ else if (strcmp ("Ddata.data", sym->name) == 0)
+ special_local_sect = SECT_OFF_DATA (objfile);
+ else if (strcmp ("Drodata.rodata", sym->name) == 0)
+ special_local_sect = SECT_OFF_RODATA (objfile);
+ else
+ special_local_sect = -1;
+ if (special_local_sect >= 0)
{
/* Found a special local symbol. Allocate a
sectinfo, if needed, and fill it in. */
if (sectinfo == NULL)
{
+ int max_index;
+ size_t size;
+
+ max_index
+ = max (SECT_OFF_BSS (objfile),
+ max (SECT_OFF_DATA (objfile),
+ SECT_OFF_RODATA (objfile)));
+ size = (sizeof (struct stab_section_info)
+ + (sizeof (CORE_ADDR)
+ * (max_index - 1)));
sectinfo = (struct stab_section_info *)
- xmmalloc (objfile->md, sizeof (*sectinfo));
- memset (sectinfo, 0,
- sizeof (*sectinfo));
+ xmmalloc (objfile->md, size);
+ memset (sectinfo, 0, size);
+ sectinfo->num_sections = max_index;
if (filesym == NULL)
{
complaint (&symfile_complaints,
@@ -412,36 +417,23 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
(char *) filesym->name;
}
}
- if (index != -1)
- {
- if (sectinfo->sections[index] != 0)
- {
- complaint (&symfile_complaints,
- "duplicated elf/stab section information for %s",
- sectinfo->filename);
- }
- }
- else
- internal_error (__FILE__, __LINE__,
- "Section index uninitialized.");
- /* Bfd symbols are section relative. */
+ if (sectinfo->sections[special_local_sect] != 0)
+ complaint (&symfile_complaints,
+ "duplicated elf/stab section information for %s",
+ sectinfo->filename);
+ /* BFD symbols are section relative. */
symaddr = sym->value + sym->section->vma;
- /* Relocate non-absolute symbols by the section offset. */
+ /* Relocate non-absolute symbols by the
+ section offset. */
if (sym->section != &bfd_abs_section)
- {
- symaddr += offset;
- }
- if (index != -1)
- sectinfo->sections[index] = symaddr;
- else
- internal_error (__FILE__, __LINE__,
- "Section index uninitialized.");
+ symaddr += offset;
+ sectinfo->sections[special_local_sect] = symaddr;
/* The special local symbols don't go in the
- minimal symbol table, so ignore this one. */
+ minimal symbol table, so ignore this one. */
continue;
}
/* Not a special stabs-in-elf symbol, do regular
- symbol processing. */
+ symbol processing. */
if (sym->section->flags & SEC_LOAD)
{
ms_type = mst_file_data;
@@ -740,8 +732,9 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
/* Found it! Allocate a new psymtab struct, and fill it in. */
maybe->found++;
pst->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
- for (i = 0; i < SECT_OFF_MAX; i++)
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+ for (i = 0; i < maybe->num_sections; i++)
(pst->section_offsets)->offsets[i] = maybe->sections[i];
return;
}
diff --git a/gdb/event-top.c b/gdb/event-top.c
index ceef7b9c9eb..5ab324df758 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -492,10 +492,8 @@ command_handler (char *command)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
-
- space_at_cmd_start = (long) (lim - (char *) &environ);
+ space_at_cmd_start = lim - lim_at_start;
#endif
}
@@ -538,9 +536,8 @@ command_handler (char *command)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
+ long space_now = lim - lim_at_start;
long space_diff = space_now - space_at_cmd_start;
printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
@@ -577,9 +574,8 @@ command_line_handler_continuation (struct continuation_arg *arg)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
+ long space_now = lim - lim_at_start;
long space_diff = space_now - space_at_cmd_start;
printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 5d975e43c85..3155697ce84 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -161,28 +161,6 @@ extract_long_unsigned_integer (const void *addr, int orig_len, LONGEST *pval)
}
-/* Treat the LEN bytes at ADDR as a target-format address, and return
- that address. ADDR is a buffer in the GDB process, not in the
- inferior.
-
- This function should only be used by target-specific code. It
- assumes that a pointer has the same representation as that thing's
- address represented as an integer. Some machines use word
- addresses, or similarly munged things, for certain types of
- pointers, so that assumption doesn't hold everywhere.
-
- Common code should use extract_typed_address instead, or something
- else based on POINTER_TO_ADDRESS. */
-
-CORE_ADDR
-extract_address (const void *addr, int len)
-{
- /* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
- whether we want this to be true eventually. */
- return (CORE_ADDR) extract_unsigned_integer (addr, len);
-}
-
-
/* Treat the bytes at BUF as a pointer of type TYPE, and return the
address it represents. */
CORE_ADDR
@@ -306,10 +284,10 @@ value_of_register (int regnum, struct frame_info *frame)
/* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (regnum))
+ if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
{
- REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
- raw_buffer, VALUE_CONTENTS_RAW (reg_val));
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
+ raw_buffer, VALUE_CONTENTS_RAW (reg_val));
}
else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
@@ -791,7 +769,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
for some good purpose. */
{
VALUE_LVAL (v) = lval_reg_frame_relative;
- VALUE_FRAME (v) = get_frame_base (frame);
+ VALUE_FRAME_ID (v) = get_frame_id (frame);
VALUE_FRAME_REGNUM (v) = regnum;
}
else if (mem_stor)
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index f7ba4be1903..6f666a77b59 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -46,17 +46,7 @@ static CORE_ADDR
default_frame_args_address (struct frame_info *next_frame, void **this_cache)
{
struct frame_info *this_frame = get_prev_frame (next_frame);
- /* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except
- that if it is unsure about the answer, it returns 0 instead of
- guessing (this happens on the VAX and i960, for example).
-
- On most machines, we never have to guess about the args address,
- so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */
-#ifdef FRAME_ARGS_ADDRESS_CORRECT
- return FRAME_ARGS_ADDRESS_CORRECT (this_frame);
-#else
return FRAME_ARGS_ADDRESS (this_frame);
-#endif
}
const struct frame_base default_frame_base = {
@@ -146,6 +136,8 @@ frame_base_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
return table->default_base;
}
+extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */
+
void
_initialize_frame_base (void)
{
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index c72d24a0b23..921d30b31d5 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -98,6 +98,8 @@ frame_unwind_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
return legacy_saved_regs_unwind;
}
+extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
+
void
_initialize_frame_unwind (void)
{
diff --git a/gdb/frame.c b/gdb/frame.c
index 07e0e5b15b6..18f95611b37 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -674,12 +674,12 @@ frame_read_signed_register (struct frame_info *frame, int regnum,
}
void
-generic_unwind_get_saved_register (char *raw_buffer,
- int *optimizedp,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum,
- enum lval_type *lvalp)
+deprecated_unwind_get_saved_register (char *raw_buffer,
+ int *optimizedp,
+ CORE_ADDR *addrp,
+ struct frame_info *frame,
+ int regnum,
+ enum lval_type *lvalp)
{
int optimizedx;
CORE_ADDR addrx;
@@ -778,7 +778,7 @@ frame_map_regnum_to_name (int regnum)
/* Create a sentinel frame. */
-struct frame_info *
+static struct frame_info *
create_sentinel_frame (struct regcache *regcache)
{
struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
@@ -1944,11 +1944,11 @@ get_prev_frame (struct frame_info *this_frame)
Doing this makes it possible for the user to examine a frame that
has an invalid frame ID.
- The very old VAX frame_args_address_correct() method noted: [...]
- For the sake of argument, suppose that the stack is somewhat
- trashed (which is one reason that "info frame" exists). So,
- return 0 (indicating we don't know the address of the arglist) if
- we don't know what frame this frame calls. */
+ Some very old VAX code noted: [...] For the sake of argument,
+ suppose that the stack is somewhat trashed (which is one reason
+ that "info frame" exists). So, return 0 (indicating we don't
+ know the address of the arglist) if we don't know what frame this
+ frame calls. */
/* Link it in. */
this_frame->prev = prev_frame;
@@ -2219,6 +2219,68 @@ deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
return frame;
}
+/* Memory access methods. */
+
+void
+get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, void *buf,
+ int len)
+{
+ read_memory (addr, buf, len);
+}
+
+LONGEST
+get_frame_memory_signed (struct frame_info *this_frame, CORE_ADDR addr,
+ int len)
+{
+ return read_memory_integer (addr, len);
+}
+
+ULONGEST
+get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr,
+ int len)
+{
+ return read_memory_unsigned_integer (addr, len);
+}
+
+/* Architecture method. */
+
+struct gdbarch *
+get_frame_arch (struct frame_info *this_frame)
+{
+ return current_gdbarch;
+}
+
+/* Stack pointer methods. */
+
+CORE_ADDR
+get_frame_sp (struct frame_info *this_frame)
+{
+ return frame_sp_unwind (this_frame->next);
+}
+
+CORE_ADDR
+frame_sp_unwind (struct frame_info *next_frame)
+{
+ /* Normality, an architecture that provides a way of obtaining any
+ frame inner-most address. */
+ if (gdbarch_unwind_sp_p (current_gdbarch))
+ return gdbarch_unwind_sp (current_gdbarch, next_frame);
+ /* Things are looking grim. If it's the inner-most frame and there
+ is a TARGET_READ_SP then that can be used. */
+ if (next_frame->level < 0 && TARGET_READ_SP_P ())
+ return TARGET_READ_SP ();
+ /* Now things are really are grim. Hope that the value returned by
+ the SP_REGNUM register is meaningful. */
+ if (SP_REGNUM >= 0)
+ {
+ ULONGEST sp;
+ frame_unwind_unsigned_register (next_frame, SP_REGNUM, &sp);
+ return sp;
+ }
+ internal_error (__FILE__, __LINE__, "Missing unwind SP method");
+}
+
+
int
legacy_frame_p (struct gdbarch *current_gdbarch)
{
@@ -2226,10 +2288,11 @@ legacy_frame_p (struct gdbarch *current_gdbarch)
|| DEPRECATED_INIT_FRAME_PC_FIRST_P ()
|| DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
|| DEPRECATED_FRAME_CHAIN_P ()
- || !gdbarch_unwind_dummy_id_p (current_gdbarch)
- || !SAVE_DUMMY_FRAME_TOS_P ());
+ || !gdbarch_unwind_dummy_id_p (current_gdbarch));
}
+extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
+
void
_initialize_frame (void)
{
diff --git a/gdb/frame.h b/gdb/frame.h
index 0abb08ed9ca..4dc75607888 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -166,6 +166,13 @@ extern struct frame_info *frame_find_by_id (struct frame_id id);
This replaced: frame->pc; */
extern CORE_ADDR get_frame_pc (struct frame_info *);
+/* The frame's inner-most bound. AKA the stack-pointer. Confusingly
+ known as top-of-stack. */
+
+extern CORE_ADDR get_frame_sp (struct frame_info *);
+extern CORE_ADDR frame_sp_unwind (struct frame_info *);
+
+
/* Following on from the `resume' address. Return the entry point
address of the function containing that resume address, or zero if
that function isn't known. */
@@ -343,6 +350,31 @@ extern CORE_ADDR frame_pc_unwind (struct frame_info *frame);
of the caller. */
extern void frame_pop (struct frame_info *frame);
+/* Return memory from the specified frame. A frame knows its thread /
+ LWP and hence can find its way down to a target. The assumption
+ here is that the current and previous frame share a common address
+ space.
+
+ If the memory read fails, these methods throw an error.
+
+ NOTE: cagney/2003-06-03: Should there be unwind versions of these
+ methods? That isn't clear. Can code, for instance, assume that
+ this and the previous frame's memory or architecture are identical?
+ If architecture / memory changes are always separated by special
+ adaptor frames this should be ok. */
+
+extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr,
+ void *buf, int len);
+extern LONGEST get_frame_memory_signed (struct frame_info *this_frame,
+ CORE_ADDR memaddr, int len);
+extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
+ CORE_ADDR memaddr, int len);
+
+/* Return this frame's architecture. */
+
+extern struct gdbarch *get_frame_arch (struct frame_info *this_frame);
+
+
/* Values for the source flag to be used in print_frame_info_base(). */
enum print_what
{
@@ -426,9 +458,6 @@ extern CORE_ADDR get_pc_function_start (CORE_ADDR);
extern int frameless_look_for_prologue (struct frame_info *);
-extern void print_frame_args (struct symbol *, struct frame_info *,
- int, struct ui_file *);
-
extern struct frame_info *find_relative_frame (struct frame_info *, int *);
extern void show_and_print_stack_frame (struct frame_info *fi, int level,
@@ -463,19 +492,16 @@ extern int generic_pc_in_call_dummy (CORE_ADDR pc,
extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
-void generic_unwind_get_saved_register (char *raw_buffer,
- int *optimizedp,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum,
- enum lval_type *lvalp);
-
-/* The function generic_get_saved_register() has been made obsolete.
- DEPRECATED_GET_SAVED_REGISTER now defaults to the recursive
- equivalent - generic_unwind_get_saved_register() - so there is no
- need to even set DEPRECATED_GET_SAVED_REGISTER. Architectures that
- need to override the register unwind mechanism should modify
- frame->unwind(). */
+
+/* The DEPRECATED_GET_SAVED_REGISTER architecture interface is
+ entirely redundant. New architectures should implement per-frame
+ unwinders (ref "frame-unwind.h"). */
+extern void deprecated_unwind_get_saved_register (char *raw_buffer,
+ int *optimizedp,
+ CORE_ADDR *addrp,
+ struct frame_info *frame,
+ int regnum,
+ enum lval_type *lvalp);
extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
struct frame_info *, int,
enum lval_type *);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index d50d0cfdfa8..e4dc885276e 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -30,15 +30,10 @@ extern void _initialize_frv_tdep (void);
static gdbarch_init_ftype frv_gdbarch_init;
static gdbarch_register_name_ftype frv_register_name;
-static gdbarch_register_raw_size_ftype frv_register_raw_size;
-static gdbarch_register_virtual_size_ftype frv_register_virtual_size;
-static gdbarch_register_virtual_type_ftype frv_register_virtual_type;
-static gdbarch_register_byte_ftype frv_register_byte;
static gdbarch_breakpoint_from_pc_ftype frv_breakpoint_from_pc;
static gdbarch_skip_prologue_ftype frv_skip_prologue;
static gdbarch_deprecated_extract_return_value_ftype frv_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype frv_extract_struct_value_address;
-static gdbarch_use_struct_convention_ftype frv_use_struct_convention;
static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
static gdbarch_init_extra_frame_info_ftype stupid_useless_init_extra_frame_info;
static gdbarch_push_arguments_ftype frv_push_arguments;
@@ -750,8 +745,8 @@ frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
static CORE_ADDR
frv_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + frv_register_byte (struct_return_regnum),
- 4);
+ return extract_unsigned_integer (regbuf + frv_register_byte (struct_return_regnum),
+ 4);
}
static void
@@ -847,7 +842,7 @@ frv_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (argreg < 14)
{
- regval = extract_address (val, partial_len);
+ regval = extract_unsigned_integer (val, partial_len);
#if 0
printf(" Argnum %d data %x -> reg %d\n",
argnum, (int) regval, argreg);
@@ -1047,17 +1042,16 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, frv_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
set_gdbarch_deprecated_register_bytes (gdbarch, frv_num_regs * 4);
- set_gdbarch_register_byte (gdbarch, frv_register_byte);
- set_gdbarch_register_raw_size (gdbarch, frv_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, frv_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, frv_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, frv_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, frv_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_type (gdbarch, frv_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, frv_register_virtual_type);
set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
@@ -1087,16 +1081,13 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Settings that should be unnecessary. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
- set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
set_gdbarch_remote_translate_xfer_address
(gdbarch, frv_remote_translate_xfer_address);
diff --git a/gdb/gdb-stabs.h b/gdb/gdb-stabs.h
index abe2d3365b6..097f9d94384 100644
--- a/gdb/gdb-stabs.h
+++ b/gdb/gdb-stabs.h
@@ -29,8 +29,6 @@
#if !defined (GDBSTABS_H)
#define GDBSTABS_H
-#define SECT_OFF_MAX 64 /* Count of possible values */
-
/* The stab_section_info chain remembers info from the ELF symbol table,
while psymtabs are being built for the other symbol tables in the
objfile. It is destroyed at the complation of psymtab-reading.
@@ -39,9 +37,10 @@
struct stab_section_info
{
char *filename;
- CORE_ADDR sections[SECT_OFF_MAX];
struct stab_section_info *next;
int found; /* Count of times it's found in searching */
+ size_t num_sections;
+ CORE_ADDR sections[1];
};
/* Information is passed among various dbxread routines for accessing
diff --git a/gdb/gdb_assert.h b/gdb/gdb_assert.h
index 4f0bcdc9497..9cad74c9cbc 100644
--- a/gdb/gdb_assert.h
+++ b/gdb/gdb_assert.h
@@ -40,16 +40,19 @@
#else
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
#define ASSERT_FUNCTION __func__
-#else
-#define ASSERT_FUNCTION ((const char *) 0)
#endif
#endif
/* This prints an "Assertion failed" message, aksing the user if they
want to continue, dump core, or just exit. */
+#if defined (ASSERT_FUNCTION)
+#define gdb_assert_fail(assertion, file, line, function) \
+ internal_error (file, line, "%s: Assertion `%s' failed.", \
+ function, assertion)
+#else
#define gdb_assert_fail(assertion, file, line, function) \
- internal_error (file, line, "%s%sAssertion `%s' failed.", \
- function ? function : "", function ? ": " : "", \
+ internal_error (file, line, "Assertion `%s' failed.", \
assertion)
+#endif
#endif /* gdb_assert.h */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 5c853361f1e..03d6b997335 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -168,14 +168,14 @@ struct gdbarch
gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
gdbarch_register_name_ftype *register_name;
int deprecated_register_size;
+ gdbarch_register_type_ftype *register_type;
+ gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
int deprecated_register_bytes;
- gdbarch_register_byte_ftype *register_byte;
- gdbarch_register_raw_size_ftype *register_raw_size;
+ gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
+ gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
+ gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
int deprecated_max_register_raw_size;
- gdbarch_register_virtual_size_ftype *register_virtual_size;
int deprecated_max_register_virtual_size;
- gdbarch_register_virtual_type_ftype *register_virtual_type;
- gdbarch_register_type_ftype *register_type;
gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
gdbarch_print_registers_info_ftype *print_registers_info;
gdbarch_print_float_info_ftype *print_float_info;
@@ -202,9 +202,9 @@ struct gdbarch
int believe_pcc_promotion;
int believe_pcc_promotion_type;
gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
- gdbarch_register_convertible_ftype *register_convertible;
- gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
- gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
+ gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
+ gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
+ gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
gdbarch_convert_register_p_ftype *convert_register_p;
gdbarch_register_to_value_ftype *register_to_value;
gdbarch_value_to_register_ftype *value_to_register;
@@ -243,6 +243,7 @@ struct gdbarch
gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
gdbarch_unwind_pc_ftype *unwind_pc;
+ gdbarch_unwind_sp_ftype *unwind_sp;
gdbarch_frame_args_address_ftype *frame_args_address;
gdbarch_frame_locals_address_ftype *frame_locals_address;
gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
@@ -263,7 +264,6 @@ struct gdbarch
gdbarch_software_single_step_ftype *software_single_step;
gdbarch_print_insn_ftype *print_insn;
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
- gdbarch_bfd_entry_point_ftype *bfd_entry_point;
gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
@@ -281,6 +281,7 @@ struct gdbarch
gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
+ gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
};
@@ -293,161 +294,162 @@ struct gdbarch startup_gdbarch =
{
1, /* Always initialized. */
/* basic architecture information */
- &bfd_default_arch_struct,
- BFD_ENDIAN_BIG,
- GDB_OSABI_UNKNOWN,
+ &bfd_default_arch_struct, /* bfd_arch_info */
+ BFD_ENDIAN_BIG, /* byte_order */
+ GDB_OSABI_UNKNOWN, /* osabi */
/* target specific vector and its dump routine */
NULL, NULL,
/*per-architecture data-pointers and swap regions */
0, NULL, NULL,
/* Multi-arch values */
- 8 * sizeof (short),
- 8 * sizeof (int),
- 8 * sizeof (long),
- 8 * sizeof (LONGEST),
- 8 * sizeof (float),
- 8 * sizeof (double),
- 8 * sizeof (long double),
- 8 * sizeof (void*),
- 8 * sizeof (void*),
- 8 * sizeof (void*),
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- -1,
- -1,
- -1,
- -1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_register_byte,
- generic_register_size,
- 0,
- generic_register_size,
- 0,
- 0,
- 0,
- 0,
- default_print_registers_info,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_pc_in_call_dummy,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_remote_translate_xfer_address,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_bfd_entry_point,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_in_function_epilogue_p,
- construct_inferior_arguments,
- 0,
- 0,
- 0,
- "malloc",
- 0,
- 0,
- 0,
- 0,
- 0,
- default_register_reggroup_p,
+ 8 * sizeof (short), /* short_bit */
+ 8 * sizeof (int), /* int_bit */
+ 8 * sizeof (long), /* long_bit */
+ 8 * sizeof (LONGEST), /* long_long_bit */
+ 8 * sizeof (float), /* float_bit */
+ 8 * sizeof (double), /* double_bit */
+ 8 * sizeof (long double), /* long_double_bit */
+ 8 * sizeof (void*), /* ptr_bit */
+ 8 * sizeof (void*), /* addr_bit */
+ 8 * sizeof (void*), /* bfd_vma_bit */
+ 1, /* char_signed */
+ 0, /* read_pc */
+ 0, /* write_pc */
+ 0, /* deprecated_target_read_fp */
+ 0, /* read_sp */
+ 0, /* deprecated_dummy_write_sp */
+ 0, /* virtual_frame_pointer */
+ 0, /* pseudo_register_read */
+ 0, /* pseudo_register_write */
+ 0, /* num_regs */
+ 0, /* num_pseudo_regs */
+ -1, /* sp_regnum */
+ -1, /* deprecated_fp_regnum */
+ -1, /* pc_regnum */
+ -1, /* ps_regnum */
+ 0, /* fp0_regnum */
+ 0, /* npc_regnum */
+ 0, /* stab_reg_to_regnum */
+ 0, /* ecoff_reg_to_regnum */
+ 0, /* dwarf_reg_to_regnum */
+ 0, /* sdb_reg_to_regnum */
+ 0, /* dwarf2_reg_to_regnum */
+ 0, /* register_name */
+ 0, /* deprecated_register_size */
+ 0, /* register_type */
+ 0, /* deprecated_register_virtual_type */
+ 0, /* deprecated_register_bytes */
+ generic_register_byte, /* deprecated_register_byte */
+ generic_register_size, /* deprecated_register_raw_size */
+ generic_register_size, /* deprecated_register_virtual_size */
+ 0, /* deprecated_max_register_raw_size */
+ 0, /* deprecated_max_register_virtual_size */
+ 0, /* deprecated_do_registers_info */
+ default_print_registers_info, /* print_registers_info */
+ 0, /* print_float_info */
+ 0, /* print_vector_info */
+ 0, /* register_sim_regno */
+ 0, /* register_bytes_ok */
+ 0, /* cannot_fetch_register */
+ 0, /* cannot_store_register */
+ 0, /* get_longjmp_target */
+ 0, /* deprecated_use_generic_dummy_frames */
+ 0, /* call_dummy_location */
+ 0, /* call_dummy_address */
+ 0, /* deprecated_call_dummy_start_offset */
+ 0, /* deprecated_call_dummy_breakpoint_offset */
+ 0, /* deprecated_call_dummy_length */
+ generic_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
+ 0, /* deprecated_call_dummy_words */
+ 0, /* deprecated_sizeof_call_dummy_words */
+ 0, /* deprecated_call_dummy_stack_adjust */
+ 0, /* deprecated_fix_call_dummy */
+ 0, /* push_dummy_code */
+ 0, /* deprecated_init_frame_pc_first */
+ 0, /* deprecated_init_frame_pc */
+ 0, /* believe_pcc_promotion */
+ 0, /* believe_pcc_promotion_type */
+ 0, /* deprecated_get_saved_register */
+ 0, /* deprecated_register_convertible */
+ 0, /* deprecated_register_convert_to_virtual */
+ 0, /* deprecated_register_convert_to_raw */
+ 0, /* convert_register_p */
+ 0, /* register_to_value */
+ 0, /* value_to_register */
+ 0, /* pointer_to_address */
+ 0, /* address_to_pointer */
+ 0, /* integer_to_address */
+ 0, /* return_value_on_stack */
+ 0, /* deprecated_push_arguments */
+ 0, /* push_dummy_call */
+ 0, /* deprecated_push_dummy_frame */
+ 0, /* deprecated_push_return_address */
+ 0, /* deprecated_pop_frame */
+ 0, /* deprecated_store_struct_return */
+ 0, /* extract_return_value */
+ 0, /* store_return_value */
+ 0, /* deprecated_extract_return_value */
+ 0, /* deprecated_store_return_value */
+ 0, /* extract_struct_value_address */
+ 0, /* deprecated_extract_struct_value_address */
+ 0, /* use_struct_convention */
+ 0, /* deprecated_frame_init_saved_regs */
+ 0, /* deprecated_init_extra_frame_info */
+ 0, /* skip_prologue */
+ 0, /* prologue_frameless_p */
+ 0, /* inner_than */
+ 0, /* breakpoint_from_pc */
+ 0, /* memory_insert_breakpoint */
+ 0, /* memory_remove_breakpoint */
+ 0, /* decr_pc_after_break */
+ 0, /* prepare_to_proceed */
+ 0, /* function_start_offset */
+ generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
+ 0, /* frame_args_skip */
+ 0, /* frameless_function_invocation */
+ 0, /* deprecated_frame_chain */
+ 0, /* deprecated_frame_chain_valid */
+ 0, /* deprecated_frame_saved_pc */
+ 0, /* unwind_pc */
+ 0, /* unwind_sp */
+ 0, /* frame_args_address */
+ 0, /* frame_locals_address */
+ 0, /* deprecated_saved_pc_after_call */
+ 0, /* frame_num_args */
+ 0, /* stack_align */
+ 0, /* frame_align */
+ 0, /* deprecated_extra_stack_alignment_needed */
+ 0, /* reg_struct_has_addr */
+ 0, /* save_dummy_frame_tos */
+ 0, /* unwind_dummy_id */
+ 0, /* parm_boundary */
+ 0, /* float_format */
+ 0, /* double_format */
+ 0, /* long_double_format */
+ 0, /* convert_from_func_ptr_addr */
+ 0, /* addr_bits_remove */
+ 0, /* smash_text_address */
+ 0, /* software_single_step */
+ 0, /* print_insn */
+ 0, /* skip_trampoline_code */
+ 0, /* in_solib_call_trampoline */
+ 0, /* in_solib_return_trampoline */
+ 0, /* pc_in_sigtramp */
+ 0, /* sigtramp_start */
+ 0, /* sigtramp_end */
+ generic_in_function_epilogue_p, /* in_function_epilogue_p */
+ construct_inferior_arguments, /* construct_inferior_arguments */
+ 0, /* dwarf2_build_frame_info */
+ 0, /* elf_make_msymbol_special */
+ 0, /* coff_make_msymbol_special */
+ "malloc", /* name_of_malloc */
+ 0, /* cannot_step_breakpoint */
+ 0, /* have_nonsteppable_watchpoint */
+ 0, /* address_class_type_flags */
+ 0, /* address_class_type_flags_to_name */
+ 0, /* address_class_name_to_type_flags */
+ default_register_reggroup_p, /* register_reggroup_p */
+ 0, /* fetch_pointer_argument */
/* startup_gdbarch() */
};
@@ -501,9 +503,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->ptr_bit = TARGET_INT_BIT;
current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
current_gdbarch->char_signed = -1;
- current_gdbarch->read_pc = generic_target_read_pc;
current_gdbarch->write_pc = generic_target_write_pc;
- current_gdbarch->read_sp = generic_target_read_sp;
current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
current_gdbarch->num_regs = -1;
current_gdbarch->sp_regnum = -1;
@@ -518,9 +518,9 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->register_name = legacy_register_name;
- current_gdbarch->register_byte = generic_register_byte;
- current_gdbarch->register_raw_size = generic_register_size;
- current_gdbarch->register_virtual_size = generic_register_size;
+ current_gdbarch->deprecated_register_byte = generic_register_byte;
+ current_gdbarch->deprecated_register_raw_size = generic_register_size;
+ current_gdbarch->deprecated_register_virtual_size = generic_register_size;
current_gdbarch->print_registers_info = default_print_registers_info;
current_gdbarch->register_sim_regno = legacy_register_sim_regno;
current_gdbarch->cannot_fetch_register = cannot_register_not;
@@ -531,7 +531,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
- current_gdbarch->register_convertible = generic_register_convertible_not;
+ current_gdbarch->deprecated_register_convertible = deprecated_register_convertible_not;
current_gdbarch->convert_register_p = legacy_convert_register_p;
current_gdbarch->register_to_value = legacy_register_to_value;
current_gdbarch->value_to_register = legacy_value_to_register;
@@ -557,7 +557,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->smash_text_address = core_addr_identity;
current_gdbarch->print_insn = legacy_print_insn;
current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
- current_gdbarch->bfd_entry_point = generic_bfd_entry_point;
current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
@@ -621,10 +620,10 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of bfd_vma_bit, invalid_p == 0 */
if (gdbarch->char_signed == -1)
gdbarch->char_signed = 1;
- /* Skip verify of read_pc, invalid_p == 0 */
+ /* Skip verify of read_pc, has predicate */
/* Skip verify of write_pc, invalid_p == 0 */
/* Skip verify of deprecated_target_read_fp, has predicate */
- /* Skip verify of read_sp, invalid_p == 0 */
+ /* Skip verify of read_sp, has predicate */
/* Skip verify of deprecated_dummy_write_sp, has predicate */
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
/* Skip verify of pseudo_register_read, has predicate */
@@ -645,13 +644,13 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
/* Skip verify of register_name, invalid_p == 0 */
- /* Skip verify of register_byte, has predicate */
- /* Skip verify of register_raw_size, invalid_p == 0 */
+ /* Skip verify of register_type, has predicate */
+ /* Skip verify of deprecated_register_virtual_type, has predicate */
+ /* Skip verify of deprecated_register_byte, has predicate */
+ /* Skip verify of deprecated_register_raw_size, invalid_p == 0 */
+ /* Skip verify of deprecated_register_virtual_size, invalid_p == 0 */
/* Skip verify of deprecated_max_register_raw_size, has predicate */
- /* Skip verify of register_virtual_size, invalid_p == 0 */
/* Skip verify of deprecated_max_register_virtual_size, has predicate */
- /* Skip verify of register_virtual_type, has predicate */
- /* Skip verify of register_type, has predicate */
/* Skip verify of deprecated_do_registers_info, has predicate */
/* Skip verify of print_registers_info, invalid_p == 0 */
/* Skip verify of print_float_info, has predicate */
@@ -673,9 +672,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of deprecated_init_frame_pc_first, has predicate */
/* Skip verify of deprecated_init_frame_pc, has predicate */
/* Skip verify of deprecated_get_saved_register, has predicate */
- /* Skip verify of register_convertible, invalid_p == 0 */
- /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
- /* Skip verify of register_convert_to_raw, invalid_p == 0 */
+ /* Skip verify of deprecated_register_convertible, invalid_p == 0 */
+ /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
+ /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
/* Skip verify of convert_register_p, invalid_p == 0 */
/* Skip verify of register_to_value, invalid_p == 0 */
/* Skip verify of value_to_register, invalid_p == 0 */
@@ -724,12 +723,11 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of deprecated_frame_chain_valid, has predicate */
/* Skip verify of deprecated_frame_saved_pc, has predicate */
/* Skip verify of unwind_pc, has predicate */
+ /* Skip verify of unwind_sp, has predicate */
/* Skip verify of frame_args_address, invalid_p == 0 */
/* Skip verify of frame_locals_address, invalid_p == 0 */
/* Skip verify of deprecated_saved_pc_after_call, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_num_args == 0))
- fprintf_unfiltered (log, "\n\tframe_num_args");
+ /* Skip verify of frame_num_args, has predicate */
/* Skip verify of stack_align, has predicate */
/* Skip verify of frame_align, has predicate */
/* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
@@ -748,7 +746,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of software_single_step, has predicate */
/* Skip verify of print_insn, invalid_p == 0 */
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
- /* Skip verify of bfd_entry_point, invalid_p == 0 */
/* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
/* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
/* Skip verify of pc_in_sigtramp, invalid_p == 0 */
@@ -766,6 +763,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of address_class_type_flags_to_name, has predicate */
/* Skip verify of address_class_name_to_type_flags, has predicate */
/* Skip verify of register_reggroup_p, invalid_p == 0 */
+ /* Skip verify of fetch_pointer_argument, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -792,10 +790,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
GDB_MULTI_ARCH);
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
- "gdbarch_dump: bfd_entry_point = 0x%08lx\n",
- (long) current_gdbarch->bfd_entry_point);
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_frame_align_p() = %d\n",
gdbarch_frame_align_p (current_gdbarch));
if (GDB_MULTI_ARCH)
@@ -1496,6 +1490,45 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
DEPRECATED_REGISTER_BYTES);
#endif
+#ifdef DEPRECATED_REGISTER_CONVERTIBLE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
+ XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_register_convertible
+ /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
+#endif
+#ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
+ XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_register_convert_to_raw
+ /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
+#endif
+#ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
+ XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_register_convert_to_virtual
+ /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
+#endif
#ifdef DEPRECATED_REGISTER_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
@@ -1701,6 +1734,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->extract_struct_value_address
/*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
#endif
+#ifdef FETCH_POINTER_ARGUMENT_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FETCH_POINTER_ARGUMENT_P()",
+ XSTRING (FETCH_POINTER_ARGUMENT_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
+ FETCH_POINTER_ARGUMENT_P ());
+#endif
+#ifdef FETCH_POINTER_ARGUMENT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FETCH_POINTER_ARGUMENT(frame, argi, type)",
+ XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
+ (long) current_gdbarch->fetch_pointer_argument
+ /*FETCH_POINTER_ARGUMENT ()*/);
+#endif
#ifdef FP0_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: FP0_REGNUM # %s\n",
@@ -1750,6 +1803,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_locals_address
/*FRAME_LOCALS_ADDRESS ()*/);
#endif
+#ifdef FRAME_NUM_ARGS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FRAME_NUM_ARGS_P()",
+ XSTRING (FRAME_NUM_ARGS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
+ FRAME_NUM_ARGS_P ());
+#endif
#ifdef FRAME_NUM_ARGS
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2025,7 +2087,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
- (long) current_gdbarch->register_byte
+ (long) current_gdbarch->deprecated_register_byte
/*REGISTER_BYTE ()*/);
#endif
#ifdef REGISTER_BYTES_OK_P
@@ -2048,45 +2110,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->register_bytes_ok
/*REGISTER_BYTES_OK ()*/);
#endif
-#ifdef REGISTER_CONVERTIBLE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_CONVERTIBLE(nr)",
- XSTRING (REGISTER_CONVERTIBLE (nr)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
- (long) current_gdbarch->register_convertible
- /*REGISTER_CONVERTIBLE ()*/);
-#endif
-#ifdef REGISTER_CONVERT_TO_RAW
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
- XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
- (long) current_gdbarch->register_convert_to_raw
- /*REGISTER_CONVERT_TO_RAW ()*/);
-#endif
-#ifdef REGISTER_CONVERT_TO_VIRTUAL
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
- XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
- (long) current_gdbarch->register_convert_to_virtual
- /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
-#endif
#ifdef REGISTER_NAME
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2106,7 +2129,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->register_raw_size
+ (long) current_gdbarch->deprecated_register_raw_size
/*REGISTER_RAW_SIZE ()*/);
#endif
#ifdef REGISTER_SIM_REGNO
@@ -2150,7 +2173,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->register_virtual_size
+ (long) current_gdbarch->deprecated_register_virtual_size
/*REGISTER_VIRTUAL_SIZE ()*/);
#endif
#ifdef REGISTER_VIRTUAL_TYPE_P
@@ -2170,7 +2193,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
- (long) current_gdbarch->register_virtual_type
+ (long) current_gdbarch->deprecated_register_virtual_type
/*REGISTER_VIRTUAL_TYPE ()*/);
#endif
#ifdef REG_STRUCT_HAS_ADDR_P
@@ -2531,6 +2554,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: TARGET_PTR_BIT = %d\n",
TARGET_PTR_BIT);
#endif
+#ifdef TARGET_READ_PC_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_PC_P()",
+ XSTRING (TARGET_READ_PC_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
+ TARGET_READ_PC_P ());
+#endif
#ifdef TARGET_READ_PC
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2542,6 +2574,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->read_pc
/*TARGET_READ_PC ()*/);
#endif
+#ifdef TARGET_READ_SP_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_SP_P()",
+ XSTRING (TARGET_READ_SP_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
+ TARGET_READ_SP_P ());
+#endif
#ifdef TARGET_READ_SP
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2605,6 +2646,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: unwind_pc = 0x%08lx\n",
(long) current_gdbarch->unwind_pc);
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
+ gdbarch_unwind_sp_p (current_gdbarch));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: unwind_sp = 0x%08lx\n",
+ (long) current_gdbarch->unwind_sp);
#ifdef USE_STRUCT_CONVENTION
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2861,6 +2910,13 @@ set_gdbarch_char_signed (struct gdbarch *gdbarch,
gdbarch->char_signed = char_signed;
}
+int
+gdbarch_read_pc_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->read_pc != 0;
+}
+
CORE_ADDR
gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
{
@@ -2925,6 +2981,13 @@ set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
}
+int
+gdbarch_read_sp_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->read_sp != 0;
+}
+
CORE_ADDR
gdbarch_read_sp (struct gdbarch *gdbarch)
{
@@ -3310,182 +3373,182 @@ set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
+gdbarch_register_type_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->register_type != 0;
+}
+
+struct type *
+gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_type == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
- return gdbarch->deprecated_register_bytes;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
+ return gdbarch->register_type (gdbarch, reg_nr);
}
void
-set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
- int deprecated_register_bytes)
+set_gdbarch_register_type (struct gdbarch *gdbarch,
+ gdbarch_register_type_ftype register_type)
{
- gdbarch->deprecated_register_bytes = deprecated_register_bytes;
+ gdbarch->register_type = register_type;
}
int
-gdbarch_register_byte_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_byte != generic_register_byte;
+ return gdbarch->deprecated_register_virtual_type != 0;
}
-int
-gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
+struct type *
+gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_byte == 0)
+ if (gdbarch->deprecated_register_virtual_type == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_byte invalid");
- /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
+ "gdbarch: gdbarch_deprecated_register_virtual_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
- return gdbarch->register_byte (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
+ return gdbarch->deprecated_register_virtual_type (reg_nr);
}
void
-set_gdbarch_register_byte (struct gdbarch *gdbarch,
- gdbarch_register_byte_ftype register_byte)
+set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
{
- gdbarch->register_byte = register_byte;
+ gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
}
int
-gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_raw_size == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_raw_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
- return gdbarch->register_raw_size (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n");
+ return gdbarch->deprecated_register_bytes;
}
void
-set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
- gdbarch_register_raw_size_ftype register_raw_size)
+set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
+ int deprecated_register_bytes)
{
- gdbarch->register_raw_size = register_raw_size;
+ gdbarch->deprecated_register_bytes = deprecated_register_bytes;
}
int
-gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_raw_size != 0;
+ return gdbarch->deprecated_register_byte != generic_register_byte;
}
int
-gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_register_byte == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_register_byte invalid");
+ /* Ignore predicate (gdbarch->deprecated_register_byte != generic_register_byte). */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
- return gdbarch->deprecated_max_register_raw_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
+ return gdbarch->deprecated_register_byte (reg_nr);
}
void
-set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
- int deprecated_max_register_raw_size)
+set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
{
- gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
+ gdbarch->deprecated_register_byte = deprecated_register_byte;
}
int
-gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_virtual_size == 0)
+ if (gdbarch->deprecated_register_raw_size == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_virtual_size invalid");
+ "gdbarch: gdbarch_deprecated_register_raw_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
- return gdbarch->register_virtual_size (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
+ return gdbarch->deprecated_register_raw_size (reg_nr);
}
void
-set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
- gdbarch_register_virtual_size_ftype register_virtual_size)
+set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
{
- gdbarch->register_virtual_size = register_virtual_size;
-}
-
-int
-gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_max_register_virtual_size != 0;
+ gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
}
int
-gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_register_virtual_size == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_register_virtual_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
- return gdbarch->deprecated_max_register_virtual_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
+ return gdbarch->deprecated_register_virtual_size (reg_nr);
}
void
-set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
- int deprecated_max_register_virtual_size)
+set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
{
- gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
+ gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
}
int
-gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_virtual_type != 0;
+ return gdbarch->deprecated_max_register_raw_size != 0;
}
-struct type *
-gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
+int
+gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_virtual_type == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_virtual_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
- return gdbarch->register_virtual_type (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
+ return gdbarch->deprecated_max_register_raw_size;
}
void
-set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
- gdbarch_register_virtual_type_ftype register_virtual_type)
+set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
+ int deprecated_max_register_raw_size)
{
- gdbarch->register_virtual_type = register_virtual_type;
+ gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
}
int
-gdbarch_register_type_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_type != 0;
+ return gdbarch->deprecated_max_register_virtual_size != 0;
}
-struct type *
-gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
+int
+gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_type == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
- return gdbarch->register_type (gdbarch, reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
+ return gdbarch->deprecated_max_register_virtual_size;
}
void
-set_gdbarch_register_type (struct gdbarch *gdbarch,
- gdbarch_register_type_ftype register_type)
+set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
+ int deprecated_max_register_virtual_size)
{
- gdbarch->register_type = register_type;
+ gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
}
int
@@ -4042,60 +4105,60 @@ set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
}
int
-gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
+gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_convertible == 0)
+ if (gdbarch->deprecated_register_convertible == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_convertible invalid");
+ "gdbarch: gdbarch_deprecated_register_convertible invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
- return gdbarch->register_convertible (nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
+ return gdbarch->deprecated_register_convertible (nr);
}
void
-set_gdbarch_register_convertible (struct gdbarch *gdbarch,
- gdbarch_register_convertible_ftype register_convertible)
+set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
{
- gdbarch->register_convertible = register_convertible;
+ gdbarch->deprecated_register_convertible = deprecated_register_convertible;
}
void
-gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
+gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_convert_to_virtual == 0)
+ if (gdbarch->deprecated_register_convert_to_virtual == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_convert_to_virtual invalid");
+ "gdbarch: gdbarch_deprecated_register_convert_to_virtual invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
- gdbarch->register_convert_to_virtual (regnum, type, from, to);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
+ gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
}
void
-set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
- gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
+set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
{
- gdbarch->register_convert_to_virtual = register_convert_to_virtual;
+ gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
}
void
-gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
+gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_convert_to_raw == 0)
+ if (gdbarch->deprecated_register_convert_to_raw == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_convert_to_raw invalid");
+ "gdbarch: gdbarch_deprecated_register_convert_to_raw invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
- gdbarch->register_convert_to_raw (type, regnum, from, to);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
+ gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
}
void
-set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
- gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
+set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
{
- gdbarch->register_convert_to_raw = register_convert_to_raw;
+ gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
}
int
@@ -4272,7 +4335,7 @@ gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
}
CORE_ADDR
-gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->push_dummy_call == 0)
@@ -4280,7 +4343,7 @@ gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, COR
"gdbarch: gdbarch_push_dummy_call invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
- return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
+ return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
}
void
@@ -4925,6 +4988,32 @@ set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
gdbarch->unwind_pc = unwind_pc;
}
+int
+gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->unwind_sp != 0;
+}
+
+CORE_ADDR
+gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->unwind_sp == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_unwind_sp invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
+ return gdbarch->unwind_sp (gdbarch, next_frame);
+}
+
+void
+set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
+ gdbarch_unwind_sp_ftype unwind_sp)
+{
+ gdbarch->unwind_sp = unwind_sp;
+}
+
CORE_ADDR
gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
@@ -4990,6 +5079,13 @@ set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
}
int
+gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_num_args != 0;
+}
+
+int
gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
@@ -5340,25 +5436,6 @@ set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
gdbarch->skip_trampoline_code = skip_trampoline_code;
}
-CORE_ADDR
-gdbarch_bfd_entry_point (struct gdbarch *gdbarch, bfd *abfd)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->bfd_entry_point == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_bfd_entry_point invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_entry_point called\n");
- return gdbarch->bfd_entry_point (gdbarch, abfd);
-}
-
-void
-set_gdbarch_bfd_entry_point (struct gdbarch *gdbarch,
- gdbarch_bfd_entry_point_ftype bfd_entry_point)
-{
- gdbarch->bfd_entry_point = bfd_entry_point;
-}
-
int
gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
@@ -5718,6 +5795,32 @@ set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
gdbarch->register_reggroup_p = register_reggroup_p;
}
+int
+gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->fetch_pointer_argument != 0;
+}
+
+CORE_ADDR
+gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->fetch_pointer_argument == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_fetch_pointer_argument invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
+ return gdbarch->fetch_pointer_argument (frame, argi, type);
+}
+
+void
+set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
+ gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
+{
+ gdbarch->fetch_pointer_argument = fetch_pointer_argument;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index c97f796d637..6c0eb3e703a 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -69,33 +69,27 @@ extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
#error "Non multi-arch definition of TARGET_ARCHITECTURE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE)
+#if !defined (TARGET_ARCHITECTURE)
#define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
#endif
-#endif
extern int gdbarch_byte_order (struct gdbarch *gdbarch);
/* set_gdbarch_byte_order() - not applicable - pre-initialized. */
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
#error "Non multi-arch definition of TARGET_BYTE_ORDER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER)
+#if !defined (TARGET_BYTE_ORDER)
#define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch))
#endif
-#endif
extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
/* set_gdbarch_osabi() - not applicable - pre-initialized. */
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
#error "Non multi-arch definition of TARGET_OSABI"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_OSABI)
+#if !defined (TARGET_OSABI)
#define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
#endif
-#endif
/* The following are initialized by the target dependent code. */
@@ -116,11 +110,9 @@ extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
#error "Non multi-arch definition of TARGET_SHORT_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT)
+#if !defined (TARGET_SHORT_BIT)
#define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in an int or unsigned int for the target machine. */
@@ -134,11 +126,9 @@ extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
#error "Non multi-arch definition of TARGET_INT_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT)
+#if !defined (TARGET_INT_BIT)
#define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a long or unsigned long for the target machine. */
@@ -152,11 +142,9 @@ extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
#error "Non multi-arch definition of TARGET_LONG_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT)
+#if !defined (TARGET_LONG_BIT)
#define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a long long or unsigned long long for the target
machine. */
@@ -171,11 +159,9 @@ extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
#error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT)
+#if !defined (TARGET_LONG_LONG_BIT)
#define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a float for the target machine. */
@@ -189,11 +175,9 @@ extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
#error "Non multi-arch definition of TARGET_FLOAT_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT)
+#if !defined (TARGET_FLOAT_BIT)
#define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a double for the target machine. */
@@ -207,11 +191,9 @@ extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
#error "Non multi-arch definition of TARGET_DOUBLE_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT)
+#if !defined (TARGET_DOUBLE_BIT)
#define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a long double for the target machine. */
@@ -225,11 +207,9 @@ extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_doubl
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT)
+#if !defined (TARGET_LONG_DOUBLE_BIT)
#define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
#endif
-#endif
/* For most targets, a pointer on the target and its representation as an
address in GDB have the same size and "look the same". For such a
@@ -251,11 +231,9 @@ extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
#error "Non multi-arch definition of TARGET_PTR_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT)
+#if !defined (TARGET_PTR_BIT)
#define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
#endif
-#endif
/* addr_bit is the size of a target address as represented in gdb */
@@ -269,11 +247,9 @@ extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
#error "Non multi-arch definition of TARGET_ADDR_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT)
+#if !defined (TARGET_ADDR_BIT)
#define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a BFD_VMA for the target object file format. */
@@ -287,11 +263,9 @@ extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT)
+#if !defined (TARGET_BFD_VMA_BIT)
#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
#endif
-#endif
/* One if `char' acts like `signed char', zero if `unsigned char'. */
@@ -305,15 +279,33 @@ extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED)
#error "Non multi-arch definition of TARGET_CHAR_SIGNED"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_CHAR_SIGNED)
+#if !defined (TARGET_CHAR_SIGNED)
#define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch))
#endif
+
+#if defined (TARGET_READ_PC)
+/* Legacy for systems yet to multi-arch TARGET_READ_PC */
+#if !defined (TARGET_READ_PC_P)
+#define TARGET_READ_PC_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC_P)
+#define TARGET_READ_PC_P() (0)
+#endif
+
+extern int gdbarch_read_pc_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P)
+#error "Non multi-arch definition of TARGET_READ_PC"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P)
+#define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
-#define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid))
+#define TARGET_READ_PC(ptid) (internal_error (__FILE__, __LINE__, "TARGET_READ_PC"), 0)
#endif
typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
@@ -322,11 +314,9 @@ extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
#error "Non multi-arch definition of TARGET_READ_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC)
+#if !defined (TARGET_READ_PC)
#define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
@@ -339,11 +329,9 @@ extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftyp
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
#error "Non multi-arch definition of TARGET_WRITE_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC)
+#if !defined (TARGET_WRITE_PC)
#define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
#endif
-#endif
/* This is simply not needed. See value_of_builtin_frame_fp_reg and
call_function_by_hand. */
@@ -379,15 +367,35 @@ extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP)
+#if !defined (DEPRECATED_TARGET_READ_FP)
#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
#endif
+
+/* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
+
+#if defined (TARGET_READ_SP)
+/* Legacy for systems yet to multi-arch TARGET_READ_SP */
+#if !defined (TARGET_READ_SP_P)
+#define TARGET_READ_SP_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP_P)
+#define TARGET_READ_SP_P() (0)
+#endif
+
+extern int gdbarch_read_sp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P)
+#error "Non multi-arch definition of TARGET_READ_SP"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P)
+#define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
-#define TARGET_READ_SP() (generic_target_read_sp ())
+#define TARGET_READ_SP() (internal_error (__FILE__, __LINE__, "TARGET_READ_SP"), 0)
#endif
typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
@@ -396,11 +404,9 @@ extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
#error "Non multi-arch definition of TARGET_READ_SP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP)
+#if !defined (TARGET_READ_SP)
#define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
#endif
-#endif
/* The dummy call frame SP should be set by push_dummy_call. */
@@ -435,11 +441,9 @@ extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP)
+#if !defined (DEPRECATED_DUMMY_WRITE_SP)
#define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
#endif
-#endif
/* Function for getting target's idea of a frame pointer. FIXME: GDB's
whole scheme for dealing with "frames" and "frame pointers" needs a
@@ -456,11 +460,9 @@ extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
#error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_VIRTUAL_FRAME_POINTER)
+#if !defined (TARGET_VIRTUAL_FRAME_POINTER)
#define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
#endif
-#endif
extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
@@ -479,11 +481,9 @@ extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
#error "Non multi-arch definition of NUM_REGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS)
+#if !defined (NUM_REGS)
#define NUM_REGS (gdbarch_num_regs (current_gdbarch))
#endif
-#endif
/* This macro gives the number of pseudo-registers that live in the
register namespace but do not get fetched or stored on the target.
@@ -500,15 +500,14 @@ extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
#error "Non multi-arch definition of NUM_PSEUDO_REGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS)
+#if !defined (NUM_PSEUDO_REGS)
#define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
#endif
-#endif
/* GDB's standard (or well known) register numbers. These can map onto
a real register or a pseudo (computed) register or not be defined at
- all (-1). */
+ all (-1).
+ SP_REGNUM will hopefully be replaced by UNWIND_SP. */
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
@@ -520,11 +519,9 @@ extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
#error "Non multi-arch definition of SP_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM)
+#if !defined (SP_REGNUM)
#define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
#endif
-#endif
/* This is simply not needed. See value_of_builtin_frame_fp_reg and
call_function_by_hand. */
@@ -539,11 +536,9 @@ extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int depre
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FP_REGNUM)
+#if !defined (DEPRECATED_FP_REGNUM)
#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
@@ -555,11 +550,9 @@ extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
#error "Non multi-arch definition of PC_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM)
+#if !defined (PC_REGNUM)
#define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
@@ -571,11 +564,9 @@ extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
#error "Non multi-arch definition of PS_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PS_REGNUM)
+#if !defined (PS_REGNUM)
#define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
@@ -587,11 +578,9 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
#error "Non multi-arch definition of FP0_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM)
+#if !defined (FP0_REGNUM)
#define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
@@ -603,11 +592,9 @@ extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
#error "Non multi-arch definition of NPC_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM)
+#if !defined (NPC_REGNUM)
#define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
#endif
-#endif
/* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
@@ -622,11 +609,9 @@ extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sta
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
+#if !defined (STAB_REG_TO_REGNUM)
#define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
#endif
-#endif
/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
@@ -641,11 +626,9 @@ extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ec
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
+#if !defined (ECOFF_REG_TO_REGNUM)
#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
#endif
-#endif
/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
@@ -660,11 +643,9 @@ extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dw
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
+#if !defined (DWARF_REG_TO_REGNUM)
#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
#endif
-#endif
/* Convert from an sdb register number to an internal gdb register number.
This should be defined in tm.h, if REGISTER_NAMES is not set up
@@ -681,11 +662,9 @@ extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
+#if !defined (SDB_REG_TO_REGNUM)
#define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
@@ -698,11 +677,9 @@ extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_d
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
+#if !defined (DWARF2_REG_TO_REGNUM)
#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
@@ -715,11 +692,11 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
#error "Non multi-arch definition of REGISTER_NAME"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME)
+#if !defined (REGISTER_NAME)
#define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
#endif
-#endif
+
+/* See the dummy frame code. */
extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
@@ -730,6 +707,54 @@ extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int d
#define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
#endif
+/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
+
+extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
+
+typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
+extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
+
+/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
+
+#if defined (REGISTER_VIRTUAL_TYPE)
+/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
+#if !defined (REGISTER_VIRTUAL_TYPE_P)
+#define REGISTER_VIRTUAL_TYPE_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
+#define REGISTER_VIRTUAL_TYPE_P() (0)
+#endif
+
+extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
+#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
+#define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
+#endif
+
+typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr);
+extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+#endif
+#if !defined (REGISTER_VIRTUAL_TYPE)
+#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
+#endif
+
+/* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
+ from REGISTER_TYPE. */
+
extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
@@ -739,11 +764,12 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
#define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
#endif
-/* NOTE: cagney/2002-05-02: This function with predicate has a valid
- (callable) initial value. As a consequence, even when the predicate
- is false, the corresponding function works. This simplifies the
- migration process - old code, calling REGISTER_BYTE, doesn't need to
- be modified. */
+/* DEPRECATED_REGISTER_BYTE can be deleted. The value is computed from
+ REGISTER_TYPE. NOTE: cagney/2002-05-02: This function with
+ predicate has a valid (callable) initial value. As a consequence,
+ even when the predicate is false, the corresponding function works.
+ This simplifies the migration process - old code, calling
+ DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
#if defined (REGISTER_BYTE)
/* Legacy for systems yet to multi-arch REGISTER_BYTE */
@@ -757,12 +783,12 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
#define REGISTER_BYTE_P() (0)
#endif
-extern int gdbarch_register_byte_p (struct gdbarch *gdbarch);
+extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P)
#error "Non multi-arch definition of REGISTER_BYTE"
#endif
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P)
-#define REGISTER_BYTE_P() (gdbarch_register_byte_p (current_gdbarch))
+#define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
@@ -770,41 +796,54 @@ extern int gdbarch_register_byte_p (struct gdbarch *gdbarch);
#define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
#endif
-typedef int (gdbarch_register_byte_ftype) (int reg_nr);
-extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte);
+typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
+extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
#error "Non multi-arch definition of REGISTER_BYTE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE)
-#define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
-#endif
+#if !defined (REGISTER_BYTE)
+#define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
#endif
-/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
- REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
+/* DEPRECATED_REGISTER_RAW_SIZE can be deleted. The value is computed
+ from REGISTER_TYPE. */
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
#define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
#endif
-typedef int (gdbarch_register_raw_size_ftype) (int reg_nr);
-extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size);
+typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
+extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
#error "Non multi-arch definition of REGISTER_RAW_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE)
-#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
+#if !defined (REGISTER_RAW_SIZE)
+#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
#endif
+
+/* DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. The value is
+ computed from REGISTER_TYPE. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
+#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
#endif
-/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
- DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
- MAX_REGISTER_SIZE (a constant). */
+typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
+extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
+#endif
+#if !defined (REGISTER_VIRTUAL_SIZE)
+#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
+#endif
+
+/* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
+ replaced by the constant MAX_REGISTER_SIZE. */
#if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
@@ -836,35 +875,12 @@ extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+#if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
#define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
#endif
-#endif
-/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
- REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
-#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
-#endif
-
-typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr);
-extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE)
-#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr))
-#endif
-#endif
-
-/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
- DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
- MAX_REGISTER_SIZE (a constant). */
+/* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
+ replaced by the constant MAX_REGISTER_SIZE. */
#if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
@@ -896,57 +912,9 @@ extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
+#if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
#endif
-#endif
-
-/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
- REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
-
-#if defined (REGISTER_VIRTUAL_TYPE)
-/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
-#if !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (0)
-#endif
-
-extern int gdbarch_register_virtual_type_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_register_virtual_type_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
-#define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
-#endif
-
-typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr);
-extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
-#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
-#endif
-#endif
-
-extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
-
-typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
-extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
#if defined (DEPRECATED_DO_REGISTERS_INFO)
/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
@@ -979,11 +947,9 @@ extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, g
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO)
+#if !defined (DEPRECATED_DO_REGISTERS_INFO)
#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
#endif
-#endif
typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
@@ -1015,11 +981,9 @@ extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_reg
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
#error "Non multi-arch definition of REGISTER_SIM_REGNO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
+#if !defined (REGISTER_SIM_REGNO)
#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
#endif
-#endif
#if defined (REGISTER_BYTES_OK)
/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
@@ -1052,11 +1016,9 @@ extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_regi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
#error "Non multi-arch definition of REGISTER_BYTES_OK"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK)
+#if !defined (REGISTER_BYTES_OK)
#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
@@ -1069,11 +1031,9 @@ extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER)
+#if !defined (CANNOT_FETCH_REGISTER)
#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
@@ -1086,11 +1046,9 @@ extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER)
+#if !defined (CANNOT_STORE_REGISTER)
#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
#endif
-#endif
/* setjmp/longjmp support. */
@@ -1125,11 +1083,9 @@ extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
#error "Non multi-arch definition of GET_LONGJMP_TARGET"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET)
+#if !defined (GET_LONGJMP_TARGET)
#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
#endif
-#endif
/* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that
much better but at least they are vaguely consistent). The headers
@@ -1182,11 +1138,9 @@ extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_cal
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
#error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS)
+#if !defined (CALL_DUMMY_ADDRESS)
#define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
#endif
-#endif
/* Replaced by push_dummy_code. */
@@ -1258,11 +1212,9 @@ extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY)
+#if !defined (DEPRECATED_PC_IN_CALL_DUMMY)
#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
#endif
-#endif
/* Replaced by push_dummy_code. */
@@ -1328,11 +1280,9 @@ extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
+#if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
#define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
#endif
-#endif
/* Replaced by push_dummy_code. */
@@ -1367,11 +1317,9 @@ extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY)
#error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY)
+#if !defined (DEPRECATED_FIX_CALL_DUMMY)
#define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_deprecated_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p))
#endif
-#endif
/* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
@@ -1412,11 +1360,9 @@ extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
+#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
#endif
-#endif
#if defined (DEPRECATED_INIT_FRAME_PC)
/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
@@ -1449,22 +1395,18 @@ extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC)
+#if !defined (DEPRECATED_INIT_FRAME_PC)
#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
#endif
-#endif
extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION)
+#if !defined (BELIEVE_PCC_PROMOTION)
#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
#endif
-#endif
extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
@@ -1506,61 +1448,62 @@ extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
#error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER)
+#if !defined (DEPRECATED_GET_SAVED_REGISTER)
#define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_deprecated_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
#endif
-#endif
+
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+ For raw <-> cooked register conversions, replaced by pseudo registers. */
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
-#define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
#endif
-typedef int (gdbarch_register_convertible_ftype) (int nr);
-extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr);
-extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
-#error "Non multi-arch definition of REGISTER_CONVERTIBLE"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE)
-#define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
+typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
+extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
+extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
#endif
+#if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
#endif
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+ For raw <-> cooked register conversions, replaced by pseudo registers. */
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
#endif
-typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
-extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
-extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
-#error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
+typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
+extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
+extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
#endif
+#if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
#endif
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+ For raw <-> cooked register conversions, replaced by pseudo registers. */
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
#endif
-typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
-extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
-extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
-#error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
+typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
+extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
+extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
#endif
+#if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
#endif
/* Default (function) for non- multi-arch platforms. */
@@ -1574,11 +1517,9 @@ extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_con
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
#error "Non multi-arch definition of CONVERT_REGISTER_P"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_REGISTER_P)
+#if !defined (CONVERT_REGISTER_P)
#define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
@@ -1591,11 +1532,9 @@ extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_regi
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
#error "Non multi-arch definition of REGISTER_TO_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_TO_VALUE)
+#if !defined (REGISTER_TO_VALUE)
#define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
@@ -1608,11 +1547,9 @@ extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_valu
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
#error "Non multi-arch definition of VALUE_TO_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (VALUE_TO_REGISTER)
+#if !defined (VALUE_TO_REGISTER)
#define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
@@ -1625,11 +1562,9 @@ extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_poi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
#error "Non multi-arch definition of POINTER_TO_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS)
+#if !defined (POINTER_TO_ADDRESS)
#define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
@@ -1642,11 +1577,9 @@ extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_add
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
#error "Non multi-arch definition of ADDRESS_TO_POINTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER)
+#if !defined (ADDRESS_TO_POINTER)
#define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
#endif
-#endif
#if defined (INTEGER_TO_ADDRESS)
/* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
@@ -1679,11 +1612,9 @@ extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_int
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS)
+#if !defined (INTEGER_TO_ADDRESS)
#define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
@@ -1696,11 +1627,9 @@ extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
#error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK)
+#if !defined (RETURN_VALUE_ON_STACK)
#define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
#endif
-#endif
/* Replaced by PUSH_DUMMY_CALL */
@@ -1735,16 +1664,14 @@ extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS)
+#if !defined (DEPRECATED_PUSH_ARGUMENTS)
#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
#endif
-#endif
extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
-typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
-extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
@@ -1778,11 +1705,9 @@ extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
#endif
-#endif
/* NOTE: This can be handled directly in push_dummy_call. */
@@ -1817,11 +1742,9 @@ extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#if !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
#endif
-#endif
#if defined (DEPRECATED_POP_FRAME)
/* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
@@ -1854,11 +1777,9 @@ extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_d
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
#error "Non multi-arch definition of DEPRECATED_POP_FRAME"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME)
+#if !defined (DEPRECATED_POP_FRAME)
#define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
#endif
-#endif
/* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
@@ -1893,11 +1814,9 @@ extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN)
+#if !defined (DEPRECATED_STORE_STRUCT_RETURN)
#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
@@ -1910,11 +1829,9 @@ extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_e
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
+#if !defined (EXTRACT_RETURN_VALUE)
#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
@@ -1927,11 +1844,9 @@ extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_sto
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
#error "Non multi-arch definition of STORE_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
+#if !defined (STORE_RETURN_VALUE)
#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
#endif
-#endif
typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
@@ -1939,11 +1854,9 @@ extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
#endif
-#endif
typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
@@ -1951,11 +1864,9 @@ extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_RETURN_VALUE)
+#if !defined (DEPRECATED_STORE_RETURN_VALUE)
#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
#endif
-#endif
#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
@@ -1988,11 +1899,9 @@ extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, g
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
+#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
#endif
-#endif
#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
@@ -2025,11 +1934,9 @@ extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
@@ -2042,11 +1949,9 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
#error "Non multi-arch definition of USE_STRUCT_CONVENTION"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION)
+#if !defined (USE_STRUCT_CONVENTION)
#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
#endif
-#endif
#if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
@@ -2079,11 +1984,9 @@ extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
#error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
+#if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
#define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
#endif
-#endif
#if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
/* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
@@ -2116,11 +2019,9 @@ extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
#error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
+#if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
#define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame))
#endif
-#endif
typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
@@ -2128,11 +2029,9 @@ extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_pro
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
#error "Non multi-arch definition of SKIP_PROLOGUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE)
+#if !defined (SKIP_PROLOGUE)
#define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
@@ -2145,11 +2044,9 @@ extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_p
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
#error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P)
+#if !defined (PROLOGUE_FRAMELESS_P)
#define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
#endif
-#endif
typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
@@ -2157,11 +2054,9 @@ extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
#error "Non multi-arch definition of INNER_THAN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN)
+#if !defined (INNER_THAN)
#define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
#endif
-#endif
typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
@@ -2169,11 +2064,9 @@ extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_bre
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC)
+#if !defined (BREAKPOINT_FROM_PC)
#define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
@@ -2186,11 +2079,9 @@ extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
#error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT)
+#if !defined (MEMORY_INSERT_BREAKPOINT)
#define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
@@ -2203,22 +2094,18 @@ extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
#error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT)
+#if !defined (MEMORY_REMOVE_BREAKPOINT)
#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
#endif
-#endif
extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
#error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK)
+#if !defined (DECR_PC_AFTER_BREAK)
#define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
@@ -2231,22 +2118,18 @@ extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_pre
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
#error "Non multi-arch definition of PREPARE_TO_PROCEED"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED)
+#if !defined (PREPARE_TO_PROCEED)
#define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
#endif
-#endif
extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
#error "Non multi-arch definition of FUNCTION_START_OFFSET"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET)
+#if !defined (FUNCTION_START_OFFSET)
#define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
#endif
-#endif
typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
@@ -2257,11 +2140,9 @@ extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR fram
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
#error "Non multi-arch definition of FRAME_ARGS_SKIP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP)
+#if !defined (FRAME_ARGS_SKIP)
#define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
@@ -2274,11 +2155,9 @@ extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
#error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION)
+#if !defined (FRAMELESS_FUNCTION_INVOCATION)
#define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
#endif
-#endif
#if defined (DEPRECATED_FRAME_CHAIN)
/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
@@ -2311,11 +2190,9 @@ extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN)
+#if !defined (DEPRECATED_FRAME_CHAIN)
#define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
#endif
-#endif
#if defined (DEPRECATED_FRAME_CHAIN_VALID)
/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
@@ -2348,11 +2225,9 @@ extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, g
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID)
#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID)
+#if !defined (DEPRECATED_FRAME_CHAIN_VALID)
#define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
#endif
-#endif
/* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
note, per UNWIND_PC's doco, that while the two have similar
@@ -2389,11 +2264,9 @@ extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC)
#error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC)
+#if !defined (DEPRECATED_FRAME_SAVED_PC)
#define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
#endif
-#endif
extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
@@ -2401,6 +2274,12 @@ typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct fra
extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
+extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
+
+typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
+extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
+extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
+
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
@@ -2412,11 +2291,9 @@ extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_fra
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
+#if !defined (FRAME_ARGS_ADDRESS)
#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
@@ -2429,11 +2306,9 @@ extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_f
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
+#if !defined (FRAME_LOCALS_ADDRESS)
#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
#endif
-#endif
#if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
/* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
@@ -2466,10 +2341,33 @@ extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
#error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
+#if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
#define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame))
#endif
+
+#if defined (FRAME_NUM_ARGS)
+/* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */
+#if !defined (FRAME_NUM_ARGS_P)
+#define FRAME_NUM_ARGS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P)
+#define FRAME_NUM_ARGS_P() (0)
+#endif
+
+extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
+#error "Non multi-arch definition of FRAME_NUM_ARGS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P)
+#define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS)
+#define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0)
#endif
typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
@@ -2478,11 +2376,9 @@ extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_n
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
#error "Non multi-arch definition of FRAME_NUM_ARGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS)
+#if !defined (FRAME_NUM_ARGS)
#define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
#endif
-#endif
#if defined (STACK_ALIGN)
/* Legacy for systems yet to multi-arch STACK_ALIGN */
@@ -2515,11 +2411,9 @@ extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_alig
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
#error "Non multi-arch definition of STACK_ALIGN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN)
+#if !defined (STACK_ALIGN)
#define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
#endif
-#endif
extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
@@ -2539,11 +2433,9 @@ extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
#error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
+#if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
#endif
-#endif
#if defined (REG_STRUCT_HAS_ADDR)
/* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
@@ -2576,11 +2468,9 @@ extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_re
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR)
+#if !defined (REG_STRUCT_HAS_ADDR)
#define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
#endif
-#endif
/* FIXME: kettenis/2003-03-08: This should be replaced by a function
parametrized with (at least) the regcache. */
@@ -2616,11 +2506,9 @@ extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS)
+#if !defined (SAVE_DUMMY_FRAME_TOS)
#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
#endif
-#endif
extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
@@ -2633,11 +2521,9 @@ extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
#error "Non multi-arch definition of PARM_BOUNDARY"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY)
+#if !defined (PARM_BOUNDARY)
#define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
@@ -2649,11 +2535,9 @@ extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floa
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT)
+#if !defined (TARGET_FLOAT_FORMAT)
#define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
@@ -2665,11 +2549,9 @@ extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct flo
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT)
+#if !defined (TARGET_DOUBLE_FORMAT)
#define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
@@ -2681,11 +2563,9 @@ extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT)
+#if !defined (TARGET_LONG_DOUBLE_FORMAT)
#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
@@ -2698,11 +2578,9 @@ extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdb
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
#error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR)
+#if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
#endif
-#endif
/* On some machines there are bits in addresses which are not really
part of the address, but are used by the kernel, the hardware, etc.
@@ -2725,11 +2603,9 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
#error "Non multi-arch definition of ADDR_BITS_REMOVE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE)
+#if !defined (ADDR_BITS_REMOVE)
#define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
#endif
-#endif
/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
ADDR_BITS_REMOVE. */
@@ -2745,11 +2621,9 @@ extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_sma
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SMASH_TEXT_ADDRESS)
+#if !defined (SMASH_TEXT_ADDRESS)
#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
#endif
-#endif
/* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
the target needs software single step. An ISA method to implement it.
@@ -2791,11 +2665,9 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP)
+#if !defined (SOFTWARE_SINGLE_STEP)
#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
@@ -2808,11 +2680,9 @@ extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
#error "Non multi-arch definition of TARGET_PRINT_INSN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN)
+#if !defined (TARGET_PRINT_INSN)
#define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
@@ -2825,20 +2695,9 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE)
+#if !defined (SKIP_TRAMPOLINE_CODE)
#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
#endif
-#endif
-
-/* The actual code address at which ABFD would begin execution. Note
- that on some architectures (like 64-bit PowerPC Linux),
- bfd_get_start_address actually points to a function descriptor, not
- the start function's entry point itself. */
-
-typedef CORE_ADDR (gdbarch_bfd_entry_point_ftype) (struct gdbarch *gdbarch, bfd *abfd);
-extern CORE_ADDR gdbarch_bfd_entry_point (struct gdbarch *gdbarch, bfd *abfd);
-extern void set_gdbarch_bfd_entry_point (struct gdbarch *gdbarch, gdbarch_bfd_entry_point_ftype *bfd_entry_point);
/* For SVR4 shared libraries, each call goes through a small piece of
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
@@ -2855,11 +2714,9 @@ extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
#error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE)
+#if !defined (IN_SOLIB_CALL_TRAMPOLINE)
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
#endif
-#endif
/* Some systems also have trampoline code for returning from shared libs. */
@@ -2874,11 +2731,9 @@ extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdb
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_RETURN_TRAMPOLINE)
+#if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
#endif
-#endif
/* Sigtramp is a routine that the kernel calls (which then calls the
signal handler). On most machines it is a library routine that is
@@ -2912,11 +2767,9 @@ extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
#error "Non multi-arch definition of PC_IN_SIGTRAMP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP)
+#if !defined (PC_IN_SIGTRAMP)
#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
#endif
-#endif
#if defined (SIGTRAMP_START)
/* Legacy for systems yet to multi-arch SIGTRAMP_START */
@@ -2949,11 +2802,9 @@ extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtram
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
#error "Non multi-arch definition of SIGTRAMP_START"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START)
+#if !defined (SIGTRAMP_START)
#define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
#endif
-#endif
#if defined (SIGTRAMP_END)
/* Legacy for systems yet to multi-arch SIGTRAMP_END */
@@ -2986,11 +2837,9 @@ extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
#error "Non multi-arch definition of SIGTRAMP_END"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END)
+#if !defined (SIGTRAMP_END)
#define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
#endif
-#endif
/* A target might have problems with watchpoints as soon as the stack
frame of the current function has been destroyed. This mostly happens
@@ -3050,11 +2899,9 @@ extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO)
+#if !defined (DWARF2_BUILD_FRAME_INFO)
#define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
@@ -3067,11 +2914,9 @@ extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
#error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ELF_MAKE_MSYMBOL_SPECIAL)
+#if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
@@ -3084,11 +2929,9 @@ extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
#error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COFF_MAKE_MSYMBOL_SPECIAL)
+#if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
@@ -3100,11 +2943,9 @@ extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * na
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
#error "Non multi-arch definition of NAME_OF_MALLOC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NAME_OF_MALLOC)
+#if !defined (NAME_OF_MALLOC)
#define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
@@ -3116,11 +2957,9 @@ extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int can
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STEP_BREAKPOINT)
+#if !defined (CANNOT_STEP_BREAKPOINT)
#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
@@ -3132,11 +2971,9 @@ extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, i
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
#define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
#endif
-#endif
#if defined (ADDRESS_CLASS_TYPE_FLAGS)
/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
@@ -3169,11 +3006,9 @@ extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS)
+#if !defined (ADDRESS_CLASS_TYPE_FLAGS)
#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
#endif
-#endif
extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
@@ -3193,6 +3028,43 @@ typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int re
extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
+/* Fetch the pointer to the ith function argument. */
+
+#if defined (FETCH_POINTER_ARGUMENT)
+/* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */
+#if !defined (FETCH_POINTER_ARGUMENT_P)
+#define FETCH_POINTER_ARGUMENT_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P)
+#define FETCH_POINTER_ARGUMENT_P() (0)
+#endif
+
+extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
+#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P)
+#define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT)
+#define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0)
+#endif
+
+typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type);
+extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
+extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT)
+#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
+#endif
+#if !defined (FETCH_POINTER_ARGUMENT)
+#define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
+#endif
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 681d7e9c213..9911ec8bc87 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -426,12 +426,13 @@ v:2:TARGET_BFD_VMA_BIT:int:bfd_vma_bit::::8 * sizeof (void*):TARGET_ARCHITECTURE
# One if \`char' acts like \`signed char', zero if \`unsigned char'.
v:2:TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1::::
#
-f:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc::0
+F:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid
f:2:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
# This is simply not needed. See value_of_builtin_frame_fp_reg and
# call_function_by_hand.
F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
-f:2:TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
+# UNWIND_SP is a direct replacement for TARGET_READ_SP.
+F:2:TARGET_READ_SP:CORE_ADDR:read_sp:void
# The dummy call frame SP should be set by push_dummy_call.
F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
# Function for getting target's idea of a frame pointer. FIXME: GDB's
@@ -452,6 +453,7 @@ v:2:NUM_PSEUDO_REGS:int:num_pseudo_regs::::0:0::0:::
# GDB's standard (or well known) register numbers. These can map onto
# a real register or a pseudo (computed) register or not be defined at
# all (-1).
+# SP_REGNUM will hopefully be replaced by UNWIND_SP.
v:2:SP_REGNUM:int:sp_regnum::::-1:-1::0
# This is simply not needed. See value_of_builtin_frame_fp_reg and
# call_function_by_hand.
@@ -472,33 +474,36 @@ f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no
f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
+# See the dummy frame code.
v::DEPRECATED_REGISTER_SIZE:int:deprecated_register_size
+
+# REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
+M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr::0:
+# REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
+F:2:REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_type:int reg_nr:reg_nr::0:0
+# DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
+# from REGISTER_TYPE.
v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
-# NOTE: cagney/2002-05-02: This function with predicate has a valid
-# (callable) initial value. As a consequence, even when the predicate
-# is false, the corresponding function works. This simplifies the
-# migration process - old code, calling REGISTER_BYTE, doesn't need to
-# be modified.
-F::REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
-# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
-# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
-f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
-# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
-# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
-# MAX_REGISTER_SIZE (a constant).
+# DEPRECATED_REGISTER_BYTE can be deleted. The value is computed from
+# REGISTER_TYPE. NOTE: cagney/2002-05-02: This function with
+# predicate has a valid (callable) initial value. As a consequence,
+# even when the predicate is false, the corresponding function works.
+# This simplifies the migration process - old code, calling
+# DEPRECATED_REGISTER_BYTE, doesn't need to be modified.
+F::REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
+# DEPRECATED_REGISTER_RAW_SIZE can be deleted. The value is computed
+# from REGISTER_TYPE.
+f:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. The value is
+# computed from REGISTER_TYPE.
+f:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+# DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
+# replaced by the constant MAX_REGISTER_SIZE.
V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
-# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
-# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
-f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
-# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
-# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
-# MAX_REGISTER_SIZE (a constant).
+# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
+# replaced by the constant MAX_REGISTER_SIZE.
V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_size
-# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
-# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
-F:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
-M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr::0:
-#
+
F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
M:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
@@ -553,9 +558,15 @@ v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
#
-f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
-f:2:REGISTER_CONVERT_TO_VIRTUAL:void:register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
-f:2:REGISTER_CONVERT_TO_RAW:void:register_convert_to_raw:struct type *type, int regnum, char *from, char *to:type, regnum, from, to:::0::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERTIBLE:int:deprecated_register_convertible:int nr:nr:::deprecated_register_convertible_not::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL:void:deprecated_register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERT_TO_RAW:void:deprecated_register_convert_to_raw:struct type *type, int regnum, const char *from, char *to:type, regnum, from, to:::0::0
#
f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_convert_register_p::0
f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
@@ -568,7 +579,7 @@ F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf
f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
# Replaced by PUSH_DUMMY_CALL
F:2:DEPRECATED_PUSH_ARGUMENTS:CORE_ADDR:deprecated_push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr
-M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr
+M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
# NOTE: This can be handled directly in push_dummy_call.
F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
@@ -609,10 +620,11 @@ F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chai
# interfaces they have very different underlying implementations.
F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi::0:0
M::UNWIND_PC:CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame:
+M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame:
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0
F::DEPRECATED_SAVED_PC_AFTER_CALL:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame
-f:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame::0:0
+F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame
#
F:2:STACK_ALIGN:CORE_ADDR:stack_align:CORE_ADDR sp:sp::0:0
M:::CORE_ADDR:frame_align:CORE_ADDR address:address
@@ -654,11 +666,6 @@ F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int i
f:2:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
-# The actual code address at which ABFD would begin execution. Note
-# that on some architectures (like 64-bit PowerPC Linux),
-# bfd_get_start_address actually points to a function descriptor, not
-# the start function's entry point itself.
-m:1::CORE_ADDR:bfd_entry_point:bfd *abfd:abfd:::generic_bfd_entry_point::0
# For SVR4 shared libraries, each call goes through a small piece of
# trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
@@ -721,6 +728,8 @@ M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_na
M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
# Is a register in a group
m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
+# Fetch the pointer to the ith function argument.
+F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type:::::::::
EOF
}
@@ -858,11 +867,9 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
+ printf "#if !defined (${macro})\n"
printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
printf "#endif\n"
- printf "#endif\n"
fi
done
@@ -929,18 +936,9 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- if test "${level}" = ""
- then
- printf "#if !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
- else
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
- printf "#endif\n"
- fi
+ printf "#if !defined (${macro})\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ printf "#endif\n"
fi
if class_is_function_p
then
@@ -987,8 +985,16 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
+ if [ "x${actual}" = "x" ]
+ then
+ d="#define ${macro}() (gdbarch_${function} (current_gdbarch))"
+ elif [ "x${actual}" = "x-" ]
+ then
+ d="#define ${macro} (gdbarch_${function} (current_gdbarch))"
+ else
+ d="#define ${macro}(${actual}) (gdbarch_${function} (current_gdbarch, ${actual}))"
+ fi
+ printf "#if !defined (${macro})\n"
if [ "x${actual}" = "x" ]
then
printf "#define ${macro}() (gdbarch_${function} (current_gdbarch))\n"
@@ -999,7 +1005,6 @@ do
printf "#define ${macro}(${actual}) (gdbarch_${function} (current_gdbarch, ${actual}))\n"
fi
printf "#endif\n"
- printf "#endif\n"
fi
fi
done
@@ -1408,7 +1413,7 @@ function_list | while do_read
do
if class_is_info_p
then
- printf " ${staticdefault},\n"
+ printf " ${staticdefault}, /* ${function} */\n"
fi
done
cat <<EOF
@@ -1422,7 +1427,7 @@ function_list | while do_read
do
if class_is_function_p || class_is_variable_p
then
- printf " ${staticdefault},\n"
+ printf " ${staticdefault}, /* ${function} */\n"
fi
done
cat <<EOF
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a7764ff5bd3..8e9551715aa 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,13 +1,19 @@
-2003-05-29 Jim Blandy <jimb@redhat.com>
+2003-06-13 Mark Kettenis <kettenis@gnu.org>
+
+ From Kelley Cook <kelleycook@wideopenwest.com>:
+ * configure.srv: Accept i[34567]86 variants.
+
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
- Add support for Linux on the 64-bit PowerPC.
- * linux-ppc64-low.c: New file.
- * configure.srv (powerpc64-*-linux*): New case.
- (powerpc*-*-linux*): Adjust case pattern not to match
- powerpc64-*-linux*.
- * Makefile.in (linux-ppc64-low.o, reg-ppc64.o, reg-ppc64.c): New
- rules.
- (clean): Delete reg-ppc64.c, too.
+ * linux-low.c (linux_wait_for_event): Correct comment typos.
+ (linux_resume_one_process): Call check_removed_breakpoint.
+ (linux_send_signal): New function.
+ (linux_target_ops): Add linux_send_signal.
+ * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
+ of kill.
+ * target.h (struct target_ops): Add send_signal.
+
+2003-05-29 Jim Blandy <jimb@redhat.com>
* linux-low.c (usr_store_inferior_registers): Transfer buf in
PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 22ad78640f8..763c21ed7b2 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -190,7 +190,7 @@ clean:
rm -f *.o ${ADD_FILES} *~
rm -f gdbserver gdbreplay core make.log
rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m68k.c reg-mips.c
- rm -f reg-ppc.c reg-ppc64.c reg-sh.c reg-x86-64.c reg-i386-linux.c
+ rm -f reg-ppc.c reg-sh.c reg-x86-64.c reg-i386-linux.c
distclean: clean
rm -f nm.h tm.h xm.h config.status
@@ -260,7 +260,6 @@ linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h)
linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
linux-mips-low.o: linux-mips-low.c $(linux_low_h) $(server_h)
linux-ppc-low.o: linux-ppc-low.c $(linux_low_h) $(server_h)
-linux-ppc64-low.o: linux-ppc64-low.c $(linux_low_h) $(server_h)
linux-s390-low.o: linux-s390-low.c $(linux_low_h) $(server_h)
linux-sh-low.o: linux-sh-low.c $(linux_low_h) $(server_h)
linux-x86-64-low.o: linux-x86-64-low.c $(linux_low_h) $(server_h)
@@ -286,9 +285,6 @@ reg-mips.c : $(srcdir)/../regformats/reg-mips.dat $(regdat_sh)
reg-ppc.o : reg-ppc.c $(regdef_h)
reg-ppc.c : $(srcdir)/../regformats/reg-ppc.dat $(regdat_sh)
sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc.dat reg-ppc.c
-reg-ppc64.o : reg-ppc64.c $(regdef_h)
-reg-ppc64.c : $(srcdir)/../regformats/reg-ppc64.dat $(regdat_sh)
- sh $(regdat_sh) $(srcdir)/../regformats/reg-ppc64.dat reg-ppc64.c
reg-s390.o : reg-s390.c $(regdef_h)
reg-s390.c : $(srcdir)/../regformats/reg-s390.dat $(regdat_sh)
sh $(regdat_sh) $(srcdir)/../regformats/reg-s390.dat reg-s390.c
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index b79d4a091d3..6ab60e93549 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -23,7 +23,7 @@ case "${target}" in
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- i[3456]86-*-linux*) srv_regobj=reg-i386-linux.o
+ i[34567]86-*-linux*) srv_regobj=reg-i386-linux.o
srv_tgtobj="linux-low.o linux-i386-low.o i387-fp.o"
srv_linux_usrregs=yes
srv_linux_regsets=yes
@@ -42,16 +42,11 @@ case "${target}" in
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- powerpc-*-linux*) srv_regobj=reg-ppc.o
+ powerpc*-*-linux*) srv_regobj=reg-ppc.o
srv_tgtobj="linux-low.o linux-ppc-low.o"
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- powerpc64-*-linux*) srv_regobj=reg-ppc64.o
- srv_tgtobj="linux-low.o linux-ppc64-low.o"
- srv_linux_usrregs=yes
- srv_linux_thread_db=yes
- ;;
s390-*-linux*) srv_regobj=reg-s390.o
srv_tgtobj="linux-low.o linux-s390-low.o"
srv_linux_usrregs=yes
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index aad2ecdafa5..4ad204ed3ac 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -399,7 +399,7 @@ linux_wait_for_event (struct thread_info *child)
/* Check for a process with a pending status. */
/* It is possible that the user changed the pending task's registers since
it stopped. We correctly handle the change of PC if we hit a breakpoint
- (in check_removed_breakpoints); signals should be reported anyway. */
+ (in check_removed_breakpoint); signals should be reported anyway. */
if (child == NULL)
{
event_child = (struct process_info *)
@@ -541,7 +541,7 @@ linux_wait_for_event (struct thread_info *child)
if (check_breakpoints (stop_pc) != 0)
{
/* We hit one of our own breakpoints. We mark it as a pending
- breakpoint, so that check_removed_breakpoints () will do the PC
+ breakpoint, so that check_removed_breakpoint () will do the PC
adjustment for us at the appropriate time. */
event_child->pending_is_breakpoint = 1;
event_child->pending_stop_pc = stop_pc;
@@ -587,7 +587,7 @@ linux_wait_for_event (struct thread_info *child)
will give us a new action for this thread, but clear it for
consistency anyway. It's safe to clear the stepping flag
because the only consumer of get_stop_pc () after this point
- is check_removed_breakpoints, and pending_is_breakpoint is not
+ is check_removed_breakpoint, and pending_is_breakpoint is not
set. It might be wiser to use a step_completed flag instead. */
if (event_child->stepping)
{
@@ -786,7 +786,7 @@ linux_resume_one_process (struct inferior_list_entry *entry,
process->pending_signals = p_sig;
}
- if (process->status_pending_p)
+ if (process->status_pending_p && !check_removed_breakpoint (process))
return;
saved_inferior = current_inferior;
@@ -1228,6 +1228,22 @@ linux_look_up_symbols (void)
#endif
}
+static void
+linux_send_signal (int signum)
+{
+ extern int signal_pid;
+
+ if (cont_thread > 0)
+ {
+ struct process_info *process;
+
+ process = get_thread_process (current_inferior);
+ kill (process->lwpid, signum);
+ }
+ else
+ kill (signal_pid, signum);
+}
+
static struct target_ops linux_target_ops = {
linux_create_inferior,
@@ -1241,6 +1257,7 @@ static struct target_ops linux_target_ops = {
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
+ linux_send_signal,
};
static void
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index d5699379bd5..eb56c1039a8 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -46,8 +46,6 @@ static int remote_desc;
extern int using_threads;
extern int debug_threads;
-extern int signal_pid;
-
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
@@ -326,7 +324,7 @@ putpkt (char *buf)
/* Check for an input interrupt while we're here. */
if (buf3[0] == '\003')
- kill (signal_pid, SIGINT);
+ (*the_target->send_signal) (SIGINT);
}
while (buf3[0] != '+');
@@ -363,7 +361,7 @@ input_interrupt (int unused)
return;
}
- kill (signal_pid, SIGINT);
+ (*the_target->send_signal) (SIGINT);
}
}
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index e554c0ac7e1..c09ac8da73d 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -104,6 +104,9 @@ struct target_ops
symbols. */
void (*look_up_symbols) (void);
+
+ /* Send a signal to the inferior process, however is appropriate. */
+ void (*send_signal) (int);
};
extern struct target_ops *the_target;
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 3b8e62faa87..3889afc8608 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -434,7 +434,7 @@ address_space_int_to_name (int space_flag)
/* Create a new type with instance flags NEW_FLAGS, based on TYPE.
If STORAGE is non-NULL, create the new type instance there. */
-struct type *
+static struct type *
make_qualified_type (struct type *type, int new_flags,
struct type *storage)
{
@@ -1668,7 +1668,7 @@ check_typedef (struct type *type)
/* Parse a type expression in the string [P..P+LENGTH). If an error occurs,
silently return builtin_type_void. */
-struct type *
+static struct type *
safe_parse_type (char *p, int length)
{
struct ui_file *saved_gdb_stderr;
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index 47d6e125880..da04c7416c0 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -184,7 +184,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
}
-struct type *
+static struct type *
gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
{
struct type *known_type;
@@ -401,6 +401,8 @@ init_gnuv2_ops (void)
gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
}
+extern initialize_file_ftype _initialize_gnu_v2_abi; /* -Wmissing-prototypes */
+
void
_initialize_gnu_v2_abi (void)
{
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index da2a2d60450..bbfd1185201 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -372,7 +372,7 @@ gnuv3_virtual_fn_field (struct value **value_p,
to (the address of)(ARG) + OFFSET.
-1 is returned on error. */
-int
+static int
gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
CORE_ADDR address)
{
@@ -447,6 +447,7 @@ init_gnuv3_ops (void)
gnu_v3_abi_ops.baseclass_offset = gnuv3_baseclass_offset;
}
+extern initialize_file_ftype _initialize_gnu_v3_abi; /* -Wmissing-prototypes */
void
_initialize_gnu_v3_abi (void)
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 33db5641558..0ebcf226d8d 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -40,12 +40,8 @@
struct frame_extra_info
{
CORE_ADDR from_pc;
- CORE_ADDR args_pointer;
- CORE_ADDR locals_pointer;
};
-#define E_NUM_REGS (h8300smode ? 14 : 13)
-
enum
{
h8300_reg_size = 2,
@@ -57,7 +53,8 @@ enum
enum gdb_regnum
{
E_R0_REGNUM, E_ER0_REGNUM = E_R0_REGNUM, E_ARG0_REGNUM = E_R0_REGNUM,
- E_R1_REGNUM, E_ER1_REGNUM = E_R1_REGNUM,
+ E_RET0_REGNUM = E_R0_REGNUM,
+ E_R1_REGNUM, E_ER1_REGNUM = E_R1_REGNUM, E_RET1_REGNUM = E_R1_REGNUM,
E_R2_REGNUM, E_ER2_REGNUM = E_R2_REGNUM, E_ARGLAST_REGNUM = E_R2_REGNUM,
E_R3_REGNUM, E_ER3_REGNUM = E_R3_REGNUM,
E_R4_REGNUM, E_ER4_REGNUM = E_R4_REGNUM,
@@ -69,7 +66,11 @@ enum gdb_regnum
E_CYCLES_REGNUM,
E_TICK_REGNUM, E_EXR_REGNUM = E_TICK_REGNUM,
E_INST_REGNUM, E_TICKS_REGNUM = E_INST_REGNUM,
- E_INSTS_REGNUM
+ E_INSTS_REGNUM,
+ E_MACH_REGNUM,
+ E_MACL_REGNUM,
+ E_SBR_REGNUM,
+ E_VBR_REGNUM
};
#define UNSIGNED_SHORT(X) ((X) & 0xffff)
@@ -270,7 +271,9 @@ gdb_print_insn_h8300 (bfd_vma memaddr, disassemble_info * info)
of the instruction. */
static CORE_ADDR
-h8300_next_prologue_insn (CORE_ADDR addr, CORE_ADDR lim, unsigned short* pword1)
+h8300_next_prologue_insn (CORE_ADDR addr,
+ CORE_ADDR lim,
+ unsigned short* pword1)
{
char buf[2];
if (addr < lim + 8)
@@ -439,10 +442,6 @@ h8300_examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
break;
}
- /* The args are always reffed based from the stack pointer */
- get_frame_extra_info (fi)->args_pointer = after_prolog_fp;
- /* Locals are always reffed based from the fp */
- get_frame_extra_info (fi)->locals_pointer = after_prolog_fp;
/* The PC is at a known place */
get_frame_extra_info (fi)->from_pc =
read_memory_unsigned_integer (after_prolog_fp + BINWORD, BINWORD);
@@ -452,7 +451,8 @@ h8300_examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
if (have_fp)
/* We keep the old FP in the SP spot */
- fsr[E_SP_REGNUM] = read_memory_unsigned_integer (fsr[E_FP_REGNUM], BINWORD);
+ fsr[E_SP_REGNUM] = read_memory_unsigned_integer (fsr[E_FP_REGNUM],
+ BINWORD);
else
fsr[E_SP_REGNUM] = after_prolog_fp + auto_depth;
@@ -470,10 +470,12 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
/* Find the beginning of this function, so we can analyze its
prologue. */
- if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
+ if (find_pc_partial_function (get_frame_pc (fi), NULL,
+ &func_addr, &func_end))
{
struct symtab_and_line sal = find_pc_line (func_addr, 0);
- CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi)) ? sal.end : get_frame_pc (fi);
+ CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi))
+ ? sal.end : get_frame_pc (fi);
/* This will fill in fields in fi. */
h8300_examine_prologue (func_addr, limit, get_frame_base (fi),
get_frame_saved_regs (fi), fi);
@@ -489,7 +491,8 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
will be called for the new frame.
For us, the frame address is its stack pointer value, so we look up
- the function prologue to determine the caller's sp value, and return it. */
+ the function prologue to determine the caller's sp value, and
+ return it. */
static CORE_ADDR
h8300_frame_chain (struct frame_info *thisframe)
@@ -532,8 +535,6 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
get_frame_extra_info (fi)->from_pc = 0;
- get_frame_extra_info (fi)->args_pointer = 0; /* Unknown */
- get_frame_extra_info (fi)->locals_pointer = 0; /* Unknown */
if (!get_frame_pc (fi))
{
@@ -544,27 +545,6 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
}
}
-static CORE_ADDR
-h8300_frame_locals_address (struct frame_info *fi)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
- return (CORE_ADDR) 0; /* Not sure what else to do... */
- return get_frame_extra_info (fi)->locals_pointer;
-}
-
-/* Return the address of the argument block for the frame
- described by FI. Returns 0 if the address is unknown. */
-
-static CORE_ADDR
-h8300_frame_args_address (struct frame_info *fi)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
- return (CORE_ADDR) 0; /* Not sure what else to do... */
- return get_frame_extra_info (fi)->args_pointer;
-}
-
/* Round N up or down to the nearest multiple of UNIT.
Evaluate N only once, UNIT several times.
UNIT must be a power of two. */
@@ -706,7 +686,8 @@ h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
for (offset = 0; offset < padded_len; offset += wordsize)
{
- ULONGEST word = extract_address (padded + offset, wordsize);
+ ULONGEST word = extract_unsigned_integer (padded + offset,
+ wordsize);
write_register (reg++, word);
}
}
@@ -769,8 +750,8 @@ h8300_pop_frame (void)
actual value we want, not the address of the value we want. */
if (get_frame_saved_regs (frame)[regno] && regno != E_SP_REGNUM)
write_register (regno,
- read_memory_integer (get_frame_saved_regs (frame)[regno],
- BINWORD));
+ read_memory_integer
+ (get_frame_saved_regs (frame)[regno], BINWORD));
else if (get_frame_saved_regs (frame)[regno] && regno == E_SP_REGNUM)
write_register (regno, get_frame_base (frame) + 2 * BINWORD);
}
@@ -786,68 +767,105 @@ h8300_pop_frame (void)
Copy that into VALBUF. Be sure to account for CPU type. */
static void
-h8300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+h8300_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
- int wordsize = BINWORD;
int len = TYPE_LENGTH (type);
+ ULONGEST c;
switch (len)
{
- case 1: /* (char) */
- case 2: /* (short), (int) */
- memcpy (valbuf, regbuf + REGISTER_BYTE (0) + (wordsize - len), len);
- break;
- case 4: /* (long), (float) */
- if (wordsize == 4)
- {
- memcpy (valbuf, regbuf + REGISTER_BYTE (0), 4);
- }
- else
- {
- memcpy (valbuf, regbuf + REGISTER_BYTE (0), 2);
- memcpy (valbuf + 2, regbuf + REGISTER_BYTE (1), 2);
- }
- break;
- case 8: /* (double) (doesn't seem to happen, which is good,
- because this almost certainly isn't right. */
- error ("I don't know how a double is returned.");
- break;
+ case 1:
+ case 2:
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+ store_unsigned_integer (valbuf, len, c);
+ break;
+ case 4: /* Needs two registers on plain H8/300 */
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+ store_unsigned_integer (valbuf, 2, c);
+ regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
+ store_unsigned_integer ((void*)((char *)valbuf + 2), 2, c);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how a 8 byte value is returned.");
+ break;
+ }
+}
+
+static void
+h8300h_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
+{
+ int len = TYPE_LENGTH (type);
+ ULONGEST c;
+
+ switch (len)
+ {
+ case 1:
+ case 2:
+ case 4:
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+ store_unsigned_integer (valbuf, len, c);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how a 8 byte value is returned.");
+ break;
}
}
+
/* Function: store_return_value
Place the appropriate value in the appropriate registers.
Primarily used by the RETURN command. */
static void
-h8300_store_return_value (struct type *type, char *valbuf)
+h8300_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
{
- int regval;
- int wordsize = BINWORD;
int len = TYPE_LENGTH (type);
+ ULONGEST val;
switch (len)
{
- case 1: /* char */
- case 2: /* short, int */
- regval = extract_address (valbuf, len);
- write_register (0, regval);
- break;
- case 4: /* long, float */
- regval = extract_address (valbuf, len);
- if (wordsize == 4)
- {
- write_register (0, regval);
- }
- else
- {
- write_register (0, regval >> 16);
- write_register (1, regval & 0xffff);
- }
- break;
- case 8: /* presumeably double, but doesn't seem to happen */
- error ("I don't know how to return a double.");
- break;
+ case 1:
+ case 2:
+ val = extract_unsigned_integer (valbuf, len);
+ regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
+ break;
+ case 4: /* long, float */
+ val = extract_unsigned_integer (valbuf, len);
+ regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
+ (val >> 16) &0xffff);
+ regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM, val & 0xffff);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how to return a 8 byte value.");
+ break;
+ }
+}
+
+static void
+h8300h_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
+{
+ int len = TYPE_LENGTH (type);
+ ULONGEST val;
+
+ switch (len)
+ {
+ case 1:
+ case 2:
+ case 4: /* long, float */
+ val = extract_unsigned_integer (valbuf, len);
+ regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how to return a 8 byte value.");
+ break;
}
}
@@ -856,21 +874,47 @@ static struct cmd_list_element *setmachinelist;
static const char *
h8300_register_name (int regno)
{
- /* The register names change depending on whether the h8300h processor
+ /* The register names change depending on which h8300 processor
type is selected. */
- static char *h8300_register_names[] = {
+ static char *register_names[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6",
"sp", "ccr","pc","cycles", "tick", "inst", ""
};
- static char *h8300s_register_names[] = {
+ if (regno < 0
+ || regno >= (sizeof (register_names) / sizeof (*register_names)))
+ internal_error (__FILE__, __LINE__,
+ "h8300_register_name: illegal register number %d", regno);
+ else
+ return register_names[regno];
+}
+
+static const char *
+h8300s_register_name (int regno)
+{
+ static char *register_names[] = {
"er0", "er1", "er2", "er3", "er4", "er5", "er6",
"sp", "ccr", "pc", "cycles", "exr", "tick", "inst"
};
- char **register_names =
- h8300smode ? h8300s_register_names : h8300_register_names;
- if (regno < 0 || regno >= E_NUM_REGS)
+ if (regno < 0
+ || regno >= (sizeof (register_names) / sizeof (*register_names)))
internal_error (__FILE__, __LINE__,
- "h8300_register_name: illegal register number %d", regno);
+ "h8300s_register_name: illegal register number %d", regno);
+ else
+ return register_names[regno];
+}
+
+static const char *
+h8300sx_register_name (int regno)
+{
+ static char *register_names[] = {
+ "er0", "er1", "er2", "er3", "er4", "er5", "er6",
+ "sp", "ccr", "pc", "cycles", "exr", "tick", "inst",
+ "mach", "macl", "sbr", "vbr"
+ };
+ if (regno < 0
+ || regno >= (sizeof (register_names) / sizeof (*register_names)))
+ internal_error (__FILE__, __LINE__,
+ "h8300sx_register_name: illegal register number %d", regno);
else
return register_names[regno];
}
@@ -879,44 +923,30 @@ static void
h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, int regno)
{
- ULONGEST rval;
- long val;
- const char *name = h8300_register_name (regno);
+ LONGEST rval;
+ const char *name = gdbarch_register_name (gdbarch, regno);
if (!name || !*name)
return;
- /* FIXME: cagney/2002-10-22: The code below assumes that VAL is at
- least 4 bytes (32 bits) in size and hence is large enough to hold
- the largest h8300 register. Should instead be using ULONGEST and
- the phex() functions. */
- gdb_assert (sizeof (val) >= 4);
- frame_read_unsigned_register (frame, regno, &rval);
- val = rval;
+ frame_read_signed_register (frame, regno, &rval);
fprintf_filtered (file, "%-14s ", name);
- if (h8300hmode)
+ if (regno == E_CCR_REGNUM || (regno == E_EXR_REGNUM && h8300smode))
{
- if (val)
- fprintf_filtered (file, "0x%08lx %-8ld", val, val);
- else
- fprintf_filtered (file, "0x%-8lx %-8ld", val, val);
+ fprintf_filtered (file, "0x%02x ", (unsigned char)rval);
+ print_longest (file, 'u', 1, rval);
}
else
{
- if (val)
- fprintf_filtered (file, "0x%04lx %-4ld", val, val);
- else
- fprintf_filtered (file, "0x%-4lx %-4ld", val, val);
+ fprintf_filtered (file, "0x%s ", phex ((ULONGEST)rval, BINWORD));
+ print_longest (file, 'd', 1, rval);
}
if (regno == E_CCR_REGNUM)
{
/* CCR register */
int C, Z, N, V;
- unsigned char b[h8300h_reg_size];
- unsigned char l;
- frame_register_read (deprecated_selected_frame, regno, b);
- l = b[REGISTER_VIRTUAL_SIZE (E_CCR_REGNUM) - 1];
+ unsigned char l = rval & 0xff;
fprintf_filtered (file, "\t");
fprintf_filtered (file, "I-%d ", (l & 0x80) != 0);
fprintf_filtered (file, "UI-%d ", (l & 0x40) != 0);
@@ -954,10 +984,7 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
else if (regno == E_EXR_REGNUM && h8300smode)
{
/* EXR register */
- unsigned char b[h8300h_reg_size];
- unsigned char l;
- frame_register_read (deprecated_selected_frame, regno, b);
- l = b[REGISTER_VIRTUAL_SIZE (E_EXR_REGNUM) - 1];
+ unsigned char l = rval & 0xff;
fprintf_filtered (file, "\t");
fprintf_filtered (file, "T-%d - - - ", (l & 0x80) != 0);
fprintf_filtered (file, "I2-%d ", (l & 4) != 0);
@@ -972,7 +999,7 @@ h8300_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, int regno, int cpregs)
{
if (regno < 0)
- for (regno = 0; regno < E_NUM_REGS; ++regno)
+ for (regno = 0; regno < NUM_REGS; ++regno)
h8300_print_register (gdbarch, file, frame, regno);
else
h8300_print_register (gdbarch, file, frame, regno);
@@ -984,50 +1011,41 @@ h8300_saved_pc_after_call (struct frame_info *ignore)
return read_memory_unsigned_integer (read_register (E_SP_REGNUM), BINWORD);
}
-static int
-h8300_register_byte (int regno)
-{
- if (regno < 0 || regno >= E_NUM_REGS)
- internal_error (__FILE__, __LINE__,
- "h8300_register_byte: illegal register number %d", regno);
- else
- return regno * BINWORD;
-}
-
-static int
-h8300_register_raw_size (int regno)
-{
- if (regno < 0 || regno >= E_NUM_REGS)
- internal_error (__FILE__, __LINE__,
- "h8300_register_raw_size: illegal register number %d",
- regno);
- else
- return BINWORD;
-}
-
static struct type *
-h8300_register_virtual_type (int regno)
+h8300_register_type (struct gdbarch *gdbarch, int regno)
{
- if (regno < 0 || regno >= E_NUM_REGS)
+ if (regno < 0 || regno >= NUM_REGS)
internal_error (__FILE__, __LINE__,
- "h8300_register_virtual_type: illegal register number %d",
+ "h8300_register_type: illegal register number %d",
regno);
else
- return h8300hmode ?
- builtin_type_unsigned_long : builtin_type_unsigned_short;
-}
-
-static void
-h8300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (0, addr);
+ {
+ switch (regno)
+ {
+ case E_PC_REGNUM:
+ return builtin_type_void_func_ptr;
+ case E_SP_REGNUM:
+ case E_FP_REGNUM:
+ return builtin_type_void_data_ptr;
+ case E_CCR_REGNUM:
+ return builtin_type_uint8;
+ case E_EXR_REGNUM:
+ if (h8300smode)
+ return builtin_type_uint8;
+ /*FALLTHRU*/
+ default:
+ return h8300hmode ? builtin_type_int32
+ : builtin_type_int16;
+ }
+ }
}
static CORE_ADDR
-h8300_extract_struct_value_address (char *regbuf)
+h8300_extract_struct_value_address (struct regcache *regcache)
{
- return extract_address (regbuf + h8300_register_byte (E_ARG0_REGNUM),
- h8300_register_raw_size (E_ARG0_REGNUM));
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
+ return addr;
}
const static unsigned char *
@@ -1040,6 +1058,22 @@ h8300_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
return breakpoint;
}
+static CORE_ADDR
+h8300_push_dummy_code (struct gdbarch *gdbarch,
+ CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
+ struct value **args, int nargs,
+ struct type *value_type,
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
+{
+ /* Allocate space sufficient for a breakpoint. */
+ sp = (sp - 2) & ~1;
+ /* Store the address of that breakpoint */
+ *bp_addr = sp;
+ /* h8300 always starts the call at the callee's entry point. */
+ *real_pc = funaddr;
+ return sp;
+}
+
static void
h8300_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
@@ -1051,7 +1085,6 @@ No floating-point info available for this processor.\n");
static struct gdbarch *
h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- static LONGEST call_dummy_words[1] = { 0 };
struct gdbarch_tdep *tdep = NULL;
struct gdbarch *gdbarch;
@@ -1066,24 +1099,59 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (info.bfd_arch_info->arch != bfd_arch_h8300)
return NULL;
+ gdbarch = gdbarch_alloc (&info, 0);
+
switch (info.bfd_arch_info->mach)
{
- case bfd_mach_h8300:
- h8300smode = 0;
- h8300hmode = 0;
- break;
- case bfd_mach_h8300h:
- h8300smode = 0;
- h8300hmode = 1;
- break;
- case bfd_mach_h8300s:
- h8300smode = 1;
- h8300hmode = 1;
- break;
+ case bfd_mach_h8300:
+ h8300sxmode = 0;
+ h8300smode = 0;
+ h8300hmode = 0;
+ set_gdbarch_num_regs (gdbarch, 13);
+ set_gdbarch_register_name (gdbarch, h8300_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300_store_return_value);
+ break;
+ case bfd_mach_h8300h:
+ case bfd_mach_h8300hn:
+ h8300sxmode = 0;
+ h8300smode = 0;
+ h8300hmode = 1;
+ set_gdbarch_num_regs (gdbarch, 13);
+ set_gdbarch_register_name (gdbarch, h8300_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
+ break;
+ case bfd_mach_h8300s:
+ case bfd_mach_h8300sn:
+ h8300sxmode = 0;
+ h8300smode = 1;
+ h8300hmode = 1;
+ set_gdbarch_num_regs (gdbarch, 14);
+ set_gdbarch_register_name (gdbarch, h8300s_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
+ break;
+ case bfd_mach_h8300sx:
+ case bfd_mach_h8300sxn:
+ h8300sxmode = 1;
+ h8300smode = 1;
+ h8300hmode = 1;
+ set_gdbarch_num_regs (gdbarch, 18);
+ set_gdbarch_register_name (gdbarch, h8300sx_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
+ break;
}
- gdbarch = gdbarch_alloc (&info, 0);
-
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
@@ -1092,34 +1160,27 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Basic register fields and methods.
*/
- set_gdbarch_num_regs (gdbarch, E_NUM_REGS);
set_gdbarch_num_pseudo_regs (gdbarch, 0);
set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
- set_gdbarch_register_name (gdbarch, h8300_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, BINWORD);
- set_gdbarch_deprecated_register_bytes (gdbarch, E_NUM_REGS * BINWORD);
- set_gdbarch_register_byte (gdbarch, h8300_register_byte);
- set_gdbarch_register_raw_size (gdbarch, h8300_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, h8300h_reg_size);
- set_gdbarch_register_virtual_size (gdbarch, h8300_register_raw_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, h8300h_reg_size);
- set_gdbarch_register_virtual_type (gdbarch, h8300_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, h8300_register_type);
set_gdbarch_print_registers_info (gdbarch, h8300_print_registers_info);
set_gdbarch_print_float_info (gdbarch, h8300_print_float_info);
/*
* Frame Info
*/
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, h8300_frame_init_saved_regs);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, h8300_init_extra_frame_info);
+ set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
+
+ set_gdbarch_deprecated_frame_init_saved_regs (gdbarch,
+ h8300_frame_init_saved_regs);
+ set_gdbarch_deprecated_init_extra_frame_info (gdbarch,
+ h8300_init_extra_frame_info);
set_gdbarch_deprecated_frame_chain (gdbarch, h8300_frame_chain);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, h8300_saved_pc_after_call);
+ set_gdbarch_deprecated_saved_pc_after_call (gdbarch,
+ h8300_saved_pc_after_call);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, h8300_frame_saved_pc);
- set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
- set_gdbarch_frame_args_address (gdbarch, h8300_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, h8300_frame_locals_address);
/*
* Miscelany
@@ -1133,41 +1194,41 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
- /*
- * Call Dummies
- *
- * These values and methods are used when gdb calls a target function. */
- set_gdbarch_deprecated_push_return_address (gdbarch, h8300_push_return_address);
- set_gdbarch_deprecated_extract_return_value (gdbarch, h8300_extract_return_value);
- set_gdbarch_deprecated_push_arguments (gdbarch, h8300_push_arguments);
- set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
- set_gdbarch_deprecated_store_struct_return (gdbarch, h8300_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch,
+ h8300_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
+ set_gdbarch_push_dummy_code (gdbarch, h8300_push_dummy_code);
set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_ptr_bit (gdbarch, BINWORD * TARGET_CHAR_BIT);
- set_gdbarch_addr_bit (gdbarch, BINWORD * TARGET_CHAR_BIT);
+ set_gdbarch_long_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_long_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
/* set_gdbarch_stack_align (gdbarch, SOME_stack_align); */
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ /*
+ * Call Dummies
+ *
+ * These values and methods are used when gdb calls a target function. */
+ /* Can all be replaced by push_dummy_call */
+ set_gdbarch_deprecated_push_return_address (gdbarch,
+ h8300_push_return_address);
+ set_gdbarch_deprecated_push_arguments (gdbarch, h8300_push_arguments);
+ set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
+
return gdbarch;
}
+extern initialize_file_ftype _initialize_h8300_tdep; /* -Wmissing-prototypes */
+
void
_initialize_h8300_tdep (void)
{
diff --git a/gdb/hpacc-abi.c b/gdb/hpacc-abi.c
index 799d4c7e9bf..0fb3adccb12 100644
--- a/gdb/hpacc-abi.c
+++ b/gdb/hpacc-abi.c
@@ -309,6 +309,7 @@ init_hpacc_ops (void)
hpacc_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
}
+extern initialize_file_ftype _initialize_hpacc_abi; /* -Wmissing-prototypes */
void
_initialize_hpacc_abi (void)
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index cc50e02783e..0fb7c8f879d 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -94,15 +94,22 @@ hppa_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
}
}
+static void
+hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ set_gdbarch_pc_in_sigtramp (gdbarch, hppa_hpux_pc_in_sigtramp);
+}
static void
hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ hppa_hpux_init_abi (info, gdbarch);
}
static void
hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ hppa_hpux_init_abi (info, gdbarch);
}
void
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 1f78d06d164..7c8e7629ad0 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4673,92 +4673,6 @@ unwind_command (char *exp, int from_tty)
pin (Total_frame_size);
}
-#ifdef PREPARE_TO_PROCEED
-
-/* If the user has switched threads, and there is a breakpoint
- at the old thread's pc location, then switch to that thread
- and return TRUE, else return FALSE and don't do a thread
- switch (or rather, don't seem to have done a thread switch).
-
- Ptrace-based gdb will always return FALSE to the thread-switch
- query, and thus also to PREPARE_TO_PROCEED.
-
- The important thing is whether there is a BPT instruction,
- not how many user breakpoints there are. So we have to worry
- about things like these:
-
- o Non-bp stop -- NO
-
- o User hits bp, no switch -- NO
-
- o User hits bp, switches threads -- YES
-
- o User hits bp, deletes bp, switches threads -- NO
-
- o User hits bp, deletes one of two or more bps
- at that PC, user switches threads -- YES
-
- o Plus, since we're buffering events, the user may have hit a
- breakpoint, deleted the breakpoint and then gotten another
- hit on that same breakpoint on another thread which
- actually hit before the delete. (FIXME in breakpoint.c
- so that "dead" breakpoints are ignored?) -- NO
-
- For these reasons, we have to violate information hiding and
- call "breakpoint_here_p". If core gdb thinks there is a bpt
- here, that's what counts, as core gdb is the one which is
- putting the BPT instruction in and taking it out.
-
- Note that this implementation is potentially redundant now that
- default_prepare_to_proceed() has been added.
-
- FIXME This may not support switching threads after Ctrl-C
- correctly. The default implementation does support this. */
-int
-hppa_prepare_to_proceed (void)
-{
- pid_t old_thread;
- pid_t current_thread;
-
- old_thread = hppa_switched_threads (PIDGET (inferior_ptid));
- if (old_thread != 0)
- {
- /* Switched over from "old_thread". Try to do
- as little work as possible, 'cause mostly
- we're going to switch back. */
- CORE_ADDR new_pc;
- CORE_ADDR old_pc = read_pc ();
-
- /* Yuk, shouldn't use global to specify current
- thread. But that's how gdb does it. */
- current_thread = PIDGET (inferior_ptid);
- inferior_ptid = pid_to_ptid (old_thread);
-
- new_pc = read_pc ();
- if (new_pc != old_pc /* If at same pc, no need */
- && breakpoint_here_p (new_pc))
- {
- /* User hasn't deleted the BP.
- Return TRUE, finishing switch to "old_thread". */
- flush_cached_frames ();
- registers_changed ();
-#if 0
- printf ("---> PREPARE_TO_PROCEED (was %d, now %d)!\n",
- current_thread, PIDGET (inferior_ptid));
-#endif
-
- return 1;
- }
-
- /* Otherwise switch back to the user-chosen thread. */
- inferior_ptid = pid_to_ptid (current_thread);
- new_pc = read_pc (); /* Re-prime register cache */
- }
-
- return 0;
-}
-#endif /* PREPARE_TO_PROCEED */
-
void
hppa_skip_permanent_breakpoint (void)
{
@@ -4961,26 +4875,6 @@ hppa_cannot_store_register (int regnum)
}
CORE_ADDR
-hppa_frame_args_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-CORE_ADDR
-hppa_frame_locals_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-int
-hppa_frame_num_args (struct frame_info *frame)
-{
- /* We can't tell how many args there are now that the C compiler delays
- popping them. */
- return -1;
-}
-
-CORE_ADDR
hppa_smash_text_address (CORE_ADDR addr)
{
/* The low two bits of the PC on the PA contain the privilege level.
@@ -4993,6 +4887,16 @@ hppa_smash_text_address (CORE_ADDR addr)
return (addr &= ~0x3);
}
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, R0_REGNUM + 26 - argi, &addr);
+ return addr;
+}
+
static struct gdbarch *
hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -5035,13 +4939,13 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fp0_regnum (gdbarch, 64);
set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM);
set_gdbarch_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
- set_gdbarch_register_raw_size (gdbarch, hppa_register_raw_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, hppa_register_raw_size);
set_gdbarch_deprecated_register_bytes (gdbarch, hppa_num_regs * 4);
- set_gdbarch_register_byte (gdbarch, hppa_register_byte);
- set_gdbarch_register_virtual_size (gdbarch, hppa_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, hppa_register_byte);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, hppa_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
- set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, hppa_register_virtual_type);
set_gdbarch_deprecated_store_struct_return (gdbarch, hppa_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch,
hppa_extract_return_value);
@@ -5056,9 +4960,6 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation
(gdbarch, hppa_frameless_function_invocation);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, hppa_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, hppa_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, hppa_frame_locals_address);
- set_gdbarch_frame_num_args (gdbarch, hppa_frame_num_args);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, hppa_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, hppa_pop_frame);
@@ -5071,6 +4972,9 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, hppa_target_write_pc);
set_gdbarch_deprecated_target_read_fp (gdbarch, hppa_target_read_fp);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, hppa_fetch_pointer_argument);
+
return gdbarch;
}
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 02f5acd9a90..ed55c341596 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -360,8 +360,8 @@ hpux_thread_store_registers (int regno)
&deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
- (extract_address (&deprecated_registers[REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno)) + 160);
+ (extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)],
+ REGISTER_RAW_SIZE (regno)) + 160);
}
else if (regno == PC_REGNUM)
write_memory (sp - 20,
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index 5911ec9b91a..443f8f7c223 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -1,56 +1,30 @@
/* Target-dependent code for Cygwin running on i386's, for GDB.
+
Copyright 2003 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 "gdb_string.h"
-#include "gdbcore.h"
-#include "i386-tdep.h"
#include "osabi.h"
-#include "frame.h"
-#include "dummy-frame.h"
-
-static int
-i386_cygwin_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- /* In the context where this is used, we get the saved PC before we've
- successfully unwound far enough to be sure what we've got (it may
- be a signal handler caller). If we're dealing with a signal
- handler caller, this will return valid, which is fine. If not,
- it'll make the correct test. */
- return ((get_frame_type (thisframe) == SIGTRAMP_FRAME) || chain != 0);
-}
-/* Return the chain-pointer for FRAME. In the case of the i386, the
- frame's nominal address is the address of a 4-byte word containing
- the calling frame's address. */
-static CORE_ADDR
-i386_cygwin_frame_chain (struct frame_info *frame)
-{
- if (pc_in_dummy_frame (get_frame_pc (frame)))
- return get_frame_base (frame);
- if (get_frame_type (frame) == SIGTRAMP_FRAME
- || i386_frameless_signal_p (frame))
- return get_frame_base (frame);
+#include "gdb_string.h"
- return read_memory_unsigned_integer (get_frame_base (frame), 4);
-}
+#include "i386-tdep.h"
static void
i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -58,8 +32,6 @@ i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->struct_return = reg_struct_return;
- set_gdbarch_deprecated_frame_chain (gdbarch, i386_cygwin_frame_chain);
- set_gdbarch_deprecated_frame_chain_valid (gdbarch, i386_cygwin_frame_chain_valid);
}
static enum gdb_osabi
@@ -75,6 +47,9 @@ i386_cygwin_osabi_sniffer (bfd * abfd)
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386_cygwin_tdep (void);
+
void
_initialize_i386_cygwin_tdep (void)
{
diff --git a/gdb/i386-interix-tdep.c b/gdb/i386-interix-tdep.c
index 7713863e4d7..2fced7202cd 100644
--- a/gdb/i386-interix-tdep.c
+++ b/gdb/i386-interix-tdep.c
@@ -90,7 +90,7 @@ pei_adjust_objfile_offsets (struct objfile *objfile,
return;
}
- for (i = 0; i < SECT_OFF_MAX; i++)
+ for (i = 0; i < objfile->num_sections; i++)
{
(objfile->section_offsets)->offsets[i] += symbols_offset;
}
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index cf769d87edc..81be404a0f4 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -70,6 +70,9 @@
/* Defines I386_LINUX_ORIG_EAX_REGNUM. */
#include "i386-linux-tdep.h"
+/* Defines ps_err_e, struct ps_prochandle. */
+#include "gdb_proc_service.h"
+
/* Prototypes for local functions. */
static void dummy_sse_values (void);
@@ -683,6 +686,21 @@ i386_linux_dr_set (int regnum, unsigned long value)
perror_with_name ("Couldn't write debug register");
}
+extern ps_err_e
+ps_get_thread_area(const struct ps_prochandle *ph,
+ lwpid_t lwpid, int idx, void **base)
+{
+ unsigned long int desc[3];
+#define PTRACE_GET_THREAD_AREA 25
+
+ if (ptrace (PTRACE_GET_THREAD_AREA,
+ lwpid, (void *) idx, (unsigned long) &desc) < 0)
+ return PS_ERR;
+
+ *(int *)base = desc[1];
+ return PS_OK;
+}
+
void
i386_linux_dr_set_control (unsigned long control)
{
@@ -852,7 +870,7 @@ child_resume (ptid_t ptid, int step, enum target_signal signal)
/* Then check the system call number. */
if (syscall == SYS_sigreturn || syscall == SYS_rt_sigreturn)
{
- CORE_ADDR sp = read_register (SP_REGNUM);
+ CORE_ADDR sp = read_register (I386_ESP_REGNUM);
CORE_ADDR addr = sp;
unsigned long int eflags;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index afff5485edc..6d284f1ea98 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -81,7 +81,7 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
The instruction sequence for normal signals is
pop %eax
- mov $0x77,%eax
+ mov $0x77, %eax
int $0x80
or 0x58 0xb8 0x77 0x00 0x00 0x00 0xcd 0x80.
@@ -103,17 +103,17 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
to the ones used by the kernel. Therefore, these trampolines are
supported too. */
-#define LINUX_SIGTRAMP_INSN0 (0x58) /* pop %eax */
-#define LINUX_SIGTRAMP_OFFSET0 (0)
-#define LINUX_SIGTRAMP_INSN1 (0xb8) /* mov $NNNN,%eax */
-#define LINUX_SIGTRAMP_OFFSET1 (1)
-#define LINUX_SIGTRAMP_INSN2 (0xcd) /* int */
-#define LINUX_SIGTRAMP_OFFSET2 (6)
+#define LINUX_SIGTRAMP_INSN0 0x58 /* pop %eax */
+#define LINUX_SIGTRAMP_OFFSET0 0
+#define LINUX_SIGTRAMP_INSN1 0xb8 /* mov $NNNN, %eax */
+#define LINUX_SIGTRAMP_OFFSET1 1
+#define LINUX_SIGTRAMP_INSN2 0xcd /* int */
+#define LINUX_SIGTRAMP_OFFSET2 6
static const unsigned char linux_sigtramp_code[] =
{
LINUX_SIGTRAMP_INSN0, /* pop %eax */
- LINUX_SIGTRAMP_INSN1, 0x77, 0x00, 0x00, 0x00, /* mov $0x77,%eax */
+ LINUX_SIGTRAMP_INSN1, 0x77, 0x00, 0x00, 0x00, /* mov $0x77, %eax */
LINUX_SIGTRAMP_INSN2, 0x80 /* int $0x80 */
};
@@ -167,20 +167,20 @@ i386_linux_sigtramp_start (CORE_ADDR pc)
/* This function does the same for RT signals. Here the instruction
sequence is
- mov $0xad,%eax
+ mov $0xad, %eax
int $0x80
or 0xb8 0xad 0x00 0x00 0x00 0xcd 0x80.
The effect is to call the system call rt_sigreturn. */
-#define LINUX_RT_SIGTRAMP_INSN0 (0xb8) /* mov $NNNN,%eax */
-#define LINUX_RT_SIGTRAMP_OFFSET0 (0)
-#define LINUX_RT_SIGTRAMP_INSN1 (0xcd) /* int */
-#define LINUX_RT_SIGTRAMP_OFFSET1 (5)
+#define LINUX_RT_SIGTRAMP_INSN0 0xb8 /* mov $NNNN, %eax */
+#define LINUX_RT_SIGTRAMP_OFFSET0 0
+#define LINUX_RT_SIGTRAMP_INSN1 0xcd /* int */
+#define LINUX_RT_SIGTRAMP_OFFSET1 5
static const unsigned char linux_rt_sigtramp_code[] =
{
- LINUX_RT_SIGTRAMP_INSN0, 0xad, 0x00, 0x00, 0x00, /* mov $0xad,%eax */
+ LINUX_RT_SIGTRAMP_INSN0, 0xad, 0x00, 0x00, 0x00, /* mov $0xad, %eax */
LINUX_RT_SIGTRAMP_INSN1, 0x80 /* int $0x80 */
};
@@ -239,50 +239,47 @@ i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
|| strcmp ("__restore_rt", name) == 0);
}
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
- address of the associated sigcontext structure. */
+/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
+#define I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 20
+
+/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
+ routine, return the address of the associated sigcontext structure. */
static CORE_ADDR
-i386_linux_sigcontext_addr (struct frame_info *frame)
+i386_linux_sigcontext_addr (struct frame_info *next_frame)
{
CORE_ADDR pc;
+ CORE_ADDR sp;
+ char buf[4];
+
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- pc = i386_linux_sigtramp_start (get_frame_pc (frame));
+ pc = i386_linux_sigtramp_start (frame_pc_unwind (next_frame));
if (pc)
{
- CORE_ADDR sp;
-
- if (get_next_frame (frame))
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. The sigcontext structure lives on
- the stack, right after the signum argument. */
- return get_frame_base (get_next_frame (frame)) + 12;
-
- /* This is the top frame. We'll have to find the address of the
- sigcontext structure by looking at the stack pointer. Keep
- in mind that the first instruction of the sigtramp code is
- "pop %eax". If the PC is at this instruction, adjust the
- returned value accordingly. */
- sp = read_register (SP_REGNUM);
- if (pc == get_frame_pc (frame))
+ /* The sigcontext structure lives on the stack, right after
+ the signum argument. We determine the address of the
+ sigcontext structure by looking at the frame's stack
+ pointer. Keep in mind that the first instruction of the
+ sigtramp code is "pop %eax". If the PC is after this
+ instruction, adjust the returned value accordingly. */
+ if (pc == frame_pc_unwind (next_frame))
return sp + 4;
return sp;
}
- pc = i386_linux_rt_sigtramp_start (get_frame_pc (frame));
+ pc = i386_linux_rt_sigtramp_start (frame_pc_unwind (next_frame));
if (pc)
{
- if (get_next_frame (frame))
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. The sigcontext structure is part of
- the user context. A pointer to the user context is passed
- as the third argument to the signal handler. */
- return read_memory_integer (get_frame_base (get_next_frame (frame))
- + 16, 4) + 20;
-
- /* This is the top frame. Again, use the stack pointer to find
- the address of the sigcontext structure. */
- return read_memory_integer (read_register (SP_REGNUM) + 8, 4) + 20;
+ CORE_ADDR ucontext_addr;
+
+ /* The sigcontext structure is part of the user context. A
+ pointer to the user context is passed as the third argument
+ to the signal handler. */
+ read_memory (sp + 8, buf, 4);
+ ucontext_addr = extract_unsigned_integer (buf, 4) + 20;
+ return ucontext_addr + I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
error ("Couldn't recognize signal trampoline.");
@@ -294,7 +291,7 @@ i386_linux_sigcontext_addr (struct frame_info *frame)
static void
i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
{
- write_register_pid (PC_REGNUM, pc, ptid);
+ write_register_pid (I386_EIP_REGNUM, pc, ptid);
/* We must be careful with modifying the program counter. If we
just interrupted a system call, the kernel might try to restart
@@ -322,7 +319,7 @@ i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
be considered too special-purpose for general consumption. */
static struct minimal_symbol *
-find_minsym_and_objfile (char *name, struct objfile **objfile_p)
+find_minsym_and_objfile (char *name, struct objfile **objfilep)
{
struct objfile *objfile;
@@ -335,7 +332,7 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
if (SYMBOL_LINKAGE_NAME (msym)
&& strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
{
- *objfile_p = objfile;
+ *objfilep = objfile;
return msym;
}
}
@@ -345,9 +342,9 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
}
static CORE_ADDR
-skip_hurd_resolver (CORE_ADDR pc)
+skip_gnu_resolver (CORE_ADDR pc)
{
- /* The HURD dynamic linker is part of the GNU C library, so many
+ /* The GNU dynamic linker is part of the GNU C library, so many
GNU/Linux distributions use it. (All ELF versions, as far as I
know.) An unresolved PLT entry points to "_dl_runtime_resolve",
which calls "fixup" to patch the PLT, and then passes control to
@@ -374,7 +371,7 @@ skip_hurd_resolver (CORE_ADDR pc)
= lookup_minimal_symbol ("fixup", NULL, objfile);
if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc)
- return (DEPRECATED_SAVED_PC_AFTER_CALL (get_current_frame ()));
+ return frame_pc_unwind (get_current_frame ());
}
return 0;
@@ -393,7 +390,7 @@ i386_linux_skip_solib_resolver (CORE_ADDR pc)
CORE_ADDR result;
/* Plug in functions for other kinds of resolvers here. */
- result = skip_hurd_resolver (pc);
+ result = skip_gnu_resolver (pc);
if (result)
return result;
@@ -442,6 +439,27 @@ i386_linux_svr4_fetch_link_map_offsets (void)
}
+/* From <asm/sigcontext.h>. */
+static int i386_linux_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 11 * 4, /* %eax */
+ 10 * 4, /* %ecx */
+ 9 * 4, /* %edx */
+ 8 * 4, /* %ebx */
+ 7 * 4, /* %esp */
+ 6 * 4, /* %ebp */
+ 5 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 14 * 4, /* %eip */
+ 16 * 4, /* %eflags */
+ 15 * 4, /* %cs */
+ 18 * 4, /* %ss */
+ 3 * 4, /* %ds */
+ 2 * 4, /* %es */
+ 1 * 4, /* %fs */
+ 0 * 4 /* %gs */
+};
+
static void
i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -461,13 +479,12 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
set_gdbarch_register_name (gdbarch, i386_linux_register_name);
set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p);
- set_gdbarch_deprecated_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
tdep->sigcontext_addr = i386_linux_sigcontext_addr;
- tdep->sc_pc_offset = 14 * 4; /* From <asm/sigcontext.h>. */
- tdep->sc_sp_offset = 7 * 4;
+ tdep->sc_reg_offset = i386_linux_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
/* When the i386 Linux kernel calls a signal handler, the return
address points to a bit of code on the stack. This function is
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index b35dd2a13b7..381119f7033 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -231,14 +231,20 @@ i386nto_pc_in_sigtramp (CORE_ADDR pc, char *name)
return name && strcmp ("__signalstub", name) == 0;
}
-#define SIGCONTEXT_OFFSET 136
+#define I386_NTO_SIGCONTEXT_OFFSET 136
+
+/* Assuming NEXT_FRAME is a frame following a QNX Neutrino sigtramp
+ routine, return the address of the associated sigcontext structure. */
+
static CORE_ADDR
-i386nto_sigcontext_addr (struct frame_info *frame)
+i386nto_sigcontext_addr (struct frame_info *next_frame)
{
- if (get_next_frame (frame))
- return get_frame_base (get_next_frame (frame)) + SIGCONTEXT_OFFSET;
+ char buf[4];
+
+ frame_unwind_register (next_frame, SP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- return read_register (SP_REGNUM) + SIGCONTEXT_OFFSET;
+ return sp + I386_NTO_SIGCONTEXT_OFFSET;
}
static void
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index a52b18850fb..78487af4658 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -42,12 +42,8 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris is SVR4-based. */
i386_svr4_init_abi (info, gdbarch);
- /* Signal trampolines are different from SVR4, in fact they're
- rather similar to BSD. */
+ /* Signal trampolines are slightly different from SVR4. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
- tdep->sigcontext_addr = i386bsd_sigcontext_addr;
- tdep->sc_pc_offset = 36 + 14 * 4;
- tdep->sc_sp_offset = 36 + 17 * 4;
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 0428c13dabb..467f686a123 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -21,25 +21,29 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "gdb_string.h"
+#include "arch-utils.h"
+#include "command.h"
+#include "dummy-frame.h"
+#include "dwarf2-frame.h"
+#include "doublest.h"
+#include "floatformat.h"
#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
#include "inferior.h"
+#include "gdbcmd.h"
#include "gdbcore.h"
#include "objfiles.h"
-#include "target.h"
-#include "floatformat.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "reggroups.h"
#include "symfile.h"
#include "symtab.h"
-#include "gdbcmd.h"
-#include "command.h"
-#include "arch-utils.h"
-#include "regcache.h"
-#include "doublest.h"
+#include "target.h"
#include "value.h"
+
#include "gdb_assert.h"
-#include "reggroups.h"
-#include "dummy-frame.h"
-#include "osabi.h"
+#include "gdb_string.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
@@ -122,12 +126,12 @@ i386_mxcsr_regnum_p (int regnum)
const char *
i386_register_name (int reg)
{
- if (reg >= 0 && reg < i386_num_register_names)
- return i386_register_names[reg];
-
if (i386_mmx_regnum_p (reg))
return i386_mmx_names[reg - MM0_REGNUM];
+ if (reg >= 0 && reg < i386_num_register_names)
+ return i386_register_names[reg];
+
return NULL;
}
@@ -140,7 +144,7 @@ i386_stab_reg_to_regnum (int reg)
/* This implements what GCC calls the "default" register map. */
if (reg >= 0 && reg <= 7)
{
- /* General registers. */
+ /* General-purpose registers. */
return reg;
}
else if (reg >= 12 && reg <= 19)
@@ -173,7 +177,7 @@ i386_dwarf_reg_to_regnum (int reg)
numbers the floating point registers differently. */
if (reg >= 0 && reg <= 9)
{
- /* General registers. */
+ /* General-purpose registers. */
return reg;
}
else if (reg >= 11 && reg <= 18)
@@ -203,412 +207,359 @@ static const char *valid_flavors[] =
NULL
};
static const char *disassembly_flavor = att_flavor;
+
-/* Stdio style buffering was used to minimize calls to ptrace, but
- this buffering did not take into account that the code section
- being accessed may not be an even number of buffers long (even if
- the buffer is only sizeof(int) long). In cases where the code
- section size happened to be a non-integral number of buffers long,
- attempting to read the last buffer would fail. Simply using
- target_read_memory and ignoring errors, rather than read_memory, is
- not the correct solution, since legitimate access errors would then
- be totally ignored. To properly handle this situation and continue
- to use buffering would require that this code be able to determine
- the minimum code section size granularity (not the alignment of the
- section itself, since the actual failing case that pointed out this
- problem had a section alignment of 4 but was not a multiple of 4
- bytes long), on a target by target basis, and then adjust it's
- buffer size accordingly. This is messy, but potentially feasible.
- It probably needs the bfd library's help and support. For now, the
- buffer size is set to 1. (FIXME -fnf) */
-
-#define CODESTREAM_BUFSIZ 1 /* Was sizeof(int), see note above. */
-static CORE_ADDR codestream_next_addr;
-static CORE_ADDR codestream_addr;
-static unsigned char codestream_buf[CODESTREAM_BUFSIZ];
-static int codestream_off;
-static int codestream_cnt;
-
-#define codestream_tell() (codestream_addr + codestream_off)
-#define codestream_peek() \
- (codestream_cnt == 0 ? \
- codestream_fill(1) : codestream_buf[codestream_off])
-#define codestream_get() \
- (codestream_cnt-- == 0 ? \
- codestream_fill(0) : codestream_buf[codestream_off++])
-
-static unsigned char
-codestream_fill (int peek_flag)
-{
- codestream_addr = codestream_next_addr;
- codestream_next_addr += CODESTREAM_BUFSIZ;
- codestream_off = 0;
- codestream_cnt = CODESTREAM_BUFSIZ;
- read_memory (codestream_addr, (char *) codestream_buf, CODESTREAM_BUFSIZ);
-
- if (peek_flag)
- return (codestream_peek ());
- else
- return (codestream_get ());
-}
+/* Use the program counter to determine the contents and size of a
+ breakpoint instruction. Return a pointer to a string of bytes that
+ encode a breakpoint instruction, store the length of the string in
+ *LEN and optionally adjust *PC to point to the correct memory
+ location for inserting the breakpoint.
-static void
-codestream_seek (CORE_ADDR place)
-{
- codestream_next_addr = place / CODESTREAM_BUFSIZ;
- codestream_next_addr *= CODESTREAM_BUFSIZ;
- codestream_cnt = 0;
- codestream_fill (1);
- while (codestream_tell () != place)
- codestream_get ();
-}
+ On the i386 we have a single breakpoint that fits in a single byte
+ and can be inserted anywhere.
-static void
-codestream_read (unsigned char *buf, int count)
+ This function is 64-bit safe. */
+
+static const unsigned char *
+i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
{
- unsigned char *p;
- int i;
- p = buf;
- for (i = 0; i < count; i++)
- *p++ = codestream_get ();
+ static unsigned char break_insn[] = { 0xcc }; /* int 3 */
+
+ *len = sizeof (break_insn);
+ return break_insn;
}
+#ifdef I386_REGNO_TO_SYMMETRY
+#error "The Sequent Symmetry is no longer supported."
+#endif
-/* If the next instruction is a jump, move to its target. */
+/* According to the System V ABI, the registers %ebp, %ebx, %edi, %esi
+ and %esp "belong" to the calling function. Therefore these
+ registers should be saved if they're going to be modified. */
-static void
-i386_follow_jump (void)
+/* The maximum number of saved registers. This should include all
+ registers mentioned above, and %eip. */
+#define I386_NUM_SAVED_REGS I386_NUM_GREGS
+
+struct i386_frame_cache
{
- unsigned char buf[4];
- long delta;
+ /* Base address. */
+ CORE_ADDR base;
+ CORE_ADDR sp_offset;
+ CORE_ADDR pc;
- int data16;
- CORE_ADDR pos;
+ /* Saved registers. */
+ CORE_ADDR saved_regs[I386_NUM_SAVED_REGS];
+ CORE_ADDR saved_sp;
+ int pc_in_eax;
- pos = codestream_tell ();
+ /* Stack space reserved for local variables. */
+ long locals;
+};
+
+/* Allocate and initialize a frame cache. */
+
+static struct i386_frame_cache *
+i386_alloc_frame_cache (void)
+{
+ struct i386_frame_cache *cache;
+ int i;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct i386_frame_cache);
+
+ /* Base address. */
+ cache->base = 0;
+ cache->sp_offset = -4;
+ cache->pc = 0;
+
+ /* Saved registers. We initialize these to -1 since zero is a valid
+ offset (that's where %ebp is supposed to be stored). */
+ for (i = 0; i < I386_NUM_SAVED_REGS; i++)
+ cache->saved_regs[i] = -1;
+ cache->saved_sp = 0;
+ cache->pc_in_eax = 0;
+
+ /* Frameless until proven otherwise. */
+ cache->locals = -1;
+
+ return cache;
+}
- data16 = 0;
- if (codestream_peek () == 0x66)
+/* If the instruction at PC is a jump, return the address of its
+ target. Otherwise, return PC. */
+
+static CORE_ADDR
+i386_follow_jump (CORE_ADDR pc)
+{
+ unsigned char op;
+ long delta = 0;
+ int data16 = 0;
+
+ op = read_memory_unsigned_integer (pc, 1);
+ if (op == 0x66)
{
- codestream_get ();
data16 = 1;
+ op = read_memory_unsigned_integer (pc + 1, 1);
}
- switch (codestream_get ())
+ switch (op)
{
case 0xe9:
/* Relative jump: if data16 == 0, disp32, else disp16. */
if (data16)
{
- codestream_read (buf, 2);
- delta = extract_signed_integer (buf, 2);
+ delta = read_memory_integer (pc + 2, 2);
/* Include the size of the jmp instruction (including the
0x66 prefix). */
- pos += delta + 4;
+ delta += 4;
}
else
{
- codestream_read (buf, 4);
- delta = extract_signed_integer (buf, 4);
+ delta = read_memory_integer (pc + 1, 4);
- pos += delta + 5;
+ /* Include the size of the jmp instruction. */
+ delta += 5;
}
break;
case 0xeb:
/* Relative jump, disp8 (ignore data16). */
- codestream_read (buf, 1);
- /* Sign-extend it. */
- delta = extract_signed_integer (buf, 1);
+ delta = read_memory_integer (pc + data16 + 1, 1);
- pos += delta + 2;
+ delta += data16 + 2;
break;
}
- codestream_seek (pos);
-}
-/* Find & return the amount a local space allocated, and advance the
- codestream to the first register push (if any).
+ return pc + delta;
+}
- If the entry sequence doesn't make sense, return -1, and leave
- codestream pointer at a random spot. */
+/* Check whether PC points at a prologue for a function returning a
+ structure or union. If so, it updates CACHE and returns the
+ address of the first instruction after the code sequence that
+ removes the "hidden" argument from the stack or CURRENT_PC,
+ whichever is smaller. Otherwise, return PC. */
-static long
-i386_get_frame_setup (CORE_ADDR pc)
+static CORE_ADDR
+i386_analyze_struct_return (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
{
+ /* Functions that return a structure or union start with:
+
+ popl %eax 0x58
+ xchgl %eax, (%esp) 0x87 0x04 0x24
+ or xchgl %eax, 0(%esp) 0x87 0x44 0x24 0x00
+
+ (the System V compiler puts out the second `xchg' instruction,
+ and the assembler doesn't try to optimize it, so the 'sib' form
+ gets generated). This sequence is used to get the address of the
+ return buffer for a function that returns a structure. */
+ static unsigned char proto1[3] = { 0x87, 0x04, 0x24 };
+ static unsigned char proto2[4] = { 0x87, 0x44, 0x24, 0x00 };
+ unsigned char buf[4];
unsigned char op;
- codestream_seek (pc);
+ if (current_pc <= pc)
+ return pc;
- i386_follow_jump ();
+ op = read_memory_unsigned_integer (pc, 1);
- op = codestream_get ();
+ if (op != 0x58) /* popl %eax */
+ return pc;
- if (op == 0x58) /* popl %eax */
+ read_memory (pc + 1, buf, 4);
+ if (memcmp (buf, proto1, 3) != 0 && memcmp (buf, proto2, 4) != 0)
+ return pc;
+
+ if (current_pc == pc)
{
- /* This function must start with
-
- popl %eax 0x58
- xchgl %eax, (%esp) 0x87 0x04 0x24
- or xchgl %eax, 0(%esp) 0x87 0x44 0x24 0x00
-
- (the System V compiler puts out the second `xchg'
- instruction, and the assembler doesn't try to optimize it, so
- the 'sib' form gets generated). This sequence is used to get
- the address of the return buffer for a function that returns
- a structure. */
- int pos;
- unsigned char buf[4];
- static unsigned char proto1[3] = { 0x87, 0x04, 0x24 };
- static unsigned char proto2[4] = { 0x87, 0x44, 0x24, 0x00 };
-
- pos = codestream_tell ();
- codestream_read (buf, 4);
- if (memcmp (buf, proto1, 3) == 0)
- pos += 3;
- else if (memcmp (buf, proto2, 4) == 0)
- pos += 4;
-
- codestream_seek (pos);
- op = codestream_get (); /* Update next opcode. */
+ cache->sp_offset += 4;
+ return current_pc;
}
- if (op == 0x68 || op == 0x6a)
+ if (current_pc == pc + 1)
{
- /* This function may start with
+ cache->pc_in_eax = 1;
+ return current_pc;
+ }
+
+ if (buf[1] == proto1[1])
+ return pc + 4;
+ else
+ return pc + 5;
+}
+
+static CORE_ADDR
+i386_skip_probe (CORE_ADDR pc)
+{
+ /* A function may start with
- pushl constant
- call _probe
- addl $4, %esp
+ pushl constant
+ call _probe
+ addl $4, %esp
- followed by
+ followed by
- pushl %ebp
+ pushl %ebp
- etc. */
- int pos;
- unsigned char buf[8];
+ etc. */
+ unsigned char buf[8];
+ unsigned char op;
- /* Skip past the `pushl' instruction; it has either a one-byte
- or a four-byte operand, depending on the opcode. */
- pos = codestream_tell ();
+ op = read_memory_unsigned_integer (pc, 1);
+
+ if (op == 0x68 || op == 0x6a)
+ {
+ int delta;
+
+ /* Skip past the `pushl' instruction; it has either a one-byte or a
+ four-byte operand, depending on the opcode. */
if (op == 0x68)
- pos += 4;
+ delta = 5;
else
- pos += 1;
- codestream_seek (pos);
+ delta = 2;
- /* Read the following 8 bytes, which should be "call _probe" (6
- bytes) followed by "addl $4,%esp" (2 bytes). */
- codestream_read (buf, sizeof (buf));
+ /* Read the following 8 bytes, which should be `call _probe' (6
+ bytes) followed by `addl $4,%esp' (2 bytes). */
+ read_memory (pc + delta, buf, sizeof (buf));
if (buf[0] == 0xe8 && buf[6] == 0xc4 && buf[7] == 0x4)
- pos += sizeof (buf);
- codestream_seek (pos);
- op = codestream_get (); /* Update next opcode. */
+ pc += delta + sizeof (buf);
}
+ return pc;
+}
+
+/* Check whether PC points at a code that sets up a new stack frame.
+ If so, it updates CACHE and returns the address of the first
+ instruction after the sequence that sets removes the "hidden"
+ argument from the stack or CURRENT_PC, whichever is smaller.
+ Otherwise, return PC. */
+
+static CORE_ADDR
+i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
+{
+ unsigned char op;
+
+ if (current_pc <= pc)
+ return current_pc;
+
+ op = read_memory_unsigned_integer (pc, 1);
+
if (op == 0x55) /* pushl %ebp */
{
- /* Check for "movl %esp, %ebp" -- can be written in two ways. */
- switch (codestream_get ())
+ /* Take into account that we've executed the `pushl %ebp' that
+ starts this instruction sequence. */
+ cache->saved_regs[I386_EBP_REGNUM] = 0;
+ cache->sp_offset += 4;
+
+ /* If that's all, return now. */
+ if (current_pc <= pc + 1)
+ return current_pc;
+
+ /* Check for `movl %esp, %ebp' -- can be written in two ways. */
+ op = read_memory_unsigned_integer (pc + 1, 1);
+ switch (op)
{
case 0x8b:
- if (codestream_get () != 0xec)
- return -1;
+ if (read_memory_unsigned_integer (pc + 2, 1) != 0xec)
+ return pc + 1;
break;
case 0x89:
- if (codestream_get () != 0xe5)
- return -1;
+ if (read_memory_unsigned_integer (pc + 2, 1) != 0xe5)
+ return pc + 1;
break;
default:
- return -1;
+ return pc + 1;
}
+
+ /* OK, we actually have a frame. We just don't know how large it is
+ yet. Set its size to zero. We'll adjust it if necessary. */
+ cache->locals = 0;
+
+ /* If that's all, return now. */
+ if (current_pc <= pc + 3)
+ return current_pc;
+
/* Check for stack adjustment
- subl $XXX, %esp
+ subl $XXX, %esp
NOTE: You can't subtract a 16 bit immediate from a 32 bit
reg, so we don't have to worry about a data16 prefix. */
- op = codestream_peek ();
+ op = read_memory_unsigned_integer (pc + 3, 1);
if (op == 0x83)
{
/* `subl' with 8 bit immediate. */
- codestream_get ();
- if (codestream_get () != 0xec)
+ if (read_memory_unsigned_integer (pc + 4, 1) != 0xec)
/* Some instruction starting with 0x83 other than `subl'. */
- {
- codestream_seek (codestream_tell () - 2);
- return 0;
- }
- /* `subl' with signed byte immediate (though it wouldn't
- make sense to be negative). */
- return (codestream_get ());
+ return pc + 3;
+
+ /* `subl' with signed byte immediate (though it wouldn't make
+ sense to be negative). */
+ cache->locals = read_memory_integer (pc + 5, 1);
+ return pc + 6;
}
else if (op == 0x81)
{
- char buf[4];
/* Maybe it is `subl' with a 32 bit immedediate. */
- codestream_get ();
- if (codestream_get () != 0xec)
+ if (read_memory_unsigned_integer (pc + 4, 1) != 0xec)
/* Some instruction starting with 0x81 other than `subl'. */
- {
- codestream_seek (codestream_tell () - 2);
- return 0;
- }
+ return pc + 3;
+
/* It is `subl' with a 32 bit immediate. */
- codestream_read ((unsigned char *) buf, 4);
- return extract_signed_integer (buf, 4);
+ cache->locals = read_memory_integer (pc + 5, 4);
+ return pc + 9;
}
else
{
- return 0;
+ /* Some instruction other than `subl'. */
+ return pc + 3;
}
}
- else if (op == 0xc8)
+ else if (op == 0xc8) /* enter $XXX */
{
- char buf[2];
- /* `enter' with 16 bit unsigned immediate. */
- codestream_read ((unsigned char *) buf, 2);
- codestream_get (); /* Flush final byte of enter instruction. */
- return extract_unsigned_integer (buf, 2);
+ cache->locals = read_memory_unsigned_integer (pc + 1, 2);
+ return pc + 4;
}
- return (-1);
-}
-
-/* Signal trampolines don't have a meaningful frame. The frame
- pointer value we use is actually the frame pointer of the calling
- frame -- that is, the frame which was in progress when the signal
- trampoline was entered. GDB mostly treats this frame pointer value
- as a magic cookie. We detect the case of a signal trampoline by
- testing for get_frame_type() == SIGTRAMP_FRAME, which is set based
- on PC_IN_SIGTRAMP.
-
- When a signal trampoline is invoked from a frameless function, we
- essentially have two frameless functions in a row. In this case,
- we use the same magic cookie for three frames in a row. We detect
- this case by seeing whether the next frame is a SIGTRAMP_FRAME,
- and, if it does, checking whether the current frame is actually
- frameless. In this case, we need to get the PC by looking at the
- SP register value stored in the signal context.
-
- This should work in most cases except in horrible situations where
- a signal occurs just as we enter a function but before the frame
- has been set up. Incidentally, that's just what happens when we
- call a function from GDB with a signal pending (there's a test in
- the testsuite that makes this happen). Therefore we pretend that
- we have a frameless function if we're stopped at the start of a
- function. */
-
-/* Return non-zero if we're dealing with a frameless signal, that is,
- a signal trampoline invoked from a frameless function. */
-
-int
-i386_frameless_signal_p (struct frame_info *frame)
-{
- return (get_next_frame (frame)
- && get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME
- && (frameless_look_for_prologue (frame)
- || get_frame_pc (frame) == get_frame_func (frame)));
-}
-
-/* Return the chain-pointer for FRAME. In the case of the i386, the
- frame's nominal address is the address of a 4-byte word containing
- the calling frame's address. */
-
-static CORE_ADDR
-i386_frame_chain (struct frame_info *frame)
-{
- if (pc_in_dummy_frame (get_frame_pc (frame)))
- return get_frame_base (frame);
-
- if (get_frame_type (frame) == SIGTRAMP_FRAME
- || i386_frameless_signal_p (frame))
- return get_frame_base (frame);
-
- if (! inside_entry_file (get_frame_pc (frame)))
- return read_memory_unsigned_integer (get_frame_base (frame), 4);
-
- return 0;
-}
-
-/* Determine whether the function invocation represented by FRAME does
- not have a from on the stack associated with it. If it does not,
- return non-zero, otherwise return zero. */
-
-static int
-i386_frameless_function_invocation (struct frame_info *frame)
-{
- if (get_frame_type (frame) == SIGTRAMP_FRAME)
- return 0;
-
- return frameless_look_for_prologue (frame);
-}
-
-/* Assuming FRAME is for a sigtramp routine, return the saved program
- counter. */
-
-static CORE_ADDR
-i386_sigtramp_saved_pc (struct frame_info *frame)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR addr;
- addr = tdep->sigcontext_addr (frame);
- return read_memory_unsigned_integer (addr + tdep->sc_pc_offset, 4);
+ return pc;
}
-/* Assuming FRAME is for a sigtramp routine, return the saved stack
- pointer. */
+/* Check whether PC points at code that saves registers on the stack.
+ If so, it updates CACHE and returns the address of the first
+ instruction after the register saves or CURRENT_PC, whichever is
+ smaller. Otherwise, return PC. */
static CORE_ADDR
-i386_sigtramp_saved_sp (struct frame_info *frame)
+i386_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR addr;
-
- addr = tdep->sigcontext_addr (frame);
- return read_memory_unsigned_integer (addr + tdep->sc_sp_offset, 4);
-}
-
-/* Return the saved program counter for FRAME. */
-
-static CORE_ADDR
-i386_frame_saved_pc (struct frame_info *frame)
-{
- if (pc_in_dummy_frame (get_frame_pc (frame)))
+ if (cache->locals >= 0)
{
- ULONGEST pc;
-
- frame_unwind_unsigned_register (frame, PC_REGNUM, &pc);
- return pc;
- }
+ CORE_ADDR offset;
+ unsigned char op;
+ int i;
- if (get_frame_type (frame) == SIGTRAMP_FRAME)
- return i386_sigtramp_saved_pc (frame);
+ offset = - 4 - cache->locals;
+ for (i = 0; i < 8 && pc < current_pc; i++)
+ {
+ op = read_memory_unsigned_integer (pc, 1);
+ if (op < 0x50 || op > 0x57)
+ break;
- if (i386_frameless_signal_p (frame))
- {
- CORE_ADDR sp = i386_sigtramp_saved_sp (get_next_frame (frame));
- return read_memory_unsigned_integer (sp, 4);
+ cache->saved_regs[op - 0x50] = offset;
+ offset -= 4;
+ pc++;
+ }
}
- return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
+ return pc;
}
-/* Immediately after a function call, return the saved pc. */
+/* Do a full analysis of the prologue at PC and update CACHE
+ accordingly. Bail out early if CURRENT_PC is reached. Return the
+ address where the analysis stopped.
-static CORE_ADDR
-i386_saved_pc_after_call (struct frame_info *frame)
-{
- if (get_frame_type (frame) == SIGTRAMP_FRAME)
- return i386_sigtramp_saved_pc (frame);
-
- return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
-}
-
-/* Parse the first few instructions the function to see what registers
- were stored.
-
We handle these cases:
The startup sequence can be at the start of the function, or the
@@ -632,79 +583,43 @@ i386_saved_pc_after_call (struct frame_info *frame)
If the setup sequence is at the end of the function, then the next
instruction will be a branch back to the start. */
-static void
-i386_frame_init_saved_regs (struct frame_info *fip)
+static CORE_ADDR
+i386_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
{
- long locals = -1;
- unsigned char op;
- CORE_ADDR addr;
- CORE_ADDR pc;
- int i;
-
- if (get_frame_saved_regs (fip))
- return;
-
- frame_saved_regs_zalloc (fip);
-
- pc = get_frame_func (fip);
- if (pc != 0)
- locals = i386_get_frame_setup (pc);
-
- if (locals >= 0)
- {
- addr = get_frame_base (fip) - 4 - locals;
- for (i = 0; i < 8; i++)
- {
- op = codestream_get ();
- if (op < 0x50 || op > 0x57)
- break;
-#ifdef I386_REGNO_TO_SYMMETRY
- /* Dynix uses different internal numbering. Ick. */
- get_frame_saved_regs (fip)[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
-#else
- get_frame_saved_regs (fip)[op - 0x50] = addr;
-#endif
- addr -= 4;
- }
- }
-
- get_frame_saved_regs (fip)[PC_REGNUM] = get_frame_base (fip) + 4;
- get_frame_saved_regs (fip)[DEPRECATED_FP_REGNUM] = get_frame_base (fip);
+ pc = i386_follow_jump (pc);
+ pc = i386_analyze_struct_return (pc, current_pc, cache);
+ pc = i386_skip_probe (pc);
+ pc = i386_analyze_frame_setup (pc, current_pc, cache);
+ return i386_analyze_register_saves (pc, current_pc, cache);
}
/* Return PC of first real instruction. */
static CORE_ADDR
-i386_skip_prologue (CORE_ADDR pc)
+i386_skip_prologue (CORE_ADDR start_pc)
{
- unsigned char op;
- int i;
static unsigned char pic_pat[6] =
- { 0xe8, 0, 0, 0, 0, /* call 0x0 */
- 0x5b, /* popl %ebx */
+ {
+ 0xe8, 0, 0, 0, 0, /* call 0x0 */
+ 0x5b, /* popl %ebx */
};
- CORE_ADDR pos;
+ struct i386_frame_cache cache;
+ CORE_ADDR pc;
+ unsigned char op;
+ int i;
- if (i386_get_frame_setup (pc) < 0)
- return (pc);
+ cache.locals = -1;
+ pc = i386_analyze_prologue (start_pc, 0xffffffff, &cache);
+ if (cache.locals < 0)
+ return start_pc;
- /* Found valid frame setup -- codestream now points to start of push
- instructions for saving registers. */
-
- /* Skip over register saves. */
- for (i = 0; i < 8; i++)
- {
- op = codestream_peek ();
- /* Break if not `pushl' instrunction. */
- if (op < 0x50 || op > 0x57)
- break;
- codestream_get ();
- }
+ /* Found valid frame setup. */
/* The native cc on SVR4 in -K PIC mode inserts the following code
to get the address of the global offset table (GOT) into register
- %ebx
-
+ %ebx:
+
call 0x0
popl %ebx
movl %ebx,x(%ebp) (optional)
@@ -714,110 +629,350 @@ i386_skip_prologue (CORE_ADDR pc)
function), so we have to skip it to get to the first real
instruction at the start of the function. */
- pos = codestream_tell ();
for (i = 0; i < 6; i++)
{
- op = codestream_get ();
+ op = read_memory_unsigned_integer (pc + i, 1);
if (pic_pat[i] != op)
break;
}
if (i == 6)
{
- unsigned char buf[4];
- long delta = 6;
+ int delta = 6;
+
+ op = read_memory_unsigned_integer (pc + delta, 1);
- op = codestream_get ();
if (op == 0x89) /* movl %ebx, x(%ebp) */
{
- op = codestream_get ();
+ op = read_memory_unsigned_integer (pc + delta + 1, 1);
+
if (op == 0x5d) /* One byte offset from %ebp. */
- {
- delta += 3;
- codestream_read (buf, 1);
- }
+ delta += 3;
else if (op == 0x9d) /* Four byte offset from %ebp. */
- {
- delta += 6;
- codestream_read (buf, 4);
- }
+ delta += 6;
else /* Unexpected instruction. */
- delta = -1;
- op = codestream_get ();
+ delta = 0;
+
+ op = read_memory_unsigned_integer (pc + delta, 1);
}
+
/* addl y,%ebx */
- if (delta > 0 && op == 0x81 && codestream_get () == 0xc3)
+ if (delta > 0 && op == 0x81
+ && read_memory_unsigned_integer (pc + delta + 1, 1) == 0xc3);
{
- pos += delta + 6;
+ pc += delta + 6;
}
}
- codestream_seek (pos);
- i386_follow_jump ();
-
- return (codestream_tell ());
+ return i386_follow_jump (pc);
}
-/* Use the program counter to determine the contents and size of a
- breakpoint instruction. Return a pointer to a string of bytes that
- encode a breakpoint instruction, store the length of the string in
- *LEN and optionally adjust *PC to point to the correct memory
- location for inserting the breakpoint.
+/* This function is 64-bit safe. */
- On the i386 we have a single breakpoint that fits in a single byte
- and can be inserted anywhere. */
-
-static const unsigned char *
-i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
+static CORE_ADDR
+i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- static unsigned char break_insn[] = { 0xcc }; /* int 3 */
-
- *len = sizeof (break_insn);
- return break_insn;
+ char buf[8];
+
+ frame_unwind_register (next_frame, PC_REGNUM, buf);
+ return extract_typed_address (buf, builtin_type_void_func_ptr);
}
+
-/* Push the return address (pointing to the call dummy) onto the stack
- and return the new value for the stack pointer. */
+/* Normal frames. */
-static CORE_ADDR
-i386_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+static struct i386_frame_cache *
+i386_frame_cache (struct frame_info *next_frame, void **this_cache)
{
+ struct i386_frame_cache *cache;
char buf[4];
+ int i;
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = i386_alloc_frame_cache ();
+ *this_cache = cache;
+
+ /* In principle, for normal frames, %ebp holds the frame pointer,
+ which holds the base address for the current stack frame.
+ However, for functions that don't need it, the frame pointer is
+ optional. For these "frameless" functions the frame pointer is
+ actually the frame pointer of the calling frame. Signal
+ trampolines are just a special case of a "frameless" function.
+ They (usually) share their frame pointer with the frame that was
+ in progress when the signal occurred. */
+
+ frame_unwind_register (next_frame, I386_EBP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 4);
+ if (cache->base == 0)
+ return cache;
+
+ /* For normal frames, %eip is stored at 4(%ebp). */
+ cache->saved_regs[I386_EIP_REGNUM] = 4;
+
+ cache->pc = frame_func_unwind (next_frame);
+ if (cache->pc != 0)
+ i386_analyze_prologue (cache->pc, frame_pc_unwind (next_frame), cache);
+
+ if (cache->locals < 0)
+ {
+ /* We didn't find a valid frame, which means that CACHE->base
+ currently holds the frame pointer for our calling frame. If
+ we're at the start of a function, or somewhere half-way its
+ prologue, the function's frame probably hasn't been fully
+ setup yet. Try to reconstruct the base address for the stack
+ frame by looking at the stack pointer. For truly "frameless"
+ functions this might work too. */
+
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
+ }
+
+ /* Now that we have the base address for the stack frame we can
+ calculate the value of %esp in the calling frame. */
+ cache->saved_sp = cache->base + 8;
- store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 4, buf, 4);
- return sp - 4;
+ /* Adjust all the saved registers such that they contain addresses
+ instead of offsets. */
+ for (i = 0; i < I386_NUM_SAVED_REGS; i++)
+ if (cache->saved_regs[i] != -1)
+ cache->saved_regs[i] += cache->base;
+
+ return cache;
}
static void
-i386_do_pop_frame (struct frame_info *frame)
+i386_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
{
- CORE_ADDR fp;
- int regnum;
- char regbuf[I386_MAX_REGISTER_SIZE];
+ struct i386_frame_cache *cache = i386_frame_cache (next_frame, this_cache);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
+
+ /* See the end of i386_push_dummy_call. */
+ (*this_id) = frame_id_build (cache->base + 8, cache->pc);
+}
+
+static void
+i386_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ struct i386_frame_cache *cache = i386_frame_cache (next_frame, this_cache);
+
+ gdb_assert (regnum >= 0);
+
+ /* The System V ABI says that:
- fp = get_frame_base (frame);
- i386_frame_init_saved_regs (frame);
+ "The flags register contains the system flags, such as the
+ direction flag and the carry flag. The direction flag must be
+ set to the forward (that is, zero) direction before entry and
+ upon exit from a function. Other user flags have no specified
+ role in the standard calling sequence and are not preserved."
- for (regnum = 0; regnum < NUM_REGS; regnum++)
+ To guarantee the "upon exit" part of that statement we fake a
+ saved flags register that has its direction flag cleared.
+
+ Note that GCC doesn't seem to rely on the fact that the direction
+ flag is cleared after a function return; it always explicitly
+ clears the flag before operations where it matters.
+
+ FIXME: kettenis/20030316: I'm not quite sure whether this is the
+ right thing to do. The way we fake the flags register here makes
+ it impossible to change it. */
+
+ if (regnum == I386_EFLAGS_REGNUM)
{
- CORE_ADDR addr;
- addr = get_frame_saved_regs (frame)[regnum];
- if (addr)
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
{
- read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
- deprecated_write_register_gen (regnum, regbuf);
+ ULONGEST val;
+
+ /* Clear the direction flag. */
+ frame_unwind_unsigned_register (next_frame, PS_REGNUM, &val);
+ val &= ~(1 << 10);
+ store_unsigned_integer (valuep, 4, val);
}
+
+ return;
}
- write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4));
- write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
- write_register (SP_REGNUM, fp + 8);
- flush_cached_frames ();
+
+ if (regnum == I386_EIP_REGNUM && cache->pc_in_eax)
+ {
+ frame_register_unwind (next_frame, I386_EAX_REGNUM,
+ optimizedp, lvalp, addrp, realnump, valuep);
+ return;
+ }
+
+ if (regnum == I386_ESP_REGNUM && cache->saved_sp)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_unsigned_integer (valuep, 4, cache->saved_sp);
+ }
+ return;
+ }
+
+ if (regnum < I386_NUM_SAVED_REGS && cache->saved_regs[regnum] != -1)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->saved_regs[regnum];
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ return;
+ }
+
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind i386_frame_unwind =
+{
+ NORMAL_FRAME,
+ i386_frame_this_id,
+ i386_frame_prev_register
+};
+
+static const struct frame_unwind *
+i386_frame_p (CORE_ADDR pc)
+{
+ return &i386_frame_unwind;
+}
+
+
+/* Signal trampolines. */
+
+static struct i386_frame_cache *
+i386_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct i386_frame_cache *cache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR addr;
+ char buf[4];
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = i386_alloc_frame_cache ();
+
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 4) - 4;
+
+ addr = tdep->sigcontext_addr (next_frame);
+ if (tdep->sc_reg_offset)
+ {
+ int i;
+
+ gdb_assert (tdep->sc_num_regs <= I386_NUM_SAVED_REGS);
+
+ for (i = 0; i < tdep->sc_num_regs; i++)
+ if (tdep->sc_reg_offset[i] != -1)
+ cache->saved_regs[i] = addr + tdep->sc_reg_offset[i];
+ }
+ else
+ {
+ cache->saved_regs[I386_EIP_REGNUM] = addr + tdep->sc_pc_offset;
+ cache->saved_regs[I386_ESP_REGNUM] = addr + tdep->sc_sp_offset;
+ }
+
+ *this_cache = cache;
+ return cache;
+}
+
+static void
+i386_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct i386_frame_cache *cache =
+ i386_sigtramp_frame_cache (next_frame, this_cache);
+
+ /* See the end of i386_push_dummy_call. */
+ (*this_id) = frame_id_build (cache->base + 8, frame_pc_unwind (next_frame));
}
static void
-i386_pop_frame (void)
+i386_sigtramp_frame_prev_register (struct frame_info *next_frame,
+ void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ /* Make sure we've initialized the cache. */
+ i386_sigtramp_frame_cache (next_frame, this_cache);
+
+ i386_frame_prev_register (next_frame, this_cache, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind i386_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ i386_sigtramp_frame_this_id,
+ i386_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+i386_sigtramp_frame_p (CORE_ADDR pc)
+{
+ char *name;
+
+ /* We shouldn't even bother to try if the OSABI didn't register
+ a sigcontext_addr handler. */
+ if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr)
+ return NULL;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return &i386_sigtramp_frame_unwind;
+
+ return NULL;
+}
+
+
+static CORE_ADDR
+i386_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct i386_frame_cache *cache = i386_frame_cache (next_frame, this_cache);
+
+ return cache->base;
+}
+
+static const struct frame_base i386_frame_base =
+{
+ &i386_frame_unwind,
+ i386_frame_base_address,
+ i386_frame_base_address,
+ i386_frame_base_address
+};
+
+static struct frame_id
+i386_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- generic_pop_current_frame (i386_do_pop_frame);
+ char buf[4];
+ CORE_ADDR fp;
+
+ frame_unwind_register (next_frame, I386_EBP_REGNUM, buf);
+ fp = extract_unsigned_integer (buf, 4);
+
+ /* See the end of i386_push_dummy_call. */
+ return frame_id_build (fp + 8, frame_pc_unwind (next_frame));
}
@@ -825,7 +980,9 @@ i386_pop_frame (void)
stack. We expect the first arg to be a pointer to the jmp_buf
structure from which we extract the address that we will land at.
This address is copied into PC. This routine returns non-zero on
- success. */
+ success.
+
+ This function is 64-bit safe. */
static int
i386_get_longjmp_target (CORE_ADDR *pc)
@@ -854,28 +1011,67 @@ i386_get_longjmp_target (CORE_ADDR *pc)
static CORE_ADDR
-i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
- sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
-
- if (struct_return)
+ char buf[4];
+ int i;
+
+ /* Push arguments in reverse order. */
+ for (i = nargs - 1; i >= 0; i--)
{
- char buf[4];
+ int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (args[i]));
+
+ /* The System V ABI says that:
+
+ "An argument's size is increased, if necessary, to make it a
+ multiple of [32-bit] words. This may require tail padding,
+ depending on the size of the argument."
+ This makes sure the stack says word-aligned. */
+ sp -= (len + 3) & ~3;
+ write_memory (sp, VALUE_CONTENTS_ALL (args[i]), len);
+ }
+
+ /* Push value address. */
+ if (struct_return)
+ {
sp -= 4;
store_unsigned_integer (buf, 4, struct_addr);
write_memory (sp, buf, 4);
}
- return sp;
+ /* Store return address. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, bp_addr);
+ write_memory (sp, buf, 4);
+
+ /* Finally, update the stack pointer... */
+ store_unsigned_integer (buf, 4, sp);
+ regcache_cooked_write (regcache, I386_ESP_REGNUM, buf);
+
+ /* ...and fake a frame pointer. */
+ regcache_cooked_write (regcache, I386_EBP_REGNUM, buf);
+
+ /* MarkK wrote: This "+ 8" is all over the place:
+ (i386_frame_this_id, i386_sigtramp_frame_this_id,
+ i386_unwind_dummy_id). It's there, since all frame unwinders for
+ a given target have to agree (within a certain margin) on the
+ defenition of the stack address of a frame. Otherwise
+ frame_id_inner() won't work correctly. Since DWARF2/GCC uses the
+ stack address *before* the function call as a frame's CFA. On
+ the i386, when %ebp is used as a frame pointer, the offset
+ between the contents %ebp and the CFA as defined by GCC. */
+ return sp + 8;
}
/* These registers are used for returning integers (and on some
targets also for returning `struct' and `union' values when their
size and alignment match an integer type). */
-#define LOW_RETURN_REGNUM 0 /* %eax */
-#define HIGH_RETURN_REGNUM 2 /* %edx */
+#define LOW_RETURN_REGNUM I386_EAX_REGNUM /* %eax */
+#define HIGH_RETURN_REGNUM I386_EDX_REGNUM /* %edx */
/* Extract from an array REGBUF containing the (raw) register state, a
function return value of TYPE, and copy that, in virtual format,
@@ -909,7 +1105,7 @@ i386_extract_return_value (struct type *type, struct regcache *regcache,
its contents to the desired type. This is probably not
exactly how it would happen on the target itself, but it is
the best we can do. */
- regcache_raw_read (regcache, FP0_REGNUM, buf);
+ regcache_raw_read (regcache, I386_ST0_REGNUM, buf);
convert_typed_floating (buf, builtin_type_i387_ext, valbuf, type);
}
else
@@ -971,7 +1167,7 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
not exactly how it would happen on the target itself, but
it is the best we can do. */
convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
- regcache_raw_write (regcache, FP0_REGNUM, buf);
+ regcache_raw_write (regcache, I386_ST0_REGNUM, buf);
/* Set the top of the floating-point register stack to 7. The
actual value doesn't really matter, but 7 is what a normal
@@ -1012,10 +1208,10 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
static CORE_ADDR
i386_extract_struct_value_address (struct regcache *regcache)
{
- ULONGEST addr;
+ char buf[4];
- regcache_raw_read_unsigned (regcache, LOW_RETURN_REGNUM, &addr);
- return addr;
+ regcache_cooked_read (regcache, I386_EAX_REGNUM, buf);
+ return extract_unsigned_integer (buf, 4);
}
@@ -1057,7 +1253,8 @@ i386_use_struct_convention (int gcc_p, struct type *type)
static struct type *
i386_register_type (struct gdbarch *gdbarch, int regnum)
{
- if (regnum == PC_REGNUM || regnum == DEPRECATED_FP_REGNUM || regnum == SP_REGNUM)
+ if (regnum == I386_EIP_REGNUM
+ || regnum == I386_EBP_REGNUM || regnum == I386_ESP_REGNUM)
return lookup_pointer_type (builtin_type_void);
if (i386_fp_regnum_p (regnum))
@@ -1073,7 +1270,7 @@ i386_register_type (struct gdbarch *gdbarch, int regnum)
}
/* Map a cooked register onto a raw register or memory. For the i386,
- the MMX registers need to be mapped onto floating-point registers. */
+ the MMX registers need to be mapped onto floating point registers. */
static int
i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
@@ -1168,7 +1365,7 @@ i386_register_convert_to_virtual (int regnum, struct type *type,
static void
i386_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
+ const char *from, char *to)
{
gdb_assert (i386_fp_regnum_p (regnum));
@@ -1274,36 +1471,27 @@ i386_print_insn (bfd_vma pc, disassemble_info *info)
static int
i386_svr4_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
+ /* UnixWare uses _sigacthandler. The origin of the other symbols is
+ currently unknown. */
return (name && (strcmp ("_sigreturn", name) == 0
|| strcmp ("_sigacthandler", name) == 0
|| strcmp ("sigvechandler", name) == 0));
}
-/* Get address of the pushed ucontext (sigcontext) on the stack for
- all three variants of SVR4 sigtramps. */
+/* Assuming NEXT_FRAME is for a frame following a SVR4 sigtramp
+ routine, return the address of the associated sigcontext (ucontext)
+ structure. */
static CORE_ADDR
-i386_svr4_sigcontext_addr (struct frame_info *frame)
+i386_svr4_sigcontext_addr (struct frame_info *next_frame)
{
- int sigcontext_offset = -1;
- char *name = NULL;
-
- find_pc_partial_function (get_frame_pc (frame), &name, NULL, NULL);
- if (name)
- {
- if (strcmp (name, "_sigreturn") == 0)
- sigcontext_offset = 132;
- else if (strcmp (name, "_sigacthandler") == 0)
- sigcontext_offset = 80;
- else if (strcmp (name, "sigvechandler") == 0)
- sigcontext_offset = 120;
- }
+ char buf[4];
+ CORE_ADDR sp;
- gdb_assert (sigcontext_offset != -1);
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- if (get_next_frame (frame))
- return get_frame_base (get_next_frame (frame)) + sigcontext_offset;
- return read_register (SP_REGNUM) + sigcontext_offset;
+ return read_memory_unsigned_integer (sp + 8, 4);
}
@@ -1342,8 +1530,8 @@ i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
- tdep->sc_pc_offset = 14 * 4;
- tdep->sc_sp_offset = 7 * 4;
+ tdep->sc_pc_offset = 36 + 14 * 4;
+ tdep->sc_sp_offset = 36 + 17 * 4;
tdep->jb_pc_offset = 20;
}
@@ -1407,6 +1595,7 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
int fp_regnum_p = (i386_fp_regnum_p (regnum)
|| i386_fpc_regnum_p (regnum));
int mmx_regnum_p = (i386_mmx_regnum_p (regnum));
+
if (group == i386_mmx_reggroup)
return mmx_regnum_p;
if (group == i386_sse_reggroup)
@@ -1417,8 +1606,20 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
return fp_regnum_p;
if (group == general_reggroup)
return (!fp_regnum_p && !mmx_regnum_p && !sse_regnum_p);
+
return default_register_reggroup_p (gdbarch, regnum, group);
}
+
+
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+i386_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR stack;
+ frame_read_register (frame, SP_REGNUM, &stack);
+ return read_memory_unsigned_integer (stack + (4 * (argi + 1)), 4);
+}
static struct gdbarch *
@@ -1436,10 +1637,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
- /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
- ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
-
/* The i386 default settings don't include the SSE registers.
FIXME: kettenis/20020614: They do include the FPU registers for
now, which probably is not quite right. */
@@ -1450,6 +1647,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->sigtramp_start = 0;
tdep->sigtramp_end = 0;
tdep->sigcontext_addr = NULL;
+ tdep->sc_reg_offset = NULL;
tdep->sc_pc_offset = -1;
tdep->sc_sp_offset = -1;
@@ -1464,15 +1662,17 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
alignment. */
set_gdbarch_long_double_bit (gdbarch, 96);
- /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-ptx.h,
- tm-symmetry.h currently override this. Sigh. */
+ /* The default ABI includes general-purpose registers and
+ floating-point registers. */
set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS);
+ set_gdbarch_register_name (gdbarch, i386_register_name);
+ set_gdbarch_register_type (gdbarch, i386_register_type);
- set_gdbarch_sp_regnum (gdbarch, 4); /* %esp */
- set_gdbarch_deprecated_fp_regnum (gdbarch, 5); /* %ebp */
- set_gdbarch_pc_regnum (gdbarch, 8); /* %eip */
- set_gdbarch_ps_regnum (gdbarch, 9); /* %eflags */
- set_gdbarch_fp0_regnum (gdbarch, 16); /* %st(0) */
+ /* Register numbers of various important registers. */
+ set_gdbarch_sp_regnum (gdbarch, I386_ESP_REGNUM); /* %esp */
+ set_gdbarch_pc_regnum (gdbarch, I386_EIP_REGNUM); /* %eip */
+ set_gdbarch_ps_regnum (gdbarch, I386_EFLAGS_REGNUM); /* %eflags */
+ set_gdbarch_fp0_regnum (gdbarch, I386_ST0_REGNUM); /* %st(0) */
/* Use the "default" register numbering scheme for stabs and COFF. */
set_gdbarch_stab_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
@@ -1485,39 +1685,23 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
be in use on any of the supported i386 targets. */
- set_gdbarch_register_name (gdbarch, i386_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_deprecated_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
- set_gdbarch_register_type (gdbarch, i386_register_type);
-
set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
/* Call dummy code. */
- set_gdbarch_deprecated_call_dummy_words (gdbarch, NULL);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_push_dummy_call (gdbarch, i386_push_dummy_call);
- set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- i386_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
-
- /* "An argument's size is increased, if necessary, to make it a
- multiple of [32-bit] words. This may require tail padding,
- depending on the size of the argument" -- from the x86 ABI. */
- set_gdbarch_parm_boundary (gdbarch, 32);
+ set_gdbarch_deprecated_register_convertible (gdbarch, i386_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, i386_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
- set_gdbarch_deprecated_push_arguments (gdbarch, i386_push_arguments);
- set_gdbarch_deprecated_push_return_address (gdbarch, i386_push_return_address);
- set_gdbarch_deprecated_pop_frame (gdbarch, i386_pop_frame);
set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
/* Stack grows downward. */
@@ -1527,18 +1711,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_function_start_offset (gdbarch, 0);
- /* The following redefines make backtracing through sigtramp work.
- They manufacture a fake sigtramp frame and obtain the saved pc in
- sigtramp from the sigcontext structure which is pushed by the
- kernel on the user stack, along with a pointer to it. */
-
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_frameless_function_invocation (gdbarch,
- i386_frameless_function_invocation);
- set_gdbarch_deprecated_frame_chain (gdbarch, i386_frame_chain);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, i386_frame_saved_pc);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
/* Wire in the MMX registers. */
@@ -1548,16 +1721,29 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_print_insn (gdbarch, i386_print_insn);
+ set_gdbarch_unwind_dummy_id (gdbarch, i386_unwind_dummy_id);
+
+ set_gdbarch_unwind_pc (gdbarch, i386_unwind_pc);
+
/* Add the i386 register groups. */
i386_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
+
+ /* Hook in the DWARF CFI frame unwinder. */
+ frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
+ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
+
+ frame_base_set_default (gdbarch, &i386_frame_base);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
+ frame_unwind_append_predicate (gdbarch, i386_sigtramp_frame_p);
+ frame_unwind_append_predicate (gdbarch, i386_frame_p);
+
return gdbarch;
}
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 1b569d924dd..38eac2004e8 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -71,7 +71,12 @@ struct gdbarch_tdep
/* Get address of sigcontext for sigtramp. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
- /* Offset of saved PC and SP in `struct sigcontext'. */
+ /* Offset of registers in `struct sigcontext'. */
+ int *sc_reg_offset;
+ int sc_num_regs;
+
+ /* Offset of saved PC and SP in `struct sigcontext'. Usage of these
+ is deprecated, please use `sc_reg_offset' instead. */
int sc_pc_offset;
int sc_sp_offset;
};
@@ -136,8 +141,16 @@ extern int i386_mxcsr_regnum_p (int regnum);
#define FCOFF_REGNUM FIOFF_REGNUM
#define FDS_REGNUM FOSEG_REGNUM
#define FDOFF_REGNUM FOOFF_REGNUM
-#define IS_FP_REGNUM(n) i386_fp_regnum_p (n)
-#define IS_SSE_REGNUM(n) i386_sse_regnum_p (n)
+
+/* Register numbers of various important registers. */
+
+#define I386_EAX_REGNUM 0 /* %eax */
+#define I386_EDX_REGNUM 2 /* %edx */
+#define I386_ESP_REGNUM 4 /* %esp */
+#define I386_EBP_REGNUM 5 /* %ebp */
+#define I386_EIP_REGNUM 8 /* %eip */
+#define I386_EFLAGS_REGNUM 9 /* %eflags */
+#define I386_ST0_REGNUM 16 /* %st(0) */
#define I386_NUM_GREGS 16
#define I386_NUM_FREGS 16
@@ -146,16 +159,6 @@ extern int i386_mxcsr_regnum_p (int regnum);
#define I386_SSE_NUM_REGS (I386_NUM_GREGS + I386_NUM_FREGS \
+ I386_NUM_XREGS)
-/* Sizes of individual register sets. These cover the entire register
- file, so summing up the sizes of those portions actually present
- yields DEPRECATED_REGISTER_BYTES. */
-#define I386_SIZEOF_GREGS (I386_NUM_GREGS * 4)
-#define I386_SIZEOF_FREGS (8 * 10 + 8 * 4)
-#define I386_SIZEOF_XREGS (8 * 16 + 4)
-
-#define I386_SSE_SIZEOF_REGS (I386_SIZEOF_GREGS + I386_SIZEOF_FREGS \
- + I386_SIZEOF_XREGS)
-
/* Size of the largest register. */
#define I386_MAX_REGISTER_SIZE 16
@@ -178,7 +181,6 @@ extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
/* Functions exported from i386bsd-tdep.c. */
-extern CORE_ADDR i386bsd_sigcontext_addr (struct frame_info *frame);
extern void i386bsd_init_abi (struct gdbarch_info, struct gdbarch *);
#endif /* i386-tdep.h */
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index ec38e135717..60524de148e 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -386,8 +386,7 @@ kernel_u_size (void)
void
_initialize_i386bsd_nat (void)
{
- int sc_pc_offset;
- int sc_sp_offset;
+ int offset;
/* To support the recognition of signal handlers, i386bsd-tdep.c
hardcodes some constants. Inclusion of this file means that we
@@ -396,51 +395,69 @@ _initialize_i386bsd_nat (void)
information. */
#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
- extern int i386fbsd4_sc_pc_offset;
- extern int i386fbsd4_sc_sp_offset;
-#define SC_PC_OFFSET i386fbsd4_sc_pc_offset
-#define SC_SP_OFFSET i386fbsd4_sc_sp_offset
+ extern int i386fbsd4_sc_reg_offset[];
+#define SC_REG_OFFSET i386fbsd4_sc_reg_offset
+#elif defined (__FreeBSD_version) && __FreeBSD_version >= 300005
+ extern int i386fbsd_sc_reg_offset[];
+#define SC_REG_OFFSET i386fbsd_sc_reg_offset
#elif defined (NetBSD) || defined (__NetBSD_Version__)
- extern int i386nbsd_sc_pc_offset;
- extern int i386nbsd_sc_sp_offset;
-#define SC_PC_OFFSET i386nbsd_sc_pc_offset
-#define SC_SP_OFFSET i386nbsd_sc_sp_offset
+ extern int i386nbsd_sc_reg_offset[];
+#define SC_REG_OFFSET i386nbsd_sc_reg_offset
#elif defined (OpenBSD)
- extern int i386obsd_sc_pc_offset;
- extern int i386obsd_sc_sp_offset;
-#define SC_PC_OFFSET i386obsd_sc_pc_offset
-#define SC_SP_OFFSET i386obsd_sc_sp_offset
+ extern int i386obsd_sc_reg_offset[];
+#define SC_REG_OFFSET i386obsd_sc_reg_offset
#else
- extern int i386bsd_sc_pc_offset;
- extern int i386bsd_sc_sp_offset;
-#define SC_PC_OFFSET i386bsd_sc_pc_offset
-#define SC_SP_OFFSET i386bsd_sc_sp_offset
+ extern int i386bsd_sc_reg_offset[];
+#define SC_PC_OFFSET i386bsd_sc_reg_offset
#endif
+ /* We only check the program counter, stack pointer and frame
+ pointer since these members of `struct sigcontext' are essential
+ for providing backtraces. More checks could be added, but would
+ involve adding configure checks for the appropriate structure
+ members, since older BSD's don't provide all of them. */
+
+#define SC_PC_OFFSET SC_REG_OFFSET[I386_EIP_REGNUM]
+#define SC_SP_OFFSET SC_REG_OFFSET[I386_ESP_REGNUM]
+#define SC_FP_OFFSET SC_REG_OFFSET[I386_EBP_REGNUM]
+
/* Override the default value for the offset of the program counter
in the sigcontext structure. */
- sc_pc_offset = offsetof (struct sigcontext, sc_pc);
+ offset = offsetof (struct sigcontext, sc_pc);
- if (SC_PC_OFFSET != sc_pc_offset)
+ if (SC_PC_OFFSET != offset)
{
warning ("\
offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>.",
- sc_pc_offset, SC_PC_OFFSET);
+Please report this to <bug-gdb@gnu.org>.",
+ offset, SC_PC_OFFSET);
}
- SC_PC_OFFSET = sc_pc_offset;
+ SC_PC_OFFSET = offset;
/* Likewise for the stack pointer. */
- sc_sp_offset = offsetof (struct sigcontext, sc_sp);
+ offset = offsetof (struct sigcontext, sc_sp);
- if (SC_SP_OFFSET != sc_sp_offset)
+ if (SC_SP_OFFSET != offset)
{
warning ("\
offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\
Please report this to <bug-gdb@gnu.org>.",
- sc_sp_offset, SC_SP_OFFSET);
+ offset, SC_SP_OFFSET);
+ }
+
+ SC_SP_OFFSET = offset;
+
+ /* And the frame pointer. */
+ offset = offsetof (struct sigcontext, sc_fp);
+
+ if (SC_FP_OFFSET != offset)
+ {
+ warning ("\
+offsetof (struct sigcontext, sc_fp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>.",
+ offset, SC_FP_OFFSET);
}
- SC_SP_OFFSET = sc_sp_offset;
+ SC_FP_OFFSET = offset;
}
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index c0c544de52d..94d68600fee 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -41,26 +41,19 @@ i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
return (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end);
}
-/* Assuming FRAME is for a BSD sigtramp routine, return the address of
- the associated sigcontext structure.
+/* Assuming NEXT_FRAME is for a frame following a BSD sigtramp
+ routine, return the address of the associated sigcontext structure. */
- Note: This function is used for Solaris 2 too, so don't make it
- static. */
-
-CORE_ADDR
-i386bsd_sigcontext_addr (struct frame_info *frame)
+static CORE_ADDR
+i386bsd_sigcontext_addr (struct frame_info *next_frame)
{
- struct frame_info *next_frame = get_next_frame (frame);
+ char buf[4];
+ CORE_ADDR sp;
- if (next_frame)
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. A pointer to the sigcontext structure
- is passed as the third argument to the signal handler. */
- return read_memory_unsigned_integer (get_frame_base (next_frame) + 16, 4);
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- /* This is the top frame. We'll have to find the address of the
- sigcontext structure by looking at the stack pointer. */
- return read_memory_unsigned_integer (read_register (SP_REGNUM) + 8, 4);
+ return read_memory_unsigned_integer (sp + 8, 4);
}
/* Return the start address of the sigtramp routine. */
@@ -93,8 +86,25 @@ i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD). */
/* From <machine/signal.h>. */
-int i386bsd_sc_pc_offset = 20;
-int i386bsd_sc_sp_offset = 8;
+int i386bsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ -1, /* %eax */
+ -1, /* %ecx */
+ -1, /* %edx */
+ -1, /* %ebx */
+ 8 + 0 * 4, /* %esp */
+ 8 + 1 * 4, /* %ebp */
+ -1, /* %esi */
+ -1, /* %edi */
+ 8 + 3 * 4, /* %eip */
+ 8 + 4 * 4, /* %eflags */
+ -1, /* %cs */
+ -1, /* %ss */
+ -1, /* %ds */
+ -1, /* %es */
+ -1, /* %fs */
+ -1 /* %gs */
+};
void
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -116,8 +126,8 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigtramp_start = 0xfdbfdfc0;
tdep->sigtramp_end = 0xfdbfe000;
tdep->sigcontext_addr = i386bsd_sigcontext_addr;
- tdep->sc_pc_offset = i386bsd_sc_pc_offset;
- tdep->sc_sp_offset = i386bsd_sc_sp_offset;
+ tdep->sc_reg_offset = i386bsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
/* FreeBSD 3.0-RELEASE or later. */
@@ -125,6 +135,27 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
CORE_ADDR i386fbsd_sigtramp_start = 0xbfbfdf20;
CORE_ADDR i386fbsd_sigtramp_end = 0xbfbfdff0;
+/* From <machine/signal.h>. */
+int i386fbsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 8 + 14 * 4, /* %eax */
+ 8 + 13 * 4, /* %ecx */
+ 8 + 12 * 4, /* %edx */
+ 8 + 11 * 4, /* %ebx */
+ 8 + 0 * 4, /* %esp */
+ 8 + 1 * 4, /* %ebp */
+ 8 + 10 * 4, /* %esi */
+ 8 + 9 * 4, /* %edi */
+ 8 + 3 * 4, /* %eip */
+ 8 + 4 * 4, /* %eflags */
+ 8 + 7 * 4, /* %cs */
+ 8 + 8 * 4, /* %ss */
+ 8 + 6 * 4, /* %ds */
+ 8 + 5 * 4, /* %es */
+ 8 + 15 * 4, /* %fs */
+ 8 + 16 * 4 /* %gs */
+};
+
static void
i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -139,6 +170,10 @@ i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* FreeBSD uses a different memory layout. */
tdep->sigtramp_start = i386fbsd_sigtramp_start;
tdep->sigtramp_end = i386fbsd_sigtramp_end;
+
+ /* FreeBSD has a more complete `struct sigcontext'. */
+ tdep->sc_reg_offset = i386fbsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
static void
@@ -158,8 +193,25 @@ i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* FreeBSD 4.0-RELEASE or later. */
/* From <machine/signal.h>. */
-int i386fbsd4_sc_pc_offset = 76;
-int i386fbsd4_sc_sp_offset = 88;
+int i386fbsd4_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 20 + 11 * 4, /* %eax */
+ 20 + 10 * 4, /* %ecx */
+ 20 + 9 * 4, /* %edx */
+ 20 + 8 * 4, /* %ebx */
+ 20 + 17 * 4, /* %esp */
+ 20 + 6 * 4, /* %ebp */
+ 20 + 5 * 4, /* %esi */
+ 20 + 4 * 4, /* %edi */
+ 20 + 14 * 4, /* %eip */
+ 20 + 16 * 4, /* %eflags */
+ 20 + 15 * 4, /* %cs */
+ 20 + 18 * 4, /* %ss */
+ 20 + 3 * 4, /* %ds */
+ 20 + 2 * 4, /* %es */
+ 20 + 1 * 4, /* %fs */
+ 20 + 0 * 4 /* %gs */
+};
static void
i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -171,8 +223,8 @@ i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
i386fbsd_init_abi (info, gdbarch);
/* FreeBSD 4.0 introduced a new `struct sigcontext'. */
- tdep->sc_pc_offset = i386fbsd4_sc_pc_offset;
- tdep->sc_sp_offset = i386fbsd4_sc_sp_offset;
+ tdep->sc_reg_offset = i386fbsd4_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 64b3dc0984e..601530bce25 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -239,8 +239,25 @@ i386nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
/* From <machine/signal.h>. */
-int i386nbsd_sc_pc_offset = 44;
-int i386nbsd_sc_sp_offset = 56;
+int i386nbsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 10 * 4, /* %eax */
+ 9 * 4, /* %ecx */
+ 8 * 4, /* %edx */
+ 7 * 4, /* %ebx */
+ 14 * 4, /* %esp */
+ 6 * 4, /* %ebp */
+ 5 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 11 * 4, /* %eip */
+ 13 * 4, /* %eflags */
+ 12 * 4, /* %cs */
+ 15 * 4, /* %ss */
+ 3 * 4, /* %ds */
+ 2 * 4, /* %es */
+ 1 * 4, /* %fs */
+ 0 * 4 /* %gs */
+};
static void
i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -263,8 +280,8 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* NetBSD has a `struct sigcontext' that's different from the
origional 4.3 BSD. */
- tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
- tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
+ tdep->sc_reg_offset = i386nbsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
/* NetBSD ELF. */
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index be0c674493b..7db076d3a3e 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -83,8 +83,25 @@ CORE_ADDR i386obsd_sigtramp_start = 0xbfbfdf20;
CORE_ADDR i386obsd_sigtramp_end = 0xbfbfdff0;
/* From <machine/signal.h>. */
-int i386obsd_sc_pc_offset = 44;
-int i386obsd_sc_sp_offset = 56;
+int i386obsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 10 * 4, /* %eax */
+ 9 * 4, /* %ecx */
+ 8 * 4, /* %edx */
+ 7 * 4, /* %ebx */
+ 14 * 4, /* %esp */
+ 6 * 4, /* %ebp */
+ 5 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 11 * 4, /* %eip */
+ 13 * 4, /* %eflags */
+ 12 * 4, /* %cs */
+ 15 * 4, /* %ss */
+ 3 * 4, /* %ds */
+ 2 * 4, /* %es */
+ 1 * 4, /* %fs */
+ 0 * 4 /* %gs */
+};
static void
i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -103,8 +120,8 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* OpenBSD has a `struct sigcontext' that's different from the
origional 4.3 BSD. */
- tdep->sc_pc_offset = i386obsd_sc_pc_offset;
- tdep->sc_sp_offset = i386obsd_sc_sp_offset;
+ tdep->sc_reg_offset = i386obsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
void
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a898f5211ab..b3290da1767 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -28,7 +28,7 @@
#include "regcache.h"
#include "doublest.h"
#include "value.h"
-
+#include "gdb_assert.h"
#include "objfiles.h"
#include "elf/common.h" /* for DT_PLTGOT value */
#include "elf-bfd.h"
@@ -86,10 +86,6 @@ extern CORE_ADDR ia64_aix_sigcontext_register_address (CORE_ADDR, int);
static gdbarch_init_ftype ia64_gdbarch_init;
static gdbarch_register_name_ftype ia64_register_name;
-static gdbarch_register_raw_size_ftype ia64_register_raw_size;
-static gdbarch_register_virtual_size_ftype ia64_register_virtual_size;
-static gdbarch_register_virtual_type_ftype ia64_register_virtual_type;
-static gdbarch_register_byte_ftype ia64_register_byte;
static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc;
static gdbarch_skip_prologue_ftype ia64_skip_prologue;
static gdbarch_deprecated_extract_return_value_ftype ia64_extract_return_value;
@@ -253,7 +249,7 @@ ia64_register_virtual_size (int reg)
/* Return true iff register N's virtual format is different from
its raw format. */
-int
+static int
ia64_register_convertible (int nr)
{
return (IA64_FR0_REGNUM <= nr && nr <= IA64_FR127_REGNUM);
@@ -265,7 +261,7 @@ const struct floatformat floatformat_ia64_ext =
floatformat_intbit_yes
};
-void
+static void
ia64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
@@ -279,9 +275,9 @@ ia64_register_convert_to_virtual (int regnum, struct type *type,
error("ia64_register_convert_to_virtual called with non floating point register number");
}
-void
+static void
ia64_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
+ const char *from, char *to)
{
if (regnum >= IA64_FR0_REGNUM && regnum <= IA64_FR127_REGNUM)
{
@@ -623,7 +619,19 @@ ia64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
return breakpoint;
}
-CORE_ADDR
+static CORE_ADDR
+ia64_read_fp (void)
+{
+ /* We won't necessarily have a frame pointer and even if we do, it
+ winds up being extraordinarly messy when attempting to find the
+ frame chain. So for the purposes of creating frames (which is
+ all deprecated_read_fp() is used for), simply use the stack
+ pointer value instead. */
+ gdb_assert (SP_REGNUM >= 0);
+ return read_register (SP_REGNUM);
+}
+
+static CORE_ADDR
ia64_read_pc (ptid_t ptid)
{
CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, ptid);
@@ -633,7 +641,7 @@ ia64_read_pc (ptid_t ptid)
return pc_value | (slot_num * SLOT_MULTIPLIER);
}
-void
+static void
ia64_write_pc (CORE_ADDR new_pc, ptid_t ptid)
{
int slot_num = (int) (new_pc & 0xf) / SLOT_MULTIPLIER;
@@ -691,7 +699,7 @@ rse_address_add(CORE_ADDR addr, int nslots)
represent the frame chain as the end of the previous frame instead
of the beginning. */
-CORE_ADDR
+static CORE_ADDR
ia64_frame_chain (struct frame_info *frame)
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
@@ -711,7 +719,7 @@ ia64_frame_chain (struct frame_info *frame)
}
}
-CORE_ADDR
+static CORE_ADDR
ia64_frame_saved_pc (struct frame_info *frame)
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
@@ -1222,7 +1230,7 @@ ia64_skip_prologue (CORE_ADDR pc)
return examine_prologue (pc, pc+1024, 0);
}
-void
+static void
ia64_frame_init_saved_regs (struct frame_info *frame)
{
if (get_frame_saved_regs (frame))
@@ -1276,7 +1284,7 @@ ia64_frame_init_saved_regs (struct frame_info *frame)
}
}
-void
+static void
ia64_get_saved_register (char *raw_buffer,
int *optimized,
CORE_ADDR *addrp,
@@ -1508,7 +1516,7 @@ ia64_extract_struct_value_address (char *regbuf)
return struct_return_address;
}
-void
+static void
ia64_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
/* FIXME: See above. */
@@ -1529,7 +1537,7 @@ ia64_saved_pc_after_call (struct frame_info *frame)
return read_register (IA64_BR0_REGNUM);
}
-CORE_ADDR
+static CORE_ADDR
ia64_frame_args_address (struct frame_info *frame)
{
/* frame->frame points at the SP for this frame; But we want the start
@@ -1537,7 +1545,7 @@ ia64_frame_args_address (struct frame_info *frame)
return ia64_frame_chain (frame);
}
-CORE_ADDR
+static CORE_ADDR
ia64_frame_locals_address (struct frame_info *frame)
{
/* frame->frame points at the SP for this frame; But we want the start
@@ -1545,7 +1553,7 @@ ia64_frame_locals_address (struct frame_info *frame)
return ia64_frame_chain (frame);
}
-void
+static void
ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
CORE_ADDR bsp, cfm;
@@ -1747,7 +1755,7 @@ generic_elf_find_global_pointer (CORE_ADDR faddr)
status = target_read_memory (addr + 8, buf, sizeof (buf));
if (status != 0)
break;
- global_pointer = extract_address (buf, sizeof (buf));
+ global_pointer = extract_unsigned_integer (buf, sizeof (buf));
/* The payoff... */
return global_pointer;
@@ -1844,7 +1852,7 @@ find_func_descr (CORE_ADDR faddr, CORE_ADDR *fdaptr)
return fdesc;
}
-CORE_ADDR
+static CORE_ADDR
ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -1929,7 +1937,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
char val_buf[8];
store_unsigned_integer (val_buf, 8,
- find_func_descr (extract_address (VALUE_CONTENTS (arg), 8),
+ find_func_descr (extract_unsigned_integer (VALUE_CONTENTS (arg), 8),
&funcdescaddr));
if (slotnum < rseslots)
write_memory (rse_address_add (bsp, slotnum), val_buf, 8);
@@ -2009,7 +2017,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
return sp;
}
-CORE_ADDR
+static CORE_ADDR
ia64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
CORE_ADDR global_pointer = FIND_GLOBAL_POINTER (pc);
@@ -2021,7 +2029,7 @@ ia64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
return sp;
}
-void
+static void
ia64_store_return_value (struct type *type, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -2035,7 +2043,7 @@ ia64_store_return_value (struct type *type, char *valbuf)
valbuf, TYPE_LENGTH (type));
}
-void
+static void
ia64_pop_frame (void)
{
generic_pop_current_frame (ia64_pop_frame_regular);
@@ -2231,7 +2239,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_float_bit (gdbarch, 32);
set_gdbarch_double_bit (gdbarch, 64);
- set_gdbarch_long_double_bit (gdbarch, 64);
+ set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_num_regs (gdbarch, ia64_num_regs);
@@ -2243,16 +2251,15 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, ia64_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 8);
set_gdbarch_deprecated_register_bytes (gdbarch, ia64_num_regs * 8 + 128*8);
- set_gdbarch_register_byte (gdbarch, ia64_register_byte);
- set_gdbarch_register_raw_size (gdbarch, ia64_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, ia64_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, ia64_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
- set_gdbarch_register_virtual_size (gdbarch, ia64_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, ia64_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 16);
- set_gdbarch_register_virtual_type (gdbarch, ia64_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, ia64_register_virtual_type);
set_gdbarch_skip_prologue (gdbarch, ia64_skip_prologue);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frameless_function_invocation (gdbarch, ia64_frameless_function_invocation);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, ia64_saved_pc_after_call);
@@ -2263,9 +2270,9 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
set_gdbarch_deprecated_get_saved_register (gdbarch, ia64_get_saved_register);
- set_gdbarch_register_convertible (gdbarch, ia64_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch, ia64_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
+ set_gdbarch_deprecated_register_convertible (gdbarch, ia64_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, ia64_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
@@ -2296,13 +2303,12 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame chain. So for the purposes of creating frames (which is
all deprecated_read_fp() is used for), simply use the stack
pointer value instead. */
- set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp);
+ set_gdbarch_deprecated_target_read_fp (gdbarch, ia64_read_fp);
/* Settings that should be unnecessary. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
@@ -2314,6 +2320,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+extern initialize_file_ftype _initialize_ia64_tdep; /* -Wmissing-prototypes */
+
void
_initialize_ia64_tdep (void)
{
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 5f80e896bbc..0a10c31b287 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -34,6 +34,7 @@
#include "gdbcmd.h"
#include "command.h"
#include "gdb_string.h"
+#include "infcall.h"
/* NOTE: cagney/2003-04-16: What's the future of this code?
@@ -530,6 +531,17 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
}
break;
case AT_ENTRY_POINT:
+ if (DEPRECATED_FIX_CALL_DUMMY_P ())
+ {
+ /* Sigh. Some targets use DEPRECATED_FIX_CALL_DUMMY to
+ shove extra stuff onto the stack or into registers. That
+ code should be in PUSH_DUMMY_CALL, however, in the mean
+ time ... */
+ /* If the target is manipulating DUMMY1, it looses big time. */
+ void *dummy1 = NULL;
+ DEPRECATED_FIX_CALL_DUMMY (dummy1, sp, funaddr, nargs, args,
+ value_type, using_gcc);
+ }
real_pc = funaddr;
dummy_addr = CALL_DUMMY_ADDRESS ();
/* A call dummy always consists of just a single breakpoint, so
@@ -736,7 +748,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
/* When there is no push_dummy_call method, should this code
simply error out. That would the implementation of this method
for all ABIs (which is probably a good thing). */
- sp = gdbarch_push_dummy_call (current_gdbarch, current_regcache,
+ sp = gdbarch_push_dummy_call (current_gdbarch, funaddr, current_regcache,
bp_addr, nargs, args, sp, struct_return,
struct_addr);
else if (DEPRECATED_PUSH_ARGUMENTS_P ())
@@ -798,19 +810,28 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
if (struct_return && DEPRECATED_STORE_STRUCT_RETURN_P ())
DEPRECATED_STORE_STRUCT_RETURN (struct_addr, sp);
- /* Write the stack pointer. This is here because the statements above
- might fool with it. On SPARC, this write also stores the register
- window into the right place in the new stack frame, which otherwise
- wouldn't happen. (See store_inferior_registers in sparc-nat.c.) */
- /* NOTE: cagney/2003-03-23: Disable this code when there is a
- push_dummy_call() method. Since that method will have already
- stored the stack pointer (as part of creating the fake call
- frame), and none of the code following that code adjusts the
- stack-pointer value, the below call is entirely redundant. */
+ /* Write the stack pointer. This is here because the statements
+ above might fool with it. On SPARC, this write also stores the
+ register window into the right place in the new stack frame,
+ which otherwise wouldn't happen (see store_inferior_registers in
+ sparc-nat.c). */
+ /* NOTE: cagney/2003-03-23: Since the architecture method
+ push_dummy_call() should have already stored the stack pointer
+ (as part of creating the fake call frame), and none of the code
+ following that call adjusts the stack-pointer value, the below
+ call is entirely redundant. */
if (DEPRECATED_DUMMY_WRITE_SP_P ())
DEPRECATED_DUMMY_WRITE_SP (sp);
- if (SAVE_DUMMY_FRAME_TOS_P ())
+ if (gdbarch_unwind_dummy_id_p (current_gdbarch))
+ {
+ /* Sanity. The exact same SP value is returned by
+ PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by
+ unwind_dummy_id to form the frame ID's stack address. */
+ gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
+ generic_save_dummy_frame_tos (sp);
+ }
+ else if (SAVE_DUMMY_FRAME_TOS_P ())
SAVE_DUMMY_FRAME_TOS (sp);
/* Now proceed, having reached the desired place. */
@@ -830,17 +851,29 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
set_momentary_breakpoint. We need to give the breakpoint a
frame ID so that the breakpoint code can correctly re-identify
the dummy breakpoint. */
- /* The assumption here is that push_dummy_call() returned the
- stack part of the frame ID. Unfortunatly, many older
- architectures were, via a convoluted mess, relying on the
- poorly defined and greatly overloaded DEPRECATED_TARGET_READ_FP
- or DEPRECATED_FP_REGNUM to supply the value. */
- if (DEPRECATED_TARGET_READ_FP_P ())
- frame = frame_id_build (DEPRECATED_TARGET_READ_FP (), sal.pc);
- else if (DEPRECATED_FP_REGNUM >= 0)
- frame = frame_id_build (read_register (DEPRECATED_FP_REGNUM), sal.pc);
+ if (gdbarch_unwind_dummy_id_p (current_gdbarch))
+ {
+ /* Sanity. The exact same SP value is returned by
+ PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by
+ unwind_dummy_id to form the frame ID's stack address. */
+ gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
+ frame = frame_id_build (sp, sal.pc);
+ }
else
- frame = frame_id_build (sp, sal.pc);
+ {
+ /* The assumption here is that push_dummy_call() returned the
+ stack part of the frame ID. Unfortunatly, many older
+ architectures were, via a convoluted mess, relying on the
+ poorly defined and greatly overloaded
+ DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM to supply
+ the value. */
+ if (DEPRECATED_TARGET_READ_FP_P ())
+ frame = frame_id_build (DEPRECATED_TARGET_READ_FP (), sal.pc);
+ else if (DEPRECATED_FP_REGNUM >= 0)
+ frame = frame_id_build (read_register (DEPRECATED_FP_REGNUM), sal.pc);
+ else
+ frame = frame_id_build (sp, sal.pc);
+ }
bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy);
bpt->disposition = disp_del;
}
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index de6c319608d..0ed0ce2f080 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1551,9 +1551,9 @@ default_print_registers_info (struct gdbarch *gdbarch,
The function frame_register_read() should have returned the
pre-cooked register so no conversion is necessary. */
/* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (i))
+ if (DEPRECATED_REGISTER_CONVERTIBLE (i))
{
- REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
raw_buffer, virtual_buffer);
}
else
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 1de3b25e39b..ed49d2315d9 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -168,8 +168,6 @@ extern CORE_ADDR read_pc (void);
extern CORE_ADDR read_pc_pid (ptid_t);
-extern CORE_ADDR generic_target_read_pc (ptid_t);
-
extern void write_pc (CORE_ADDR);
extern void write_pc_pid (CORE_ADDR, ptid_t);
@@ -178,9 +176,7 @@ extern void generic_target_write_pc (CORE_ADDR, ptid_t);
extern CORE_ADDR read_sp (void);
-extern CORE_ADDR generic_target_read_sp (void);
-
-extern void generic_target_write_sp (CORE_ADDR);
+extern void deprecated_write_sp (CORE_ADDR);
extern CORE_ADDR deprecated_read_fp (void);
diff --git a/gdb/interps.c b/gdb/interps.c
index 748b5b64901..6df1d4bf17f 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -290,7 +290,7 @@ interp_quiet_p (struct interp *interp)
return current_interpreter->quiet_p;
}
-int
+static int
interp_set_quiet (struct interp *interp, int quiet)
{
int old_val = interp->quiet_p;
@@ -357,7 +357,7 @@ initialize_interps (void)
/* Don't know if anything needs to be done here... */
}
-void
+static void
interpreter_exec_cmd (char *args, int from_tty)
{
struct interp *old_interp, *interp_to_use;
diff --git a/gdb/interps.h b/gdb/interps.h
index 3954e553671..74008d6c21a 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -63,7 +63,7 @@ extern int current_interp_named_p (const char *name);
extern int current_interp_display_prompt_p (void);
extern void current_interp_command_loop (void);
-extern void clear_interpreter_hooks ();
+extern void clear_interpreter_hooks (void);
/* well-known interpreters */
#define INTERP_CONSOLE "console"
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 76354954443..90229bbe014 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -156,7 +156,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 6128a04a450..bb90da51f88 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -174,7 +174,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 7fe020d5ae6..71206205fe1 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -1228,9 +1228,7 @@ java_type_from_name (name)
Otherwise, return 0. */
static int
-push_variable (name)
- struct stoken name;
-
+push_variable (struct stoken name)
{
char *tmp = copy_name (name);
int is_a_field_of_this = 0;
@@ -1302,9 +1300,7 @@ push_fieldnames (name)
Handle a qualified name, where DOT_INDEX is the index of the first '.' */
static void
-push_qualified_expression_name (name, dot_index)
- struct stoken name;
- int dot_index;
+push_qualified_expression_name (struct stoken name, int dot_index)
{
struct stoken token;
char *tmp;
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index a2a44f0543e..e3ae1882dfc 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -35,6 +35,7 @@
#include "gdbcore.h"
#include "block.h"
#include "demangle.h"
+#include "dictionary.h"
#include <ctype.h>
struct type *java_int_type;
@@ -91,9 +92,7 @@ get_dynamics_objfile (void)
static struct symtab *class_symtab = NULL;
-/* Maximum number of class in class_symtab before relocation is needed. */
-
-static int class_symtab_space;
+static void free_class_block (struct symtab *symtab);
static struct symtab *
get_java_class_symtab (void)
@@ -106,15 +105,16 @@ get_java_class_symtab (void)
class_symtab = allocate_symtab ("<java-classes>", objfile);
class_symtab->language = language_java;
bv = (struct blockvector *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct blockvector));
+ obstack_alloc (&objfile->symbol_obstack,
+ sizeof (struct blockvector) + sizeof (struct block *));
BLOCKVECTOR_NBLOCKS (bv) = 1;
BLOCKVECTOR (class_symtab) = bv;
/* Allocate dummy STATIC_BLOCK. */
bl = (struct block *)
obstack_alloc (&objfile->symbol_obstack, sizeof (struct block));
- BLOCK_NSYMS (bl) = 0;
- BLOCK_HASHTABLE (bl) = 0;
+ BLOCK_DICT (bl) = dict_create_linear (&objfile->symbol_obstack,
+ NULL);
BLOCK_START (bl) = 0;
BLOCK_END (bl) = 0;
BLOCK_FUNCTION (bl) = NULL;
@@ -124,13 +124,12 @@ get_java_class_symtab (void)
BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = bl;
/* Allocate GLOBAL_BLOCK. This has to be relocatable. */
- class_symtab_space = 128;
- bl = xmmalloc (objfile->md,
- sizeof (struct block)
- + ((class_symtab_space - 1) * sizeof (struct symbol *)));
+ bl = (struct block *)
+ obstack_alloc (&objfile->symbol_obstack, sizeof (struct block));
*bl = *BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+ BLOCK_DICT (bl) = dict_create_hashed_expandable ();
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
- class_symtab->free_ptr = (char *) bl;
+ class_symtab->free_func = free_class_block;
}
return class_symtab;
}
@@ -140,20 +139,7 @@ add_class_symtab_symbol (struct symbol *sym)
{
struct symtab *symtab = get_java_class_symtab ();
struct blockvector *bv = BLOCKVECTOR (symtab);
- struct block *bl = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- if (BLOCK_NSYMS (bl) >= class_symtab_space)
- {
- /* Need to re-allocate. */
- class_symtab_space *= 2;
- bl = xmrealloc (symtab->objfile->md, bl,
- sizeof (struct block)
- + ((class_symtab_space - 1) * sizeof (struct symbol *)));
- class_symtab->free_ptr = (char *) bl;
- BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl;
- }
-
- BLOCK_SYM (bl, BLOCK_NSYMS (bl)) = sym;
- BLOCK_NSYMS (bl) = BLOCK_NSYMS (bl) + 1;
+ dict_add_symbol (BLOCK_DICT (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)), sym);
}
static struct symbol *add_class_symbol (struct type *type, CORE_ADDR addr);
@@ -174,6 +160,16 @@ add_class_symbol (struct type *type, CORE_ADDR addr)
SYMBOL_VALUE_ADDRESS (sym) = addr;
return sym;
}
+
+/* Free the dynamic symbols block. */
+static void
+free_class_block (struct symtab *symtab)
+{
+ struct blockvector *bv = BLOCKVECTOR (symtab);
+ struct block *bl = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+
+ dict_free (BLOCK_DICT (bl));
+}
#endif
struct type *
@@ -268,7 +264,7 @@ type_from_class (struct value *clas)
char *nptr;
CORE_ADDR addr;
struct block *bl;
- int i;
+ struct dict_iterator iter;
int is_array = 0;
type = check_typedef (VALUE_TYPE (clas));
@@ -283,9 +279,8 @@ type_from_class (struct value *clas)
#if 0
get_java_class_symtab ();
bl = BLOCKVECTOR_BLOCK (BLOCKVECTOR (class_symtab), GLOBAL_BLOCK);
- for (i = BLOCK_NSYMS (bl); --i >= 0;)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- struct symbol *sym = BLOCK_SYM (bl, i);
if (SYMBOL_VALUE_ADDRESS (sym) == addr)
return SYMBOL_TYPE (sym);
}
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index c36394e87f3..48fd51673da 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -24,6 +24,10 @@
#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
+#ifdef HAVE_TKILL_SYSCALL
+#include <unistd.h>
+#include <sys/syscall.h>
+#endif
#include <sys/ptrace.h>
#include "gdb_wait.h"
@@ -156,6 +160,7 @@ static sigset_t blocked_mask;
/* Prototypes for local functions. */
static int stop_wait_callback (struct lwp_info *lp, void *data);
+static int lin_lwp_thread_alive (ptid_t ptid);
/* Convert wait status STATUS to a string. Used for printing debug
messages only. */
@@ -627,6 +632,32 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
}
+/* Issue kill to specified lwp. */
+
+static int tkill_failed;
+
+static int
+kill_lwp (int lwpid, int signo)
+{
+ errno = 0;
+
+/* Use tkill, if possible, in case we are using nptl threads. If tkill
+ fails, then we are not using nptl threads and we should be using kill. */
+
+#ifdef HAVE_TKILL_SYSCALL
+ if (!tkill_failed)
+ {
+ int ret = syscall (__NR_tkill, lwpid, signo);
+ if (errno != ENOSYS)
+ return ret;
+ errno = 0;
+ tkill_failed = 1;
+ }
+#endif
+
+ return kill (lwpid, signo);
+}
+
/* Send a SIGSTOP to LP. */
static int
@@ -642,8 +673,15 @@ stop_callback (struct lwp_info *lp, void *data)
"SC: kill %s **<SIGSTOP>**\n",
target_pid_to_str (lp->ptid));
}
- ret = kill (GET_LWP (lp->ptid), SIGSTOP);
- gdb_assert (ret == 0);
+ errno = 0;
+ ret = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SC: lwp kill %d %s\n",
+ ret,
+ errno ? safe_strerror (errno) : "ERRNO-OK");
+ }
lp->signalled = 1;
gdb_assert (lp->status == 0);
@@ -667,11 +705,23 @@ stop_wait_callback (struct lwp_info *lp, void *data)
gdb_assert (lp->status == 0);
- pid = waitpid (GET_LWP (lp->ptid), &status, lp->cloned ? __WCLONE : 0);
+ pid = waitpid (GET_LWP (lp->ptid), &status, 0);
if (pid == -1 && errno == ECHILD)
- /* OK, the proccess has disappeared. We'll catch the actual
- exit event in lin_lwp_wait. */
- return 0;
+ {
+ pid = waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
+ if (pid == -1 && errno == ECHILD)
+ {
+ /* The thread has previously exited. We need to delete it now
+ because in the case of nptl threads, there won't be an
+ exit event unless it is the main thread. */
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s exited.\n",
+ target_pid_to_str (lp->ptid));
+ delete_lwp (lp->ptid);
+ return 0;
+ }
+ }
gdb_assert (pid == GET_LWP (lp->ptid));
@@ -683,6 +733,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
status_to_str (status));
}
+ /* Check if the thread has exited. */
if (WIFEXITED (status) || WIFSIGNALED (status))
{
gdb_assert (num_lwps > 1);
@@ -697,7 +748,31 @@ stop_wait_callback (struct lwp_info *lp, void *data)
target_pid_to_str (lp->ptid));
}
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog, "SWC: %s exited.\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s exited.\n",
+ target_pid_to_str (lp->ptid));
+
+ delete_lwp (lp->ptid);
+ return 0;
+ }
+
+ /* Check if the current LWP has previously exited. For nptl threads,
+ there is no exit signal issued for LWPs that are not the
+ main thread so we should check whenever the thread is stopped. */
+ if (!lin_lwp_thread_alive (lp->ptid))
+ {
+ if (in_thread_list (lp->ptid))
+ {
+ /* Core GDB cannot deal with us deleting the current
+ thread. */
+ if (!ptid_equal (lp->ptid, inferior_ptid))
+ delete_thread (lp->ptid);
+ printf_unfiltered ("[%s exited]\n",
+ target_pid_to_str (lp->ptid));
+ }
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s already exited.\n",
target_pid_to_str (lp->ptid));
delete_lwp (lp->ptid);
@@ -756,7 +831,14 @@ stop_wait_callback (struct lwp_info *lp, void *data)
/* If there's another event, throw it back into the queue. */
if (lp->status)
{
- kill (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: kill %s, %s\n",
+ target_pid_to_str (lp->ptid),
+ status_to_str ((int) status));
+ }
+ kill_lwp (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
}
/* Save the sigtrap event. */
lp->status = status;
@@ -800,7 +882,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
target_pid_to_str (lp->ptid),
status_to_str ((int) status));
}
- kill (GET_LWP (lp->ptid), WSTOPSIG (status));
+ kill_lwp (GET_LWP (lp->ptid), WSTOPSIG (status));
}
return 0;
}
@@ -1049,6 +1131,25 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
#endif
+/* Stop an active thread, verify it still exists, then resume it. */
+
+static int
+stop_and_resume_callback (struct lwp_info *lp, void *data)
+{
+ struct lwp_info *ptr;
+
+ if (!lp->stopped && !lp->signalled)
+ {
+ stop_callback (lp, NULL);
+ stop_wait_callback (lp, NULL);
+ /* Resume if the lwp still exists. */
+ for (ptr = lwp_list; ptr; ptr = ptr->next)
+ if (lp == ptr)
+ resume_callback (lp, NULL);
+ }
+ return 0;
+}
+
static ptid_t
lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
@@ -1206,9 +1307,7 @@ retry:
}
}
- /* Make sure we don't report a TARGET_WAITKIND_EXITED or
- TARGET_WAITKIND_SIGNALLED event if there are still LWP's
- left in the process. */
+ /* Check if the thread has exited. */
if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
{
if (in_thread_list (lp->ptid))
@@ -1220,6 +1319,59 @@ retry:
printf_unfiltered ("[%s exited]\n",
target_pid_to_str (lp->ptid));
}
+
+ /* If this is the main thread, we must stop all threads and
+ verify if they are still alive. This is because in the nptl
+ thread model, there is no signal issued for exiting LWPs
+ other than the main thread. We only get the main thread
+ exit signal once all child threads have already exited.
+ If we stop all the threads and use the stop_wait_callback
+ to check if they have exited we can determine whether this
+ signal should be ignored or whether it means the end of the
+ debugged application, regardless of which threading model
+ is being used. */
+ if (GET_PID (lp->ptid) == GET_LWP (lp->ptid))
+ {
+ lp->stopped = 1;
+ iterate_over_lwps (stop_and_resume_callback, NULL);
+ }
+
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: %s exited.\n",
+ target_pid_to_str (lp->ptid));
+
+ delete_lwp (lp->ptid);
+
+ /* If there is at least one more LWP, then the exit signal
+ was not the end of the debugged application and should be
+ ignored. */
+ if (num_lwps > 0)
+ {
+ /* Make sure there is at least one thread running. */
+ gdb_assert (iterate_over_lwps (running_callback, NULL));
+
+ /* Discard the event. */
+ status = 0;
+ continue;
+ }
+ }
+
+ /* Check if the current LWP has previously exited. In the nptl
+ thread model, LWPs other than the main thread do not issue
+ signals when they exit so we must check whenever the thread
+ has stopped. A similar check is made in stop_wait_callback(). */
+ if (num_lwps > 1 && !lin_lwp_thread_alive (lp->ptid))
+ {
+ if (in_thread_list (lp->ptid))
+ {
+ /* Core GDB cannot deal with us deleting the current
+ thread. */
+ if (!ptid_equal (lp->ptid, inferior_ptid))
+ delete_thread (lp->ptid);
+ printf_unfiltered ("[%s exited]\n",
+ target_pid_to_str (lp->ptid));
+ }
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s exited.\n",
diff --git a/gdb/linespec.c b/gdb/linespec.c
index bda41c78940..b8f727453ea 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -34,6 +34,7 @@
#include "parser-defs.h"
#include "block.h"
#include "objc-lang.h"
+#include "linespec.h"
/* We share this one with symtab.c, but it is not exported widely. */
@@ -82,6 +83,12 @@ static int total_number_of_methods (struct type *type);
static int find_methods (struct type *, char *, struct symbol **);
+static int add_matching_methods (int method_counter, struct type *t,
+ struct symbol **sym_arr);
+
+static int add_constructors (int method_counter, struct type *t,
+ struct symbol **sym_arr);
+
static void build_canonical_line_spec (struct symtab_and_line *,
char *, char ***);
@@ -210,7 +217,6 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
method_counter >= 0;
--method_counter)
{
- int field_counter;
char *method_name = TYPE_FN_FIELDLIST_NAME (t, method_counter);
char dem_opname[64];
@@ -226,88 +232,13 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
if (strcmp_iw (name, method_name) == 0)
/* Find all the overloaded methods with that name. */
- for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
- field_counter >= 0;
- --field_counter)
- {
- struct fn_field *f;
- char *phys_name;
-
- f = TYPE_FN_FIELDLIST1 (t, method_counter);
-
- if (TYPE_FN_FIELD_STUB (f, field_counter))
- {
- char *tmp_name;
-
- tmp_name = gdb_mangle_name (t,
- method_counter,
- field_counter);
- phys_name = alloca (strlen (tmp_name) + 1);
- strcpy (phys_name, tmp_name);
- xfree (tmp_name);
- }
- else
- phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
-
- /* Destructor is handled by caller, don't add it to
- the list. */
- if (is_destructor_name (phys_name) != 0)
- continue;
-
- sym_arr[i1] = lookup_symbol (phys_name,
- NULL, VAR_DOMAIN,
- (int *) NULL,
- (struct symtab **) NULL);
- if (sym_arr[i1])
- i1++;
- else
- {
- /* This error message gets printed, but the method
- still seems to be found
- fputs_filtered("(Cannot find method ", gdb_stdout);
- fprintf_symbol_filtered (gdb_stdout, phys_name,
- language_cplus,
- DMGL_PARAMS | DMGL_ANSI);
- fputs_filtered(" - possibly inlined.)\n", gdb_stdout);
- */
- }
- }
+ i1 += add_matching_methods (method_counter, t,
+ sym_arr + i1);
else if (strncmp (class_name, name, name_len) == 0
&& (class_name[name_len] == '\0'
|| class_name[name_len] == '<'))
- {
- /* For GCC 3.x and stabs, constructors and destructors
- have names like __base_ctor and __complete_dtor.
- Check the physname for now if we're looking for a
- constructor. */
- for (field_counter
- = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
- field_counter >= 0;
- --field_counter)
- {
- struct fn_field *f;
- char *phys_name;
-
- f = TYPE_FN_FIELDLIST1 (t, method_counter);
-
- /* GCC 3.x will never produce stabs stub methods, so
- we don't need to handle this case. */
- if (TYPE_FN_FIELD_STUB (f, field_counter))
- continue;
- phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
- if (! is_constructor_name (phys_name))
- continue;
-
- /* If this method is actually defined, include it in the
- list. */
- sym_arr[i1] = lookup_symbol (phys_name,
- NULL, VAR_DOMAIN,
- (int *) NULL,
- (struct symtab **) NULL);
- if (sym_arr[i1])
- i1++;
- }
- }
+ i1 += add_constructors (method_counter, t,
+ sym_arr + i1);
}
}
@@ -329,6 +260,113 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
return i1;
}
+/* Add the symbols associated to methods of the class whose type is T
+ and whose name matches the method indexed by METHOD_COUNTER in the
+ array SYM_ARR. Return the number of methods added. */
+
+static int
+add_matching_methods (int method_counter, struct type *t,
+ struct symbol **sym_arr)
+{
+ int field_counter;
+ int i1 = 0;
+
+ for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
+ field_counter >= 0;
+ --field_counter)
+ {
+ struct fn_field *f;
+ char *phys_name;
+
+ f = TYPE_FN_FIELDLIST1 (t, method_counter);
+
+ if (TYPE_FN_FIELD_STUB (f, field_counter))
+ {
+ char *tmp_name;
+
+ tmp_name = gdb_mangle_name (t,
+ method_counter,
+ field_counter);
+ phys_name = alloca (strlen (tmp_name) + 1);
+ strcpy (phys_name, tmp_name);
+ xfree (tmp_name);
+ }
+ else
+ phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
+
+ /* Destructor is handled by caller, don't add it to
+ the list. */
+ if (is_destructor_name (phys_name) != 0)
+ continue;
+
+ sym_arr[i1] = lookup_symbol (phys_name,
+ NULL, VAR_DOMAIN,
+ (int *) NULL,
+ (struct symtab **) NULL);
+ if (sym_arr[i1])
+ i1++;
+ else
+ {
+ /* This error message gets printed, but the method
+ still seems to be found
+ fputs_filtered("(Cannot find method ", gdb_stdout);
+ fprintf_symbol_filtered (gdb_stdout, phys_name,
+ language_cplus,
+ DMGL_PARAMS | DMGL_ANSI);
+ fputs_filtered(" - possibly inlined.)\n", gdb_stdout);
+ */
+ }
+ }
+
+ return i1;
+}
+
+/* Add the symbols associated to constructors of the class whose type
+ is CLASS_TYPE and which are indexed by by METHOD_COUNTER to the
+ array SYM_ARR. Return the number of methods added. */
+
+static int
+add_constructors (int method_counter, struct type *t,
+ struct symbol **sym_arr)
+{
+ int field_counter;
+ int i1 = 0;
+
+ /* For GCC 3.x and stabs, constructors and destructors
+ have names like __base_ctor and __complete_dtor.
+ Check the physname for now if we're looking for a
+ constructor. */
+ for (field_counter
+ = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
+ field_counter >= 0;
+ --field_counter)
+ {
+ struct fn_field *f;
+ char *phys_name;
+
+ f = TYPE_FN_FIELDLIST1 (t, method_counter);
+
+ /* GCC 3.x will never produce stabs stub methods, so
+ we don't need to handle this case. */
+ if (TYPE_FN_FIELD_STUB (f, field_counter))
+ continue;
+ phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
+ if (! is_constructor_name (phys_name))
+ continue;
+
+ /* If this method is actually defined, include it in the
+ list. */
+ sym_arr[i1] = lookup_symbol (phys_name,
+ NULL, VAR_DOMAIN,
+ (int *) NULL,
+ (struct symtab **) NULL);
+ if (sym_arr[i1])
+ i1++;
+ }
+
+ return i1;
+}
+
/* Helper function for decode_line_1.
Build a canonical line spec in CANONICAL if it is non-NULL and if
the SAL has a symtab.
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 5d6e51e756b..c1859f39eaa 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -419,12 +419,6 @@ m68hc11_frame_args_address (struct frame_info *frame)
return addr;
}
-static CORE_ADDR
-m68hc11_frame_locals_address (struct frame_info *frame)
-{
- return get_frame_base (frame);
-}
-
/* Discard from the stack the innermost frame, restoring all saved
registers. */
@@ -1057,7 +1051,7 @@ m68hc11_push_arguments (int nargs,
/* Return a location where we can set a breakpoint that will be hit
when an inferior function call returns. */
-CORE_ADDR
+static CORE_ADDR
m68hc11_call_dummy_address (void)
{
return entry_point_address ();
@@ -1171,8 +1165,8 @@ m68hc11_return_value_on_stack (struct type *type)
static CORE_ADDR
m68hc11_extract_struct_value_address (char *regbuf)
{
- return extract_address (&regbuf[HARD_D_REGNUM * 2],
- REGISTER_RAW_SIZE (HARD_D_REGNUM));
+ return extract_unsigned_integer (&regbuf[HARD_D_REGNUM * 2],
+ REGISTER_RAW_SIZE (HARD_D_REGNUM));
}
/* Function: push_return_address (pc)
@@ -1365,17 +1359,15 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68hc11_frame_init_saved_regs);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM);
set_gdbarch_register_name (gdbarch, m68hc11_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 2);
set_gdbarch_deprecated_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
- set_gdbarch_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
@@ -1391,15 +1383,11 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
- set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
-
set_gdbarch_deprecated_frame_chain (gdbarch, m68hc11_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, m68hc11_frame_locals_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
@@ -1431,6 +1419,8 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
return gdbarch;
}
+extern initialize_file_ftype _initialize_m68hc11_tdep; /* -Wmissing-prototypes */
+
void
_initialize_m68hc11_tdep (void)
{
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index fbbac634cae..c8158c4261c 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -847,13 +847,13 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ jb_addr = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
if (target_read_memory (jb_addr + tdep->jb_pc * tdep->jb_elt_size, buf,
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
@@ -929,18 +929,16 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
set_gdbarch_frameless_function_invocation (gdbarch,
m68k_frameless_function_invocation);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_register_raw_size (gdbarch, m68k_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, m68k_register_virtual_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, m68k_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, m68k_register_virtual_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 12);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 12);
- set_gdbarch_register_virtual_type (gdbarch, m68k_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, m68k_register_virtual_type);
set_gdbarch_register_name (gdbarch, m68k_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_byte (gdbarch, m68k_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, m68k_register_byte);
set_gdbarch_num_regs (gdbarch, 29);
set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok);
set_gdbarch_deprecated_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4));
@@ -964,7 +962,10 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
+
+ /* Disassembler. */
+ set_gdbarch_print_insn (gdbarch, print_insn_m68k);
#if defined JB_PC && defined JB_ELEMENT_SIZE
tdep->jb_pc = JB_PC;
@@ -995,9 +996,10 @@ m68k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
return;
}
+extern initialize_file_ftype _initialize_m68k_tdep; /* -Wmissing-prototypes */
+
void
_initialize_m68k_tdep (void)
{
gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
- deprecated_tm_print_insn = print_insn_m68k;
}
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index 612f9fd5d9d..1fa9f749650 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -149,9 +149,9 @@ m68k_linux_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
- regbuf + REGISTER_BYTE (FP0_REGNUM),
- valbuf);
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
+ regbuf + REGISTER_BYTE (FP0_REGNUM),
+ valbuf);
}
else if (TYPE_CODE (type) == TYPE_CODE_PTR)
memcpy (valbuf, regbuf + REGISTER_BYTE (M68K_A0_REGNUM),
@@ -171,7 +171,7 @@ m68k_linux_store_return_value (struct type *type, char *valbuf)
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)];
- REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
+ DEPRECATED_REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
raw_buffer, TYPE_LENGTH (type));
}
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 02f44fce4cd..7c2ebbea749 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -222,6 +222,8 @@ macro_list_command (char *exp, int from_tty)
/* Initializing the `macrocmd' module. */
+extern initialize_file_ftype _initialize_macrocmd; /* -Wmissing-prototypes */
+
void
_initialize_macrocmd (void)
{
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 1432847a8e6..4f0761d7dec 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -123,7 +123,7 @@ macro_bcache_str (struct macro_table *t, const char *s)
/* Free a possibly bcached object OBJ. That is, if the macro table T
has a bcache, it's an error; otherwise, xfree OBJ. */
-void
+static void
macro_bcache_free (struct macro_table *t, void *obj)
{
gdb_assert (! t->bcache);
diff --git a/gdb/main.c b/gdb/main.c
index fd25750b94e..5a06017ac88 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -73,10 +73,10 @@ struct ui_file *gdb_stdout;
struct ui_file *gdb_stderr;
struct ui_file *gdb_stdlog;
struct ui_file *gdb_stdtarg;
-
-/* Used to initialize error() - defined in utils.c */
-
-extern void error_init (void);
+struct ui_file *gdb_stdin;
+/* target IO streams */
+struct ui_file *gdb_stdtargin;
+struct ui_file *gdb_stdtargerr;
/* Whether to enable writing into executable and core files */
extern int write_files;
@@ -168,6 +168,10 @@ captured_main (void *data)
/* This needs to happen before the first use of malloc. */
init_malloc (NULL);
+#ifdef HAVE_SBRK
+ lim_at_start = (char *) sbrk (0);
+#endif
+
#if defined (ALIGN_STACK_ON_STARTUP)
i = (int) &count & 0x3;
if (i != 0)
@@ -193,6 +197,9 @@ captured_main (void *data)
gdb_stderr = stdio_fileopen (stderr);
gdb_stdlog = gdb_stderr; /* for moment */
gdb_stdtarg = gdb_stderr; /* for moment */
+ gdb_stdin = stdio_fileopen (stdin);
+ gdb_stdtargerr = gdb_stderr; /* for moment */
+ gdb_stdtargin = gdb_stdin; /* for moment */
/* initialize error() */
error_init ();
diff --git a/gdb/maint.c b/gdb/maint.c
index aa342390765..b55cb67b4e3 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -407,7 +407,7 @@ maintenance_print_statistics (char *args, int from_tty)
print_symbol_bcache_statistics ();
}
-void
+static void
maintenance_print_architecture (char *args, int from_tty)
{
if (args == NULL)
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index ea97ec297e4..18d7600f89c 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -30,51 +30,10 @@
#include "gdb_string.h"
#include "disasm.h"
-/* Functions declared and used only in this file */
-
-static CORE_ADDR mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue);
-
-static struct frame_info *analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame);
-
+static CORE_ADDR mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc,
+ int skip_prologue);
static int get_insn (CORE_ADDR pc);
-/* Functions exported from this file */
-
-int mcore_use_struct_convention (int gcc_p, struct type *type);
-
-void _initialize_mcore (void);
-
-void mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi);
-
-CORE_ADDR mcore_frame_saved_pc (struct frame_info *fi);
-
-CORE_ADDR mcore_find_callers_reg (struct frame_info *fi, int regnum);
-
-CORE_ADDR mcore_frame_args_address (struct frame_info *fi);
-
-CORE_ADDR mcore_frame_locals_address (struct frame_info *fi);
-
-CORE_ADDR mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
-
-CORE_ADDR mcore_push_arguments (int nargs, struct value ** args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr);
-
-void mcore_pop_frame ();
-
-CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
-
-CORE_ADDR mcore_frame_chain (struct frame_info *fi);
-
-const unsigned char *mcore_breakpoint_from_pc (CORE_ADDR * bp_addr, int *bp_size);
-
-int mcore_use_struct_convention (int gcc_p, struct type *type);
-
-void mcore_store_return_value (struct type *type, char *valbuf);
-
-CORE_ADDR mcore_extract_struct_value_address (char *regbuf);
-
-void mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf);
-
#ifdef MCORE_DEBUG
int mcore_debug = 0;
#endif
@@ -243,7 +202,7 @@ mcore_register_name (int regnum)
instructions are 16 bits, this is all we need, regardless of
address. bpkt = 0x0000 */
-const unsigned char *
+static const unsigned char *
mcore_breakpoint_from_pc (CORE_ADDR * bp_addr, int *bp_size)
{
static char breakpoint[] =
@@ -647,7 +606,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
then DEPRECATED_INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC
will be called for the new frame. */
-CORE_ADDR
+static CORE_ADDR
mcore_frame_chain (struct frame_info * fi)
{
struct frame_info *dummy;
@@ -705,7 +664,7 @@ mcore_frame_chain (struct frame_info * fi)
/* Skip the prologue of the function at PC. */
-CORE_ADDR
+static CORE_ADDR
mcore_skip_prologue (CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
@@ -725,13 +684,13 @@ mcore_skip_prologue (CORE_ADDR pc)
}
/* Return the address at which function arguments are offset. */
-CORE_ADDR
+static CORE_ADDR
mcore_frame_args_address (struct frame_info * fi)
{
return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
}
-CORE_ADDR
+static CORE_ADDR
mcore_frame_locals_address (struct frame_info * fi)
{
return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
@@ -739,7 +698,7 @@ mcore_frame_locals_address (struct frame_info * fi)
/* Return the frame pointer in use at address PC. */
-void
+static void
mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
{
struct frame_info *dummy = analyze_dummy_frame (pc, 0);
@@ -757,7 +716,7 @@ mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
/* Find the value of register REGNUM in frame FI. */
-CORE_ADDR
+static CORE_ADDR
mcore_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi != NULL; fi = get_next_frame (fi))
@@ -776,7 +735,7 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum)
/* Find the saved pc in frame FI. */
-CORE_ADDR
+static CORE_ADDR
mcore_frame_saved_pc (struct frame_info * fi)
{
@@ -793,7 +752,7 @@ mcore_frame_saved_pc (struct frame_info * fi)
/* This routine gets called when either the user uses the "return"
command, or the call dummy breakpoint gets hit. */
-void
+static void
mcore_pop_frame (void)
{
int rn;
@@ -843,7 +802,7 @@ mcore_pop_frame (void)
FIRST_ARGREG, since the MCORE treats struct returns (of less than eight
bytes) as hidden first arguments. */
-CORE_ADDR
+static CORE_ADDR
mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -953,7 +912,7 @@ mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
opted to use generic call dummies, so we simply store the
CALL_DUMMY_ADDRESS into the PR register (r15). */
-CORE_ADDR
+static CORE_ADDR
mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (PR_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -979,7 +938,7 @@ mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
and TYPE is the type (which is known to be struct, union or array). */
-int
+static int
mcore_use_struct_convention (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
@@ -989,17 +948,17 @@ mcore_use_struct_convention (int gcc_p, struct type *type)
this buffer was passed as a hidden first argument, so
just return that address. */
-CORE_ADDR
+static CORE_ADDR
mcore_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
+ return extract_unsigned_integer (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
}
/* Given a function which returns a value of type TYPE, extract the
the function's return value and place the result into VALBUF.
REGBUF is the register contents of the target. */
-void
+static void
mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
/* Copy the return value (starting) in RETVAL_REGNUM to VALBUF. */
@@ -1019,7 +978,7 @@ mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf)
significant word) and r3 (least significant word, left justified).
Note that this includes structures of less than eight bytes, too. */
-void
+static void
mcore_store_return_value (struct type *type, char *valbuf)
{
int value_size;
@@ -1045,7 +1004,7 @@ mcore_store_return_value (struct type *type, char *valbuf)
This includes allocating space for saved registers and analyzing
the prologue of this frame. */
-void
+static void
mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
if (fi && get_next_frame (fi))
@@ -1106,10 +1065,10 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_max_register_raw_size (gdbarch, MCORE_REG_SIZE);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, MCORE_REG_SIZE);
set_gdbarch_register_name (gdbarch, mcore_register_name);
- set_gdbarch_register_virtual_type (gdbarch, mcore_register_virtual_type);
- set_gdbarch_register_virtual_size (gdbarch, mcore_register_size);
- set_gdbarch_register_raw_size (gdbarch, mcore_register_size);
- set_gdbarch_register_byte (gdbarch, mcore_register_byte);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, mcore_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, mcore_register_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, mcore_register_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, mcore_register_byte);
set_gdbarch_deprecated_register_bytes (gdbarch, MCORE_REG_SIZE * MCORE_NUM_REGS);
set_gdbarch_num_regs (gdbarch, MCORE_NUM_REGS);
set_gdbarch_pc_regnum (gdbarch, 64);
@@ -1144,7 +1103,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frame_args_address (gdbarch, mcore_frame_args_address);
set_gdbarch_frame_locals_address (gdbarch, mcore_frame_locals_address);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_pop_frame (gdbarch, mcore_pop_frame);
set_gdbarch_virtual_frame_pointer (gdbarch, mcore_virtual_frame_pointer);
@@ -1159,7 +1117,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_reg_struct_has_addr (gdbarch, mcore_reg_struct_has_addr);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
@@ -1170,6 +1128,8 @@ mcore_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
}
+extern initialize_file_ftype _initialize_mcore_tdep; /* -Wmissing-prototypes */
+
void
_initialize_mcore_tdep (void)
{
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 379a3636bbe..1bb1e057009 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -54,6 +54,7 @@
#include "demangle.h"
#include "gdb_assert.h"
#include "block.h"
+#include "dictionary.h"
/* These are needed if the tm.h file does not contain the necessary
mips specific definitions. */
@@ -284,9 +285,11 @@ static struct symbol *new_symbol (char *);
static struct type *new_type (char *);
-static struct block *new_block (int);
+enum block_type { FUNCTION_BLOCK, NON_FUNCTION_BLOCK };
-static struct symtab *new_symtab (char *, int, int, struct objfile *);
+static struct block *new_block (enum block_type);
+
+static struct symtab *new_symtab (char *, int, struct objfile *);
static struct linetable *new_linetable (int);
@@ -298,8 +301,6 @@ static struct type *parse_type (int, union aux_ext *, unsigned int, int *,
static struct symbol *mylookup_symbol (char *, struct block *, domain_enum,
enum address_class);
-static struct block *shrink_block (struct block *, struct symtab *);
-
static void sort_blocks (struct symtab *);
static struct partial_symtab *new_psymtab (char *, struct objfile *);
@@ -483,7 +484,6 @@ static struct parse_stack
int blocktype;
- int maxsyms; /* Max symbols in this block. */
struct type *cur_type; /* Type we parse fields for. */
int cur_field; /* Field number in cur_type. */
CORE_ADDR procadr; /* Start addres of this procedure */
@@ -834,7 +834,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
TYPE_FLAGS (SYMBOL_TYPE (s)) |= TYPE_FLAG_PROTOTYPED;
/* Create and enter a new lexical context */
- b = new_block (top_stack->maxsyms);
+ b = new_block (FUNCTION_BLOCK);
SYMBOL_BLOCK_VALUE (s) = b;
BLOCK_FUNCTION (b) = s;
BLOCK_START (b) = BLOCK_END (b) = sh->value;
@@ -1169,7 +1169,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
}
top_stack->blocktype = stBlock;
- b = new_block (top_stack->maxsyms);
+ b = new_block (NON_FUNCTION_BLOCK);
BLOCK_START (b) = sh->value + top_stack->procadr;
BLOCK_SUPERBLOCK (b) = top_stack->cur_block;
top_stack->cur_block = b;
@@ -1189,7 +1189,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
/* Finished with procedure */
struct blockvector *bv = BLOCKVECTOR (top_stack->cur_st);
struct mips_extra_func_info *e;
- struct block *b;
+ struct block *b = top_stack->cur_block;
struct type *ftype = top_stack->cur_type;
int i;
@@ -1209,9 +1209,6 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
e->pdr.framereg = -1;
add_symbol (s, top_stack->cur_block);
- /* Reallocate symbols, saving memory */
- b = shrink_block (top_stack->cur_block, top_stack->cur_st);
-
/* f77 emits proc-level with address bounds==[0,0],
So look for such child blocks, and patch them. */
for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); i++)
@@ -1236,13 +1233,17 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
if (nparams > 0)
{
+ struct dict_iterator iter;
TYPE_NFIELDS (ftype) = nparams;
TYPE_FIELDS (ftype) = (struct field *)
TYPE_ALLOC (ftype, nparams * sizeof (struct field));
- for (i = iparams = 0; iparams < nparams; i++)
+ iparams = 0;
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- sym = BLOCK_SYM (b, i);
+ if (iparams == nparams)
+ break;
+
switch (SYMBOL_CLASS (sym))
{
case LOC_ARG:
@@ -1266,7 +1267,6 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
displacement from the procedure`s start address of the
end of this block. */
BLOCK_END (top_stack->cur_block) = sh->value + top_stack->procadr;
- shrink_block (top_stack->cur_block, top_stack->cur_st);
}
else if (sh->sc == scText && top_stack->blocktype == stNil)
{
@@ -4008,10 +4008,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
end_stabs ();
}
- /* Sort the symbol table now, we are done adding symbols to it.
- We must do this before parse_procedure calls lookup_symbol. */
- sort_symtab_syms (st);
-
/* There used to be a call to sort_blocks here, but this should not
be necessary for stabs symtabs. And as sort_blocks modifies the
start address of the GLOBAL_BLOCK to the FIRST_LOCAL_BLOCK,
@@ -4065,19 +4061,15 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
int maxlines;
EXTR *ext_ptr;
- /* How many symbols will we need */
- /* FIXME, this does not count enum values. */
- f_max = pst->n_global_syms + pst->n_static_syms;
if (fh == 0)
{
maxlines = 0;
- st = new_symtab ("unknown", f_max, 0, pst->objfile);
+ st = new_symtab ("unknown", 0, pst->objfile);
}
else
{
- f_max += fh->csym + fh->cpd;
maxlines = 2 * fh->cline;
- st = new_symtab (pst->filename, 2 * f_max, maxlines, pst->objfile);
+ st = new_symtab (pst->filename, maxlines, pst->objfile);
/* The proper language was already determined when building
the psymtab, use it. */
@@ -4097,7 +4089,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
BLOCK_START (top_stack->cur_block) = pst->textlow;
BLOCK_END (top_stack->cur_block) = 0;
top_stack->blocktype = stFile;
- top_stack->maxsyms = 2 * f_max;
top_stack->cur_type = 0;
top_stack->procadr = 0;
top_stack->numargs = 0;
@@ -4181,10 +4172,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
top_stack->cur_block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st),
GLOBAL_BLOCK);
top_stack->blocktype = stFile;
- top_stack->maxsyms
- = (debug_info->symbolic_header.isymMax
- + debug_info->symbolic_header.ipdMax
- + debug_info->symbolic_header.iextMax);
ext_ptr = PST_PRIVATE (pst)->extern_tab;
for (i = PST_PRIVATE (pst)->extern_count; --i >= 0; ext_ptr++)
@@ -4206,9 +4193,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
st->primary = 1;
- /* Sort the symbol table now, we are done adding symbols to it. */
- sort_symtab_syms (st);
-
sort_blocks (st);
}
@@ -4457,11 +4441,12 @@ static struct symbol *
mylookup_symbol (char *name, register struct block *block,
domain_enum domain, enum address_class class)
{
- int i, inc;
+ struct dict_iterator iter;
+ int inc;
struct symbol *sym;
inc = name[0];
- ALL_BLOCK_SYMBOLS (block, i, sym)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
if (DEPRECATED_SYMBOL_NAME (sym)[0] == inc
&& SYMBOL_DOMAIN (sym) == domain
@@ -4477,41 +4462,12 @@ mylookup_symbol (char *name, register struct block *block,
}
-/* Add a new symbol S to a block B.
- Infrequently, we will need to reallocate the block to make it bigger.
- We only detect this case when adding to top_stack->cur_block, since
- that's the only time we know how big the block is. FIXME. */
+/* Add a new symbol S to a block B. */
static void
add_symbol (struct symbol *s, struct block *b)
{
- int nsyms = BLOCK_NSYMS (b)++;
- struct block *origb;
- struct parse_stack *stackp;
-
- if (b == top_stack->cur_block &&
- nsyms >= top_stack->maxsyms)
- {
- complaint (&symfile_complaints, "block containing %s overfilled",
- DEPRECATED_SYMBOL_NAME (s));
- /* In this case shrink_block is actually grow_block, since
- BLOCK_NSYMS(b) is larger than its current size. */
- origb = b;
- b = shrink_block (top_stack->cur_block, top_stack->cur_st);
-
- /* Now run through the stack replacing pointers to the
- original block. shrink_block has already done this
- for the blockvector and BLOCK_FUNCTION. */
- for (stackp = top_stack; stackp; stackp = stackp->next)
- {
- if (stackp->cur_block == origb)
- {
- stackp->cur_block = b;
- stackp->maxsyms = BLOCK_NSYMS (b);
- }
- }
- }
- BLOCK_SYM (b, nsyms) = s;
+ dict_add_symbol (BLOCK_DICT (b), s);
}
/* Add a new block B to a symtab S */
@@ -4633,11 +4589,11 @@ sort_blocks (struct symtab *s)
/* Constructor/restructor/destructor procedures */
-/* Allocate a new symtab for NAME. Needs an estimate of how many symbols
- MAXSYMS and linenumbers MAXLINES we'll put in it */
+/* Allocate a new symtab for NAME. Needs an estimate of how many
+ linenumbers MAXLINES we'll put in it */
static struct symtab *
-new_symtab (char *name, int maxsyms, int maxlines, struct objfile *objfile)
+new_symtab (char *name, int maxlines, struct objfile *objfile)
{
struct symtab *s = allocate_symtab (name, objfile);
@@ -4645,8 +4601,10 @@ new_symtab (char *name, int maxsyms, int maxlines, struct objfile *objfile)
/* All symtabs must have at least two blocks */
BLOCKVECTOR (s) = new_bvect (2);
- BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK) = new_block (maxsyms);
- BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK) = new_block (maxsyms);
+ BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK)
+ = new_block (NON_FUNCTION_BLOCK);
+ BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK)
+ = new_block (NON_FUNCTION_BLOCK);
BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK)) =
BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
@@ -4730,48 +4688,22 @@ new_bvect (int nblocks)
return bv;
}
-/* Allocate and zero a new block of MAXSYMS symbols */
+/* Allocate and zero a new block, and set its BLOCK_DICT. If function
+ is non-zero, assume the block is associated to a function, and make
+ sure that the symbols are stored linearly; otherwise, store them
+ hashed. */
static struct block *
-new_block (int maxsyms)
+new_block (enum block_type type)
{
- int size = sizeof (struct block) + (maxsyms - 1) * sizeof (struct symbol *);
-
- return (struct block *) xzalloc (size);
-}
-
-/* Ooops, too big. Shrink block B in symtab S to its minimal size.
- Shrink_block can also be used by add_symbol to grow a block. */
+ struct block *retval = xzalloc (sizeof (struct block));
-static struct block *
-shrink_block (struct block *b, struct symtab *s)
-{
- struct block *new;
- struct blockvector *bv = BLOCKVECTOR (s);
- int i;
+ if (type == FUNCTION_BLOCK)
+ BLOCK_DICT (retval) = dict_create_linear_expandable ();
+ else
+ BLOCK_DICT (retval) = dict_create_hashed_expandable ();
- /* Just reallocate it and fix references to the old one */
-
- new = (struct block *) xrealloc ((void *) b,
- (sizeof (struct block)
- + ((BLOCK_NSYMS (b) - 1)
- * sizeof (struct symbol *))));
-
- /* FIXME: Not worth hashing this block as it's built. */
- /* All callers should have created the block with new_block (), which
- would mean it was not previously hashed. Make sure. */
- gdb_assert (BLOCK_HASHTABLE (new) == 0);
-
- /* Should chase pointers to old one. Fortunately, that`s just
- the block`s function and inferior blocks */
- if (BLOCK_FUNCTION (new) && SYMBOL_BLOCK_VALUE (BLOCK_FUNCTION (new)) == b)
- SYMBOL_BLOCK_VALUE (BLOCK_FUNCTION (new)) = new;
- for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); i++)
- if (BLOCKVECTOR_BLOCK (bv, i) == b)
- BLOCKVECTOR_BLOCK (bv, i) = new;
- else if (BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (bv, i)) == b)
- BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (bv, i)) = new;
- return new;
+ return retval;
}
/* Create a new symbol with printname NAME */
@@ -4908,7 +4840,7 @@ fixup_sigtramp (void)
TYPE_TARGET_TYPE (SYMBOL_TYPE (s)) = mdebug_type_void;
/* Need a block to allocate MIPS_EFI_SYMBOL_NAME in */
- b = new_block (1);
+ b = new_block (NON_FUNCTION_BLOCK);
SYMBOL_BLOCK_VALUE (s) = b;
BLOCK_START (b) = sigtramp_address;
BLOCK_END (b) = sigtramp_end;
@@ -4951,7 +4883,7 @@ fixup_sigtramp (void)
current_objfile = NULL;
}
- BLOCK_SYM (b, BLOCK_NSYMS (b)++) = s;
+ dict_add_symbol (BLOCK_DICT (b), s);
}
#endif /* TM_MIPS_H */
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 05ad413cc0a..4ab5dbf1009 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -514,6 +514,8 @@ mem_delete_command (char *args, int from_tty)
dont_repeat ();
}
+extern initialize_file_ftype _initialize_mem; /* -Wmissing-prototype */
+
void
_initialize_mem (void)
{
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 3b0124c2c3d..57651c2d16a 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,23 @@
+2003-06-11 David Carlton <carlton@bactrian.org>
+
+ * mi-cmd-stack.c: Include dictionary.h.
+ (list_args_or_locals): Update use of ALL_BLOCK_SYMBOLS.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c (get_register): Replace REGISTER_CONVERTIBLE with
+ DEPRECATED_REGISTER_CONVERTIBLE.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * mi-parse.c (_initialize_mi_parse): Delete function.
+ * mi-main.c: Include "mi-main.h".
+ * mi-interp.c (_initialize_mi_interp): Add declaration.
+ * mi-cmd-stack.c: Include "stack.h".
+ (select_frame_command_wrapper): Delete extern declaration.
+ (mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
+ with select_frame_command.
+
2003-05-16 Andrew Cagney <cagney@redhat.com>
* mi-main.c (mi_setup_architecture_data):
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 1f6a9a1aa73..6330cda473c 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -27,11 +27,8 @@
#include "ui-out.h"
#include "symtab.h"
#include "block.h"
-
-/* FIXME: these should go in some .h file but stack.c doesn't have a
- corresponding .h file. These wrappers will be obsolete anyway, once
- we pull the plug on the sanitization. */
-extern void select_frame_command_wrapper (char *, int);
+#include "stack.h"
+#include "dictionary.h"
static void list_args_or_locals (int locals, int values, struct frame_info *fi);
@@ -217,7 +214,8 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
{
struct block *block;
struct symbol *sym;
- int i, nsyms;
+ struct dict_iterator iter;
+ int nsyms;
struct cleanup *cleanup_list;
static struct ui_stream *stb = NULL;
@@ -229,7 +227,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
while (block != 0)
{
- ALL_BLOCK_SYMBOLS (block, i, sym)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
int print_me = 0;
@@ -311,8 +309,8 @@ mi_cmd_stack_select_frame (char *command, char **argv, int argc)
/* with no args, don't change frame */
if (argc == 0)
- select_frame_command_wrapper (0, 1 /* not used */ );
+ select_frame_command (0, 1 /* not used */ );
else
- select_frame_command_wrapper (argv[0], 1 /* not used */ );
+ select_frame_command (argv[0], 1 /* not used */ );
return MI_CMD_DONE;
}
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 87ed17f16c9..696ae06e24c 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -393,6 +393,8 @@ mi_input (char *buf)
return gdb_readline (NULL);
}
+extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
+
void
_initialize_mi_interp (void)
{
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 0e9cb248a10..5e55913fb94 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -41,6 +41,7 @@
#include "regcache.h"
#include "gdb.h"
#include "frame.h"
+#include "mi-main.h"
#include <ctype.h>
#include <sys/time.h>
@@ -535,9 +536,9 @@ get_register (int regnum, int format)
/* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (regnum))
+ if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
{
- REGISTER_CONVERT_TO_VIRTUAL (regnum,
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
register_type (current_gdbarch, regnum),
raw_buffer, virtual_buffer);
}
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index caefd5936a5..ebfddc7ff29 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -231,8 +231,3 @@ mi_parse (char *cmd)
parse->op = MI_COMMAND;
return parse;
}
-
-void
-_initialize_mi_parse (void)
-{
-}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index b8072f1aba7..78503d1c650 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -80,7 +80,7 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
@@ -367,7 +367,7 @@ mips64_linux_get_longjmp_target (CORE_ADDR *pc)
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index e370534f38c..fbd18c0b43f 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -150,7 +150,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 31410d66fc4..70bb92be0c7 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -48,6 +48,8 @@
#include "elf-bfd.h"
#include "symcat.h"
+static void set_reg_offset (CORE_ADDR *saved_regs, int regnum, CORE_ADDR off);
+
/* A useful bit in the CP0 status register (PS_REGNUM). */
/* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip. */
#define ST0_FR (1 << 26)
@@ -150,6 +152,27 @@ static const char *mips_saved_regsize_string = size_auto;
#define MIPS_SAVED_REGSIZE (mips_saved_regsize())
+/* MIPS16 function addresses are odd (bit 0 is set). Here are some
+ functions to test, set, or clear bit 0 of addresses. */
+
+static CORE_ADDR
+is_mips16_addr (CORE_ADDR addr)
+{
+ return ((addr) & 1);
+}
+
+static CORE_ADDR
+make_mips16_addr (CORE_ADDR addr)
+{
+ return ((addr) | 1);
+}
+
+static CORE_ADDR
+unmake_mips16_addr (CORE_ADDR addr)
+{
+ return ((addr) & ~1);
+}
+
/* Return the contents of register REGNUM as a signed integer. */
static LONGEST
@@ -350,8 +373,6 @@ mips_stack_argsize (void)
int gdb_print_insn_mips (bfd_vma, disassemble_info *);
-static void mips_print_register (int, int);
-
static mips_extra_func_info_t heuristic_proc_desc (CORE_ADDR, CORE_ADDR,
struct frame_info *, int);
@@ -372,9 +393,6 @@ static mips_extra_func_info_t find_proc_desc (CORE_ADDR pc,
static CORE_ADDR after_prologue (CORE_ADDR pc,
mips_extra_func_info_t proc_desc);
-static void mips_read_fp_register_single (int regno, char *rare_buffer);
-static void mips_read_fp_register_double (int regno, char *rare_buffer);
-
static struct type *mips_float_register_type (void);
static struct type *mips_double_register_type (void);
@@ -603,7 +621,7 @@ mips_register_convert_to_virtual (int n, struct type *virtual_type,
static void
mips_register_convert_to_raw (struct type *virtual_type, int n,
- char *virt_buf, char *raw_buf)
+ const char *virt_buf, char *raw_buf)
{
memset (raw_buf, 0, REGISTER_RAW_SIZE (n));
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
@@ -786,7 +804,7 @@ pc_is_mips16 (bfd_vma memaddr)
struct minimal_symbol *sym;
/* If bit 0 of the address is set, assume this is a MIPS16 address. */
- if (IS_MIPS16_ADDR (memaddr))
+ if (is_mips16_addr (memaddr))
return 1;
/* A flag indicating that this is a MIPS16 function is stored by elfread.c in
@@ -919,7 +937,7 @@ mips_fetch_instruction (CORE_ADDR addr)
if (pc_is_mips16 (addr))
{
instlen = MIPS16_INSTLEN;
- addr = UNMAKE_MIPS16_ADDR (addr);
+ addr = unmake_mips16_addr (addr);
}
else
instlen = MIPS_INSTLEN;
@@ -1422,38 +1440,37 @@ mips_next_pc (CORE_ADDR pc)
return mips32_next_pc (pc);
}
-/* Guaranteed to set fci->saved_regs to some values (it never leaves it
- NULL).
-
- Note: kevinb/2002-08-09: The only caller of this function is (and
- should remain) mips_frame_init_saved_regs(). In fact,
- aside from calling mips_find_saved_regs(), mips_frame_init_saved_regs()
- does nothing more than set frame->saved_regs[SP_REGNUM]. These two
- functions should really be combined and now that there is only one
- caller, it should be straightforward. (Watch out for multiple returns
- though.) */
+/* Set up the 'saved_regs' array. This is a data structure containing
+ the addresses on the stack where each register has been saved, for
+ each stack frame. Registers that have not been saved will have
+ zero here. The stack pointer register is special: rather than the
+ address where the stack register has been saved,
+ saved_regs[SP_REGNUM] will have the actual value of the previous
+ frame's stack register. */
static void
mips_find_saved_regs (struct frame_info *fci)
{
int ireg;
- CORE_ADDR reg_position;
/* r0 bit means kernel trap */
int kernel_trap;
/* What registers have been saved? Bitmasks. */
unsigned long gen_mask, float_mask;
mips_extra_func_info_t proc_desc;
t_inst inst;
+ CORE_ADDR *saved_regs;
- frame_saved_regs_zalloc (fci);
+ if (get_frame_saved_regs (fci) != NULL)
+ return;
+ saved_regs = frame_saved_regs_zalloc (fci);
/* If it is the frame for sigtramp, the saved registers are located
- in a sigcontext structure somewhere on the stack.
- If the stack layout for sigtramp changes we might have to change these
- constants and the companion fixup_sigtramp in mdebugread.c */
+ in a sigcontext structure somewhere on the stack. If the stack
+ layout for sigtramp changes we might have to change these
+ constants and the companion fixup_sigtramp in mdebugread.c */
#ifndef SIGFRAME_BASE
-/* To satisfy alignment restrictions, sigcontext is located 4 bytes
- above the sigtramp frame. */
+ /* To satisfy alignment restrictions, sigcontext is located 4 bytes
+ above the sigtramp frame. */
#define SIGFRAME_BASE MIPS_REGSIZE
/* FIXME! Are these correct?? */
#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * MIPS_REGSIZE)
@@ -1462,61 +1479,65 @@ mips_find_saved_regs (struct frame_info *fci)
(SIGFRAME_REGSAVE_OFF + MIPS_NUMREGS * MIPS_REGSIZE + 3 * MIPS_REGSIZE)
#endif
#ifndef SIGFRAME_REG_SIZE
-/* FIXME! Is this correct?? */
+ /* FIXME! Is this correct?? */
#define SIGFRAME_REG_SIZE MIPS_REGSIZE
#endif
if ((get_frame_type (fci) == SIGTRAMP_FRAME))
{
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
- reg_position = get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
- + ireg * SIGFRAME_REG_SIZE;
- get_frame_saved_regs (fci)[ireg] = reg_position;
+ CORE_ADDR reg_position = (get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
+ + ireg * SIGFRAME_REG_SIZE);
+ set_reg_offset (saved_regs, ireg, reg_position);
}
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
- reg_position = get_frame_base (fci) + SIGFRAME_FPREGSAVE_OFF
- + ireg * SIGFRAME_REG_SIZE;
- get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + SIGFRAME_FPREGSAVE_OFF
+ + ireg * SIGFRAME_REG_SIZE);
+ set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
}
- get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_base (fci) + SIGFRAME_PC_OFF;
+
+ set_reg_offset (saved_regs, PC_REGNUM, get_frame_base (fci) + SIGFRAME_PC_OFF);
+ /* SP_REGNUM, contains the value and not the address. */
+ set_reg_offset (saved_regs, SP_REGNUM, get_frame_base (fci));
return;
}
proc_desc = get_frame_extra_info (fci)->proc_desc;
if (proc_desc == NULL)
- /* I'm not sure how/whether this can happen. Normally when we can't
- find a proc_desc, we "synthesize" one using heuristic_proc_desc
- and set the saved_regs right away. */
+ /* I'm not sure how/whether this can happen. Normally when we
+ can't find a proc_desc, we "synthesize" one using
+ heuristic_proc_desc and set the saved_regs right away. */
return;
kernel_trap = PROC_REG_MASK (proc_desc) & 1;
gen_mask = kernel_trap ? 0xFFFFFFFF : PROC_REG_MASK (proc_desc);
float_mask = kernel_trap ? 0xFFFFFFFF : PROC_FREG_MASK (proc_desc);
- if ( /* In any frame other than the innermost or a frame interrupted by
- a signal, we assume that all registers have been saved.
- This assumes that all register saves in a function happen before
- the first function call. */
+ if (/* In any frame other than the innermost or a frame interrupted
+ by a signal, we assume that all registers have been saved.
+ This assumes that all register saves in a function happen
+ before the first function call. */
(get_next_frame (fci) == NULL
|| (get_frame_type (get_next_frame (fci)) == SIGTRAMP_FRAME))
- /* In a dummy frame we know exactly where things are saved. */
+ /* In a dummy frame we know exactly where things are saved. */
&& !PROC_DESC_IS_DUMMY (proc_desc)
- /* Don't bother unless we are inside a function prologue. Outside the
- prologue, we know where everything is. */
+ /* Don't bother unless we are inside a function prologue.
+ Outside the prologue, we know where everything is. */
&& in_prologue (get_frame_pc (fci), PROC_LOW_ADDR (proc_desc))
- /* Not sure exactly what kernel_trap means, but if it means
- the kernel saves the registers without a prologue doing it,
- we better not examine the prologue to see whether registers
- have been saved yet. */
+ /* Not sure exactly what kernel_trap means, but if it means the
+ kernel saves the registers without a prologue doing it, we
+ better not examine the prologue to see whether registers
+ have been saved yet. */
&& !kernel_trap)
{
- /* We need to figure out whether the registers that the proc_desc
- claims are saved have been saved yet. */
+ /* We need to figure out whether the registers that the
+ proc_desc claims are saved have been saved yet. */
CORE_ADDR addr;
@@ -1529,8 +1550,8 @@ mips_find_saved_regs (struct frame_info *fci)
addr = PROC_LOW_ADDR (proc_desc);
instlen = pc_is_mips16 (addr) ? MIPS16_INSTLEN : MIPS_INSTLEN;
- /* Scan through this function's instructions preceding the current
- PC, and look for those that save registers. */
+ /* Scan through this function's instructions preceding the
+ current PC, and look for those that save registers. */
while (addr < get_frame_pc (fci))
{
inst = mips_fetch_instruction (addr);
@@ -1544,89 +1565,84 @@ mips_find_saved_regs (struct frame_info *fci)
float_mask = float_save_found;
}
- /* Fill in the offsets for the registers which gen_mask says
- were saved. */
- reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
- for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
- if (gen_mask & 0x80000000)
- {
- get_frame_saved_regs (fci)[ireg] = reg_position;
- reg_position -= MIPS_SAVED_REGSIZE;
- }
+ /* Fill in the offsets for the registers which gen_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + PROC_REG_OFFSET (proc_desc));
+ for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
+ if (gen_mask & 0x80000000)
+ {
+ set_reg_offset (saved_regs, ireg, reg_position);
+ reg_position -= MIPS_SAVED_REGSIZE;
+ }
+ }
- /* The MIPS16 entry instruction saves $s0 and $s1 in the reverse order
- of that normally used by gcc. Therefore, we have to fetch the first
- instruction of the function, and if it's an entry instruction that
- saves $s0 or $s1, correct their saved addresses. */
+ /* The MIPS16 entry instruction saves $s0 and $s1 in the reverse
+ order of that normally used by gcc. Therefore, we have to fetch
+ the first instruction of the function, and if it's an entry
+ instruction that saves $s0 or $s1, correct their saved addresses. */
if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)))
{
inst = mips_fetch_instruction (PROC_LOW_ADDR (proc_desc));
- if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
+ if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700)
+ /* entry */
{
int reg;
int sreg_count = (inst >> 6) & 3;
/* Check if the ra register was pushed on the stack. */
- reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + PROC_REG_OFFSET (proc_desc));
if (inst & 0x20)
reg_position -= MIPS_SAVED_REGSIZE;
- /* Check if the s0 and s1 registers were pushed on the stack. */
+ /* Check if the s0 and s1 registers were pushed on the
+ stack. */
for (reg = 16; reg < sreg_count + 16; reg++)
{
- get_frame_saved_regs (fci)[reg] = reg_position;
+ set_reg_offset (saved_regs, reg, reg_position);
reg_position -= MIPS_SAVED_REGSIZE;
}
}
}
- /* Fill in the offsets for the registers which float_mask says
- were saved. */
- reg_position = get_frame_base (fci) + PROC_FREG_OFFSET (proc_desc);
-
- /* Apparently, the freg_offset gives the offset to the first 64 bit
- saved.
+ /* Fill in the offsets for the registers which float_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + PROC_FREG_OFFSET (proc_desc));
- When the ABI specifies 64 bit saved registers, the FREG_OFFSET
- designates the first saved 64 bit register.
+ /* Apparently, the freg_offset gives the offset to the first 64
+ bit saved.
- When the ABI specifies 32 bit saved registers, the ``64 bit saved
- DOUBLE'' consists of two adjacent 32 bit registers, Hence
- FREG_OFFSET, designates the address of the lower register of the
- register pair. Adjust the offset so that it designates the upper
- register of the pair -- i.e., the address of the first saved 32
- bit register. */
+ When the ABI specifies 64 bit saved registers, the FREG_OFFSET
+ designates the first saved 64 bit register.
- if (MIPS_SAVED_REGSIZE == 4)
- reg_position += MIPS_SAVED_REGSIZE;
+ When the ABI specifies 32 bit saved registers, the ``64 bit
+ saved DOUBLE'' consists of two adjacent 32 bit registers, Hence
+ FREG_OFFSET, designates the address of the lower register of
+ the register pair. Adjust the offset so that it designates the
+ upper register of the pair -- i.e., the address of the first
+ saved 32 bit register. */
- /* Fill in the offsets for the float registers which float_mask says
- were saved. */
- for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
- if (float_mask & 0x80000000)
- {
- get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
- reg_position -= MIPS_SAVED_REGSIZE;
- }
+ if (MIPS_SAVED_REGSIZE == 4)
+ reg_position += MIPS_SAVED_REGSIZE;
- get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_saved_regs (fci)[RA_REGNUM];
-}
+ /* Fill in the offsets for the float registers which float_mask
+ says were saved. */
+ for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
+ if (float_mask & 0x80000000)
+ {
+ set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
+ reg_position -= MIPS_SAVED_REGSIZE;
+ }
-/* Set up the 'saved_regs' array. This is a data structure containing
- the addresses on the stack where each register has been saved, for
- each stack frame. Registers that have not been saved will have
- zero here. The stack pointer register is special: rather than the
- address where the stack register has been saved, saved_regs[SP_REGNUM]
- will have the actual value of the previous frame's stack register. */
+ set_reg_offset (saved_regs, PC_REGNUM, saved_regs[RA_REGNUM]);
+ }
-static void
-mips_frame_init_saved_regs (struct frame_info *frame)
-{
- if (get_frame_saved_regs (frame) == NULL)
- {
- mips_find_saved_regs (frame);
- }
- get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame);
+ /* SP_REGNUM, contains the value and not the address. */
+ set_reg_offset (saved_regs, SP_REGNUM, get_frame_base (fci));
}
static CORE_ADDR
@@ -1781,16 +1797,16 @@ static struct mips_extra_func_info temp_proc_desc;
frames. */
static CORE_ADDR *temp_saved_regs;
-/* Set a register's saved stack address in temp_saved_regs. If an address
- has already been set for this register, do nothing; this way we will
- only recognize the first save of a given register in a function prologue.
- This is a helper function for mips{16,32}_heuristic_proc_desc. */
+/* Set a register's saved stack address in temp_saved_regs. If an
+ address has already been set for this register, do nothing; this
+ way we will only recognize the first save of a given register in a
+ function prologue. */
static void
-set_reg_offset (int regno, CORE_ADDR offset)
+set_reg_offset (CORE_ADDR *saved_regs, int regno, CORE_ADDR offset)
{
- if (temp_saved_regs[regno] == 0)
- temp_saved_regs[regno] = offset;
+ if (saved_regs[regno] == 0)
+ saved_regs[regno] = offset;
}
@@ -1986,26 +2002,26 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
reg = mips16_to_32_reg[(inst & 0x700) >> 8];
PROC_REG_MASK (&temp_proc_desc) |= (1 << reg);
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
}
else if ((inst & 0xff00) == 0xf900) /* sd reg,n($sp) */
{
offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
PROC_REG_MASK (&temp_proc_desc) |= (1 << reg);
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
}
else if ((inst & 0xff00) == 0x6200) /* sw $ra,n($sp) */
{
offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
PROC_REG_MASK (&temp_proc_desc) |= (1 << RA_REGNUM);
- set_reg_offset (RA_REGNUM, sp + offset);
+ set_reg_offset (temp_saved_regs, RA_REGNUM, sp + offset);
}
else if ((inst & 0xff00) == 0xfa00) /* sd $ra,n($sp) */
{
offset = mips16_get_imm (prev_inst, inst, 8, 8, 0);
PROC_REG_MASK (&temp_proc_desc) |= (1 << RA_REGNUM);
- set_reg_offset (RA_REGNUM, sp + offset);
+ set_reg_offset (temp_saved_regs, RA_REGNUM, sp + offset);
}
else if (inst == 0x673d) /* move $s1, $sp */
{
@@ -2024,14 +2040,14 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
offset = mips16_get_imm (prev_inst, inst, 5, 4, 0);
reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, frame_addr + offset);
+ set_reg_offset (temp_saved_regs, reg, frame_addr + offset);
}
else if ((inst & 0xFF00) == 0x7900) /* sd reg,offset($s1) */
{
offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, frame_addr + offset);
+ set_reg_offset (temp_saved_regs, reg, frame_addr + offset);
}
else if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
entry_inst = inst; /* save for later processing */
@@ -2061,7 +2077,7 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
for (reg = 4, offset = 0; reg < areg_count + 4; reg++)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
offset += MIPS_SAVED_REGSIZE;
}
@@ -2070,7 +2086,7 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
if (entry_inst & 0x20)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << RA_REGNUM;
- set_reg_offset (RA_REGNUM, sp + offset);
+ set_reg_offset (temp_saved_regs, RA_REGNUM, sp + offset);
offset -= MIPS_SAVED_REGSIZE;
}
@@ -2078,7 +2094,7 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
for (reg = 16; reg < sreg_count + 16; reg++)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
offset -= MIPS_SAVED_REGSIZE;
}
}
@@ -2123,7 +2139,7 @@ restart:
else if ((high_word & 0xFFE0) == 0xafa0) /* sw reg,offset($sp) */
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + low_word);
+ set_reg_offset (temp_saved_regs, reg, sp + low_word);
}
else if ((high_word & 0xFFE0) == 0xffa0) /* sd reg,offset($sp) */
{
@@ -2131,7 +2147,7 @@ restart:
but the register size used is only 32 bits. Make the address
for the saved register point to the lower 32 bits. */
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + low_word + 8 - MIPS_REGSIZE);
+ set_reg_offset (temp_saved_regs, reg, sp + low_word + 8 - MIPS_REGSIZE);
}
else if (high_word == 0x27be) /* addiu $30,$sp,size */
{
@@ -2181,7 +2197,7 @@ restart:
else if ((high_word & 0xFFE0) == 0xafc0) /* sw reg,offset($30) */
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, frame_addr + low_word);
+ set_reg_offset (temp_saved_regs, reg, frame_addr + low_word);
}
}
}
@@ -2580,15 +2596,18 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
if (!PC_IN_SIGTRAMP (get_frame_pc (fci), name))
{
frame_saved_regs_zalloc (fci);
- memcpy (get_frame_saved_regs (fci), temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
- get_frame_saved_regs (fci)[PC_REGNUM]
- = get_frame_saved_regs (fci)[RA_REGNUM];
- /* Set value of previous frame's stack pointer. Remember that
- saved_regs[SP_REGNUM] is special in that it contains the
- value of the stack pointer register. The other saved_regs
- values are addresses (in the inferior) at which a given
- register's value may be found. */
- get_frame_saved_regs (fci)[SP_REGNUM] = get_frame_base (fci);
+ /* Set value of previous frame's stack pointer.
+ Remember that saved_regs[SP_REGNUM] is special in
+ that it contains the value of the stack pointer
+ register. The other saved_regs values are addresses
+ (in the inferior) at which a given register's value
+ may be found. */
+ set_reg_offset (temp_saved_regs, SP_REGNUM,
+ get_frame_base (fci));
+ set_reg_offset (temp_saved_regs, PC_REGNUM,
+ temp_saved_regs[RA_REGNUM]);
+ memcpy (get_frame_saved_regs (fci), temp_saved_regs,
+ SIZEOF_FRAME_SAVED_REGS);
}
}
@@ -2691,11 +2710,10 @@ mips_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
}
static CORE_ADDR
-mips_eabi_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -2703,6 +2721,14 @@ mips_eabi_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -2722,7 +2748,7 @@ mips_eabi_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_arguments: sp=0x%s allocated %d\n",
+ "mips_eabi_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -2734,7 +2760,7 @@ mips_eabi_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_eabi_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
}
@@ -2753,7 +2779,7 @@ mips_eabi_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_arguments: %d len=%d type=%d",
+ "mips_eabi_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
/* The EABI passes structures that do not fit in a register by
@@ -2937,18 +2963,19 @@ mips_eabi_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
/* Return adjusted stack pointer. */
return sp;
}
-/* N32/N64 version of push_arguments. */
+/* N32/N64 version of push_dummy_call. */
static CORE_ADDR
-mips_n32n64_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -2956,6 +2983,14 @@ mips_n32n64_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -2973,7 +3008,7 @@ mips_n32n64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_arguments: sp=0x%s allocated %d\n",
+ "mips_n32n64_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -2985,7 +3020,7 @@ mips_n32n64_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_n32n64_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
}
@@ -3004,7 +3039,7 @@ mips_n32n64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_arguments: %d len=%d type=%d",
+ "mips_n32n64_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
val = (char *) VALUE_CONTENTS (arg);
@@ -3159,18 +3194,19 @@ mips_n32n64_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
/* Return adjusted stack pointer. */
return sp;
}
-/* O32 version of push_arguments. */
+/* O32 version of push_dummy_call. */
static CORE_ADDR
-mips_o32_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -3178,6 +3214,14 @@ mips_o32_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -3195,7 +3239,7 @@ mips_o32_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_arguments: sp=0x%s allocated %d\n",
+ "mips_o32_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -3207,7 +3251,7 @@ mips_o32_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_o32_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
stack_offset += MIPS_STACK_ARGSIZE;
@@ -3227,7 +3271,7 @@ mips_o32_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_arguments: %d len=%d type=%d",
+ "mips_o32_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
val = (char *) VALUE_CONTENTS (arg);
@@ -3458,18 +3502,19 @@ mips_o32_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
/* Return adjusted stack pointer. */
return sp;
}
-/* O64 version of push_arguments. */
+/* O64 version of push_dummy_call. */
static CORE_ADDR
-mips_o64_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -3477,6 +3522,14 @@ mips_o64_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -3494,7 +3547,7 @@ mips_o64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_arguments: sp=0x%s allocated %d\n",
+ "mips_o64_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -3506,7 +3559,7 @@ mips_o64_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_o64_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
stack_offset += MIPS_STACK_ARGSIZE;
@@ -3526,7 +3579,7 @@ mips_o64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_arguments: %d len=%d type=%d",
+ "mips_o64_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
val = (char *) VALUE_CONTENTS (arg);
@@ -3757,16 +3810,9 @@ mips_o64_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
- /* Return adjusted stack pointer. */
- return sp;
-}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
-static CORE_ADDR
-mips_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- /* Set the return address register to point to the entry
- point of the program, where a breakpoint lies in wait. */
- write_register (RA_REGNUM, CALL_DUMMY_ADDRESS ());
+ /* Return adjusted stack pointer. */
return sp;
}
@@ -3787,8 +3833,7 @@ mips_pop_frame (void)
proc_desc = get_frame_extra_info (frame)->proc_desc;
write_register (PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
- if (get_frame_saved_regs (frame) == NULL)
- DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
+ mips_find_saved_regs (frame);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (regnum != SP_REGNUM && regnum != PC_REGNUM
&& get_frame_saved_regs (frame)[regnum])
@@ -3844,13 +3889,6 @@ mips_pop_frame (void)
}
}
-static void
-mips_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
-{
- write_register(T9_REGNUM, fun);
-}
-
/* Floating point register management.
Background: MIPS1 & 2 fp registers are 32 bits wide. To support
@@ -3903,12 +3941,13 @@ mips_double_register_type (void)
into rare_buffer. */
static void
-mips_read_fp_register_single (int regno, char *rare_buffer)
+mips_read_fp_register_single (struct frame_info *frame, int regno,
+ char *rare_buffer)
{
int raw_size = REGISTER_RAW_SIZE (regno);
char *raw_buffer = alloca (raw_size);
- if (!frame_register_read (deprecated_selected_frame, regno, raw_buffer))
+ if (!frame_register_read (frame, regno, raw_buffer))
error ("can't read register %d (%s)", regno, REGISTER_NAME (regno));
if (raw_size == 8)
{
@@ -3934,7 +3973,8 @@ mips_read_fp_register_single (int regno, char *rare_buffer)
register. */
static void
-mips_read_fp_register_double (int regno, char *rare_buffer)
+mips_read_fp_register_double (struct frame_info *frame, int regno,
+ char *rare_buffer)
{
int raw_size = REGISTER_RAW_SIZE (regno);
@@ -3942,7 +3982,7 @@ mips_read_fp_register_double (int regno, char *rare_buffer)
{
/* We have a 64-bit value for this register, and we should use
all 64 bits. */
- if (!frame_register_read (deprecated_selected_frame, regno, rare_buffer))
+ if (!frame_register_read (frame, regno, rare_buffer))
error ("can't read register %d (%s)", regno, REGISTER_NAME (regno));
}
else
@@ -3956,19 +3996,20 @@ mips_read_fp_register_double (int regno, char *rare_buffer)
each register. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- mips_read_fp_register_single (regno, rare_buffer + 4);
- mips_read_fp_register_single (regno + 1, rare_buffer);
+ mips_read_fp_register_single (frame, regno, rare_buffer + 4);
+ mips_read_fp_register_single (frame, regno + 1, rare_buffer);
}
else
{
- mips_read_fp_register_single (regno, rare_buffer);
- mips_read_fp_register_single (regno + 1, rare_buffer + 4);
+ mips_read_fp_register_single (frame, regno, rare_buffer);
+ mips_read_fp_register_single (frame, regno + 1, rare_buffer + 4);
}
}
}
static void
-mips_print_fp_register (int regnum)
+mips_print_fp_register (struct ui_file *file, struct frame_info *frame,
+ int regnum)
{ /* do values for FP (float) regs */
char *raw_buffer;
double doub, flt1, flt2; /* doubles extracted from raw hex data */
@@ -3976,94 +4017,94 @@ mips_print_fp_register (int regnum)
raw_buffer = (char *) alloca (2 * REGISTER_RAW_SIZE (FP0_REGNUM));
- printf_filtered ("%s:", REGISTER_NAME (regnum));
- printf_filtered ("%*s", 4 - (int) strlen (REGISTER_NAME (regnum)), "");
+ fprintf_filtered (file, "%s:", REGISTER_NAME (regnum));
+ fprintf_filtered (file, "%*s", 4 - (int) strlen (REGISTER_NAME (regnum)),
+ "");
if (REGISTER_RAW_SIZE (regnum) == 4 || mips2_fp_compat ())
{
/* 4-byte registers: Print hex and floating. Also print even
numbered registers as doubles. */
- mips_read_fp_register_single (regnum, raw_buffer);
+ mips_read_fp_register_single (frame, regnum, raw_buffer);
flt1 = unpack_double (mips_float_register_type (), raw_buffer, &inv1);
- print_scalar_formatted (raw_buffer, builtin_type_uint32, 'x', 'w',
- gdb_stdout);
+ print_scalar_formatted (raw_buffer, builtin_type_uint32, 'x', 'w', file);
- printf_filtered (" flt: ");
+ fprintf_filtered (file, " flt: ");
if (inv1)
- printf_filtered (" <invalid float> ");
+ fprintf_filtered (file, " <invalid float> ");
else
- printf_filtered ("%-17.9g", flt1);
+ fprintf_filtered (file, "%-17.9g", flt1);
if (regnum % 2 == 0)
{
- mips_read_fp_register_double (regnum, raw_buffer);
+ mips_read_fp_register_double (frame, regnum, raw_buffer);
doub = unpack_double (mips_double_register_type (), raw_buffer,
&inv2);
- printf_filtered (" dbl: ");
+ fprintf_filtered (file, " dbl: ");
if (inv2)
- printf_filtered ("<invalid double>");
+ fprintf_filtered (file, "<invalid double>");
else
- printf_filtered ("%-24.17g", doub);
+ fprintf_filtered (file, "%-24.17g", doub);
}
}
else
{
/* Eight byte registers: print each one as hex, float and double. */
- mips_read_fp_register_single (regnum, raw_buffer);
+ mips_read_fp_register_single (frame, regnum, raw_buffer);
flt1 = unpack_double (mips_float_register_type (), raw_buffer, &inv1);
- mips_read_fp_register_double (regnum, raw_buffer);
+ mips_read_fp_register_double (frame, regnum, raw_buffer);
doub = unpack_double (mips_double_register_type (), raw_buffer, &inv2);
- print_scalar_formatted (raw_buffer, builtin_type_uint64, 'x', 'g',
- gdb_stdout);
+ print_scalar_formatted (raw_buffer, builtin_type_uint64, 'x', 'g', file);
- printf_filtered (" flt: ");
+ fprintf_filtered (file, " flt: ");
if (inv1)
- printf_filtered ("<invalid float>");
+ fprintf_filtered (file, "<invalid float>");
else
- printf_filtered ("%-17.9g", flt1);
+ fprintf_filtered (file, "%-17.9g", flt1);
- printf_filtered (" dbl: ");
+ fprintf_filtered (file, " dbl: ");
if (inv2)
- printf_filtered ("<invalid double>");
+ fprintf_filtered (file, "<invalid double>");
else
- printf_filtered ("%-24.17g", doub);
+ fprintf_filtered (file, "%-24.17g", doub);
}
}
static void
-mips_print_register (int regnum, int all)
+mips_print_register (struct ui_file *file, struct frame_info *frame,
+ int regnum, int all)
{
char raw_buffer[MAX_REGISTER_SIZE];
int offset;
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
{
- mips_print_fp_register (regnum);
+ mips_print_fp_register (file, frame, regnum);
return;
}
/* Get the data in raw format. */
- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (frame, regnum, raw_buffer))
{
- printf_filtered ("%s: [Invalid]", REGISTER_NAME (regnum));
+ fprintf_filtered (file, "%s: [Invalid]", REGISTER_NAME (regnum));
return;
}
- fputs_filtered (REGISTER_NAME (regnum), gdb_stdout);
+ fputs_filtered (REGISTER_NAME (regnum), file);
/* The problem with printing numeric register names (r26, etc.) is that
the user can't use them on input. Probably the best solution is to
fix it so that either the numeric or the funky (a2, etc.) names
are accepted on input. */
if (regnum < MIPS_NUMREGS)
- printf_filtered ("(r%d): ", regnum);
+ fprintf_filtered (file, "(r%d): ", regnum);
else
- printf_filtered (": ");
+ fprintf_filtered (file, ": ");
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
@@ -4072,18 +4113,19 @@ mips_print_register (int regnum, int all)
print_scalar_formatted (raw_buffer + offset,
REGISTER_VIRTUAL_TYPE (regnum),
- 'x', 0, gdb_stdout);
+ 'x', 0, file);
}
/* Replacement for generic do_registers_info.
Print regs in pretty columns. */
static int
-do_fp_register_row (int regnum)
+print_fp_register_row (struct ui_file *file, struct frame_info *frame,
+ int regnum)
{
- printf_filtered (" ");
- mips_print_fp_register (regnum);
- printf_filtered ("\n");
+ fprintf_filtered (file, " ");
+ mips_print_fp_register (file, frame, regnum);
+ fprintf_filtered (file, "\n");
return regnum + 1;
}
@@ -4091,7 +4133,8 @@ do_fp_register_row (int regnum)
/* Print a row's worth of GP (int) registers, with name labels above */
static int
-do_gp_register_row (int regnum)
+print_gp_register_row (struct ui_file *file, struct frame_info *frame,
+ int regnum)
{
/* do values for GP (int) regs */
char raw_buffer[MAX_REGISTER_SIZE];
@@ -4102,19 +4145,20 @@ do_gp_register_row (int regnum)
/* For GP registers, we print a separate row of names above the vals */
- printf_filtered (" ");
+ fprintf_filtered (file, " ");
for (col = 0; col < ncols && regnum < numregs; regnum++)
{
if (*REGISTER_NAME (regnum) == '\0')
continue; /* unused register */
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
break; /* end the row: reached FP register */
- printf_filtered (MIPS_REGSIZE == 8 ? "%17s" : "%9s",
- REGISTER_NAME (regnum));
+ fprintf_filtered (file, MIPS_REGSIZE == 8 ? "%17s" : "%9s",
+ REGISTER_NAME (regnum));
col++;
}
- printf_filtered (start_regnum < MIPS_NUMREGS ? "\n R%-4d" : "\n ",
- start_regnum); /* print the R0 to R31 names */
+ fprintf_filtered (file,
+ start_regnum < MIPS_NUMREGS ? "\n R%-4d" : "\n ",
+ start_regnum); /* print the R0 to R31 names */
regnum = start_regnum; /* go back to start of row */
/* now print the values in hex, 4 or 8 to the row */
@@ -4125,7 +4169,7 @@ do_gp_register_row (int regnum)
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
break; /* end row: reached FP register */
/* OK: get the data in raw format. */
- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (frame, regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* pad small registers */
for (byte = 0; byte < (MIPS_REGSIZE - REGISTER_VIRTUAL_SIZE (regnum)); byte++)
@@ -4135,17 +4179,17 @@ do_gp_register_row (int regnum)
for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
byte < REGISTER_RAW_SIZE (regnum);
byte++)
- printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
else
for (byte = REGISTER_VIRTUAL_SIZE (regnum) - 1;
byte >= 0;
byte--)
- printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
- printf_filtered (" ");
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
+ fprintf_filtered (file, " ");
col++;
}
if (col > 0) /* ie. if we actually printed anything... */
- printf_filtered ("\n");
+ fprintf_filtered (file, "\n");
return regnum;
}
@@ -4153,15 +4197,16 @@ do_gp_register_row (int regnum)
/* MIPS_DO_REGISTERS_INFO(): called by "info register" command */
static void
-mips_do_registers_info (int regnum, int fpregs)
+mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, int regnum, int all)
{
if (regnum != -1) /* do one specified register */
{
if (*(REGISTER_NAME (regnum)) == '\0')
error ("Not a valid register for the current processor type");
- mips_print_register (regnum, 0);
- printf_filtered ("\n");
+ mips_print_register (file, frame, regnum, 0);
+ fprintf_filtered (file, "\n");
}
else
/* do all (or most) registers */
@@ -4170,12 +4215,14 @@ mips_do_registers_info (int regnum, int fpregs)
while (regnum < NUM_REGS)
{
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
- if (fpregs) /* true for "INFO ALL-REGISTERS" command */
- regnum = do_fp_register_row (regnum); /* FP regs */
- else
- regnum += MIPS_NUMREGS; /* skip floating point regs */
+ {
+ if (all) /* true for "INFO ALL-REGISTERS" command */
+ regnum = print_fp_register_row (file, frame, regnum);
+ else
+ regnum += MIPS_NUMREGS; /* skip floating point regs */
+ }
else
- regnum = do_gp_register_row (regnum); /* GP (int) regs */
+ regnum = print_gp_register_row (file, frame, regnum);
}
}
}
@@ -4887,12 +4934,6 @@ mips_n32n64_store_return_value (struct type *type, char *valbuf)
mips_n32n64_xfer_return_value (type, current_regcache, NULL, valbuf);
}
-static void
-mips_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- /* Nothing to do -- push_arguments does all the work. */
-}
-
static CORE_ADDR
mips_extract_struct_value_address (struct regcache *regcache)
{
@@ -5090,7 +5131,7 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info)
the search would fail because the symbol table says the function
starts at an odd address, i.e. 1 byte past the given address. */
memaddr = ADDR_BITS_REMOVE (memaddr);
- proc_desc = non_heuristic_proc_desc (MAKE_MIPS16_ADDR (memaddr), NULL);
+ proc_desc = non_heuristic_proc_desc (make_mips16_addr (memaddr), NULL);
/* Make an attempt to determine if this is a 16-bit function. If
the procedure descriptor exists and the address therein is odd,
@@ -5098,10 +5139,10 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info)
guess that if the address passed in is odd, it's 16-bits. */
if (proc_desc)
info->mach = pc_is_mips16 (PROC_LOW_ADDR (proc_desc)) ?
- bfd_mach_mips16 : TM_PRINT_INSN_MACH;
+ bfd_mach_mips16 : 0;
else
info->mach = pc_is_mips16 (memaddr) ?
- bfd_mach_mips16 : TM_PRINT_INSN_MACH;
+ bfd_mach_mips16 : 0;
/* Round down the instruction address to the appropriate boundary. */
memaddr &= (info->mach == bfd_mach_mips16 ? ~1 : ~3);
@@ -5128,7 +5169,7 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
if (pc_is_mips16 (*pcptr))
{
static unsigned char mips16_big_breakpoint[] = {0xe8, 0xa5};
- *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
+ *pcptr = unmake_mips16_addr (*pcptr);
*lenptr = sizeof (mips16_big_breakpoint);
return mips16_big_breakpoint;
}
@@ -5158,7 +5199,7 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
if (pc_is_mips16 (*pcptr))
{
static unsigned char mips16_little_breakpoint[] = {0xa5, 0xe8};
- *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
+ *pcptr = unmake_mips16_addr (*pcptr);
*lenptr = sizeof (mips16_little_breakpoint);
return mips16_little_breakpoint;
}
@@ -5406,8 +5447,8 @@ mips_get_saved_register (char *raw_buffer,
lvalp = &lvalx;
if (optimizedp == NULL)
optimizedp = &optimizedx;
- generic_unwind_get_saved_register (raw_buffer, optimizedp, addrp, frame,
- regnum, lvalp);
+ deprecated_unwind_get_saved_register (raw_buffer, optimizedp, addrp, frame,
+ regnum, lvalp);
/* FIXME: cagney/2002-09-13: This is just so bad. The MIPS should
have a pseudo register range that correspons to the ABI's, rather
than the ISA's, view of registers. These registers would then
@@ -5544,8 +5585,6 @@ static struct gdbarch *
mips_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches)
{
- static LONGEST mips_call_dummy_words[] =
- {0};
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
int elf_flags;
@@ -5702,9 +5741,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_float_bit (gdbarch, 32);
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
- set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, mips_register_raw_size);
tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
@@ -5719,7 +5756,7 @@ mips_gdbarch_init (struct gdbarch_info info,
switch (mips_abi)
{
case MIPS_ABI_O32:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_o32_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_o32_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_o32_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_o32_extract_return_value);
tdep->mips_default_saved_regsize = 4;
@@ -5738,7 +5775,7 @@ mips_gdbarch_init (struct gdbarch_info info,
always_use_struct_convention);
break;
case MIPS_ABI_O64:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_o64_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_o64_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_o64_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_o64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5753,11 +5790,10 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_reg_struct_has_addr (gdbarch,
mips_o32_reg_struct_has_addr);
- set_gdbarch_use_struct_convention (gdbarch,
- mips_o32_use_struct_convention);
+ set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
break;
case MIPS_ABI_EABI32:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_eabi_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_eabi_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
tdep->mips_default_saved_regsize = 4;
@@ -5776,7 +5812,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_eabi_use_struct_convention);
break;
case MIPS_ABI_EABI64:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_eabi_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_eabi_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5795,7 +5831,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_eabi_use_struct_convention);
break;
case MIPS_ABI_N32:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_n32n64_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5814,7 +5850,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_n32n64_reg_struct_has_addr);
break;
case MIPS_ABI_N64:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_n32n64_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5892,7 +5928,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_deprecated_target_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base. */
set_gdbarch_read_sp (gdbarch, mips_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
/* Add/remove bits from an address. The MIPS needs be careful to
ensure that all 32 bit addresses are sign extended to 64 bits. */
@@ -5910,31 +5945,23 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mips_dwarf_dwarf2_ecoff_reg_to_regnum);
/* Initialize a frame */
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, mips_frame_init_saved_regs);
+ set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, mips_find_saved_regs);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, mips_init_extra_frame_info);
/* MIPS version of CALL_DUMMY */
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
- set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, mips_fix_call_dummy);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, mips_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
- set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_frame_align (gdbarch, mips_frame_align);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
- set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- mips_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch,
- mips_register_convert_to_raw);
+ set_gdbarch_deprecated_register_convertible (gdbarch, mips_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, mips_register_convert_to_raw);
set_gdbarch_deprecated_frame_chain (gdbarch, mips_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
generic_frameless_function_invocation_not);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, mips_frame_saved_pc);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_get_saved_register (gdbarch, mips_get_saved_register);
@@ -5954,16 +5981,14 @@ mips_gdbarch_init (struct gdbarch_info info,
/* There are MIPS targets which do not yet use this since they still
define REGISTER_VIRTUAL_TYPE. */
- set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, mips_register_virtual_type);
- set_gdbarch_deprecated_do_registers_info (gdbarch, mips_do_registers_info);
+ set_gdbarch_print_registers_info (gdbarch, mips_print_registers_info);
set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
- set_gdbarch_deprecated_store_struct_return (gdbarch, mips_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch,
mips_extract_struct_value_address);
@@ -6157,8 +6182,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: IN_SOLIB_RETURN_TRAMPOLINE # %s\n",
XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (PC, NAME)));
fprintf_unfiltered (file,
- "mips_dump_tdep: IS_MIPS16_ADDR = FIXME!\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: LAST_EMBED_REGNUM = %d\n",
LAST_EMBED_REGNUM);
fprintf_unfiltered (file,
@@ -6180,8 +6203,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
MACHINE_CPROC_SP_OFFSET);
#endif
fprintf_unfiltered (file,
- "mips_dump_tdep: MAKE_MIPS16_ADDR = FIXME!\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: MIPS16_INSTLEN = %d\n",
MIPS16_INSTLEN);
fprintf_unfiltered (file,
@@ -6327,11 +6348,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: TARGET_HAS_HARDWARE_WATCHPOINTS # %s\n",
XSTRING (TARGET_HAS_HARDWARE_WATCHPOINTS));
- fprintf_unfiltered (file,
- "mips_dump_tdep: TARGET_MIPS = used?\n");
- fprintf_unfiltered (file,
- "mips_dump_tdep: TM_PRINT_INSN_MACH # %s\n",
- XSTRING (TM_PRINT_INSN_MACH));
#ifdef TRACE_CLEAR
fprintf_unfiltered (file,
"mips_dump_tdep: TRACE_CLEAR # %s\n",
@@ -6352,8 +6368,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: TRACE_SET # %s\n",
XSTRING (TRACE_SET (X,STATE)));
#endif
- fprintf_unfiltered (file,
- "mips_dump_tdep: UNMAKE_MIPS16_ADDR = function?\n");
#ifdef UNUSED_REGNUM
fprintf_unfiltered (file,
"mips_dump_tdep: UNUSED_REGNUM = %d\n",
@@ -6378,6 +6392,8 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
_PROC_MAGIC_);
}
+extern initialize_file_ftype _initialize_mips_tdep; /* -Wmissing-prototypes */
+
void
_initialize_mips_tdep (void)
{
diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h
index 8e19bcdf266..5d3aa85692d 100644
--- a/gdb/mips-tdep.h
+++ b/gdb/mips-tdep.h
@@ -40,4 +40,7 @@ enum mips_abi
/* Return the MIPS ABI associated with GDBARCH. */
enum mips_abi mips_abi (struct gdbarch *gdbarch);
+/* For wince :-(. */
+extern CORE_ADDR mips_next_pc (CORE_ADDR pc);
+
#endif /* MIPS_TDEP_H */
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 7776d465ad1..62ec8f3bb64 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for MIPS systems running NetBSD.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -105,7 +105,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
mipsnbsd_supply_reg (regs, -1);
/* Floating point registers. */
- mipsnbsd_supply_fpreg (regs, -1);
+ mipsnbsd_supply_fpreg (fpregs, -1);
}
static void
@@ -250,7 +250,7 @@ mipsnbsd_get_longjmp_target (CORE_ADDR *pc)
NBSD_MIPS_JB_ELEMENT_SIZE))
return 0;
- *pc = extract_address (buf, NBSD_MIPS_JB_ELEMENT_SIZE);
+ *pc = extract_unsigned_integer (buf, NBSD_MIPS_JB_ELEMENT_SIZE);
return 1;
}
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 65ffa0dc629..d29bc995d9a 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -154,7 +154,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index c7bc58c35fa..85b4a8ea0b2 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -31,6 +31,7 @@
#include "symfile.h"
#include "regcache.h"
#include "arch-utils.h"
+#include "gdb_assert.h"
#define D0_REGNUM 0
#define D2_REGNUM 2
@@ -131,8 +132,8 @@ mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
static CORE_ADDR
mn10300_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + REGISTER_BYTE (4),
- REGISTER_RAW_SIZE (4));
+ return extract_unsigned_integer (regbuf + REGISTER_BYTE (4),
+ REGISTER_RAW_SIZE (4));
}
static void
@@ -1091,6 +1092,14 @@ mn10300_do_registers_info (int regnum, int fpregs)
}
}
+static CORE_ADDR
+mn10300_read_fp (void)
+{
+ /* That's right, we're using the stack pointer as our frame pointer. */
+ gdb_assert (SP_REGNUM >= 0);
+ return read_register (SP_REGNUM);
+}
+
/* Dump out the mn10300 speciic architecture information. */
static void
@@ -1149,11 +1158,11 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_register_size (gdbarch, 4);
set_gdbarch_deprecated_register_bytes (gdbarch, num_regs * gdbarch_deprecated_register_size (gdbarch));
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size);
- set_gdbarch_register_byte (gdbarch, mn10300_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, mn10300_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, mn10300_register_byte);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
- set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, mn10300_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, mn10300_register_virtual_type);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum);
set_gdbarch_deprecated_do_registers_info (gdbarch, mn10300_do_registers_info);
set_gdbarch_sp_regnum (gdbarch, 8);
@@ -1182,9 +1191,8 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_pop_frame (gdbarch, mn10300_pop_frame);
set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/* That's right, we're using the stack pointer as our frame pointer. */
- set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp);
+ set_gdbarch_deprecated_target_read_fp (gdbarch, mn10300_read_fp);
/* Calling functions in the inferior from GDB. */
set_gdbarch_deprecated_call_dummy_words (gdbarch, mn10300_call_dummy_words);
@@ -1199,7 +1207,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
tdep->am33_mode = am33_mode;
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
diff --git a/gdb/monitor.c b/gdb/monitor.c
index eabbbd938cc..ee2280d968c 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -1054,12 +1054,11 @@ monitor_wait_cleanup (void *old_timeout)
-void
+static void
monitor_wait_filter (char *buf,
int bufmax,
int *ext_resp_len,
- struct target_waitstatus *status
-)
+ struct target_waitstatus *status)
{
int resp_len;
do
@@ -2335,6 +2334,8 @@ init_monitor_ops (struct target_ops *ops)
/* Define additional commands that are usually only used by monitors. */
+extern initialize_file_ftype _initialize_remote_monitors; /* -Wmissing-prototypes */
+
void
_initialize_remote_monitors (void)
{
diff --git a/gdb/nlm/configure b/gdb/nlm/configure
index 3918fee794c..ca1146a14b4 100755
--- a/gdb/nlm/configure
+++ b/gdb/nlm/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.2
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -28,6 +28,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -142,6 +143,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -312,6 +314,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -333,7 +340,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.2"
+ echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@@ -477,12 +484,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -569,7 +580,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
+echo "configure:584: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -590,7 +601,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
+echo "configure:605: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -608,7 +619,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
+echo "configure:623: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -662,7 +673,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:666: checking for a BSD compatible install" >&5
+echo "configure:677: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -710,6 +721,8 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
@@ -719,7 +732,7 @@ case "${target_cpu}" in
alpha) gdb_target_cpu=alpha ;;
c[12]) gdb_target_cpu=convex ;;
hppa*) gdb_target_cpu=pa ;;
-i[3456]86) gdb_target_cpu=i386 ;;
+i[34567]86) gdb_target_cpu=i386 ;;
m68*) gdb_target_cpu=m68k ;;
np1) gdb_target_cpu=gould ;;
pn) gdb_target_cpu=gould ;;
@@ -773,7 +786,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -852,7 +865,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -876,6 +889,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -910,6 +924,7 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@target_makefile_frag_path@%$target_makefile_frag_path%g
/@target_makefile_frag@/r $target_makefile_frag
diff --git a/gdb/nlm/configure.in b/gdb/nlm/configure.in
index 845b486e524..ba415aa31e1 100644
--- a/gdb/nlm/configure.in
+++ b/gdb/nlm/configure.in
@@ -15,7 +15,7 @@ case "${target_cpu}" in
alpha) gdb_target_cpu=alpha ;;
c[12]) gdb_target_cpu=convex ;;
hppa*) gdb_target_cpu=pa ;;
-i[3456]86) gdb_target_cpu=i386 ;;
+i[34567]86) gdb_target_cpu=i386 ;;
m68*) gdb_target_cpu=m68k ;;
np1) gdb_target_cpu=gould ;;
pn) gdb_target_cpu=gould ;;
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 46c175c4b02..a52f39f0833 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -357,12 +357,6 @@ ns32k_frame_args_address (struct frame_info *frame)
return (read_register (SP_REGNUM) - 4);
}
-static CORE_ADDR
-ns32k_frame_locals_address (struct frame_info *frame)
-{
- return (get_frame_base (frame));
-}
-
/* Code to initialize 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
@@ -503,7 +497,7 @@ ns32k_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR
ns32k_extract_struct_value_address (char *regbuf)
{
- return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
}
void
@@ -513,7 +507,7 @@ ns32k_gdbarch_init_32082 (struct gdbarch *gdbarch)
set_gdbarch_register_name (gdbarch, ns32k_register_name_32082);
set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32082);
- set_gdbarch_register_byte (gdbarch, ns32k_register_byte_32082);
+ set_gdbarch_deprecated_register_byte (gdbarch, ns32k_register_byte_32082);
}
void
@@ -523,7 +517,7 @@ ns32k_gdbarch_init_32382 (struct gdbarch *gdbarch)
set_gdbarch_register_name (gdbarch, ns32k_register_name_32382);
set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32382);
- set_gdbarch_register_byte (gdbarch, ns32k_register_byte_32382);
+ set_gdbarch_deprecated_register_byte (gdbarch, ns32k_register_byte_32382);
}
/* Initialize the current architecture based on INFO. If possible, re-use an
@@ -557,12 +551,12 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_num_regs (gdbarch, NS32K_PS_REGNUM);
set_gdbarch_deprecated_register_size (gdbarch, NS32K_REGISTER_SIZE);
- set_gdbarch_register_raw_size (gdbarch, ns32k_register_raw_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, ns32k_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, NS32K_MAX_REGISTER_RAW_SIZE);
- set_gdbarch_register_virtual_size (gdbarch, ns32k_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, ns32k_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
NS32K_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, ns32k_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, ns32k_register_virtual_type);
/* Frame and stack info */
set_gdbarch_skip_prologue (gdbarch, umax_skip_prologue);
@@ -576,7 +570,6 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, ns32k_frame_locals_address);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ns32k_frame_init_saved_regs);
@@ -611,7 +604,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -619,6 +612,8 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return (gdbarch);
}
+extern initialize_file_ftype _initialize_ns32k_tdep; /* -Wmissing-prototypes */
+
void
_initialize_ns32k_tdep (void)
{
diff --git a/gdb/ns32knbsd-tdep.c b/gdb/ns32knbsd-tdep.c
index 33b99d98094..b241851665f 100644
--- a/gdb/ns32knbsd-tdep.c
+++ b/gdb/ns32knbsd-tdep.c
@@ -61,6 +61,8 @@ ns32knbsd_aout_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+extern initialize_file_ftype _initialize_ns32knbsd_tdep; /* -Wmissing-prototypes */
+
void
_initialize_ns32knbsd_tdep (void)
{
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 40dc5b8ab66..9e7cf11cc01 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -1775,7 +1775,6 @@ yylex ()
CORE_ADDR Class = lookup_objc_class(tmp);
if (Class)
{
- extern struct symbol *lookup_struct_typedef();
yylval.class.class = Class;
if ((sym = lookup_struct_typedef (tmp,
expression_context_block,
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index c3577476eb5..9a983b7da31 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -775,7 +775,8 @@ end_msglist(void)
* Used for qsorting lists of objc methods (either by class or selector).
*/
-int specialcmp(char *a, char *b)
+static int
+specialcmp (char *a, char *b)
{
while (*a && *a != ' ' && *a != ']' && *b && *b != ' ' && *b != ']')
{
@@ -1421,7 +1422,6 @@ char *find_imps (struct symtab *symtab, struct block *block,
if (tmp == NULL) {
- struct symtab *sym_symtab = NULL;
struct symbol *sym = NULL;
struct minimal_symbol *msym = NULL;
@@ -1431,7 +1431,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
if (tmp == NULL)
return NULL;
- sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, &sym_symtab);
+ sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, NULL);
if (sym != NULL)
{
if (syms)
@@ -1519,7 +1519,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
return method + (tmp - buf);
}
-void
+static void
print_object_command (char *args, int from_tty)
{
struct value *object, *function, *description;
@@ -1607,7 +1607,7 @@ static struct objc_methcall methcalls[] = {
* case the functions have moved for some reason.
*/
-void
+static void
find_objc_msgsend (void)
{
unsigned int i;
@@ -1654,7 +1654,7 @@ struct objc_submethod_helper_data {
CORE_ADDR *new_pc;
};
-int
+static int
find_objc_msgcall_submethod_helper (void * arg)
{
struct objc_submethod_helper_data *s =
@@ -1666,7 +1666,7 @@ find_objc_msgcall_submethod_helper (void * arg)
return 0;
}
-int
+static int
find_objc_msgcall_submethod (int (*f) (CORE_ADDR, CORE_ADDR *),
CORE_ADDR pc,
CORE_ADDR *new_pc)
@@ -1710,6 +1710,8 @@ find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc)
return 0;
}
+extern initialize_file_ftype _initialize_objc_language; /* -Wmissing-prototypes */
+
void
_initialize_objc_language (void)
{
@@ -1723,60 +1725,6 @@ _initialize_objc_language (void)
add_com_alias ("po", "print-object", class_vars, 1);
}
-#if 1
-/* Disable these functions until we put them in the gdbarch vector. */
-static unsigned long FETCH_ARGUMENT (int i)
-{
- internal_error (__FILE__, __LINE__, "FETCH_ARGUMENT not implemented");
- return 0;
-}
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- internal_error (__FILE__, __LINE__, "CONVERT_FUNCPTR not implemented");
- return pc;
-}
-#else
-#if defined (__powerpc__) || defined (__ppc__)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- return read_register (3 + i);
-}
-#elif defined (__i386__)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- CORE_ADDR stack = read_register (SP_REGNUM);
- return read_memory_unsigned_integer (stack + (4 * (i + 1)), 4);
-}
-#elif defined (__sparc__)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- return read_register (O0_REGNUM + i);
-}
-#elif defined (__hppa__) || defined (__hppa)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- return read_register (R0_REGNUM + 26 - i);
-}
-#else
-#error unknown architecture
-#endif
-
-#if defined (__hppa__) || defined (__hppa)
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- if (pc & 0x2)
- pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, 4);
-
- return pc;
-}
-#else
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- return pc;
-}
-#endif
-#endif
-
static void
read_objc_method (CORE_ADDR addr, struct objc_method *method)
{
@@ -1827,7 +1775,7 @@ read_objc_class (CORE_ADDR addr, struct objc_class *class)
class->protocols = read_memory_unsigned_integer (addr + 36, 4);
}
-CORE_ADDR
+static CORE_ADDR
find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
{
CORE_ADDR subclass = class;
@@ -1865,7 +1813,9 @@ find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
#endif
if (meth_str.name == sel)
- return CONVERT_FUNCPTR (meth_str.imp);
+ /* FIXME: hppa arch was doing a pointer dereference
+ here. There needs to be a better way to do that. */
+ return meth_str.imp;
}
mlistnum++;
}
@@ -1875,7 +1825,7 @@ find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
return 0;
}
-CORE_ADDR
+static CORE_ADDR
find_implementation (CORE_ADDR object, CORE_ADDR sel)
{
struct objc_object ostr;
@@ -1889,6 +1839,9 @@ find_implementation (CORE_ADDR object, CORE_ADDR sel)
return find_implementation_from_class (ostr.isa, sel);
}
+#define OBJC_FETCH_POINTER_ARGUMENT(argi) \
+ FETCH_POINTER_ARGUMENT (get_current_frame (), argi, builtin_type_void_func_ptr)
+
static int
resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc)
{
@@ -1896,8 +1849,8 @@ resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- object = FETCH_ARGUMENT (0);
- sel = FETCH_ARGUMENT (1);
+ object = OBJC_FETCH_POINTER_ARGUMENT (0);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (1);
res = find_implementation (object, sel);
if (new_pc != 0)
@@ -1914,8 +1867,8 @@ resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- object = FETCH_ARGUMENT (1);
- sel = FETCH_ARGUMENT (2);
+ object = OBJC_FETCH_POINTER_ARGUMENT (1);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (2);
res = find_implementation (object, sel);
if (new_pc != 0)
@@ -1934,8 +1887,8 @@ resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- super = FETCH_ARGUMENT (0);
- sel = FETCH_ARGUMENT (1);
+ super = OBJC_FETCH_POINTER_ARGUMENT (0);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (1);
read_objc_super (super, &sstr);
if (sstr.class == 0)
@@ -1958,8 +1911,8 @@ resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- super = FETCH_ARGUMENT (1);
- sel = FETCH_ARGUMENT (2);
+ super = OBJC_FETCH_POINTER_ARGUMENT (1);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (2);
read_objc_super (super, &sstr);
if (sstr.class == 0)
diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h
index 0c49bac6382..c88a0f7a5fa 100644
--- a/gdb/objc-lang.h
+++ b/gdb/objc-lang.h
@@ -62,4 +62,7 @@ extern void start_msglist (void);
extern void add_msglist (struct stoken *str, int addcolon);
extern int end_msglist (void);
+struct symbol *lookup_struct_typedef (char *name, struct block *block,
+ int noerr);
+
#endif
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index e695ebef78f..39f5623749d 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -43,6 +43,7 @@
#include "breakpoint.h"
#include "block.h"
+#include "dictionary.h"
/* Prototypes for local functions */
@@ -613,7 +614,8 @@ void
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct section_offsets *delta =
- (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)));
{
int i;
@@ -656,13 +658,13 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct block *b;
struct symbol *sym;
- int j;
+ struct dict_iterator iter;
b = BLOCKVECTOR_BLOCK (bv, i);
BLOCK_START (b) += ANOFFSET (delta, s->block_line_section);
BLOCK_END (b) += ANOFFSET (delta, s->block_line_section);
- ALL_BLOCK_SYMBOLS (b, j, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
fixup_symbol_section (sym, objfile);
diff --git a/gdb/ocd.c b/gdb/ocd.c
index 4dfda5d6d4b..3c8d5d2936d 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -1365,6 +1365,8 @@ bdm_read_register_command (char *args, int from_tty)
}
+extern initialize_file_ftype _initialize_remote_ocd; /* -Wmissing-prototypes */
+
void
_initialize_remote_ocd (void)
{
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 22414062705..5f935d2dfe7 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -531,7 +531,7 @@ set_osabi (char *args, int from_tty, struct cmd_list_element *c)
internal_error (__FILE__, __LINE__, "Updating OS ABI failed.");
}
-void
+static void
show_osabi (char *args, int from_tty)
{
if (user_osabi_state == osabi_auto)
@@ -546,6 +546,8 @@ show_osabi (char *args, int from_tty)
gdbarch_osabi_name (GDB_OSABI_DEFAULT));
}
+extern initialize_file_ftype _initialize_gdb_osabi; /* -Wmissing-prototype */
+
void
_initialize_gdb_osabi (void)
{
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 282d25a065d..13d0f784156 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -158,8 +158,8 @@ parse_number (char *, int, int, YYSTYPE *);
static struct type *current_type;
-static void push_current_type ();
-static void pop_current_type ();
+static void push_current_type (void);
+static void pop_current_type (void);
static int search_field;
%}
@@ -992,7 +992,8 @@ struct type_push
static struct type_push *tp_top = NULL;
-static void push_current_type ()
+static void
+push_current_type (void)
{
struct type_push *tpnew;
tpnew = (struct type_push *) malloc (sizeof (struct type_push));
@@ -1002,7 +1003,8 @@ static void push_current_type ()
tp_top = tpnew;
}
-static void pop_current_type ()
+static void
+pop_current_type (void)
{
struct type_push *tp = tp_top;
if (tp)
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index ddd508ac044..4867dcb47b6 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -222,13 +222,12 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
struct value *vt_val;
struct symbol *wsym = (struct symbol *) NULL;
struct type *wtype;
- struct symtab *s;
struct block *block = (struct block *) NULL;
int is_this_fld;
if (msymbol != NULL)
wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
- VAR_DOMAIN, &is_this_fld, &s);
+ VAR_DOMAIN, &is_this_fld, NULL);
if (wsym)
{
@@ -1098,6 +1097,7 @@ pascal_object_print_class_member (char *valaddr, struct type *domain,
fprintf_filtered (stream, "%ld", (long int) (val >> 3));
}
+extern initialize_file_ftype _initialize_pascal_valprint; /* -Wmissing-prototypes */
void
_initialize_pascal_valprint (void)
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index 43910dad46f..b67532d3759 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -222,9 +222,9 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
bfd *tmp_bfd;
asection *sec;
obj_private_data_t *obj_private;
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs;
+ struct cleanup *my_cleanups;
- memset (&section_addrs, 0, sizeof (section_addrs));
/* We need the BFD so that we can look at its sections. We open up the
file temporarily, then close it when we are done. */
tmp_bfd = bfd_openr (name, gnutarget);
@@ -262,15 +262,18 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
text_addr += sec->filepos;
}
+ section_addrs = alloc_section_addr_info (bfd_count_sections (tmp_bfd));
+ my_cleanups = make_cleanup (xfree, section_addrs);
+
/* We are done with the temporary bfd. Get rid of it and make sure
nobody else can us it. */
bfd_close (tmp_bfd);
tmp_bfd = NULL;
/* Now let the generic code load up symbols for this library. */
- section_addrs.other[0].addr = text_addr;
- section_addrs.other[0].name = ".text";
- so->objfile = symbol_file_add (name, from_tty, &section_addrs, 0, OBJF_SHARED);
+ section_addrs->other[0].addr = text_addr;
+ section_addrs->other[0].name = ".text";
+ so->objfile = symbol_file_add (name, from_tty, section_addrs, 0, OBJF_SHARED);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data. */
@@ -289,6 +292,7 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
obj_private = (obj_private_data_t *) so->objfile->obj_private;
obj_private->so_info = so;
obj_private->dp = so->pa64_solib_desc.linkage_ptr;
+ do_cleanups (my_cleanups);
}
/* Load debugging information for a shared library. TARGET may be
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index 9e7133e10ac..f1898187cf6 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -346,6 +346,8 @@ a wiggler, specify wiggler and then the port it is connected to\n\
bdm_ppc_ops.to_magic = OPS_MAGIC;
} /* init_bdm_ppc_ops */
+extern initialize_file_ftype _initialize_bdm_ppc; /* -Wmissing-prototypes */
+
void
_initialize_bdm_ppc (void)
{
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 7e6306e821b..a0954ef75db 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -295,7 +295,7 @@ ppc_linux_skip_trampoline_code (CORE_ADDR pc)
/* Get address of the relocation entry (Elf32_Rela) */
if (target_read_memory (plt_table + reloc_index, buf, 4) != 0)
return 0;
- reloc = extract_address (buf, 4);
+ reloc = extract_unsigned_integer (buf, 4);
sect = find_pc_section (reloc);
if (!sect)
@@ -894,53 +894,6 @@ ppc64_skip_trampoline_code (CORE_ADDR pc)
}
-/* Support for CONVERT_FROM_FUNC_PTR_ADDR(ADDR) on PPC64 Linux.
-
- Usually a function pointer's representation is simply the address
- of the function. On Linux on the 64-bit PowerPC however, a function
- pointer is represented by a pointer to a TOC entry. This TOC entry
- contains three words, the first word is the address of the
- function, the second word is the TOC pointer (r2), and the third
- word is the static chain value. Throughout GDB it is currently
- assumed that a function pointer contains the address of the
- function, which is not easy to fix. In addition, the conversion of
- a function address to a function pointer would require allocation
- of a TOC entry in the inferior's memory space, with all its
- drawbacks. To be able to call C++ virtual methods in the inferior
- (which are called via function pointers), find_function_addr uses
- this function to get the function address from a function
- pointer. */
-
-/* Return real function address if ADDR (a function pointer) is in the data
- space and is therefore a special function pointer. */
-
-static CORE_ADDR
-ppc64_linux_convert_from_func_ptr_addr (CORE_ADDR addr)
-{
- struct obj_section *s;
-
- s = find_pc_section (addr);
- if (s && s->the_bfd_section->flags & SEC_CODE)
- return addr;
-
- /* ADDR is in the data space, so it's a pointer to a descriptor, not
- the entry point. */
- return ppc64_desc_entry_point (addr);
-}
-
-
-/* On 64-bit PowerPC Linux, the ELF header's e_entry field is the
- address of a function descriptor for the entry point function, not
- the actual entry point itself. So to find the actual address at
- which execution should begin, we need to fetch the function's entry
- point from that descriptor. */
-static CORE_ADDR
-ppc64_call_dummy_address (void)
-{
- return ppc64_desc_entry_point (entry_point_address ());
-}
-
-
enum {
ELF_NGREG = 48,
ELF_NFPREG = 33,
@@ -1062,13 +1015,6 @@ ppc_linux_init_abi (struct gdbarch_info info,
if (tdep->wordsize == 8)
{
- /* Handle PPC64 Linux function pointers (which are really
- function descriptors). */
- set_gdbarch_convert_from_func_ptr_addr
- (gdbarch, ppc64_linux_convert_from_func_ptr_addr);
-
- set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
-
set_gdbarch_in_solib_call_trampoline
(gdbarch, ppc64_in_solib_call_trampoline);
set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
diff --git a/gdb/ppcbug-rom.c b/gdb/ppcbug-rom.c
index 712af06d3ff..0619964eef3 100644
--- a/gdb/ppcbug-rom.c
+++ b/gdb/ppcbug-rom.c
@@ -196,6 +196,8 @@ ppcbug_open1 (char *args, int from_tty)
monitor_open (args, &ppcbug_cmds1, from_tty);
}
+extern initialize_file_ftype _initialize_ppcbug_rom; /* -Wmissing-prototypes */
+
void
_initialize_ppcbug_rom (void)
{
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 11fd1df9468..410b950fe33 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -140,9 +140,6 @@ static void disable_display_command (char *, int);
static void printf_command (char *, int);
-static void print_frame_nameless_args (struct frame_info *, long,
- int, int, struct ui_file *);
-
static void display_info (char *, int);
static void do_one_display (struct display *);
@@ -1745,228 +1742,6 @@ print_variable_value (struct symbol *var, struct frame_info *frame,
value_print (val, stream, 0, Val_pretty_default);
}
-/* Print the arguments of a stack frame, given the function FUNC
- running in that frame (as a symbol), the info on the frame,
- and the number of args according to the stack frame (or -1 if unknown). */
-
-/* References here and elsewhere to "number of args according to the
- stack frame" appear in all cases to refer to "number of ints of args
- according to the stack frame". At least for VAX, i386, isi. */
-
-void
-print_frame_args (struct symbol *func, struct frame_info *fi, int num,
- struct ui_file *stream)
-{
- struct block *b = NULL;
- int first = 1;
- register int i;
- register struct symbol *sym;
- struct value *val;
- /* Offset of next stack argument beyond the one we have seen that is
- at the highest offset.
- -1 if we haven't come to a stack argument yet. */
- long highest_offset = -1;
- int arg_size;
- /* Number of ints of arguments that we have printed so far. */
- int args_printed = 0;
- struct cleanup *old_chain, *list_chain;
- struct ui_stream *stb;
-
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
-
- if (func)
- {
- b = SYMBOL_BLOCK_VALUE (func);
- /* Function blocks are order sensitive, and thus should not be
- hashed. */
- gdb_assert (BLOCK_HASHTABLE (b) == 0);
-
- ALL_BLOCK_SYMBOLS (b, i, sym)
- {
- QUIT;
-
- /* Keep track of the highest stack argument offset seen, and
- skip over any kinds of symbols we don't care about. */
-
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_ARG:
- case LOC_REF_ARG:
- {
- long current_offset = SYMBOL_VALUE (sym);
- arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
-
- /* Compute address of next argument by adding the size of
- this argument and rounding to an int boundary. */
- current_offset =
- ((current_offset + arg_size + sizeof (int) - 1)
- & ~(sizeof (int) - 1));
-
- /* If this is the highest offset seen yet, set highest_offset. */
- if (highest_offset == -1
- || (current_offset > highest_offset))
- highest_offset = current_offset;
-
- /* Add the number of ints we're about to print to args_printed. */
- args_printed += (arg_size + sizeof (int) - 1) / sizeof (int);
- }
-
- /* We care about types of symbols, but don't need to keep track of
- stack offsets in them. */
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- break;
-
- /* Other types of symbols we just skip over. */
- default:
- continue;
- }
-
- /* We have to look up the symbol because arguments can have
- two entries (one a parameter, one a local) and the one we
- want is the local, which lookup_symbol will find for us.
- This includes gcc1 (not gcc2) on the sparc when passing a
- small structure and gcc2 when the argument type is float
- and it is passed as a double and converted to float by
- the prologue (in the latter case the type of the LOC_ARG
- symbol is double and the type of the LOC_LOCAL symbol is
- float). */
- /* But if the parameter name is null, don't try it.
- Null parameter names occur on the RS/6000, for traceback tables.
- FIXME, should we even print them? */
-
- if (*DEPRECATED_SYMBOL_NAME (sym))
- {
- struct symbol *nsym;
- nsym = lookup_symbol
- (DEPRECATED_SYMBOL_NAME (sym),
- b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
- if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
- {
- /* There is a LOC_ARG/LOC_REGISTER pair. This means that
- it was passed on the stack and loaded into a register,
- or passed in a register and stored in a stack slot.
- GDB 3.x used the LOC_ARG; GDB 4.0-4.11 used the LOC_REGISTER.
-
- Reasons for using the LOC_ARG:
- (1) because find_saved_registers may be slow for remote
- debugging,
- (2) because registers are often re-used and stack slots
- rarely (never?) are. Therefore using the stack slot is
- much less likely to print garbage.
-
- Reasons why we might want to use the LOC_REGISTER:
- (1) So that the backtrace prints the same value as
- "print foo". I see no compelling reason why this needs
- to be the case; having the backtrace print the value which
- was passed in, and "print foo" print the value as modified
- within the called function, makes perfect sense to me.
-
- Additional note: It might be nice if "info args" displayed
- both values.
- One more note: There is a case with sparc structure passing
- where we need to use the LOC_REGISTER, but this is dealt with
- by creating a single LOC_REGPARM in symbol reading. */
-
- /* Leave sym (the LOC_ARG) alone. */
- ;
- }
- else
- sym = nsym;
- }
-
- /* Print the current arg. */
- if (!first)
- ui_out_text (uiout, ", ");
- ui_out_wrap_hint (uiout, " ");
-
- annotate_arg_begin ();
-
- list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (sym),
- SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
- ui_out_field_stream (uiout, "name", stb);
- annotate_arg_name_end ();
- ui_out_text (uiout, "=");
-
- /* Avoid value_print because it will deref ref parameters. We just
- want to print their addresses. Print ??? for args whose address
- we do not know. We pass 2 as "recurse" to val_print because our
- standard indentation here is 4 spaces, and val_print indents
- 2 for each recurse. */
- val = read_var_value (sym, fi);
-
- annotate_arg_value (val == NULL ? NULL : VALUE_TYPE (val));
-
- if (val)
- {
- val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
- VALUE_ADDRESS (val),
- stb->stream, 0, 0, 2, Val_no_prettyprint);
- ui_out_field_stream (uiout, "value", stb);
- }
- else
- ui_out_text (uiout, "???");
-
- /* Invoke ui_out_tuple_end. */
- do_cleanups (list_chain);
-
- annotate_arg_end ();
-
- first = 0;
- }
- }
-
- /* Don't print nameless args in situations where we don't know
- enough about the stack to find them. */
- if (num != -1)
- {
- long start;
-
- if (highest_offset == -1)
- start = FRAME_ARGS_SKIP;
- else
- start = highest_offset;
-
- print_frame_nameless_args (fi, start, num - args_printed,
- first, stream);
- }
- do_cleanups (old_chain);
-}
-
-/* Print nameless args on STREAM.
- FI is the frameinfo for this frame, START is the offset
- of the first nameless arg, and NUM is the number of nameless args to
- print. FIRST is nonzero if this is the first argument (not just
- the first nameless arg). */
-
-static void
-print_frame_nameless_args (struct frame_info *fi, long start, int num,
- int first, struct ui_file *stream)
-{
- int i;
- CORE_ADDR argsaddr;
- long arg_value;
-
- for (i = 0; i < num; i++)
- {
- QUIT;
- argsaddr = get_frame_args_address (fi);
- if (!argsaddr)
- return;
- arg_value = read_memory_integer (argsaddr + start, sizeof (int));
- if (!first)
- fprintf_filtered (stream, ", ");
- fprintf_filtered (stream, "%ld", arg_value);
- first = 0;
- start += sizeof (int);
- }
-}
-
/* ARGSUSED */
static void
printf_command (char *arg, int from_tty)
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 09b48f01054..facaab38e1e 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -82,7 +82,7 @@ struct regcache_descr
struct type **register_type;
};
-void
+static void
init_legacy_regcache_descr (struct gdbarch *gdbarch,
struct regcache_descr *descr)
{
@@ -340,7 +340,7 @@ regcache_xfree (struct regcache *regcache)
xfree (regcache);
}
-void
+static void
do_regcache_xfree (void *data)
{
regcache_xfree (data);
@@ -1064,7 +1064,7 @@ typedef void (regcache_read_ftype) (struct regcache *regcache, int regnum,
typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum,
const void *buf);
-void
+static void
regcache_xfer_part (struct regcache *regcache, int regnum,
int offset, int len, void *in, const void *out,
regcache_read_ftype *read, regcache_write_ftype *write)
@@ -1267,41 +1267,16 @@ regcache_collect (int regnum, void *buf)
/* read_pc, write_pc, read_sp, deprecated_read_fp, etc. Special
handling for registers PC, SP, and FP. */
-/* NOTE: cagney/2001-02-18: The functions generic_target_read_pc(),
- read_pc_pid(), read_pc(), generic_target_write_pc(),
- write_pc_pid(), write_pc(), generic_target_read_sp(), read_sp(),
- generic_target_write_sp(), and deprecated_read_fp(), will
- eventually be moved out of the reg-cache into either frame.[hc] or
- to the multi-arch framework. The are not part of the raw register
- cache. */
-
-/* This routine is getting awfully cluttered with #if's. It's probably
- time to turn this into READ_PC and define it in the tm.h file.
- Ditto for write_pc.
-
- 1999-06-08: The following were re-written so that it assumes the
- existence of a TARGET_READ_PC et.al. macro. A default generic
- version of that macro is made available where needed.
+/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc(),
+ read_sp(), and deprecated_read_fp(), will eventually be replaced by
+ per-frame methods. Instead of relying on the global INFERIOR_PTID,
+ they will use the contextual information provided by the FRAME.
+ These functions do not belong in the register cache. */
- Since the ``TARGET_READ_PC'' et.al. macro is going to be controlled
- by the multi-arch framework, it will eventually be possible to
- eliminate the intermediate read_pc_pid(). The client would call
- TARGET_READ_PC directly. (cagney). */
-
-CORE_ADDR
-generic_target_read_pc (ptid_t ptid)
-{
-#ifdef PC_REGNUM
- if (PC_REGNUM >= 0)
- {
- CORE_ADDR pc_val = ADDR_BITS_REMOVE ((CORE_ADDR) read_register_pid (PC_REGNUM, ptid));
- return pc_val;
- }
-#endif
- internal_error (__FILE__, __LINE__,
- "generic_target_read_pc");
- return 0;
-}
+/* NOTE: cagney/2003-06-07: The functions generic_target_write_pc(),
+ write_pc_pid(), write_pc(), and deprecated_read_fp(), all need to
+ be replaced by something that does not rely on global state. But
+ what? */
CORE_ADDR
read_pc_pid (ptid_t ptid)
@@ -1313,7 +1288,17 @@ read_pc_pid (ptid_t ptid)
saved_inferior_ptid = inferior_ptid;
inferior_ptid = ptid;
- pc_val = TARGET_READ_PC (ptid);
+ if (TARGET_READ_PC_P ())
+ pc_val = TARGET_READ_PC (ptid);
+ /* Else use per-frame method on get_current_frame. */
+ else if (PC_REGNUM >= 0)
+ {
+ CORE_ADDR raw_val = read_register_pid (PC_REGNUM, ptid);
+ CORE_ADDR pc_val = ADDR_BITS_REMOVE (raw_val);
+ return pc_val;
+ }
+ else
+ internal_error (__FILE__, __LINE__, "read_pc_pid: Unable to find PC");
inferior_ptid = saved_inferior_ptid;
return pc_val;
@@ -1362,34 +1347,24 @@ write_pc (CORE_ADDR pc)
/* Cope with strage ways of getting to the stack and frame pointers */
CORE_ADDR
-generic_target_read_sp (void)
-{
-#ifdef SP_REGNUM
- if (SP_REGNUM >= 0)
- return read_register (SP_REGNUM);
-#endif
- internal_error (__FILE__, __LINE__,
- "generic_target_read_sp");
-}
-
-CORE_ADDR
read_sp (void)
{
- return TARGET_READ_SP ();
+ if (TARGET_READ_SP_P ())
+ return TARGET_READ_SP ();
+ else if (gdbarch_unwind_sp_p (current_gdbarch))
+ return get_frame_sp (get_current_frame ());
+ else if (SP_REGNUM >= 0)
+ /* Try SP_REGNUM last: this makes all sorts of [wrong] assumptions
+ about the architecture so put it at the end. */
+ return read_register (SP_REGNUM);
+ internal_error (__FILE__, __LINE__, "read_sp: Unable to find SP");
}
void
-generic_target_write_sp (CORE_ADDR val)
+deprecated_write_sp (CORE_ADDR val)
{
-#ifdef SP_REGNUM
- if (SP_REGNUM >= 0)
- {
- write_register (SP_REGNUM, val);
- return;
- }
-#endif
- internal_error (__FILE__, __LINE__,
- "generic_target_write_sp");
+ gdb_assert (SP_REGNUM >= 0);
+ write_register (SP_REGNUM, val);
}
CORE_ADDR
@@ -1692,6 +1667,8 @@ maintenance_print_register_groups (char *args, int from_tty)
regcache_print (args, regcache_dump_groups);
}
+extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
+
void
_initialize_regcache (void)
{
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index b72140eadee..ea9a9ec921e 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -245,6 +245,8 @@ struct reggroup *const all_reggroup = &all_group;
struct reggroup *const save_reggroup = &save_group;
struct reggroup *const restore_reggroup = &restore_group;
+extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
+
void
_initialize_reggroup (void)
{
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 643c6b6fe1b..94985fe5816 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -781,7 +781,7 @@ gbyte (void)
return (high << 4) + low;
}
-void
+static void
fetch_regs_from_dump (int (*nextchar) (), char *want)
{
int regno;
@@ -1873,7 +1873,7 @@ why_stop (void)
/* Suck characters, if a string match, then return the strings index
otherwise echo them. */
-int
+static int
expect_n (char **strings)
{
char *(ptr[10]);
@@ -2165,6 +2165,8 @@ target e7000 foobar";
e7000_ops.to_magic = OPS_MAGIC;
};
+extern initialize_file_ftype _initialize_remote_e7000; /* -Wmissing-prototypes */
+
void
_initialize_remote_e7000 (void)
{
diff --git a/gdb/remote-est.c b/gdb/remote-est.c
index 93eddc9d123..a2c0f7ce2af 100644
--- a/gdb/remote-est.c
+++ b/gdb/remote-est.c
@@ -168,6 +168,8 @@ est_open (char *args, int from_tty)
monitor_open (args, &est_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_est; /* -Wmissing-prototypes */
+
void
_initialize_est (void)
{
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
new file mode 100644
index 00000000000..fd57617acd5
--- /dev/null
+++ b/gdb/remote-fileio.c
@@ -0,0 +1,1379 @@
+/* Remote File-I/O communications
+
+ Copyright 2003 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. */
+
+/* See the GDB User Guide for details of the GDB remote protocol. */
+
+#include "defs.h"
+#include "gdb_string.h"
+#include "gdbcmd.h"
+#include "remote.h"
+#include "gdb/fileio.h"
+#include "gdb_wait.h"
+#include "gdb_stat.h"
+#include "remote-fileio.h"
+
+#include <fcntl.h>
+#include <sys/time.h>
+#ifdef __CYGWIN__
+#include <sys/cygwin.h> /* For cygwin_conv_to_full_posix_path. */
+#endif
+#include <signal.h>
+
+static struct {
+ int *fd_map;
+ int fd_map_size;
+} remote_fio_data;
+
+#define FIO_FD_INVALID -1
+#define FIO_FD_CONSOLE_IN -2
+#define FIO_FD_CONSOLE_OUT -3
+
+static int remote_fio_system_call_allowed = 0;
+
+static int
+remote_fileio_init_fd_map (void)
+{
+ int i;
+
+ if (!remote_fio_data.fd_map)
+ {
+ remote_fio_data.fd_map = (int *) xmalloc (10 * sizeof (int));
+ remote_fio_data.fd_map_size = 10;
+ remote_fio_data.fd_map[0] = FIO_FD_CONSOLE_IN;
+ remote_fio_data.fd_map[1] = FIO_FD_CONSOLE_OUT;
+ remote_fio_data.fd_map[2] = FIO_FD_CONSOLE_OUT;
+ for (i = 3; i < 10; ++i)
+ remote_fio_data.fd_map[i] = FIO_FD_INVALID;
+ }
+ return 3;
+}
+
+static int
+remote_fileio_resize_fd_map (void)
+{
+ if (!remote_fio_data.fd_map)
+ return remote_fileio_init_fd_map ();
+ remote_fio_data.fd_map_size += 10;
+ remote_fio_data.fd_map =
+ (int *) xrealloc (remote_fio_data.fd_map,
+ remote_fio_data.fd_map_size * sizeof (int));
+ return remote_fio_data.fd_map_size - 10;
+}
+
+static int
+remote_fileio_next_free_fd (void)
+{
+ int i;
+
+ for (i = 0; i < remote_fio_data.fd_map_size; ++i)
+ if (remote_fio_data.fd_map[i] == FIO_FD_INVALID)
+ return i;
+ return remote_fileio_resize_fd_map ();
+}
+
+static int
+remote_fileio_fd_to_targetfd (int fd)
+{
+ int target_fd = remote_fileio_next_free_fd ();
+ remote_fio_data.fd_map[target_fd] = fd;
+ return target_fd;
+}
+
+static int
+remote_fileio_map_fd (int target_fd)
+{
+ remote_fileio_init_fd_map ();
+ if (target_fd < 0 || target_fd >= remote_fio_data.fd_map_size)
+ return FIO_FD_INVALID;
+ return remote_fio_data.fd_map[target_fd];
+}
+
+static void
+remote_fileio_close_target_fd (int target_fd)
+{
+ remote_fileio_init_fd_map ();
+ if (target_fd >= 0 && target_fd < remote_fio_data.fd_map_size)
+ remote_fio_data.fd_map[target_fd] = FIO_FD_INVALID;
+}
+
+static int
+remote_fileio_oflags_to_host (long flags)
+{
+ int hflags = 0;
+
+ if (flags & FILEIO_O_CREAT)
+ hflags |= O_CREAT;
+ if (flags & FILEIO_O_EXCL)
+ hflags |= O_EXCL;
+ if (flags & FILEIO_O_TRUNC)
+ hflags |= O_TRUNC;
+ if (flags & FILEIO_O_APPEND)
+ hflags |= O_APPEND;
+ if (flags & FILEIO_O_RDONLY)
+ hflags |= O_RDONLY;
+ if (flags & FILEIO_O_WRONLY)
+ hflags |= O_WRONLY;
+ if (flags & FILEIO_O_RDWR)
+ hflags |= O_RDWR;
+/* On systems supporting binary and text mode, always open files in
+ binary mode. */
+#ifdef O_BINARY
+ hflags |= O_BINARY;
+#endif
+ return hflags;
+}
+
+static mode_t
+remote_fileio_mode_to_host (long mode, int open_call)
+{
+ mode_t hmode = 0;
+
+ if (!open_call)
+ {
+ if (mode & FILEIO_S_IFREG)
+ hmode |= S_IFREG;
+ if (mode & FILEIO_S_IFDIR)
+ hmode |= S_IFDIR;
+ if (mode & FILEIO_S_IFCHR)
+ hmode |= S_IFCHR;
+ }
+ if (mode & FILEIO_S_IRUSR)
+ hmode |= S_IRUSR;
+ if (mode & FILEIO_S_IWUSR)
+ hmode |= S_IWUSR;
+ if (mode & FILEIO_S_IXUSR)
+ hmode |= S_IXUSR;
+ if (mode & FILEIO_S_IRGRP)
+ hmode |= S_IRGRP;
+ if (mode & FILEIO_S_IWGRP)
+ hmode |= S_IWGRP;
+ if (mode & FILEIO_S_IXGRP)
+ hmode |= S_IXGRP;
+ if (mode & FILEIO_S_IROTH)
+ hmode |= S_IROTH;
+ if (mode & FILEIO_S_IWOTH)
+ hmode |= S_IWOTH;
+ if (mode & FILEIO_S_IXOTH)
+ hmode |= S_IXOTH;
+ return hmode;
+}
+
+static LONGEST
+remote_fileio_mode_to_target (mode_t mode)
+{
+ mode_t tmode = 0;
+
+ if (mode & S_IFREG)
+ tmode |= FILEIO_S_IFREG;
+ if (mode & S_IFDIR)
+ tmode |= FILEIO_S_IFDIR;
+ if (mode & S_IFCHR)
+ tmode |= FILEIO_S_IFCHR;
+ if (mode & S_IRUSR)
+ tmode |= FILEIO_S_IRUSR;
+ if (mode & S_IWUSR)
+ tmode |= FILEIO_S_IWUSR;
+ if (mode & S_IXUSR)
+ tmode |= FILEIO_S_IXUSR;
+ if (mode & S_IRGRP)
+ tmode |= FILEIO_S_IRGRP;
+ if (mode & S_IWGRP)
+ tmode |= FILEIO_S_IWGRP;
+ if (mode & S_IXGRP)
+ tmode |= FILEIO_S_IXGRP;
+ if (mode & S_IROTH)
+ tmode |= FILEIO_S_IROTH;
+ if (mode & S_IWOTH)
+ tmode |= FILEIO_S_IWOTH;
+ if (mode & S_IXOTH)
+ tmode |= FILEIO_S_IXOTH;
+ return tmode;
+}
+
+static int
+remote_fileio_errno_to_target (int error)
+{
+ switch (error)
+ {
+ case EPERM:
+ return FILEIO_EPERM;
+ case ENOENT:
+ return FILEIO_ENOENT;
+ case EINTR:
+ return FILEIO_EINTR;
+ case EIO:
+ return FILEIO_EIO;
+ case EBADF:
+ return FILEIO_EBADF;
+ case EACCES:
+ return FILEIO_EACCES;
+ case EFAULT:
+ return FILEIO_EFAULT;
+ case EBUSY:
+ return FILEIO_EBUSY;
+ case EEXIST:
+ return FILEIO_EEXIST;
+ case ENODEV:
+ return FILEIO_ENODEV;
+ case ENOTDIR:
+ return FILEIO_ENOTDIR;
+ case EISDIR:
+ return FILEIO_EISDIR;
+ case EINVAL:
+ return FILEIO_EINVAL;
+ case ENFILE:
+ return FILEIO_ENFILE;
+ case EMFILE:
+ return FILEIO_EMFILE;
+ case EFBIG:
+ return FILEIO_EFBIG;
+ case ENOSPC:
+ return FILEIO_ENOSPC;
+ case ESPIPE:
+ return FILEIO_ESPIPE;
+ case EROFS:
+ return FILEIO_EROFS;
+ case ENOSYS:
+ return FILEIO_ENOSYS;
+ case ENAMETOOLONG:
+ return FILEIO_ENAMETOOLONG;
+ }
+ return FILEIO_EUNKNOWN;
+}
+
+static int
+remote_fileio_seek_flag_to_host (long num, int *flag)
+{
+ if (!flag)
+ return 0;
+ switch (num)
+ {
+ case FILEIO_SEEK_SET:
+ *flag = SEEK_SET;
+ break;
+ case FILEIO_SEEK_CUR:
+ *flag = SEEK_CUR;
+ break;
+ case FILEIO_SEEK_END:
+ *flag = SEEK_END;
+ break;
+ default:
+ return -1;
+ }
+ return 0;
+}
+
+static int
+remote_fileio_extract_long (char **buf, LONGEST *retlong)
+{
+ char *c;
+ int sign = 1;
+
+ if (!buf || !*buf || !**buf || !retlong)
+ return -1;
+ c = strchr (*buf, ',');
+ if (c)
+ *c++ = '\0';
+ else
+ c = strchr (*buf, '\0');
+ while (strchr ("+-", **buf))
+ {
+ if (**buf == '-')
+ sign = -sign;
+ ++*buf;
+ }
+ for (*retlong = 0; **buf; ++*buf)
+ {
+ *retlong <<= 4;
+ if (**buf >= '0' && **buf <= '9')
+ *retlong += **buf - '0';
+ else if (**buf >= 'a' && **buf <= 'f')
+ *retlong += **buf - 'a' + 10;
+ else if (**buf >= 'A' && **buf <= 'F')
+ *retlong += **buf - 'A' + 10;
+ else
+ return -1;
+ }
+ *retlong *= sign;
+ *buf = c;
+ return 0;
+}
+
+static int
+remote_fileio_extract_int (char **buf, long *retint)
+{
+ int ret;
+ LONGEST retlong;
+
+ if (!retint)
+ return -1;
+ ret = remote_fileio_extract_long (buf, &retlong);
+ if (!ret)
+ *retint = (long) retlong;
+ return ret;
+}
+
+static int
+remote_fileio_extract_ptr_w_len (char **buf, CORE_ADDR *ptrval, int *length)
+{
+ char *c;
+ LONGEST retlong;
+
+ if (!buf || !*buf || !**buf || !ptrval || !length)
+ return -1;
+ c = strchr (*buf, '/');
+ if (!c)
+ return -1;
+ *c++ = '\0';
+ if (remote_fileio_extract_long (buf, &retlong))
+ return -1;
+ *ptrval = (CORE_ADDR) retlong;
+ *buf = c;
+ if (remote_fileio_extract_long (buf, &retlong))
+ return -1;
+ *length = (int) retlong;
+ return 0;
+}
+
+/* Convert to big endian */
+static void
+remote_fileio_to_be (LONGEST num, char *buf, int bytes)
+{
+ int i;
+
+ for (i = 0; i < bytes; ++i)
+ buf[i] = (num >> (8 * (bytes - i - 1))) & 0xff;
+}
+
+static void
+remote_fileio_to_fio_int (long num, fio_int_t fnum)
+{
+ remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_uint (long num, fio_uint_t fnum)
+{
+ remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_mode (mode_t num, fio_mode_t fnum)
+{
+ remote_fileio_to_be (remote_fileio_mode_to_target(num), (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_time (time_t num, fio_time_t fnum)
+{
+ remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_long (LONGEST num, fio_long_t fnum)
+{
+ remote_fileio_to_be (num, (char *) fnum, 8);
+}
+
+static void
+remote_fileio_to_fio_ulong (LONGEST num, fio_ulong_t fnum)
+{
+ remote_fileio_to_be (num, (char *) fnum, 8);
+}
+
+static void
+remote_fileio_to_fio_stat (struct stat *st, struct fio_stat *fst)
+{
+ /* `st_dev' is set in the calling function */
+ remote_fileio_to_fio_uint ((long) st->st_ino, fst->fst_ino);
+ remote_fileio_to_fio_mode (st->st_mode, fst->fst_mode);
+ remote_fileio_to_fio_uint ((long) st->st_nlink, fst->fst_nlink);
+ remote_fileio_to_fio_uint ((long) st->st_uid, fst->fst_uid);
+ remote_fileio_to_fio_uint ((long) st->st_gid, fst->fst_gid);
+ remote_fileio_to_fio_uint ((long) st->st_rdev, fst->fst_rdev);
+ remote_fileio_to_fio_ulong ((LONGEST) st->st_size, fst->fst_size);
+ remote_fileio_to_fio_ulong ((LONGEST) st->st_blksize, fst->fst_blksize);
+ remote_fileio_to_fio_ulong ((LONGEST) st->st_blocks, fst->fst_blocks);
+ remote_fileio_to_fio_time (st->st_atime, fst->fst_atime);
+ remote_fileio_to_fio_time (st->st_mtime, fst->fst_mtime);
+ remote_fileio_to_fio_time (st->st_ctime, fst->fst_ctime);
+}
+
+static void
+remote_fileio_to_fio_timeval (struct timeval *tv, struct fio_timeval *ftv)
+{
+ remote_fileio_to_fio_time (tv->tv_sec, ftv->ftv_sec);
+ remote_fileio_to_fio_long (tv->tv_usec, ftv->ftv_usec);
+}
+
+static int remote_fio_ctrl_c_flag = 0;
+static int remote_fio_no_longjmp = 0;
+
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+static struct sigaction remote_fio_sa;
+static struct sigaction remote_fio_osa;
+#else
+static void (*remote_fio_ofunc)(int);
+#endif
+
+static void
+remote_fileio_sig_init (void)
+{
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+ remote_fio_sa.sa_handler = SIG_IGN;
+ sigemptyset (&remote_fio_sa.sa_mask);
+ remote_fio_sa.sa_flags = 0;
+ sigaction (SIGINT, &remote_fio_sa, &remote_fio_osa);
+#else
+ remote_fio_ofunc = signal (SIGINT, SIG_IGN);
+#endif
+}
+
+static void
+remote_fileio_sig_set (void (*sigint_func)(int))
+{
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+ remote_fio_sa.sa_handler = sigint_func;
+ sigemptyset (&remote_fio_sa.sa_mask);
+ remote_fio_sa.sa_flags = 0;
+ sigaction (SIGINT, &remote_fio_sa, NULL);
+#else
+ signal (SIGINT, sigint_func);
+#endif
+}
+
+static void
+remote_fileio_sig_exit (void)
+{
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+ sigaction (SIGINT, &remote_fio_osa, NULL);
+#else
+ signal (SIGINT, remote_fio_ofunc);
+#endif
+}
+
+static void
+remote_fileio_ctrl_c_signal_handler (int signo)
+{
+ remote_fileio_sig_set (SIG_IGN);
+ remote_fio_ctrl_c_flag = 1;
+ if (!remote_fio_no_longjmp)
+ throw_exception (RETURN_QUIT);
+ remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+}
+
+static void
+remote_fileio_reply (int retcode, int error)
+{
+ char buf[32];
+
+ remote_fileio_sig_set (SIG_IGN);
+ strcpy (buf, "F");
+ if (retcode < 0)
+ {
+ strcat (buf, "-");
+ retcode = -retcode;
+ }
+ sprintf (buf + strlen (buf), "%x", retcode);
+ if (error || remote_fio_ctrl_c_flag)
+ {
+ if (error && remote_fio_ctrl_c_flag)
+ error = FILEIO_EINTR;
+ if (error < 0)
+ {
+ strcat (buf, "-");
+ error = -error;
+ }
+ sprintf (buf + strlen (buf), ",%x", error);
+ if (remote_fio_ctrl_c_flag)
+ strcat (buf, ",C");
+ }
+ remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+ putpkt (buf);
+}
+
+static void
+remote_fileio_ioerror (void)
+{
+ remote_fileio_reply (-1, FILEIO_EIO);
+}
+
+static void
+remote_fileio_badfd (void)
+{
+ remote_fileio_reply (-1, FILEIO_EBADF);
+}
+
+static void
+remote_fileio_return_errno (int retcode)
+{
+ remote_fileio_reply (retcode,
+ retcode < 0 ? remote_fileio_errno_to_target (errno) : 0);
+}
+
+static void
+remote_fileio_return_success (int retcode)
+{
+ remote_fileio_reply (retcode, 0);
+}
+
+/* Wrapper function for remote_write_bytes() which has the disadvantage to
+ write only one packet, regardless of the requested number of bytes to
+ transfer. This wrapper calls remote_write_bytes() as often as needed. */
+static int
+remote_fileio_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
+{
+ int ret = 0, written;
+
+ while (len > 0 && (written = remote_write_bytes (memaddr, myaddr, len)) > 0)
+ {
+ len -= written;
+ memaddr += written;
+ myaddr += written;
+ ret += written;
+ }
+ return ret;
+}
+
+static void
+remote_fileio_func_open (char *buf)
+{
+ CORE_ADDR ptrval;
+ int length, retlength;
+ long num;
+ int flags, fd;
+ mode_t mode;
+ char *pathname;
+ struct stat st;
+
+ /* 1. Parameter: Ptr to pathname / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* 2. Parameter: open flags */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ flags = remote_fileio_oflags_to_host (num);
+ /* 3. Parameter: open mode */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ mode = remote_fileio_mode_to_host (num, 1);
+
+ /* Request pathname using 'm' packet */
+ pathname = alloca (length);
+ retlength = remote_read_bytes (ptrval, pathname, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* Check if pathname exists and is not a regular file or directory. If so,
+ return an appropriate error code. Same for trying to open directories
+ for writing. */
+ if (!stat (pathname, &st))
+ {
+ if (!S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode))
+ {
+ remote_fileio_reply (-1, FILEIO_ENODEV);
+ return;
+ }
+ if (S_ISDIR (st.st_mode)
+ && ((flags & O_WRONLY) == O_WRONLY || (flags & O_RDWR) == O_RDWR))
+ {
+ remote_fileio_reply (-1, FILEIO_EISDIR);
+ return;
+ }
+ }
+
+ remote_fio_no_longjmp = 1;
+ fd = open (pathname, flags, mode);
+ if (fd < 0)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+
+ fd = remote_fileio_fd_to_targetfd (fd);
+ remote_fileio_return_success (fd);
+}
+
+static void
+remote_fileio_func_close (char *buf)
+{
+ long num;
+ int fd;
+
+ /* Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) num);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ if (fd != FIO_FD_CONSOLE_IN && fd != FIO_FD_CONSOLE_OUT && close (fd))
+ remote_fileio_return_errno (-1);
+ remote_fileio_close_target_fd ((int) num);
+ remote_fileio_return_success (0);
+}
+
+static void
+remote_fileio_func_read (char *buf)
+{
+ long target_fd, num;
+ LONGEST lnum;
+ CORE_ADDR ptrval;
+ int fd, ret, retlength;
+ char *buffer;
+ size_t length;
+ off_t old_offset, new_offset;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) target_fd);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ /* 2. Parameter: buffer pointer */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+ /* 3. Parameter: buffer length */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ length = (size_t) num;
+
+ switch (fd)
+ {
+ case FIO_FD_CONSOLE_OUT:
+ remote_fileio_badfd ();
+ return;
+ case FIO_FD_CONSOLE_IN:
+ {
+ static char *remaining_buf = NULL;
+ static int remaining_length = 0;
+
+ buffer = (char *) xmalloc (32768);
+ if (remaining_buf)
+ {
+ remote_fio_no_longjmp = 1;
+ if (remaining_length > length)
+ {
+ memcpy (buffer, remaining_buf, length);
+ memmove (remaining_buf, remaining_buf + length,
+ remaining_length - length);
+ remaining_length -= length;
+ ret = length;
+ }
+ else
+ {
+ memcpy (buffer, remaining_buf, remaining_length);
+ xfree (remaining_buf);
+ remaining_buf = NULL;
+ ret = remaining_length;
+ }
+ }
+ else
+ {
+ ret = ui_file_read (gdb_stdtargin, buffer, 32767);
+ remote_fio_no_longjmp = 1;
+ if (ret > 0 && (size_t)ret > length)
+ {
+ remaining_buf = (char *) xmalloc (ret - length);
+ remaining_length = ret - length;
+ memcpy (remaining_buf, buffer + length, remaining_length);
+ ret = length;
+ }
+ }
+ }
+ break;
+ default:
+ buffer = (char *) xmalloc (length);
+ /* POSIX defines EINTR behaviour of read in a weird way. It's allowed
+ for read() to return -1 even if "some" bytes have been read. It
+ has been corrected in SUSv2 but that doesn't help us much...
+ Therefore a complete solution must check how many bytes have been
+ read on EINTR to return a more reliable value to the target */
+ old_offset = lseek (fd, 0, SEEK_CUR);
+ remote_fio_no_longjmp = 1;
+ ret = read (fd, buffer, length);
+ if (ret < 0 && errno == EINTR)
+ {
+ new_offset = lseek (fd, 0, SEEK_CUR);
+ /* If some data has been read, return the number of bytes read.
+ The Ctrl-C flag is set in remote_fileio_reply() anyway */
+ if (old_offset != new_offset)
+ ret = new_offset - old_offset;
+ }
+ break;
+ }
+
+ if (ret > 0)
+ {
+ retlength = remote_fileio_write_bytes (ptrval, buffer, ret);
+ if (retlength != ret)
+ ret = -1; /* errno has been set to EIO in remote_fileio_write_bytes() */
+ }
+
+ if (ret < 0)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+
+ xfree (buffer);
+}
+
+static void
+remote_fileio_func_write (char *buf)
+{
+ long target_fd, num;
+ LONGEST lnum;
+ CORE_ADDR ptrval;
+ int fd, ret, retlength;
+ char *buffer;
+ size_t length;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) target_fd);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ /* 2. Parameter: buffer pointer */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+ /* 3. Parameter: buffer length */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ length = (size_t) num;
+
+ buffer = (char *) xmalloc (length);
+ retlength = remote_read_bytes (ptrval, buffer, length);
+ if (retlength != length)
+ {
+ xfree (buffer);
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ switch (fd)
+ {
+ case FIO_FD_CONSOLE_IN:
+ remote_fileio_badfd ();
+ return;
+ case FIO_FD_CONSOLE_OUT:
+ ui_file_write (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr, buffer,
+ length);
+ gdb_flush (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr);
+ ret = length;
+ break;
+ default:
+ ret = write (fd, buffer, length);
+ if (ret < 0 && errno == EACCES)
+ errno = EBADF; /* Cygwin returns EACCESS when writing to a R/O file.*/
+ break;
+ }
+
+ if (ret < 0)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+
+ xfree (buffer);
+}
+
+static void
+remote_fileio_func_lseek (char *buf)
+{
+ long num;
+ LONGEST lnum;
+ int fd, flag;
+ off_t offset, ret;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) num);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ else if (fd == FIO_FD_CONSOLE_IN || fd == FIO_FD_CONSOLE_OUT)
+ {
+ remote_fileio_reply (-1, FILEIO_ESPIPE);
+ return;
+ }
+
+ /* 2. Parameter: offset */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ offset = (off_t) lnum;
+ /* 3. Parameter: flag */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ if (remote_fileio_seek_flag_to_host (num, &flag))
+ {
+ remote_fileio_reply (-1, FILEIO_EINVAL);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = lseek (fd, offset, flag);
+
+ if (ret == (off_t) -1)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_rename (char *buf)
+{
+ CORE_ADDR ptrval;
+ int length, retlength;
+ char *oldpath, *newpath;
+ int ret, of, nf;
+ struct stat ost, nst;
+
+ /* 1. Parameter: Ptr to oldpath / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request oldpath using 'm' packet */
+ oldpath = alloca (length);
+ retlength = remote_read_bytes (ptrval, oldpath, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* 2. Parameter: Ptr to newpath / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request newpath using 'm' packet */
+ newpath = alloca (length);
+ retlength = remote_read_bytes (ptrval, newpath, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* Only operate on regular files and directories */
+ of = stat (oldpath, &ost);
+ nf = stat (newpath, &nst);
+ if ((!of && !S_ISREG (ost.st_mode) && !S_ISDIR (ost.st_mode))
+ || (!nf && !S_ISREG (nst.st_mode) && !S_ISDIR (nst.st_mode)))
+ {
+ remote_fileio_reply (-1, FILEIO_EACCES);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = rename (oldpath, newpath);
+
+ if (ret == -1)
+ {
+ /* Special case: newpath is a non-empty directory. Some systems
+ return ENOTEMPTY, some return EEXIST. We coerce that to be
+ always EEXIST. */
+ if (errno == ENOTEMPTY)
+ errno = EEXIST;
+#ifdef __CYGWIN__
+ /* Workaround some Cygwin problems with correct errnos. */
+ if (errno == EACCES)
+ {
+ if (!of && !nf && S_ISDIR (nst.st_mode))
+ {
+ if (S_ISREG (ost.st_mode))
+ errno = EISDIR;
+ else
+ {
+ char oldfullpath[PATH_MAX + 1];
+ char newfullpath[PATH_MAX + 1];
+ int len;
+
+ cygwin_conv_to_full_posix_path (oldpath, oldfullpath);
+ cygwin_conv_to_full_posix_path (newpath, newfullpath);
+ len = strlen (oldfullpath);
+ if (newfullpath[len] == '/'
+ && !strncmp (oldfullpath, newfullpath, len))
+ errno = EINVAL;
+ else
+ errno = EEXIST;
+ }
+ }
+ }
+#endif
+
+ remote_fileio_return_errno (-1);
+ }
+ else
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_unlink (char *buf)
+{
+ CORE_ADDR ptrval;
+ int length, retlength;
+ char *pathname;
+ int ret;
+ struct stat st;
+
+ /* Parameter: Ptr to pathname / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request pathname using 'm' packet */
+ pathname = alloca (length);
+ retlength = remote_read_bytes (ptrval, pathname, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* Only operate on regular files (and directories, which allows to return
+ the correct return code) */
+ if (!stat (pathname, &st) && !S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode))
+ {
+ remote_fileio_reply (-1, FILEIO_ENODEV);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = unlink (pathname);
+
+ if (ret == -1)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_stat (char *buf)
+{
+ CORE_ADDR ptrval;
+ int ret, length, retlength;
+ char *pathname;
+ LONGEST lnum;
+ struct stat st;
+ struct fio_stat fst;
+
+ /* 1. Parameter: Ptr to pathname / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request pathname using 'm' packet */
+ pathname = alloca (length);
+ retlength = remote_read_bytes (ptrval, pathname, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* 2. Parameter: Ptr to struct stat */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+
+ remote_fio_no_longjmp = 1;
+ ret = stat (pathname, &st);
+
+ if (ret == -1)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ /* Only operate on regular files and directories */
+ if (!ret && !S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode))
+ {
+ remote_fileio_reply (-1, FILEIO_EACCES);
+ return;
+ }
+ if (ptrval)
+ {
+ remote_fileio_to_fio_stat (&st, &fst);
+ remote_fileio_to_fio_uint (0, fst.fst_dev);
+
+ retlength = remote_fileio_write_bytes (ptrval, (char *) &fst, sizeof fst);
+ if (retlength != sizeof fst)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ }
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_fstat (char *buf)
+{
+ CORE_ADDR ptrval;
+ int fd, ret, retlength;
+ long target_fd;
+ LONGEST lnum;
+ struct stat st;
+ struct fio_stat fst;
+ struct timeval tv;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) target_fd);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ /* 2. Parameter: Ptr to struct stat */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+
+ remote_fio_no_longjmp = 1;
+ if (fd == FIO_FD_CONSOLE_IN || fd == FIO_FD_CONSOLE_OUT)
+ {
+ remote_fileio_to_fio_uint (1, fst.fst_dev);
+ st.st_mode = S_IFCHR | (fd == FIO_FD_CONSOLE_IN ? S_IRUSR : S_IWUSR);
+ st.st_nlink = 1;
+ st.st_uid = getuid ();
+ st.st_gid = getgid ();
+ st.st_rdev = 0;
+ st.st_size = 0;
+ st.st_blksize = 512;
+ st.st_blocks = 0;
+ if (!gettimeofday (&tv, NULL))
+ st.st_atime = st.st_mtime = st.st_ctime = tv.tv_sec;
+ else
+ st.st_atime = st.st_mtime = st.st_ctime = (time_t) 0;
+ ret = 0;
+ }
+ else
+ ret = fstat (fd, &st);
+
+ if (ret == -1)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ if (ptrval)
+ {
+ remote_fileio_to_fio_stat (&st, &fst);
+
+ retlength = remote_fileio_write_bytes (ptrval, (char *) &fst, sizeof fst);
+ if (retlength != sizeof fst)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ }
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_gettimeofday (char *buf)
+{
+ LONGEST lnum;
+ CORE_ADDR ptrval;
+ int ret, retlength;
+ struct timeval tv;
+ struct fio_timeval ftv;
+
+ /* 1. Parameter: struct timeval pointer */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+ /* 2. Parameter: some pointer value... */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* ...which has to be NULL */
+ if (lnum)
+ {
+ remote_fileio_reply (-1, FILEIO_EINVAL);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = gettimeofday (&tv, NULL);
+
+ if (ret == -1)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+
+ if (ptrval)
+ {
+ remote_fileio_to_fio_timeval (&tv, &ftv);
+
+ retlength = remote_fileio_write_bytes (ptrval, (char *) &ftv, sizeof ftv);
+ if (retlength != sizeof ftv)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ }
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_isatty (char *buf)
+{
+ long target_fd;
+ int fd;
+
+ /* Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ remote_fio_no_longjmp = 1;
+ fd = remote_fileio_map_fd ((int) target_fd);
+ remote_fileio_return_success (fd == FIO_FD_CONSOLE_IN ||
+ fd == FIO_FD_CONSOLE_OUT ? 1 : 0);
+}
+
+static void
+remote_fileio_func_system (char *buf)
+{
+ CORE_ADDR ptrval;
+ int ret, length, retlength;
+ char *cmdline;
+
+ /* Check if system(3) has been explicitely allowed using the
+ `set remote system-call-allowed 1' command. If not, return
+ EPERM */
+ if (!remote_fio_system_call_allowed)
+ {
+ remote_fileio_reply (-1, FILEIO_EPERM);
+ return;
+ }
+
+ /* Parameter: Ptr to commandline / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request commandline using 'm' packet */
+ cmdline = alloca (length);
+ retlength = remote_read_bytes (ptrval, cmdline, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = system (cmdline);
+
+ if (ret == -1)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (WEXITSTATUS (ret));
+}
+
+static struct {
+ char *name;
+ void (*func)(char *);
+} remote_fio_func_map[] = {
+ "open", remote_fileio_func_open,
+ "close", remote_fileio_func_close,
+ "read", remote_fileio_func_read,
+ "write", remote_fileio_func_write,
+ "lseek", remote_fileio_func_lseek,
+ "rename", remote_fileio_func_rename,
+ "unlink", remote_fileio_func_unlink,
+ "stat", remote_fileio_func_stat,
+ "fstat", remote_fileio_func_fstat,
+ "gettimeofday", remote_fileio_func_gettimeofday,
+ "isatty", remote_fileio_func_isatty,
+ "system", remote_fileio_func_system,
+ NULL, NULL
+};
+
+static int
+do_remote_fileio_request (struct ui_out *uiout, void *buf_arg)
+{
+ char *buf = buf_arg;
+ char *c;
+ int idx;
+
+ remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+
+ c = strchr (++buf, ',');
+ if (c)
+ *c++ = '\0';
+ else
+ c = strchr (buf, '\0');
+ for (idx = 0; remote_fio_func_map[idx].name; ++idx)
+ if (!strcmp (remote_fio_func_map[idx].name, buf))
+ break;
+ if (!remote_fio_func_map[idx].name) /* ERROR: No such function. */
+ return RETURN_ERROR;
+ remote_fio_func_map[idx].func (c);
+ return 0;
+}
+
+void
+remote_fileio_request (char *buf)
+{
+ int ex;
+
+ remote_fileio_sig_init ();
+
+ remote_fio_ctrl_c_flag = 0;
+ remote_fio_no_longjmp = 0;
+
+ ex = catch_exceptions (uiout, do_remote_fileio_request, (void *)buf,
+ NULL, RETURN_MASK_ALL);
+ switch (ex)
+ {
+ case RETURN_ERROR:
+ remote_fileio_reply (-1, FILEIO_ENOSYS);
+ break;
+ case RETURN_QUIT:
+ remote_fileio_reply (-1, FILEIO_EINTR);
+ break;
+ default:
+ break;
+ }
+
+ remote_fileio_sig_exit ();
+}
+
+static void
+set_system_call_allowed (char *args, int from_tty)
+{
+ if (args)
+ {
+ char *arg_end;
+ int val = strtoul (args, &arg_end, 10);
+ if (*args && *arg_end == '\0')
+ {
+ remote_fio_system_call_allowed = !!val;
+ return;
+ }
+ }
+ error ("Illegal argument for \"set remote system-call-allowed\" command");
+}
+
+static void
+show_system_call_allowed (char *args, int from_tty)
+{
+ if (args)
+ error ("Garbage after \"show remote system-call-allowed\" command: `%s'", args);
+ printf_unfiltered ("Calling host system(3) call from target is %sallowed\n",
+ remote_fio_system_call_allowed ? "" : "not ");
+}
+
+void
+initialize_remote_fileio (struct cmd_list_element *remote_set_cmdlist,
+ struct cmd_list_element *remote_show_cmdlist)
+{
+ add_cmd ("system-call-allowed", no_class,
+ set_system_call_allowed,
+ "Set if the host system(3) call is allowed for the target.\n",
+ &remote_set_cmdlist);
+ add_cmd ("system-call-allowed", no_class,
+ show_system_call_allowed,
+ "Show if the host system(3) call is allowed for the target.\n",
+ &remote_show_cmdlist);
+}
diff --git a/gdb/remote-fileio.h b/gdb/remote-fileio.h
new file mode 100644
index 00000000000..da248ec5f04
--- /dev/null
+++ b/gdb/remote-fileio.h
@@ -0,0 +1,36 @@
+/* Remote File-I/O communications
+
+ Copyright 2003 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. */
+
+/* See the GDB User Guide for details of the GDB remote protocol. */
+
+#ifndef REMOTE_FILEIO_H
+#define REMOTE_FILEIO_H
+
+/* Unified interface to remote fileio, called in remote.c from
+ remote_wait () and remote_async_wait () */
+extern void remote_fileio_request (char *buf);
+
+/* Called from _initialize_remote () */
+extern void initialize_remote_fileio (
+ struct cmd_list_element *remote_set_cmdlist,
+ struct cmd_list_element *remote_show_cmdlist);
+
+#endif
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index 438d6c6d6c7..cd7f4d39c49 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -140,6 +140,8 @@ hms_open (char *args, int from_tty)
int write_dos_tick_delay;
+extern initialize_file_ftype _initialize_remote_hms; /* -Wmissing-prototypes */
+
void
_initialize_remote_hms (void)
{
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index e2908499fea..96f39728f54 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -536,7 +536,7 @@ fputs_readable (const char *string, struct ui_file *file)
timed out. TIMEOUT specifies timeout value in seconds.
*/
-int
+static int
mips_expect_timeout (const char *string, int timeout)
{
const char *p = string;
@@ -592,7 +592,7 @@ mips_expect_timeout (const char *string, int timeout)
mips_expect_timeout if a different timeout value is needed.
*/
-int
+static int
mips_expect (const char *string)
{
return mips_expect_timeout (string, remote_timeout);
@@ -600,7 +600,7 @@ mips_expect (const char *string)
/* Read the required number of characters into the given buffer (which
is assumed to be large enough). The only failure is a timeout. */
-int
+static int
mips_getstring (char *string, int n)
{
char *p = string;
@@ -1721,7 +1721,7 @@ mips_resume (ptid_t ptid, int step, enum target_signal siggnal)
/* Return the signal corresponding to SIG, where SIG is the number which
the MIPS protocol uses for the signal. */
-enum target_signal
+static enum target_signal
mips_signal_from_protocol (int sig)
{
/* We allow a few more signals than the IDT board actually returns, on
@@ -2437,7 +2437,7 @@ calculate_mask (CORE_ADDR addr, int len)
/* Insert a hardware breakpoint. This works only on LSI targets, which
implement ordinary breakpoints using hardware facilities. */
-int
+static int
remote_mips_insert_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
{
if (strcmp (target_shortname, "lsi") == 0)
@@ -2450,7 +2450,7 @@ remote_mips_insert_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
/* Remove a hardware breakpoint. This works only on LSI targets, which
implement ordinary breakpoints using hardware facilities. */
-int
+static int
remote_mips_remove_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
{
if (strcmp (target_shortname, "lsi") == 0)
@@ -3477,6 +3477,8 @@ pmon_command (char *args, int from_tty)
printf_filtered ("Received packet: %s\n", buf);
}
+extern initialize_file_ftype _initialize_remote_mips; /* -Wmissing-prototypes */
+
void
_initialize_remote_mips (void)
{
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index a85fbb118b7..94cb676a5f6 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -146,7 +146,7 @@ arm_rdi_start_remote (char *dummy)
/* Helper callbacks for the "host interface" structure. RDI functions call
these to forward output from the target system and so forth. */
-void
+static void
voiddummy (void *dummy)
{
fprintf_unfiltered (gdb_stdout, "void dummy\n");
@@ -1009,6 +1009,8 @@ rdilogenable_command (char *args, int from_tty)
" try y or n\n", args);
}
+extern initialize_file_ftype _initialize_remote_rdi; /* -Wmissing-prototypes */
+
void
_initialize_remote_rdi (void)
{
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index a9dba9ab401..6cbf73cbe8a 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -374,7 +374,7 @@ rdp_init (int cold, int tty)
}
-void
+static void
send_rdp (char *template,...)
{
char buf[200];
@@ -1403,6 +1403,8 @@ init_remote_rdp_ops (void)
remote_rdp_ops.to_magic = OPS_MAGIC;
}
+extern initialize_file_ftype _initialize_remote_rdp; /* -Wmissing-prototypes */
+
void
_initialize_remote_rdp (void)
{
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index a97c18eed99..8b554282194 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -101,8 +101,8 @@ vx_read_register (int regno)
area in the frame. VxWorks does not do this for the active frame
automatically; it greatly simplifies debugging. */
- sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (SP_REGNUM));
+ sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
+ REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
@@ -176,8 +176,8 @@ vx_write_register (int regno)
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{
- sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (SP_REGNUM));
+ sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
+ REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
diff --git a/gdb/remote.c b/gdb/remote.c
index 40be8e6badc..d5a5cf66c72 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -55,6 +55,8 @@
#include "gdbcore.h" /* for exec_bfd */
+#include "remote-fileio.h"
+
/* Prototypes for local functions */
static void cleanup_sigint_signal_handler (void *dummy);
static void initialize_sigint_signal_handler (void);
@@ -67,10 +69,6 @@ void async_remote_interrupt_twice (gdb_client_data);
static void build_remote_gdbarch_data (void);
-static int remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-
-static int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-
static void remote_files_info (struct target_ops *ignore);
static int remote_xfer_memory (CORE_ADDR memaddr, char *myaddr,
@@ -261,9 +259,10 @@ init_remote_state (struct gdbarch *gdbarch)
int regnum;
struct remote_state *rs = xmalloc (sizeof (struct remote_state));
- /* Start out by having the remote protocol mimic the existing
- behavour - just copy in the description of the register cache. */
- rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES; /* OK */
+ if (DEPRECATED_REGISTER_BYTES != 0)
+ rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES;
+ else
+ rs->sizeof_g_packet = 0;
/* Assume a 1:1 regnum<->pnum table. */
rs->regs = xcalloc (NUM_REGS + NUM_PSEUDO_REGS, sizeof (struct packet_reg));
@@ -274,8 +273,11 @@ init_remote_state (struct gdbarch *gdbarch)
r->regnum = regnum;
r->offset = REGISTER_BYTE (regnum);
r->in_g_packet = (regnum < NUM_REGS);
- /* ...size = REGISTER_RAW_SIZE (regnum); */
/* ...name = REGISTER_NAME (regnum); */
+
+ /* Compute packet size by accumulating the size of all registers. */
+ if (DEPRECATED_REGISTER_BYTES == 0)
+ rs->sizeof_g_packet += register_size (current_gdbarch, regnum);
}
/* Default maximum number of characters in a packet body. Many
@@ -1985,8 +1987,10 @@ get_offsets (void)
if (symfile_objfile == NULL)
return;
- offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+ offs = ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections)));
+ memcpy (offs, symfile_objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_addr;
@@ -2097,8 +2101,10 @@ remote_cisco_objfile_relocate (bfd_signed_vma text_off, bfd_signed_vma data_off,
broken for xcoff, dwarf, sdb-coff, etc. But there is no
simple canonical representation for this stuff. */
- offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+ offs = (struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
+ memcpy (offs, symfile_objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_off;
offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_off;
@@ -2945,6 +2951,9 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
case 'E': /* Error of some sort */
warning ("Remote failure reply: %s", buf);
continue;
+ case 'F': /* File-I/O request */
+ remote_fileio_request (buf);
+ continue;
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
@@ -3196,6 +3205,9 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
case 'E': /* Error of some sort */
warning ("Remote failure reply: %s", buf);
continue;
+ case 'F': /* File-I/O request */
+ remote_fileio_request (buf);
+ continue;
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
@@ -3750,7 +3762,7 @@ check_binary_download (CORE_ADDR addr)
Returns number of bytes transferred, or 0 (setting errno) for
error. Only transfer a single packet. */
-static int
+int
remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
{
unsigned char *buf;
@@ -3894,7 +3906,7 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
caller and its callers caller ;-) already contains code for
handling partial reads. */
-static int
+int
remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
{
char *buf;
@@ -4625,33 +4637,33 @@ extended_remote_async_create_inferior (char *exec_file, char *args, char **env)
/* On some machines, e.g. 68k, we may use a different breakpoint
- instruction than other targets; in those use REMOTE_BREAKPOINT
- instead of just BREAKPOINT_FROM_PC. Also, bi-endian targets may
- define LITTLE_REMOTE_BREAKPOINT and BIG_REMOTE_BREAKPOINT. If none
- of these are defined, we just call the standard routines that are
- in mem-break.c. */
-
-/* FIXME, these ought to be done in a more dynamic fashion. For instance,
- the choice of breakpoint instruction affects target program design and
- vice versa, and by making it user-tweakable, the special code here
- goes away and we need fewer special GDB configurations. */
-
-#if defined (LITTLE_REMOTE_BREAKPOINT) && defined (BIG_REMOTE_BREAKPOINT) && !defined(REMOTE_BREAKPOINT)
-#define REMOTE_BREAKPOINT
+ instruction than other targets; in those use
+ DEPRECATED_REMOTE_BREAKPOINT instead of just BREAKPOINT_FROM_PC.
+ Also, bi-endian targets may define
+ DEPRECATED_LITTLE_REMOTE_BREAKPOINT and
+ DEPRECATED_BIG_REMOTE_BREAKPOINT. If none of these are defined, we
+ just call the standard routines that are in mem-break.c. */
+
+/* NOTE: cagney/2003-06-08: This is silly. A remote and simulator
+ target should use an identical BREAKPOINT_FROM_PC. As for native,
+ the ARCH-OS-tdep.c code can override the default. */
+
+#if defined (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && defined (DEPRECATED_BIG_REMOTE_BREAKPOINT) && !defined(DEPRECATED_REMOTE_BREAKPOINT)
+#define DEPRECATED_REMOTE_BREAKPOINT
#endif
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
/* If the target isn't bi-endian, just pretend it is. */
-#if !defined (LITTLE_REMOTE_BREAKPOINT) && !defined (BIG_REMOTE_BREAKPOINT)
-#define LITTLE_REMOTE_BREAKPOINT REMOTE_BREAKPOINT
-#define BIG_REMOTE_BREAKPOINT REMOTE_BREAKPOINT
+#if !defined (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && !defined (DEPRECATED_BIG_REMOTE_BREAKPOINT)
+#define DEPRECATED_LITTLE_REMOTE_BREAKPOINT DEPRECATED_REMOTE_BREAKPOINT
+#define DEPRECATED_BIG_REMOTE_BREAKPOINT DEPRECATED_REMOTE_BREAKPOINT
#endif
-static unsigned char big_break_insn[] = BIG_REMOTE_BREAKPOINT;
-static unsigned char little_break_insn[] = LITTLE_REMOTE_BREAKPOINT;
+static unsigned char big_break_insn[] = DEPRECATED_BIG_REMOTE_BREAKPOINT;
+static unsigned char little_break_insn[] = DEPRECATED_LITTLE_REMOTE_BREAKPOINT;
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
/* Insert a breakpoint on targets that don't have any better
breakpoint support. We read the contents of the target location
@@ -4665,7 +4677,7 @@ static int
remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
{
struct remote_state *rs = get_remote_state ();
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
int val;
#endif
int bp_size;
@@ -4702,7 +4714,7 @@ remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
}
}
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
val = target_read_memory (addr, contents_cache, sizeof big_break_insn);
if (val == 0)
@@ -4718,7 +4730,7 @@ remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
return val;
#else
return memory_insert_breakpoint (addr, contents_cache);
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
}
static int
@@ -4747,11 +4759,11 @@ remote_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
return (buf[0] == 'E');
}
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
return target_write_memory (addr, contents_cache, sizeof big_break_insn);
#else
return memory_remove_breakpoint (addr, contents_cache);
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
}
static int
@@ -4846,7 +4858,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
int remote_hw_watchpoint_limit = -1;
int remote_hw_breakpoint_limit = -1;
-int
+static int
remote_check_watch_resources (int type, int cnt, int ot)
{
if (type == bp_hardware_breakpoint)
@@ -4872,13 +4884,13 @@ remote_check_watch_resources (int type, int cnt, int ot)
return -1;
}
-int
+static int
remote_stopped_by_watchpoint (void)
{
return remote_stopped_by_watchpoint_p;
}
-CORE_ADDR
+static CORE_ADDR
remote_stopped_data_address (void)
{
if (remote_stopped_by_watchpoint ())
@@ -6268,4 +6280,7 @@ Set use of remote protocol `Z' packets",
set_remote_protocol_Z_packet_cmd,
show_remote_protocol_Z_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
+
+ /* Eventually initialize fileio. See fileio.c */
+ initialize_remote_fileio (remote_set_cmdlist, remote_show_cmdlist);
}
diff --git a/gdb/remote.h b/gdb/remote.h
index 4477148f9c8..7c0df32ad6f 100644
--- a/gdb/remote.h
+++ b/gdb/remote.h
@@ -54,6 +54,10 @@ extern void remote_cisco_objfile_relocate (bfd_signed_vma text_off,
extern void async_remote_interrupt_twice (void *arg);
+extern int remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len);
+
+extern int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
+
extern void (*target_resume_hook) (void);
extern void (*target_wait_loop_hook) (void);
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index 6b0926bf408..af5e02365ed 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -246,6 +246,8 @@ rom68k_open (char *args, int from_tty)
monitor_open (args, &rom68k_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_rom68k; /* -Wmissing-prototypes */
+
void
_initialize_rom68k (void)
{
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index c5a0ea73d8f..e825529ba95 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -485,7 +485,8 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
/* Fetch trailing memory needed for alignment. */
if (addr + count * sizeof (int) > memaddr + len)
- if (!read_word (addr, buf + count - 1, arch64))
+ if (!read_word (addr + (count - 1) * sizeof (int),
+ buf + count - 1, arch64))
return 0;
/* Copy supplied data into memory buffer. */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 23fc0541e69..2e52ee52c7d 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -230,6 +230,16 @@ rs6000_saved_pc_after_call (struct frame_info *fi)
return read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum);
}
+/* Get the ith function argument for the current function. */
+static CORE_ADDR
+rs6000_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, 3 + argi, &addr);
+ return addr;
+}
+
/* Calculate the destination of a branch/jump. Return -1 if not a branch. */
static CORE_ADDR
@@ -1934,7 +1944,7 @@ rs6000_register_convert_to_virtual (int n, struct type *type,
static void
rs6000_register_convert_to_raw (struct type *type, int n,
- char *from, char *to)
+ const char *from, char *to)
{
if (TYPE_LENGTH (type) != REGISTER_RAW_SIZE (n))
{
@@ -2154,7 +2164,7 @@ rs6000_create_inferior (int pid)
/* Return real function address if ADDR (a function pointer) is in the data
space and is therefore a special function pointer. */
-CORE_ADDR
+static CORE_ADDR
rs6000_convert_from_func_ptr_addr (CORE_ADDR addr)
{
struct obj_section *s;
@@ -2900,22 +2910,20 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
set_gdbarch_print_insn (gdbarch, gdb_print_insn_powerpc);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_num_regs (gdbarch, v->nregs);
set_gdbarch_num_pseudo_regs (gdbarch, v->npregs);
set_gdbarch_register_name (gdbarch, rs6000_register_name);
set_gdbarch_deprecated_register_size (gdbarch, wordsize);
set_gdbarch_deprecated_register_bytes (gdbarch, off);
- set_gdbarch_register_byte (gdbarch, rs6000_register_byte);
- set_gdbarch_register_raw_size (gdbarch, rs6000_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, rs6000_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, rs6000_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, generic_register_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 16);
- set_gdbarch_register_virtual_type (gdbarch, rs6000_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, rs6000_register_virtual_type);
set_gdbarch_ptr_bit (gdbarch, wordsize * TARGET_CHAR_BIT);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
@@ -2936,9 +2944,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- set_gdbarch_register_convertible (gdbarch, rs6000_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
+ set_gdbarch_deprecated_register_convertible (gdbarch, rs6000_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
/* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
is correct for the SysV ABI when the wordsize is 8, but I'm also
@@ -2991,9 +2999,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call);
- /* We can't tell how many args there are
- now that the C compiler delays popping them. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ /* Helpers for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, rs6000_fetch_pointer_argument);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -3022,6 +3029,8 @@ rs6000_info_powerpc_command (char *args, int from_tty)
/* Initialization code. */
+extern initialize_file_ftype _initialize_rs6000_tdep; /* -Wmissing-prototypes */
+
void
_initialize_rs6000_tdep (void)
{
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
index 63e779bc19e..4dc8045f35c 100644
--- a/gdb/s390-nat.c
+++ b/gdb/s390-nat.c
@@ -251,9 +251,26 @@ supply_gregset (gregset_t * gregsetp)
for (regi = 0; regi < S390_NUM_GPRS; regi++)
supply_register (S390_GP0_REGNUM + regi,
(char *) &gregp[S390_GP0_REGNUM + regi]);
+
+#if defined (CONFIG_ARCH_S390X)
+ /* On the s390x, each element of gregset_t is 8 bytes long, but
+ each access register is still only 32 bits long. So they're
+ packed two per element. It's apparently traditional that
+ gregset_t must be an array, so when the registers it provides
+ have different sizes, something has to get strange
+ somewhere. */
+ {
+ unsigned int *acrs = (unsigned int *) &gregp[S390_FIRST_ACR];
+
+ for (regi = 0; regi < S390_NUM_ACRS; regi++)
+ supply_register (S390_FIRST_ACR + regi, (char *) &acrs[regi]);
+ }
+#else
for (regi = 0; regi < S390_NUM_ACRS; regi++)
supply_register (S390_FIRST_ACR + regi,
- (char *) &gregp[S390_FIRST_ACR + regi]);
+ (char *) &gregp[S390_FIRST_ACR + regi]);
+#endif
+
/* unfortunately this isn't in gregsetp */
for (regi = 0; regi < S390_NUM_CRS; regi++)
supply_register (S390_FIRST_CR + regi, NULL);
@@ -284,12 +301,35 @@ fill_gregset (gregset_t * gregsetp, int regno)
for (regi = 0; regi < S390_NUM_GPRS; regi++)
regcache_collect (S390_GP0_REGNUM + regi,
&gregp[S390_GP0_REGNUM + regi]);
+#if defined (CONFIG_ARCH_S390X)
+ /* See the comments about the access registers in
+ supply_gregset, above. */
+ {
+ unsigned int *acrs = (unsigned int *) &gregp[S390_FIRST_ACR];
+
+ for (regi = 0; regi < S390_NUM_ACRS; regi++)
+ regcache_collect (S390_FIRST_ACR + regi, &acrs[regi]);
+ }
+#else
for (regi = 0; regi < S390_NUM_ACRS; regi++)
regcache_collect (S390_FIRST_ACR + regi,
&gregp[S390_FIRST_ACR + regi]);
+#endif
}
- else if (regno >= S390_PSWM_REGNUM && regno <= S390_LAST_ACR)
+ else if (regno >= S390_PSWM_REGNUM && regno < S390_FIRST_ACR)
regcache_collect (regno, &gregp[regno]);
+ else if (regno >= S390_FIRST_ACR && regno <= S390_LAST_ACR)
+ {
+#if defined (CONFIG_ARCH_S390X)
+ /* See the comments about the access registers in
+ supply_gregset, above. */
+ unsigned int *acrs = (unsigned int *) &gregp[S390_FIRST_ACR];
+
+ regcache_collect (regno, &acrs[regno - S390_FIRST_ACR]);
+#else
+ regcache_collect (regno, &gregp[regno]);
+#endif
+ }
}
/* Given a pointer to a floating point register set in /proc format
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c7dce06a17b..e3bf67778b6 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -45,7 +45,7 @@
/* Number of bytes of storage in the actual machine representation
for register N. */
-int
+static int
s390_register_raw_size (int reg_nr)
{
if (S390_FP0_REGNUM <= reg_nr
@@ -55,21 +55,21 @@ s390_register_raw_size (int reg_nr)
return 4;
}
-int
+static int
s390x_register_raw_size (int reg_nr)
{
return (reg_nr == S390_FPC_REGNUM)
|| (reg_nr >= S390_FIRST_ACR && reg_nr <= S390_LAST_ACR) ? 4 : 8;
}
-int
+static int
s390_cannot_fetch_register (int regno)
{
return (regno >= S390_FIRST_CR && regno < (S390_FIRST_CR + 9)) ||
(regno >= (S390_FIRST_CR + 12) && regno <= S390_LAST_CR);
}
-int
+static int
s390_register_byte (int reg_nr)
{
if (reg_nr <= S390_GP_LAST_REGNUM)
@@ -119,7 +119,7 @@ struct frame_extra_info
static CORE_ADDR s390_frame_saved_pc_nofix (struct frame_info *fi);
-int
+static int
s390_readinstruction (bfd_byte instr[], CORE_ADDR at,
struct disassemble_info *info)
{
@@ -150,7 +150,7 @@ s390_memset_extra_info (struct frame_extra_info *fextra_info)
-const char *
+static const char *
s390_register_name (int reg_nr)
{
static char *register_names[] = {
@@ -175,7 +175,7 @@ s390_register_name (int reg_nr)
-int
+static int
s390_stab_reg_to_regnum (int regno)
{
return regno >= 64 ? S390_PSWM_REGNUM - 64 :
@@ -210,7 +210,7 @@ is_arg_reg (int regidx)
*/
-int
+static int
s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
struct frame_info *fi, int init_extra_info)
{
@@ -675,7 +675,7 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
}
-int
+static int
s390_check_function_end (CORE_ADDR pc)
{
bfd_byte instr[S390_MAX_INSTR_SIZE];
@@ -767,7 +767,7 @@ s390_sniff_pc_function_start (CORE_ADDR pc, struct frame_info *fi)
-CORE_ADDR
+static CORE_ADDR
s390_function_start (struct frame_info *fi)
{
CORE_ADDR function_start = 0;
@@ -782,7 +782,7 @@ s390_function_start (struct frame_info *fi)
-int
+static int
s390_frameless_function_invocation (struct frame_info *fi)
{
struct frame_extra_info fextra_info, *fextra_info_ptr;
@@ -881,7 +881,7 @@ s390_is_sigreturn (CORE_ADDR pc, struct frame_info *sighandler_fi,
for the moment.
For some reason the blockframe.c calls us with fi->next->fromleaf
so this seems of little use to us. */
-CORE_ADDR
+static CORE_ADDR
s390_init_frame_pc_first (int next_fromleaf, struct frame_info *fi)
{
CORE_ADDR sigcaller_pc;
@@ -901,7 +901,7 @@ s390_init_frame_pc_first (int next_fromleaf, struct frame_info *fi)
return pc;
}
-void
+static void
s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
@@ -916,7 +916,7 @@ s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
&FEXTRA_INFOP contains struct frame_extra_info; TDATAP can be NULL,
in which case the framedata are read. */
-void
+static void
s390_frame_init_saved_regs (struct frame_info *fi)
{
@@ -941,15 +941,6 @@ s390_frame_init_saved_regs (struct frame_info *fi)
-CORE_ADDR
-s390_frame_args_address (struct frame_info *fi)
-{
-
- /* Apparently gdb already knows gdb_args_offset itself */
- return get_frame_base (fi);
-}
-
-
static CORE_ADDR
s390_frame_saved_pc_nofix (struct frame_info *fi)
{
@@ -979,7 +970,7 @@ s390_frame_saved_pc_nofix (struct frame_info *fi)
return 0;
}
-CORE_ADDR
+static CORE_ADDR
s390_frame_saved_pc (struct frame_info *fi)
{
CORE_ADDR saved_pc = 0, sig_pc;
@@ -1008,7 +999,7 @@ s390_frame_saved_pc (struct frame_info *fi)
/* We want backtraces out of signal handlers so we don't set
(get_frame_type (thisframe) == SIGTRAMP_FRAME) to 1 */
-CORE_ADDR
+static CORE_ADDR
s390_frame_chain (struct frame_info *thisframe)
{
CORE_ADDR prev_fp = 0;
@@ -1088,7 +1079,7 @@ s390_frame_chain (struct frame_info *thisframe)
/* a given return value in `regbuf' with a type `valtype', extract and copy its
value into `valbuf' */
-void
+static void
s390_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
{
/* floats and doubles are returned in fpr0. fpr's have a size of 8 bytes.
@@ -1146,7 +1137,7 @@ s390_promote_integer_argument (struct type *valtype, char *valbuf,
return (value);
}
-void
+static void
s390_store_return_value (struct type *valtype, char *valbuf)
{
int arglen;
@@ -1194,7 +1185,7 @@ gdb_print_insn_s390 (bfd_vma memaddr, disassemble_info * info)
/* Not the most efficent code in the world */
-int
+static int
s390_fp_regnum (void)
{
int regno = S390_SP_REGNUM;
@@ -1209,7 +1200,7 @@ s390_fp_regnum (void)
return regno;
}
-CORE_ADDR
+static CORE_ADDR
s390_read_fp (void)
{
return read_register (s390_fp_regnum ());
@@ -1251,7 +1242,7 @@ s390_pop_frame_regular (struct frame_info *frame)
machine state that was in effect before the frame was created.
Used in the contexts of the "return" command, and of
target function calls from the debugger. */
-void
+static void
s390_pop_frame (void)
{
/* This function checks for and handles generic dummy frames, and
@@ -1501,7 +1492,7 @@ alignment_of (struct type *type)
Our caller has taken care of any type promotions needed to satisfy
prototypes or the old K&R argument-passing rules. */
-CORE_ADDR
+static CORE_ADDR
s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -1685,7 +1676,7 @@ s390_use_struct_convention (int gcc_p, struct type *value_type)
/* Return the GDB type object for the "standard" data type
of data in register N. */
-struct type *
+static struct type *
s390_register_virtual_type (int regno)
{
if (S390_FP0_REGNUM <= regno && regno < S390_FP0_REGNUM + S390_NUM_FPRS)
@@ -1695,7 +1686,7 @@ s390_register_virtual_type (int regno)
}
-struct type *
+static struct type *
s390x_register_virtual_type (int regno)
{
return (regno == S390_FPC_REGNUM) ||
@@ -1705,7 +1696,7 @@ s390x_register_virtual_type (int regno)
-void
+static void
s390_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (S390_GP0_REGNUM + 2, addr);
@@ -1713,7 +1704,7 @@ s390_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-const static unsigned char *
+static const unsigned char *
s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char breakpoint[] = { 0x0, 0x1 };
@@ -1724,7 +1715,7 @@ s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
/* Advance PC across any function entry prologue instructions to reach some
"real" code. */
-CORE_ADDR
+static CORE_ADDR
s390_skip_prologue (CORE_ADDR pc)
{
struct frame_extra_info fextra_info;
@@ -1737,7 +1728,7 @@ s390_skip_prologue (CORE_ADDR pc)
Can't go through the frames for this because on some machines
the new frame is not set up until the new function executes
some instructions. */
-CORE_ADDR
+static CORE_ADDR
s390_saved_pc_after_call (struct frame_info *frame)
{
return ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
@@ -1775,7 +1766,7 @@ s390_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
return NULL;
}
-int
+static int
s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name,
int *type_flags_ptr)
{
@@ -1788,7 +1779,7 @@ s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name
return 0;
}
-struct gdbarch *
+static struct gdbarch *
s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
static LONGEST s390_call_dummy_words[] = { 0 };
@@ -1816,12 +1807,8 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_char_signed (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frame_args_address (gdbarch, s390_frame_args_address);
set_gdbarch_deprecated_frame_chain (gdbarch, s390_frame_chain);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, s390_frame_init_saved_regs);
- set_gdbarch_frame_locals_address (gdbarch, s390_frame_args_address);
- /* We can't do this */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_store_struct_return (gdbarch, s390_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, s390_store_return_value);
@@ -1853,7 +1840,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
produces the frame's chain-pointer. */
set_gdbarch_deprecated_frame_chain (gdbarch, s390_frame_chain);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, s390_saved_pc_after_call);
- set_gdbarch_register_byte (gdbarch, s390_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, s390_register_byte);
set_gdbarch_pc_regnum (gdbarch, S390_PC_REGNUM);
set_gdbarch_sp_regnum (gdbarch, S390_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, S390_FP_REGNUM);
@@ -1883,19 +1870,18 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
case bfd_mach_s390_31:
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_raw_size (gdbarch, s390_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, s390_register_raw_size);
- set_gdbarch_register_virtual_type (gdbarch, s390_register_virtual_type);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, s390_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, s390_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, s390_register_virtual_type);
set_gdbarch_addr_bits_remove (gdbarch, s390_addr_bits_remove);
set_gdbarch_deprecated_register_bytes (gdbarch, S390_REGISTER_BYTES);
break;
case bfd_mach_s390_64:
set_gdbarch_deprecated_register_size (gdbarch, 8);
- set_gdbarch_register_raw_size (gdbarch, s390x_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, s390x_register_raw_size);
- set_gdbarch_register_virtual_type (gdbarch,
- s390x_register_virtual_type);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, s390x_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, s390x_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, s390x_register_virtual_type);
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
@@ -1911,13 +1897,15 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
+extern initialize_file_ftype _initialize_s390_tdep; /* -Wmissing-prototypes */
+
void
_initialize_s390_tdep (void)
{
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index dcc583ec98e..94c1ee31311 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -44,7 +44,7 @@ sentinel_frame_cache (struct regcache *regcache)
/* Here the register value is taken direct from the register cache. */
-void
+static void
sentinel_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache,
int regnum, int *optimized,
@@ -70,7 +70,7 @@ sentinel_frame_prev_register (struct frame_info *next_frame,
}
}
-void
+static void
sentinel_frame_this_id (struct frame_info *next_frame,
void **this_prologue_cache,
struct frame_id *this_id)
diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c
index 063cca13d63..8496ae411a2 100644
--- a/gdb/ser-e7kpc.c
+++ b/gdb/ser-e7kpc.c
@@ -19,8 +19,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if defined __GO32__ || defined _WIN32
#include "defs.h"
+#if defined __GO32__ || defined _WIN32
#include "serial.h"
#include "gdb_string.h"
@@ -425,6 +425,8 @@ static struct serial_ops e7000pc_ops =
#endif /*_WIN32 or __GO32__*/
+extern initialize_file_ftype _initialize_ser_e7000pc; /* -Wmissing-prototypes */
+
void
_initialize_ser_e7000pc (void)
{
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index cbaaa3689d4..655aaaa0367 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -362,7 +362,7 @@ sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
#define MSYMBOL_IS_SPECIAL(msym) \
(((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
-void
+static void
sh64_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
{
if (msym == NULL)
@@ -1239,7 +1239,7 @@ is_media_pseudo (int rn)
&& rn <= tdep->FV_LAST_REGNUM);
}
-int
+static int
sh64_get_gdb_regnum (int gcc_regnum, CORE_ADDR pc)
{
return translate_insn_rn (gcc_regnum, pc_is_isa32 (pc));
@@ -1813,7 +1813,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
}
}
-void
+static void
sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
struct frame_info *frame, int regnum,
enum lval_type *lval)
@@ -1921,14 +1921,14 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
static CORE_ADDR
sh_extract_struct_value_address (char *regbuf)
{
- return (extract_address ((regbuf), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer ((regbuf), REGISTER_RAW_SIZE (0)));
}
static CORE_ADDR
sh64_extract_struct_value_address (char *regbuf)
{
- return (extract_address ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
- REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
+ return (extract_unsigned_integer ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
+ REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
}
static CORE_ADDR
@@ -2123,7 +2123,7 @@ sh_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (argreg <= tdep->ARGLAST_REGNUM)
{
/* there's room in a register */
- regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
+ regval = extract_unsigned_integer (val, REGISTER_RAW_SIZE (argreg));
write_register (argreg++, regval);
}
/* Store the value 4 bytes at a time. This means that things
@@ -2238,7 +2238,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (int_argreg <= tdep->ARGLAST_REGNUM)
{
/* there's room in a register */
- regval = extract_address (val, argreg_size);
+ regval = extract_unsigned_integer (val, argreg_size);
write_register (int_argreg, regval);
}
/* Store the value 8 bytes at a time. This means that
@@ -2297,8 +2297,9 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
{
memset (valbuf_tmp, 0, sizeof (valbuf_tmp));
- REGISTER_CONVERT_TO_VIRTUAL (regnum,
- type, val, valbuf_tmp);
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
+ type, val,
+ valbuf_tmp);
val = valbuf_tmp;
}
#endif
@@ -3035,7 +3036,8 @@ sh64_show_regs (void)
sh64_show_compact_regs ();
}
-void sh_show_regs_command (char *args, int from_tty)
+static void
+sh_show_regs_command (char *args, int from_tty)
{
if (sh_show_regs)
(*sh_show_regs)();
@@ -3409,7 +3411,7 @@ sh_sh4_register_convert_to_virtual (int regnum, struct type *type,
error ("sh_register_convert_to_virtual called with non DR register number");
}
-void
+static void
sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
@@ -3451,7 +3453,7 @@ sh_sh4_register_convert_to_raw (struct type *type, int regnum,
error("sh_register_convert_to_raw called with non DR register number");
}
-void
+static void
sh_sh64_register_convert_to_raw (struct type *type, int regnum,
const void *from, void *to)
{
@@ -3476,7 +3478,7 @@ sh_sh64_register_convert_to_raw (struct type *type, int regnum,
error("sh_register_convert_to_raw called with non DR register number");
}
-void
+static void
sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, void *buffer)
{
@@ -3679,7 +3681,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
}
}
-void
+static void
sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const void *buffer)
{
@@ -3715,7 +3717,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
}
}
-void
+static void
sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const void *buffer)
{
@@ -4123,7 +4125,7 @@ sh_print_register (int regnum)
do_pseudo_register (regnum);
}
-void
+static void
sh_do_registers_info (int regnum, int fpregs)
{
if (regnum != -1) /* do one specified register */
@@ -4175,7 +4177,7 @@ sh_do_registers_info (int regnum, int fpregs)
}
}
-void
+static void
sh_compact_do_registers_info (int regnum, int fpregs)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
@@ -4201,7 +4203,7 @@ sh_compact_do_registers_info (int regnum, int fpregs)
}
}
-void
+static void
sh64_do_registers_info (int regnum, int fpregs)
{
if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
@@ -4306,7 +4308,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
struct gdbarch_tdep *tdep;
gdbarch_register_name_ftype *sh_register_name;
gdbarch_deprecated_store_return_value_ftype *sh_store_return_value;
- gdbarch_register_virtual_type_ftype *sh_register_virtual_type;
+ gdbarch_deprecated_register_virtual_type_ftype *sh_register_virtual_type;
/* If there is already a candidate, use it. */
arches = gdbarch_list_lookup_by_info (arches, &info);
@@ -4393,9 +4395,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
break;
case bfd_mach_sh2:
sh_register_name = sh_sh_register_name;
@@ -4403,9 +4405,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
break;
case bfd_mach_sh2e:
sh_register_name = sh_sh2e_register_name;
@@ -4413,9 +4415,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh3e_sh4_store_return_value;
sh_register_virtual_type = sh_sh3e_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
set_gdbarch_fp0_regnum (gdbarch, 25);
tdep->FPUL_REGNUM = 23;
tdep->FPSCR_REGNUM = 24;
@@ -4427,9 +4429,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
tdep->DSR_REGNUM = 24;
tdep->A0G_REGNUM = 25;
@@ -4452,9 +4454,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
tdep->SSR_REGNUM = 41;
tdep->SPC_REGNUM = 42;
break;
@@ -4464,9 +4466,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh3e_sh4_store_return_value;
sh_register_virtual_type = sh_sh3e_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_fp0_regnum (gdbarch, 25);
tdep->FPUL_REGNUM = 23;
@@ -4481,9 +4483,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
tdep->DSR_REGNUM = 24;
tdep->A0G_REGNUM = 25;
tdep->A0_REGNUM = 26;
@@ -4509,9 +4511,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_fp0_regnum (gdbarch, 25);
- set_gdbarch_register_raw_size (gdbarch, sh_sh4_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_sh4_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh4_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_sh4_register_byte);
set_gdbarch_num_pseudo_regs (gdbarch, 12);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
@@ -4597,9 +4599,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh64_store_return_value;
skip_prologue_hard_way = sh64_skip_prologue_hard_way;
do_pseudo_register = sh64_do_pseudo_register;
- set_gdbarch_register_raw_size (gdbarch, sh_sh64_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_sh64_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh64_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
/* This seems awfully wrong!*/
/*set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);*/
/* should include the size of the pseudo regs. */
@@ -4631,19 +4633,17 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
break;
}
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_register_name (gdbarch, sh_register_name);
- set_gdbarch_register_virtual_type (gdbarch, sh_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, sh_register_virtual_type);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
@@ -4667,7 +4667,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
/* Hook in ABI-specific overrides, if they have been registered. */
@@ -4687,6 +4686,8 @@ sh_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
/* FIXME: dump the rest of gdbarch_tdep. */
}
+extern initialize_file_ftype _initialize_sh_tdep; /* -Wmissing-prototypes */
+
void
_initialize_sh_tdep (void)
{
diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c
index 7d07fa53c80..b946e6fd71c 100644
--- a/gdb/sh3-rom.c
+++ b/gdb/sh3-rom.c
@@ -343,6 +343,8 @@ sh3_close (int quitting)
}
}
+extern initialize_file_ftype _initialize_sh3_rom; /* -Wmissing-prototypes */
+
void
_initialize_sh3_rom (void)
{
diff --git a/gdb/shnbsd-nat.c b/gdb/shnbsd-nat.c
index e1b56e66405..ec400698553 100644
--- a/gdb/shnbsd-nat.c
+++ b/gdb/shnbsd-nat.c
@@ -1,5 +1,5 @@
/* Native-dependent code for SuperH running NetBSD, for GDB.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -26,6 +26,7 @@
#include "defs.h"
#include "inferior.h"
+#include "sh-tdep.h"
#include "shnbsd-tdep.h"
/* Determine if PT_GETREGS fetches this register. */
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c
index ca46a9ed1c7..c808d1fdeae 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -819,6 +819,8 @@ Use \"info signals\" for a list of symbolic signals.");
}
#ifndef GDBSERVER
+extern initialize_file_ftype _initialize_signals; /* -Wmissing-prototype */
+
void
_initialize_signals (void)
{
diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c
index 26a776ff283..8400ad3a006 100644
--- a/gdb/solib-irix.c
+++ b/gdb/solib-irix.c
@@ -123,16 +123,12 @@ union irix_obj_info
/* MIPS sign extends its 32 bit addresses. We could conceivably use
extract_typed_address here, but to do so, we'd have to construct an
- appropriate type. Calling extract_signed_integer or
- extract_address seems simpler. */
+ appropriate type. Calling extract_signed_integer seems simpler. */
static CORE_ADDR
extract_mips_address (void *addr, int len)
{
- if (len <= 32)
- return extract_signed_integer (addr, len);
- else
- return extract_address (addr, len);
+ return extract_signed_integer (addr, len);
}
/* Fetch and return the link map data associated with ADDR. Note that
diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c
index 2dd9fa5fd02..a87eb21511a 100644
--- a/gdb/solib-legacy.c
+++ b/gdb/solib-legacy.c
@@ -142,6 +142,8 @@ legacy_svr4_fetch_link_map_offsets (void)
#endif /* HAVE_LINK_H */
+extern initialize_file_ftype _initialize_svr4_lm; /* -Wmissing-prototypes */
+
void
_initialize_svr4_lm (void)
{
diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c
index 4072fab5f4c..b7444c64cc2 100644
--- a/gdb/solib-sunos.c
+++ b/gdb/solib-sunos.c
@@ -68,14 +68,16 @@ static char *main_name_list[] =
NULL
};
-/* Macro to extract an address from a solib structure.
- When GDB is configured for some 32-bit targets (e.g. Solaris 2.7
- sparc), BFD is configured to handle 64-bit targets, so CORE_ADDR is
- 64 bits. We have to extract only the significant bits of addresses
- to get the right address when accessing the core file BFD. */
+/* Macro to extract an address from a solib structure. When GDB is
+ configured for some 32-bit targets (e.g. Solaris 2.7 sparc), BFD is
+ configured to handle 64-bit targets, so CORE_ADDR is 64 bits. We
+ have to extract only the significant bits of addresses to get the
+ right address when accessing the core file BFD.
+
+ Assume that the address is unsigned. */
#define SOLIB_EXTRACT_ADDRESS(MEMBER) \
- extract_address (&(MEMBER), sizeof (MEMBER))
+ extract_unsigned_integer (&(MEMBER), sizeof (MEMBER))
/* local data declarations */
@@ -108,7 +110,9 @@ LM_NEXT (struct so_list *so)
int lm_next_offset = offsetof (struct link_map, lm_next);
int lm_next_size = fieldsize (struct link_map, lm_next);
- return extract_address (so->lm_info->lm + lm_next_offset, lm_next_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lm_next_offset,
+ lm_next_size);
}
static CORE_ADDR
@@ -117,7 +121,9 @@ LM_NAME (struct so_list *so)
int lm_name_offset = offsetof (struct link_map, lm_name);
int lm_name_size = fieldsize (struct link_map, lm_name);
- return extract_address (so->lm_info->lm + lm_name_offset, lm_name_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lm_name_offset,
+ lm_name_size);
}
static CORE_ADDR debug_base; /* Base of dynamic linker structures */
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index b5cf617115d..d4335349790 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -79,9 +79,19 @@ static char *solib_break_names[] =
"r_debug_state",
"_r_debug_state",
"_dl_debug_state",
- "._dl_debug_state",
"rtld_db_dlactivity",
"_rtld_debug_state",
+
+ /* On the 64-bit PowerPC, the linker symbol with the same name as
+ the C function points to a function descriptor, not to the entry
+ point. The linker symbol whose name is the C function name
+ prefixed with a '.' points to the function's entry point. So
+ when we look through this table, we ignore symbols that point
+ into the data section (thus skipping the descriptor's symbol),
+ and eventually try this one, giving us the real entry point
+ address. */
+ "._dl_debug_state",
+
NULL
};
@@ -106,14 +116,16 @@ static char *main_name_list[] =
NULL
};
-/* Macro to extract an address from a solib structure.
- When GDB is configured for some 32-bit targets (e.g. Solaris 2.7
- sparc), BFD is configured to handle 64-bit targets, so CORE_ADDR is
- 64 bits. We have to extract only the significant bits of addresses
- to get the right address when accessing the core file BFD. */
+/* Macro to extract an address from a solib structure. When GDB is
+ configured for some 32-bit targets (e.g. Solaris 2.7 sparc), BFD is
+ configured to handle 64-bit targets, so CORE_ADDR is 64 bits. We
+ have to extract only the significant bits of addresses to get the
+ right address when accessing the core file BFD.
+
+ Assume that the address is unsigned. */
#define SOLIB_EXTRACT_ADDRESS(MEMBER) \
- extract_address (&(MEMBER), sizeof (MEMBER))
+ extract_unsigned_integer (&(MEMBER), sizeof (MEMBER))
/* local data declarations */
@@ -133,7 +145,9 @@ LM_NEXT (struct so_list *so)
{
struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
- return extract_address (so->lm_info->lm + lmo->l_next_offset, lmo->l_next_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lmo->l_next_offset,
+ lmo->l_next_size);
}
static CORE_ADDR
@@ -141,7 +155,9 @@ LM_NAME (struct so_list *so)
{
struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
- return extract_address (so->lm_info->lm + lmo->l_name_offset, lmo->l_name_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lmo->l_name_offset,
+ lmo->l_name_size);
}
static int
@@ -149,8 +165,9 @@ IGNORE_FIRST_LINK_MAP_ENTRY (struct so_list *so)
{
struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
- return extract_address (so->lm_info->lm + lmo->l_prev_offset,
- lmo->l_prev_size) == 0;
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lmo->l_prev_offset,
+ lmo->l_prev_size) == 0;
}
static CORE_ADDR debug_base; /* Base of dynamic linker structures */
@@ -160,7 +177,7 @@ static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
static int match_main (char *);
-static CORE_ADDR bfd_lookup_symbol (bfd *, char *, flagword);
+static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
/*
@@ -170,7 +187,7 @@ static CORE_ADDR bfd_lookup_symbol (bfd *, char *, flagword);
SYNOPSIS
- CORE_ADDR bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
+ CORE_ADDR bfd_lookup_symbol (bfd *abfd, char *symname)
DESCRIPTION
@@ -179,15 +196,12 @@ static CORE_ADDR bfd_lookup_symbol (bfd *, char *, flagword);
shared library support to find the address of the debugger
interface structures in the shared library.
- If SECT_FLAGS is non-zero, only match symbols in sections whose
- flags include all those in SECT_FLAGS.
-
Note that 0 is specifically allowed as an error return (no
such symbol).
*/
static CORE_ADDR
-bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
+bfd_lookup_symbol (bfd *abfd, char *symname)
{
long storage_needed;
asymbol *sym;
@@ -208,8 +222,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
for (i = 0; i < number_of_symbols; i++)
{
sym = *symbol_table++;
- if (STREQ (sym->name, symname)
- && (sym->section->flags & sect_flags) == sect_flags)
+ if (STREQ (sym->name, symname))
{
/* Bfd symbols are section relative. */
symaddr = sym->value + sym->section->vma;
@@ -236,9 +249,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
for (i = 0; i < number_of_symbols; i++)
{
sym = *symbol_table++;
-
- if (STREQ (sym->name, symname)
- && (sym->section->flags & sect_flags) == sect_flags)
+ if (STREQ (sym->name, symname))
{
/* Bfd symbols are section relative. */
symaddr = sym->value + sym->section->vma;
@@ -344,7 +355,7 @@ look_for_base (int fd, CORE_ADDR baseaddr)
for (symbolp = debug_base_symbols; *symbolp != NULL; symbolp++)
{
- address = bfd_lookup_symbol (interp_bfd, *symbolp, 0);
+ address = bfd_lookup_symbol (interp_bfd, *symbolp);
if (address != 0)
{
break;
@@ -594,7 +605,8 @@ first_link_map_member (void)
read_memory (debug_base + lmo->r_map_offset, r_map_buf, lmo->r_map_size);
- lm = extract_address (r_map_buf, lmo->r_map_size);
+ /* Assume that the address is unsigned. */
+ lm = extract_unsigned_integer (r_map_buf, lmo->r_map_size);
/* FIXME: Perhaps we should validate the info somehow, perhaps by
checking r_version for a known version number, or r_state for
@@ -652,8 +664,9 @@ open_symbol_file_object (void *from_ttyp)
/* Read address of name from target memory to GDB. */
read_memory (lm + lmo->l_name_offset, l_name_buf, lmo->l_name_size);
- /* Convert the address to host format. */
- l_name = extract_address (l_name_buf, lmo->l_name_size);
+ /* Convert the address to host format. Assume that the address is
+ unsigned. */
+ l_name = extract_unsigned_integer (l_name_buf, lmo->l_name_size);
/* Free l_name_buf. */
do_cleanups (cleanups);
@@ -827,9 +840,9 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
/* Read address of name from target memory to GDB. */
read_memory (lm + lmo->l_name_offset, l_name_buf, lmo->l_name_size);
- /* Extract this object's name. */
- name_address = extract_address (l_name_buf,
- lmo->l_name_size);
+ /* Extract this object's name. Assume that the address is
+ unsigned. */
+ name_address = extract_unsigned_integer (l_name_buf, lmo->l_name_size);
target_read_string (name_address, &buffer,
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
make_cleanup (xfree, buffer);
@@ -850,9 +863,10 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
return lm;
}
}
- /* Not the file we wanted, continue checking. */
- lm = extract_address (objfile_lm_info.lm + lmo->l_next_offset,
- lmo->l_next_size);
+ /* Not the file we wanted, continue checking. Assume that the
+ address is unsigned. */
+ lm = extract_unsigned_integer (objfile_lm_info.lm + lmo->l_next_offset,
+ lmo->l_next_size);
do_cleanups (old_chain);
}
return 0;
@@ -1022,8 +1036,7 @@ enable_break (void)
the current pc (which should point at the entry point for the
dynamic linker) and subtracting the offset of the entry point. */
if (!load_addr_found)
- load_addr = (read_pc ()
- - gdbarch_bfd_entry_point (current_gdbarch, tmp_bfd));
+ load_addr = read_pc () - tmp_bfd->start_address;
/* Record the relocated start and end address of the dynamic linker
text and plt section for svr4_in_dynsym_resolve_code. */
@@ -1047,16 +1060,7 @@ enable_break (void)
/* Now try to set a breakpoint in the dynamic linker. */
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
- /* On ABI's that use function descriptors, there are usually
- two linker symbols associated with each C function: one
- pointing at the actual entry point of the machine code,
- and one pointing at the function's descriptor. The
- latter symbol has the same name as the C function.
-
- What we're looking for here is the machine code entry
- point, so we are only interested in symbols in code
- sections. */
- sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep, SEC_CODE);
+ sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep);
if (sym_addr != 0)
break;
}
@@ -1462,6 +1466,8 @@ init_fetch_link_map_offsets (struct gdbarch *gdbarch)
static struct target_so_ops svr4_so_ops;
+extern initialize_file_ftype _initialize_svr4_solib; /* -Wmissing-prototypes */
+
void
_initialize_svr4_solib (void)
{
diff --git a/gdb/solib.c b/gdb/solib.c
index 289b84f34bf..6428a7cfe86 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -91,6 +91,7 @@ static char *solib_search_path = NULL;
* If path is absolute, look in SOLIB_ABSOLUTE_PREFIX.
* If path is absolute or relative, look for it literally (unmodified).
* Look in SOLIB_SEARCH_PATH.
+ * If available, use target defined search function.
* Look in inferior's $PATH.
* Look in inferior's $LD_LIBRARY_PATH.
@@ -381,7 +382,7 @@ symbol_add_stub (void *arg)
the section table. But we only use this for core files and
processes we've just attached to, so that's okay. */
-void
+static void
update_solib_list (int from_tty, struct target_ops *target)
{
struct so_list *inferior = TARGET_SO_CURRENT_SOS ();
@@ -856,6 +857,8 @@ reload_shared_libraries (char *ignored, int from_tty)
solib_add (NULL, from_tty, NULL, auto_solib_add);
}
+extern initialize_file_ftype _initialize_solib; /* -Wmissing-prototypes */
+
void
_initialize_solib (void)
{
diff --git a/gdb/somread.c b/gdb/somread.c
index 654ae067f75..cb7b048eafd 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -430,9 +430,10 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
int i;
CORE_ADDR text_addr;
- objfile->num_sections = SECT_OFF_MAX;
+ objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* FIXME: ezannoni 2000-04-20 The section names in SOM are not
.text, .data, etc, but $TEXT$, $DATA$,... We should initialize
@@ -457,7 +458,7 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
break;
text_addr = addrs->other[i].addr;
- for (i = 0; i < SECT_OFF_MAX; i++)
+ for (i = 0; i < objfile->num_sections; i++)
(objfile->section_offsets)->offsets[i] = text_addr;
}
}
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index ab5b9732d5f..31718139b29 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -508,7 +508,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
stack layout has changed or the stack is corrupt. */
target_read_memory (sigcontext_addr + saved_pc_offset,
scbuf, sizeof (scbuf));
- return extract_address (scbuf, sizeof (scbuf));
+ return extract_unsigned_integer (scbuf, sizeof (scbuf));
}
else if (get_frame_extra_info (frame)->in_prologue ||
(get_next_frame (frame) != NULL &&
@@ -534,7 +534,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
return PC_ADJUST (read_register (O7_REGNUM));
read_memory (addr, buf, SPARC_INTREG_SIZE);
- return PC_ADJUST (extract_address (buf, SPARC_INTREG_SIZE));
+ return PC_ADJUST (extract_unsigned_integer (buf, SPARC_INTREG_SIZE));
}
/* Since an individual frame in the frame cache is defined by two
@@ -1796,7 +1796,7 @@ get_longjmp_target (CORE_ADDR *pc)
LONGJMP_TARGET_SIZE))
return 0;
- *pc = extract_address (buf, LONGJMP_TARGET_SIZE);
+ *pc = extract_unsigned_integer (buf, LONGJMP_TARGET_SIZE);
return 1;
}
@@ -2104,20 +2104,7 @@ sparc_print_registers (struct gdbarch *gdbarch,
continue;
}
- /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
- The function frame_register_read() should have returned the
- pre-cooked register so no conversion is necessary. */
- /* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (i))
- {
- REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
- raw_buffer, virtual_buffer);
- }
- else
- {
- memcpy (virtual_buffer, raw_buffer,
- REGISTER_VIRTUAL_SIZE (i));
- }
+ memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (i));
/* If virtual format is floating, print it that way, and in raw
hex. */
@@ -2199,7 +2186,7 @@ sparc_do_registers_info (int regnum, int all)
#endif
-int
+static int
gdb_print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
{
/* It's necessary to override mach again because print_insn messes it up. */
@@ -2461,7 +2448,7 @@ sparc_extract_struct_value_address (struct regcache *regcache)
/* FIXME: kettenis/2003/05/24: Still used for sparc64. */
-void
+static void
sparc_store_return_value (struct type *type, char *valbuf)
{
int regno;
@@ -2610,6 +2597,8 @@ static struct gdbarch * sparc_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches);
static void sparc_dump_tdep (struct gdbarch *, struct ui_file *);
+extern initialize_file_ftype _initialize_sparc_tdep; /* -Wmissing-prototypes */
+
void
_initialize_sparc_tdep (void)
{
@@ -2624,7 +2613,7 @@ _initialize_sparc_tdep (void)
/* Compensate for stack bias. Note that we currently don't handle
mixed 32/64 bit code. */
-CORE_ADDR
+static CORE_ADDR
sparc64_read_sp (void)
{
CORE_ADDR sp = read_register (SP_REGNUM);
@@ -2634,7 +2623,7 @@ sparc64_read_sp (void)
return sp;
}
-CORE_ADDR
+static CORE_ADDR
sparc64_read_fp (void)
{
CORE_ADDR fp = read_register (DEPRECATED_FP_REGNUM);
@@ -2644,7 +2633,7 @@ sparc64_read_fp (void)
return fp;
}
-void
+static void
sparc64_write_sp (CORE_ADDR val)
{
CORE_ADDR oldsp = read_register (SP_REGNUM);
@@ -2668,7 +2657,7 @@ sparc64_write_sp (CORE_ADDR val)
for both; this means that if the arguments alternate between
int and float, we will waste every other register of both types. */
-CORE_ADDR
+static CORE_ADDR
sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_retaddr)
{
@@ -2785,7 +2774,7 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Values <= 32 bytes are returned in o0-o3 (floating-point values are
returned in f0-f3). */
-void
+static void
sp64_extract_return_value (struct type *type, char *regbuf, char *valbuf,
int bitoffset)
{
@@ -2842,7 +2831,7 @@ sp64_extract_return_value (struct type *type, char *regbuf, char *valbuf,
}
}
-extern void
+static void
sparc64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
sp64_extract_return_value (type, regbuf, valbuf, 0);
@@ -2868,7 +2857,7 @@ sparc32_stack_align (CORE_ADDR addr)
return ((addr + 7) & -8);
}
-extern CORE_ADDR
+static CORE_ADDR
sparc64_stack_align (CORE_ADDR addr)
{
return ((addr + 15) & -16);
@@ -3006,7 +2995,7 @@ sparc64_register_name (int regno)
// OBSOLETE }
#endif
-CORE_ADDR
+static CORE_ADDR
sparc_push_return_address (CORE_ADDR pc_unused, CORE_ADDR sp)
{
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
@@ -3165,19 +3154,6 @@ sparc_saved_pc_after_call (struct frame_info *fi)
return sparc_pc_adjust (read_register (RP_REGNUM));
}
-/* Convert registers between 'raw' and 'virtual' formats.
- They are the same on sparc, so there's nothing to do. */
-
-static void
-sparc_convert_to_virtual (int regnum, struct type *type, char *from, char *to)
-{ /* do nothing (should never be called) */
-}
-
-static void
-sparc_convert_to_raw (struct type *type, int regnum, char *from, char *to)
-{ /* do nothing (should never be called) */
-}
-
/* Init saved regs: nothing to do, just a place-holder function. */
static void
@@ -3212,7 +3188,7 @@ sparc_call_dummy_address (void)
/* Supply the Y register number to those that need it. */
-int
+static int
sparc_y_regnum (void)
{
return gdbarch_tdep (current_gdbarch)->y_regnum;
@@ -3227,7 +3203,7 @@ sparc_reg_struct_has_addr (int gcc_p, struct type *type)
return (gcc_p != 1);
}
-int
+static int
sparc_intreg_size (void)
{
return SPARC_INTREG_SIZE;
@@ -3243,6 +3219,16 @@ sparc_return_value_on_stack (struct type *type)
return 0;
}
+/* Get the ith function argument for the current function. */
+static CORE_ADDR
+sparc_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, O0_REGNUM + argi, &addr);
+ return addr;
+}
+
/*
* Gdbarch "constructor" function.
*/
@@ -3323,7 +3309,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fp0_regnum (gdbarch, SPARC_FP0_REGNUM);
set_gdbarch_deprecated_frame_chain (gdbarch, sparc_frame_chain);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sparc_frame_init_saved_regs);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, sparc_frame_saved_pc);
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
@@ -3338,12 +3323,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, sparc_pop_frame);
set_gdbarch_deprecated_push_return_address (gdbarch, sparc_push_return_address);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, sparc_push_dummy_frame);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
- set_gdbarch_register_convert_to_raw (gdbarch, sparc_convert_to_raw);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- sparc_convert_to_virtual);
- set_gdbarch_register_convertible (gdbarch,
- generic_register_convertible_not);
set_gdbarch_reg_struct_has_addr (gdbarch, sparc_reg_struct_has_addr);
set_gdbarch_return_value_on_stack (gdbarch, sparc_return_value_on_stack);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sparc_saved_pc_after_call);
@@ -3354,6 +3333,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, sparc_fetch_pointer_argument);
+
/*
* Settings that depend only on 32/64 bit word size
*/
@@ -3443,14 +3425,12 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, SPARC32_PC_REGNUM);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_push_arguments (gdbarch, sparc32_push_arguments);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_register_byte (gdbarch, sparc32_register_byte);
- set_gdbarch_register_raw_size (gdbarch, sparc32_register_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sparc32_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sparc32_register_size);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, sparc32_register_size);
- set_gdbarch_register_virtual_type (gdbarch,
- sparc32_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sparc32_register_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, sparc32_register_virtual_type);
#ifdef SPARC32_CALL_DUMMY_ON_STACK
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_32));
#else
@@ -3461,7 +3441,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_struct_return (gdbarch, sparc32_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch,
generic_use_struct_convention);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
tdep->y_regnum = SPARC32_Y_REGNUM;
tdep->fp_max_regnum = SPARC_FP0_REGNUM + 32;
tdep->intreg_size = 4;
@@ -3499,12 +3479,11 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_sp (gdbarch, sparc64_read_sp);
/* Some of the registers aren't 64 bits, but it's a lot simpler just
to assume they all are (since most of them are). */
- set_gdbarch_register_byte (gdbarch, sparc64_register_byte);
- set_gdbarch_register_raw_size (gdbarch, sparc64_register_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sparc64_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sparc64_register_size);
set_gdbarch_deprecated_register_size (gdbarch, 8);
- set_gdbarch_register_virtual_size (gdbarch, sparc64_register_size);
- set_gdbarch_register_virtual_type (gdbarch,
- sparc64_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sparc64_register_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, sparc64_register_virtual_type);
#ifdef SPARC64_CALL_DUMMY_ON_STACK
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_64));
#else
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 1299d06972b..4fe05aa9ce0 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -447,7 +447,7 @@ sparcnbsd_get_longjmp_target_32 (CORE_ADDR *pc)
if (target_read_memory (jb_addr + 12, buf, sizeof (buf)))
return 0;
- *pc = extract_address (buf, sizeof (buf));
+ *pc = extract_unsigned_integer (buf, sizeof (buf));
return 1;
}
@@ -463,7 +463,7 @@ sparcnbsd_get_longjmp_target_64 (CORE_ADDR *pc)
if (target_read_memory (jb_addr + 16, buf, sizeof (buf)))
return 0;
- *pc = extract_address (buf, sizeof (buf));
+ *pc = extract_unsigned_integer (buf, sizeof (buf));
return 1;
}
diff --git a/gdb/stack.c b/gdb/stack.c
index a0bd7a4ae68..ff098a1e38a 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -40,6 +40,9 @@
#include "annotate.h"
#include "ui-out.h"
#include "block.h"
+#include "stack.h"
+#include "gdb_assert.h"
+#include "dictionary.h"
/* Prototypes for exported functions. */
@@ -71,8 +74,6 @@ void frame_command (char *, int);
static void current_frame_command (char *, int);
-static void select_frame_command (char *, int);
-
static void print_frame_arg_vars (struct frame_info *, struct ui_file *);
static void catch_info (char *, int);
@@ -168,6 +169,225 @@ struct print_args_args
static int print_args_stub (void *);
+/* Print nameless args on STREAM.
+ FI is the frameinfo for this frame, START is the offset
+ of the first nameless arg, and NUM is the number of nameless args to
+ print. FIRST is nonzero if this is the first argument (not just
+ the first nameless arg). */
+
+static void
+print_frame_nameless_args (struct frame_info *fi, long start, int num,
+ int first, struct ui_file *stream)
+{
+ int i;
+ CORE_ADDR argsaddr;
+ long arg_value;
+
+ for (i = 0; i < num; i++)
+ {
+ QUIT;
+ argsaddr = get_frame_args_address (fi);
+ if (!argsaddr)
+ return;
+ arg_value = read_memory_integer (argsaddr + start, sizeof (int));
+ if (!first)
+ fprintf_filtered (stream, ", ");
+ fprintf_filtered (stream, "%ld", arg_value);
+ first = 0;
+ start += sizeof (int);
+ }
+}
+
+/* Print the arguments of a stack frame, given the function FUNC
+ running in that frame (as a symbol), the info on the frame,
+ and the number of args according to the stack frame (or -1 if unknown). */
+
+/* References here and elsewhere to "number of args according to the
+ stack frame" appear in all cases to refer to "number of ints of args
+ according to the stack frame". At least for VAX, i386, isi. */
+
+static void
+print_frame_args (struct symbol *func, struct frame_info *fi, int num,
+ struct ui_file *stream)
+{
+ struct block *b = NULL;
+ int first = 1;
+ struct dict_iterator iter;
+ register struct symbol *sym;
+ struct value *val;
+ /* Offset of next stack argument beyond the one we have seen that is
+ at the highest offset.
+ -1 if we haven't come to a stack argument yet. */
+ long highest_offset = -1;
+ int arg_size;
+ /* Number of ints of arguments that we have printed so far. */
+ int args_printed = 0;
+ struct cleanup *old_chain, *list_chain;
+ struct ui_stream *stb;
+
+ stb = ui_out_stream_new (uiout);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
+
+ if (func)
+ {
+ b = SYMBOL_BLOCK_VALUE (func);
+
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
+ {
+ QUIT;
+
+ /* Keep track of the highest stack argument offset seen, and
+ skip over any kinds of symbols we don't care about. */
+
+ switch (SYMBOL_CLASS (sym))
+ {
+ case LOC_ARG:
+ case LOC_REF_ARG:
+ {
+ long current_offset = SYMBOL_VALUE (sym);
+ arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
+
+ /* Compute address of next argument by adding the size of
+ this argument and rounding to an int boundary. */
+ current_offset =
+ ((current_offset + arg_size + sizeof (int) - 1)
+ & ~(sizeof (int) - 1));
+
+ /* If this is the highest offset seen yet, set highest_offset. */
+ if (highest_offset == -1
+ || (current_offset > highest_offset))
+ highest_offset = current_offset;
+
+ /* Add the number of ints we're about to print to args_printed. */
+ args_printed += (arg_size + sizeof (int) - 1) / sizeof (int);
+ }
+
+ /* We care about types of symbols, but don't need to keep track of
+ stack offsets in them. */
+ case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
+ case LOC_LOCAL_ARG:
+ case LOC_BASEREG_ARG:
+ case LOC_COMPUTED_ARG:
+ break;
+
+ /* Other types of symbols we just skip over. */
+ default:
+ continue;
+ }
+
+ /* We have to look up the symbol because arguments can have
+ two entries (one a parameter, one a local) and the one we
+ want is the local, which lookup_symbol will find for us.
+ This includes gcc1 (not gcc2) on the sparc when passing a
+ small structure and gcc2 when the argument type is float
+ and it is passed as a double and converted to float by
+ the prologue (in the latter case the type of the LOC_ARG
+ symbol is double and the type of the LOC_LOCAL symbol is
+ float). */
+ /* But if the parameter name is null, don't try it.
+ Null parameter names occur on the RS/6000, for traceback tables.
+ FIXME, should we even print them? */
+
+ if (*DEPRECATED_SYMBOL_NAME (sym))
+ {
+ struct symbol *nsym;
+ nsym = lookup_symbol
+ (DEPRECATED_SYMBOL_NAME (sym),
+ b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
+ if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
+ {
+ /* There is a LOC_ARG/LOC_REGISTER pair. This means that
+ it was passed on the stack and loaded into a register,
+ or passed in a register and stored in a stack slot.
+ GDB 3.x used the LOC_ARG; GDB 4.0-4.11 used the LOC_REGISTER.
+
+ Reasons for using the LOC_ARG:
+ (1) because find_saved_registers may be slow for remote
+ debugging,
+ (2) because registers are often re-used and stack slots
+ rarely (never?) are. Therefore using the stack slot is
+ much less likely to print garbage.
+
+ Reasons why we might want to use the LOC_REGISTER:
+ (1) So that the backtrace prints the same value as
+ "print foo". I see no compelling reason why this needs
+ to be the case; having the backtrace print the value which
+ was passed in, and "print foo" print the value as modified
+ within the called function, makes perfect sense to me.
+
+ Additional note: It might be nice if "info args" displayed
+ both values.
+ One more note: There is a case with sparc structure passing
+ where we need to use the LOC_REGISTER, but this is dealt with
+ by creating a single LOC_REGPARM in symbol reading. */
+
+ /* Leave sym (the LOC_ARG) alone. */
+ ;
+ }
+ else
+ sym = nsym;
+ }
+
+ /* Print the current arg. */
+ if (!first)
+ ui_out_text (uiout, ", ");
+ ui_out_wrap_hint (uiout, " ");
+
+ annotate_arg_begin ();
+
+ list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+ fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (sym),
+ SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
+ ui_out_field_stream (uiout, "name", stb);
+ annotate_arg_name_end ();
+ ui_out_text (uiout, "=");
+
+ /* Avoid value_print because it will deref ref parameters. We just
+ want to print their addresses. Print ??? for args whose address
+ we do not know. We pass 2 as "recurse" to val_print because our
+ standard indentation here is 4 spaces, and val_print indents
+ 2 for each recurse. */
+ val = read_var_value (sym, fi);
+
+ annotate_arg_value (val == NULL ? NULL : VALUE_TYPE (val));
+
+ if (val)
+ {
+ val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
+ VALUE_ADDRESS (val),
+ stb->stream, 0, 0, 2, Val_no_prettyprint);
+ ui_out_field_stream (uiout, "value", stb);
+ }
+ else
+ ui_out_text (uiout, "???");
+
+ /* Invoke ui_out_tuple_end. */
+ do_cleanups (list_chain);
+
+ annotate_arg_end ();
+
+ first = 0;
+ }
+ }
+
+ /* Don't print nameless args in situations where we don't know
+ enough about the stack to find them. */
+ if (num != -1)
+ {
+ long start;
+
+ if (highest_offset == -1)
+ start = FRAME_ARGS_SKIP;
+ else
+ start = highest_offset;
+
+ print_frame_nameless_args (fi, start, num - args_printed,
+ first, stream);
+ }
+ do_cleanups (old_chain);
+}
+
/* Pass the args the way catch_errors wants them. */
static int
@@ -176,7 +396,13 @@ print_args_stub (void *args)
int numargs;
struct print_args_args *p = (struct print_args_args *) args;
- numargs = FRAME_NUM_ARGS (p->fi);
+ if (FRAME_NUM_ARGS_P ())
+ {
+ numargs = FRAME_NUM_ARGS (p->fi);
+ gdb_assert (numargs >= 0);
+ }
+ else
+ numargs = -1;
print_frame_args (p->func, p->fi, numargs, p->stream);
return 0;
}
@@ -760,15 +986,22 @@ frame_info (char *addr_exp, int from_tty)
print_address_numeric (arg_list, 1, gdb_stdout);
printf_filtered (",");
- numargs = FRAME_NUM_ARGS (fi);
- if (numargs < 0)
- puts_filtered (" args: ");
- else if (numargs == 0)
- puts_filtered (" no args.");
- else if (numargs == 1)
- puts_filtered (" 1 arg: ");
+ if (!FRAME_NUM_ARGS_P ())
+ {
+ numargs = -1;
+ puts_filtered (" args: ");
+ }
else
- printf_filtered (" %d args: ", numargs);
+ {
+ numargs = FRAME_NUM_ARGS (fi);
+ gdb_assert (numargs >= 0);
+ if (numargs == 0)
+ puts_filtered (" no args.");
+ else if (numargs == 1)
+ puts_filtered (" 1 arg: ");
+ else
+ printf_filtered (" %d args: ", numargs);
+ }
print_frame_args (func, fi, numargs, gdb_stdout);
puts_filtered ("\n");
}
@@ -1076,14 +1309,15 @@ backtrace_full_command (char *arg, int from_tty)
Return 1 if any variables were printed; 0 otherwise. */
static int
-print_block_frame_locals (struct block *b, register struct frame_info *fi,
- int num_tabs, register struct ui_file *stream)
+print_block_frame_locals (struct block *b, struct frame_info *fi,
+ int num_tabs, struct ui_file *stream)
{
- register int i, j;
- register struct symbol *sym;
- register int values_printed = 0;
+ struct dict_iterator iter;
+ int j;
+ struct symbol *sym;
+ int values_printed = 0;
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
switch (SYMBOL_CLASS (sym))
{
@@ -1115,11 +1349,11 @@ static int
print_block_frame_labels (struct block *b, int *have_default,
register struct ui_file *stream)
{
- register int i;
+ struct dict_iterator iter;
register struct symbol *sym;
register int values_printed = 0;
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
if (STREQ (DEPRECATED_SYMBOL_NAME (sym), "default"))
{
@@ -1297,7 +1531,7 @@ print_frame_arg_vars (register struct frame_info *fi,
{
struct symbol *func = get_frame_function (fi);
register struct block *b;
- register int i;
+ struct dict_iterator iter;
register struct symbol *sym, *sym2;
register int values_printed = 0;
@@ -1308,7 +1542,7 @@ print_frame_arg_vars (register struct frame_info *fi,
}
b = SYMBOL_BLOCK_VALUE (func);
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
switch (SYMBOL_CLASS (sym))
{
@@ -1460,14 +1694,7 @@ find_relative_frame (register struct frame_info *frame,
and select it. See parse_frame_specification for more info on proper
frame expressions. */
-/* ARGSUSED */
void
-select_frame_command_wrapper (char *level_exp, int from_tty)
-{
- select_frame_command (level_exp, from_tty);
-}
-
-static void
select_frame_command (char *level_exp, int from_tty)
{
struct frame_info *frame;
diff --git a/gdb/stack.h b/gdb/stack.h
new file mode 100644
index 00000000000..0891c94c051
--- /dev/null
+++ b/gdb/stack.h
@@ -0,0 +1,27 @@
+/* Stack manipulation commands, for GDB the GNU Debugger.
+
+ Copyright 2003 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. */
+
+#ifndef STACK_H
+#define STACK_H
+
+void select_frame_command (char *level_exp, int from_tty);
+
+#endif /* #ifndef STACK_H */
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index 93d5102661c..1241852383a 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -133,6 +133,8 @@ value_of_builtin_frame_ps_reg (struct frame_info *frame)
error ("Standard register ``$ps'' is not available for this target");
}
+extern initialize_file_ftype _initialize_frame_reg; /* -Wmissing-prototypes */
+
void
_initialize_frame_reg (void)
{
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8bb3b371339..0fab10f1bb5 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -236,38 +236,6 @@ sort_pst_symbols (struct partial_symtab *pst)
compare_psymbols);
}
-/* Call sort_block_syms to sort alphabetically the symbols of one block. */
-
-void
-sort_block_syms (register struct block *b)
-{
- qsort (&BLOCK_SYM (b, 0), BLOCK_NSYMS (b),
- sizeof (struct symbol *), compare_symbols);
-}
-
-/* Call sort_symtab_syms to sort alphabetically
- the symbols of each block of one symtab. */
-
-void
-sort_symtab_syms (register struct symtab *s)
-{
- register struct blockvector *bv;
- int nbl;
- int i;
- register struct block *b;
-
- if (s == 0)
- return;
- bv = BLOCKVECTOR (s);
- nbl = BLOCKVECTOR_NBLOCKS (bv);
- for (i = 0; i < nbl; i++)
- {
- b = BLOCKVECTOR_BLOCK (bv, i);
- if (BLOCK_SHOULD_SORT (b))
- sort_block_syms (b);
- }
-}
-
/* Make a null terminated copy of the string at PTR with SIZE characters in
the obstack pointed to by OBSTACKP . Returns the address of the copy.
Note that the string at PTR does not have to be null terminated, I.E. it
@@ -401,6 +369,22 @@ find_lowest_section (bfd *abfd, asection *sect, void *obj)
*lowest = sect;
}
+/* Create a new section_addr_info, with room for NUM_SECTIONS. */
+
+struct section_addr_info *
+alloc_section_addr_info (size_t num_sections)
+{
+ struct section_addr_info *sap;
+ size_t size;
+
+ size = (sizeof (struct section_addr_info)
+ + sizeof (struct other_sections) * (num_sections - 1));
+ sap = (struct section_addr_info *) xmalloc (size);
+ memset (sap, 0, size);
+ sap->num_sections = num_sections;
+
+ return sap;
+}
/* Build (allocate and populate) a section_addr_info struct from
an existing section table. */
@@ -413,14 +397,13 @@ build_section_addr_info_from_section_table (const struct section_table *start,
const struct section_table *stp;
int oidx;
- sap = xmalloc (sizeof (struct section_addr_info));
- memset (sap, 0, sizeof (struct section_addr_info));
+ sap = alloc_section_addr_info (end - start);
for (stp = start, oidx = 0; stp != end; stp++)
{
if (bfd_get_section_flags (stp->bfd,
stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD)
- && oidx < MAX_SECTIONS)
+ && oidx < end - start)
{
sap->other[oidx].addr = stp->addr;
sap->other[oidx].name
@@ -441,7 +424,7 @@ free_section_addr_info (struct section_addr_info *sap)
{
int idx;
- for (idx = 0; idx < MAX_SECTIONS; idx++)
+ for (idx = 0; idx < sap->num_sections; idx++)
if (sap->other[idx].name)
xfree (sap->other[idx].name);
xfree (sap);
@@ -514,14 +497,16 @@ default_symfile_offsets (struct objfile *objfile,
{
int i;
- objfile->num_sections = SECT_OFF_MAX;
+ objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
- memset (objfile->section_offsets, 0, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+ memset (objfile->section_offsets, 0,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* Now calculate offsets for section that were specified by the
caller. */
- for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
{
struct other_sections *osp ;
@@ -584,23 +569,12 @@ syms_from_objfile (struct objfile *objfile,
asection *lower_sect;
asection *sect;
CORE_ADDR lower_offset;
- struct section_addr_info local_addr;
+ struct section_addr_info *local_addr = NULL;
struct cleanup *old_chain;
int i;
gdb_assert (! (addrs && offsets));
- /* If ADDRS and OFFSETS are both NULL, put together a dummy address
- list. We now establish the convention that an addr of zero means
- no load address was specified. */
- if (! addrs && ! offsets)
- {
- memset (&local_addr, 0, sizeof (local_addr));
- addrs = &local_addr;
- }
-
- /* Now either addrs or offsets is non-zero. */
-
init_entry_point_info (objfile);
find_sym_fns (objfile);
@@ -611,6 +585,19 @@ syms_from_objfile (struct objfile *objfile,
if an error occurs during symbol reading. */
old_chain = make_cleanup_free_objfile (objfile);
+ /* If ADDRS and OFFSETS are both NULL, put together a dummy address
+ list. We now establish the convention that an addr of zero means
+ no load address was specified. */
+ if (! addrs && ! offsets)
+ {
+ local_addr
+ = alloc_section_addr_info (bfd_count_sections (objfile->obfd));
+ make_cleanup (xfree, local_addr);
+ addrs = local_addr;
+ }
+
+ /* Now either addrs or offsets is non-zero. */
+
if (mainline)
{
/* We will modify the main symbol table, make sure that all its users
@@ -674,7 +661,7 @@ syms_from_objfile (struct objfile *objfile,
/* Calculate offsets for sections. */
if (addrs)
- for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ for (i=0 ; i < addrs->num_sections && addrs->other[i].name; i++)
{
if (addrs->other[i].addr != 0)
{
@@ -758,7 +745,7 @@ syms_from_objfile (struct objfile *objfile,
int i;
for (i = 0;
- !s_addr && i < MAX_SECTIONS && addrs->other[i].name;
+ !s_addr && i < addrs->num_sections && addrs->other[i].name;
i++)
if (strcmp (bfd_section_name (s->objfile->obfd,
s->the_bfd_section),
@@ -792,13 +779,6 @@ syms_from_objfile (struct objfile *objfile,
/* Discard cleanups as symbol reading was successful. */
discard_cleanups (old_chain);
-
- /* Call this after reading in a new symbol table to give target
- dependent code a crack at the new symbols. For instance, this
- could be used to update the values of target-specific symbols GDB
- needs to keep track of (such as _sigtramp, or whatever). */
-
- TARGET_SYMFILE_POSTREAD (objfile);
}
/* Perform required actions after either reading in the initial
@@ -856,10 +836,8 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
struct partial_symtab *psymtab;
char *debugfile;
bfd *abfd;
- struct section_addr_info orig_addrs;
-
- if (addrs)
- orig_addrs = *addrs;
+ struct section_addr_info *orig_addrs;
+ struct cleanup *my_cleanups;
/* Open a bfd for the file, and give user a chance to burp if we'd be
interactively wiping out any existing symbols. */
@@ -874,6 +852,11 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
objfile = allocate_objfile (abfd, flags);
+ orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd));
+ my_cleanups = make_cleanup (xfree, orig_addrs);
+ if (addrs)
+ *orig_addrs = *addrs;
+
/* If the objfile uses a mapped symbol file, and we have a psymtab for
it, then skip reading any symbols at this time. */
@@ -940,7 +923,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
if (addrs != NULL)
{
objfile->separate_debug_objfile
- = symbol_file_add (debugfile, from_tty, &orig_addrs, 0, flags);
+ = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags);
}
else
{
@@ -979,6 +962,8 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
time. */
gdb_flush (gdb_stdout);
+ do_cleanups (my_cleanups);
+
if (objfile->sf == NULL)
return objfile; /* No symbols. */
@@ -1696,15 +1681,21 @@ add_symbol_file_command (char *args, int from_tty)
int expecting_sec_name = 0;
int expecting_sec_addr = 0;
- struct
+ struct sect_opt
{
char *name;
char *value;
- } sect_opts[SECT_OFF_MAX];
+ };
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs;
+ struct sect_opt *sect_opts = NULL;
+ size_t num_sect_opts = 0;
struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL);
+ num_sect_opts = 16;
+ sect_opts = (struct sect_opt *) xmalloc (num_sect_opts
+ * sizeof (struct sect_opt));
+
dont_repeat ();
if (args == NULL)
@@ -1713,9 +1704,6 @@ add_symbol_file_command (char *args, int from_tty)
/* Make a copy of the string that we can safely write into. */
args = xstrdup (args);
- /* Ensure section_addrs is initialized */
- memset (&section_addrs, 0, sizeof (section_addrs));
-
while (*args != '\000')
{
/* Any leading spaces? */
@@ -1748,7 +1736,14 @@ add_symbol_file_command (char *args, int from_tty)
to load the program. */
sect_opts[section_index].name = ".text";
sect_opts[section_index].value = arg;
- section_index++;
+ if (++section_index > num_sect_opts)
+ {
+ num_sect_opts *= 2;
+ sect_opts = ((struct sect_opt *)
+ xrealloc (sect_opts,
+ num_sect_opts
+ * sizeof (struct sect_opt)));
+ }
}
else
{
@@ -1765,8 +1760,6 @@ add_symbol_file_command (char *args, int from_tty)
else
if (strcmp (arg, "-s") == 0)
{
- if (section_index >= SECT_OFF_MAX)
- error ("Too many sections specified.");
expecting_sec_name = 1;
expecting_sec_addr = 1;
}
@@ -1783,7 +1776,14 @@ add_symbol_file_command (char *args, int from_tty)
{
sect_opts[section_index].value = arg;
expecting_sec_addr = 0;
- section_index++;
+ if (++section_index > num_sect_opts)
+ {
+ num_sect_opts *= 2;
+ sect_opts = ((struct sect_opt *)
+ xrealloc (sect_opts,
+ num_sect_opts
+ * sizeof (struct sect_opt)));
+ }
}
else
error ("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*");
@@ -1799,6 +1799,8 @@ add_symbol_file_command (char *args, int from_tty)
string. */
printf_filtered ("add symbol table from file \"%s\" at\n", filename);
+ section_addrs = alloc_section_addr_info (section_index);
+ make_cleanup (xfree, section_addrs);
for (i = 0; i < section_index; i++)
{
CORE_ADDR addr;
@@ -1813,8 +1815,8 @@ add_symbol_file_command (char *args, int from_tty)
/* Here we store the section offsets in the order they were
entered on the command line. */
- section_addrs.other[sec_num].name = sec;
- section_addrs.other[sec_num].addr = addr;
+ section_addrs->other[sec_num].name = sec;
+ section_addrs->other[sec_num].addr = addr;
printf_filtered ("\t%s_addr = %s\n",
sec,
local_hex_string ((unsigned long)addr));
@@ -1830,7 +1832,7 @@ add_symbol_file_command (char *args, int from_tty)
if (from_tty && (!query ("%s", "")))
error ("Not confirmed.");
- symbol_file_add (filename, from_tty, &section_addrs, 0, flags);
+ symbol_file_add (filename, from_tty, section_addrs, 0, flags);
/* Getting new symbols may change our opinion about what is
frameless. */
@@ -1927,8 +1929,10 @@ reread_symbols (void)
/* Save the offsets, we will nuke them with the rest of the
psymbol_obstack. */
num_offsets = objfile->num_sections;
- offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offsets, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+ offsets = ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets)));
+ memcpy (offsets, objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (num_offsets));
/* Nuke all the state that we will re-read. Much of the following
code which sets things to NULL really is necessary to tell
@@ -1996,8 +2000,10 @@ reread_symbols (void)
/* We use the same section offsets as from last time. I'm not
sure whether that is always correct for shared libraries. */
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
- memcpy (objfile->section_offsets, offsets, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (num_offsets));
+ memcpy (objfile->section_offsets, offsets,
+ SIZEOF_N_SECTION_OFFSETS (num_offsets));
objfile->num_sections = num_offsets;
/* What the hell is sym_new_init for, anyway? The concept of
@@ -2041,14 +2047,6 @@ reread_symbols (void)
again now. */
objfile->mtime = new_modtime;
reread_one = 1;
-
- /* Call this after reading in a new symbol table to give target
- dependent code a crack at the new symbols. For instance, this
- could be used to update the values of target-specific symbols GDB
- needs to keep track of (such as _sigtramp, or whatever). */
-
- TARGET_SYMFILE_POSTREAD (objfile);
-
reread_separate_symbols (objfile);
}
}
@@ -2980,7 +2978,7 @@ pc_in_mapped_range (CORE_ADDR pc, asection *section)
/* Return true if the mapped ranges of sections A and B overlap, false
otherwise. */
-int
+static int
sections_overlap (asection *a, asection *b)
{
/* FIXME: need bfd *, so we can use bfd_section_vma methods. */
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 04b0d89605b..5339253b28a 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -1,7 +1,7 @@
/* Definitions for reading symbol files into GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,113 +26,117 @@
/* This file requires that you first include "bfd.h". */
/* Opaque declarations. */
+struct section_table;
struct objfile;
struct obstack;
struct block;
-/* Partial symbols are stored in the psymbol_cache and pointers to them
- are kept in a dynamically grown array that is obtained from malloc and
- grown as necessary via realloc. Each objfile typically has two of these,
- one for global symbols and one for static symbols. Although this adds
- a level of indirection for storing or accessing the partial symbols,
- it allows us to throw away duplicate psymbols and set all pointers
- to the single saved instance. */
+/* Partial symbols are stored in the psymbol_cache and pointers to
+ them are kept in a dynamically grown array that is obtained from
+ malloc and grown as necessary via realloc. Each objfile typically
+ has two of these, one for global symbols and one for static
+ symbols. Although this adds a level of indirection for storing or
+ accessing the partial symbols, it allows us to throw away duplicate
+ psymbols and set all pointers to the single saved instance. */
struct psymbol_allocation_list
- {
+{
- /* Pointer to beginning of dynamically allocated array of pointers to
- partial symbols. The array is dynamically expanded as necessary to
- accommodate more pointers. */
+ /* Pointer to beginning of dynamically allocated array of pointers
+ to partial symbols. The array is dynamically expanded as
+ necessary to accommodate more pointers. */
- struct partial_symbol **list;
+ struct partial_symbol **list;
- /* Pointer to next available slot in which to store a pointer to a partial
- symbol. */
+ /* Pointer to next available slot in which to store a pointer to a
+ partial symbol. */
- struct partial_symbol **next;
+ struct partial_symbol **next;
- /* Number of allocated pointer slots in current dynamic array (not the
- number of bytes of storage). The "next" pointer will always point
- somewhere between list[0] and list[size], and when at list[size] the
- array will be expanded on the next attempt to store a pointer. */
+ /* Number of allocated pointer slots in current dynamic array (not
+ the number of bytes of storage). The "next" pointer will always
+ point somewhere between list[0] and list[size], and when at
+ list[size] the array will be expanded on the next attempt to
+ store a pointer. */
- int size;
- };
+ int size;
+};
/* Define an array of addresses to accommodate non-contiguous dynamic
loading of modules. This is for use when entering commands, so we
- can keep track of the section names until we read the file and
- can map them to bfd sections. This structure is also used by
- solib.c to communicate the section addresses in shared objects to
- symbol_file_add (). */
-
-#define MAX_SECTIONS 64
-struct section_addr_info
+ can keep track of the section names until we read the file and can
+ map them to bfd sections. This structure is also used by solib.c
+ to communicate the section addresses in shared objects to
+ symbol_file_add (). */
+
+struct section_addr_info
{
+ /* The number of sections for which address information is
+ available. */
+ size_t num_sections;
/* Sections whose names are file format dependent. */
struct other_sections
{
CORE_ADDR addr;
char *name;
int sectindex;
- } other[MAX_SECTIONS];
+ } other[1];
};
/* Structure to keep track of symbol reading functions for various
object file types. */
struct sym_fns
- {
+{
- /* BFD flavour that we handle, or (as a special kludge, see xcoffread.c,
- (enum bfd_flavour)-1 for xcoff). */
+ /* BFD flavour that we handle, or (as a special kludge, see
+ xcoffread.c, (enum bfd_flavour)-1 for xcoff). */
- enum bfd_flavour sym_flavour;
+ enum bfd_flavour sym_flavour;
- /* Initializes anything that is global to the entire symbol table. It is
- called during symbol_file_add, when we begin debugging an entirely new
- program. */
+ /* Initializes anything that is global to the entire symbol table.
+ It is called during symbol_file_add, when we begin debugging an
+ entirely new program. */
- void (*sym_new_init) (struct objfile *);
+ void (*sym_new_init) (struct objfile *);
- /* Reads any initial information from a symbol file, and initializes the
- struct sym_fns SF in preparation for sym_read(). It is called every
- time we read a symbol file for any reason. */
+ /* Reads any initial information from a symbol file, and initializes
+ the struct sym_fns SF in preparation for sym_read(). It is
+ called every time we read a symbol file for any reason. */
- void (*sym_init) (struct objfile *);
+ void (*sym_init) (struct objfile *);
- /* sym_read (objfile, mainline)
- Reads a symbol file into a psymtab (or possibly a symtab).
- OBJFILE is the objfile struct for the file we are reading.
- MAINLINE is 1 if this is the
- main symbol table being read, and 0 if a secondary
- symbol file (e.g. shared library or dynamically loaded file)
- is being read. */
+ /* sym_read (objfile, mainline) Reads a symbol file into a psymtab
+ (or possibly a symtab). OBJFILE is the objfile struct for the
+ file we are reading. MAINLINE is 1 if this is the main symbol
+ table being read, and 0 if a secondary symbol file (e.g. shared
+ library or dynamically loaded file) is being read. */
- void (*sym_read) (struct objfile *, int);
+ void (*sym_read) (struct objfile *, int);
- /* Called when we are finished with an objfile. Should do all cleanup
- that is specific to the object file format for the particular objfile. */
+ /* Called when we are finished with an objfile. Should do all
+ cleanup that is specific to the object file format for the
+ particular objfile. */
- void (*sym_finish) (struct objfile *);
+ void (*sym_finish) (struct objfile *);
- /* This function produces a file-dependent section_offsets structure,
- allocated in the objfile's storage, and based on the parameter.
- The parameter is currently a CORE_ADDR (FIXME!) for backward compatibility
- with the higher levels of GDB. It should probably be changed to
- a string, where NULL means the default, and others are parsed in a file
- dependent way. */
+ /* This function produces a file-dependent section_offsets
+ structure, allocated in the objfile's storage, and based on the
+ parameter. The parameter is currently a CORE_ADDR (FIXME!) for
+ backward compatibility with the higher levels of GDB. It should
+ probably be changed to a string, where NULL means the default,
+ and others are parsed in a file dependent way. */
- void (*sym_offsets) (struct objfile *, struct section_addr_info *);
+ void (*sym_offsets) (struct objfile *, struct section_addr_info *);
- /* Finds the next struct sym_fns. They are allocated and initialized
- in whatever module implements the functions pointed to; an
- initializer calls add_symtab_fns to add them to the global chain. */
+ /* Finds the next struct sym_fns. They are allocated and
+ initialized in whatever module implements the functions pointed
+ to; an initializer calls add_symtab_fns to add them to the global
+ chain. */
- struct sym_fns *next;
+ struct sym_fns *next;
- };
+};
/* The default version of sym_fns.sym_offsets for readers that don't
do anything special. */
@@ -144,21 +148,21 @@ extern void default_symfile_offsets (struct objfile *objfile,
extern void extend_psymbol_list (struct psymbol_allocation_list *,
struct objfile *);
-/* Add any kind of symbol to a psymbol_allocation_list. */
+/* Add any kind of symbol to a psymbol_allocation_list. */
/* #include "demangle.h" */
-extern void
-add_psymbol_to_list (char *, int, domain_enum, enum address_class,
- struct psymbol_allocation_list *, long, CORE_ADDR,
- enum language, struct objfile *);
+extern void add_psymbol_to_list (char *, int, domain_enum, enum address_class,
+ struct psymbol_allocation_list *, long,
+ CORE_ADDR, enum language, struct objfile *);
-extern void
-add_psymbol_with_dem_name_to_list (char *, int, char *, int, domain_enum,
- enum address_class,
- struct psymbol_allocation_list *,
- long, CORE_ADDR,
- enum language, struct objfile *);
+extern void add_psymbol_with_dem_name_to_list (char *, int, char *, int,
+ domain_enum,
+ enum address_class,
+ struct psymbol_allocation_list
+ *, long, CORE_ADDR,
+ enum language,
+ struct objfile *);
extern void init_psymbol_list (struct objfile *, int);
@@ -176,24 +180,30 @@ extern void add_symtab_fns (struct sym_fns *);
extern void init_entry_point_info (struct objfile *);
extern void syms_from_objfile (struct objfile *,
- struct section_addr_info *,
- struct section_offsets *, int,
- int, int);
+ struct section_addr_info *,
+ struct section_offsets *, int, int, int);
extern void new_symfile_objfile (struct objfile *, int, int);
extern struct objfile *symbol_file_add (char *, int,
struct section_addr_info *, int, int);
-/* Build (allocate and populate) a section_addr_info struct from
- an existing section table. */
+/* Create a new section_addr_info, with room for NUM_SECTIONS. */
-struct section_table;
-extern struct section_addr_info *
-build_section_addr_info_from_section_table (const struct section_table *start,
- const struct section_table *end);
+extern struct section_addr_info *alloc_section_addr_info (size_t
+ num_sections);
+
+/* Build (allocate and populate) a section_addr_info struct from an
+ existing section table. */
-/* Free all memory allocated by build_section_addr_info_from_section_table. */
+extern struct section_addr_info
+ *build_section_addr_info_from_section_table (const struct section_table
+ *start,
+ const struct section_table
+ *end);
+
+/* Free all memory allocated by
+ build_section_addr_info_from_section_table. */
extern void free_section_addr_info (struct section_addr_info *);
@@ -204,20 +214,14 @@ extern struct partial_symtab *start_psymtab_common (struct objfile *,
struct partial_symbol **,
struct partial_symbol **);
-/* Sorting your symbols for fast lookup or alphabetical printing. */
-
-extern void sort_block_syms (struct block *);
-
-extern void sort_symtab_syms (struct symtab *);
-
-/* Make a copy of the string at PTR with SIZE characters in the symbol obstack
- (and add a null character at the end in the copy).
- Returns the address of the copy. */
+/* Make a copy of the string at PTR with SIZE characters in the symbol
+ obstack (and add a null character at the end in the copy). Returns
+ the address of the copy. */
extern char *obsavestring (const char *, int, struct obstack *);
-/* Concatenate strings S1, S2 and S3; return the new string.
- Space is found in the symbol_obstack. */
+/* Concatenate strings S1, S2 and S3; return the new string. Space is
+ found in the symbol_obstack. */
extern char *obconcat (struct obstack *obstackp, const char *, const char *,
const char *);
@@ -232,7 +236,7 @@ extern char *obconcat (struct obstack *obstackp, const char *, const char *,
this flag and then add the shared library symbols as needed. Note
that there is a potential for confusion, since if the shared
library symbols are not loaded, commands like "info fun" will *not*
- report all the functions that are actually present. */
+ report all the functions that are actually present. */
extern int auto_solib_add;
@@ -241,8 +245,7 @@ extern int auto_solib_add;
known to the debugger would cause the total shared library symbol
size to exceed this threshhold, then the shlib's symbols are not
added. The threshold is ignored if the user explicitly asks for a
- shlib to be added, such as when using the "sharedlibrary"
- command. */
+ shlib to be added, such as when using the "sharedlibrary" command. */
extern int auto_solib_limit;
@@ -261,58 +264,59 @@ extern bfd *symfile_bfd_open (char *);
extern int get_section_index (struct objfile *, char *);
/* Utility functions for overlay sections: */
-extern enum overlay_debugging_state {
- ovly_off,
- ovly_on,
+extern enum overlay_debugging_state
+{
+ ovly_off,
+ ovly_on,
ovly_auto
} overlay_debugging;
extern int overlay_cache_invalid;
-/* return the "mapped" overlay section containing the PC */
+/* Return the "mapped" overlay section containing the PC. */
extern asection *find_pc_mapped_section (CORE_ADDR);
-/* return any overlay section containing the PC (even in its LMA region) */
+/* Return any overlay section containing the PC (even in its LMA
+ region). */
extern asection *find_pc_overlay (CORE_ADDR);
-/* return true if the section is an overlay */
+/* Return true if the section is an overlay. */
extern int section_is_overlay (asection *);
-/* return true if the overlay section is currently "mapped" */
+/* Return true if the overlay section is currently "mapped". */
extern int section_is_mapped (asection *);
-/* return true if pc belongs to section's VMA */
+/* Return true if pc belongs to section's VMA. */
extern CORE_ADDR pc_in_mapped_range (CORE_ADDR, asection *);
-/* return true if pc belongs to section's LMA */
+/* Return true if pc belongs to section's LMA. */
extern CORE_ADDR pc_in_unmapped_range (CORE_ADDR, asection *);
-/* map an address from a section's LMA to its VMA */
+/* Map an address from a section's LMA to its VMA. */
extern CORE_ADDR overlay_mapped_address (CORE_ADDR, asection *);
-/* map an address from a section's VMA to its LMA */
+/* Map an address from a section's VMA to its LMA. */
extern CORE_ADDR overlay_unmapped_address (CORE_ADDR, asection *);
-/* convert an address in an overlay section (force into VMA range) */
+/* Convert an address in an overlay section (force into VMA range). */
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
-/* Load symbols from a file. */
+/* Load symbols from a file. */
extern void symbol_file_add_main (char *args, int from_tty);
-/* Clear GDB symbol tables. */
+/* Clear GDB symbol tables. */
extern void symbol_file_clear (int from_tty);
extern bfd_byte *symfile_relocate_debug_section (bfd *abfd, asection *sectp,
- bfd_byte *buf);
+ bfd_byte * buf);
/* From dwarfread.c */
-extern void
-dwarf_build_psymtabs (struct objfile *, int, file_ptr, unsigned int,
- file_ptr, unsigned int);
+extern void dwarf_build_psymtabs (struct objfile *, int, file_ptr,
+ unsigned int, file_ptr, unsigned int);
/* From dwarf2read.c */
-extern int dwarf2_has_info (bfd * abfd);
+extern int dwarf2_has_info (bfd *abfd);
extern void dwarf2_build_psymtabs (struct objfile *, int);
extern void dwarf2_build_frame_info (struct objfile *);
@@ -321,17 +325,17 @@ extern void dwarf2_build_frame_info (struct objfile *);
/* Hack to force structures to exist before use in parameter list. */
struct ecoff_debug_hack
- {
- struct ecoff_debug_swap *a;
- struct ecoff_debug_info *b;
- };
-extern void
-mdebug_build_psymtabs (struct objfile *,
- const struct ecoff_debug_swap *,
- struct ecoff_debug_info *);
-
-extern void
-elfmdebug_build_psymtabs (struct objfile *,
- const struct ecoff_debug_swap *, asection *);
+{
+ struct ecoff_debug_swap *a;
+ struct ecoff_debug_info *b;
+};
+
+extern void mdebug_build_psymtabs (struct objfile *,
+ const struct ecoff_debug_swap *,
+ struct ecoff_debug_info *);
+
+extern void elfmdebug_build_psymtabs (struct objfile *,
+ const struct ecoff_debug_swap *,
+ asection *);
#endif /* !defined(SYMFILE_H) */
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 3b57e5fa41d..c3cd7ab00f1 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -34,6 +34,7 @@
#include "bcache.h"
#include "block.h"
#include "gdb_regex.h"
+#include "dictionary.h"
#include "gdb_string.h"
#include <readline/readline.h>
@@ -87,22 +88,22 @@ static void free_symtab_block (struct objfile *, struct block *);
/* Free a struct block <- B and all the symbols defined in that block. */
+/* FIXME: carlton/2003-04-28: I don't believe this is currently ever
+ used. */
+
static void
free_symtab_block (struct objfile *objfile, struct block *b)
{
- register int i, n;
- struct symbol *sym, *next_sym;
+ struct dict_iterator iter;
+ struct symbol *sym;
- n = BLOCK_BUCKETS (b);
- for (i = 0; i < n; i++)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- for (sym = BLOCK_BUCKET (b, i); sym; sym = next_sym)
- {
- next_sym = sym->hash_next;
- xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (sym));
- xmfree (objfile->md, sym);
- }
+ xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (sym));
+ xmfree (objfile->md, sym);
}
+
+ dict_free (BLOCK_DICT (b));
xmfree (objfile->md, b);
}
@@ -141,7 +142,7 @@ free_symtab (register struct symtab *s)
/* Also free the linetable. */
case free_linetable:
- /* Everything will be freed either by our `free_ptr'
+ /* Everything will be freed either by our `free_func'
or by some other symtab, except for our linetable.
Free that now. */
if (LINETABLE (s))
@@ -150,8 +151,8 @@ free_symtab (register struct symtab *s)
}
/* If there is a single block of memory to free, free it. */
- if (s->free_ptr != NULL)
- xmfree (s->objfile->md, s->free_ptr);
+ if (s->free_func != NULL)
+ s->free_func (s);
/* Free source-related stuff */
if (s->line_charpos != NULL)
@@ -444,12 +445,13 @@ static void
dump_symtab (struct objfile *objfile, struct symtab *symtab,
struct ui_file *outfile)
{
- register int i, j;
+ int i;
+ struct dict_iterator iter;
int len, blen;
- register struct linetable *l;
+ struct linetable *l;
struct blockvector *bv;
struct symbol *sym;
- register struct block *b;
+ struct block *b;
int depth;
fprintf_filtered (outfile, "\nSymtab for file %s\n", symtab->filename);
@@ -496,11 +498,8 @@ dump_symtab (struct objfile *objfile, struct symtab *symtab,
/* drow/2002-07-10: We could save the total symbols count
even if we're using a hashtable, but nothing else but this message
wants it. */
- blen = BLOCK_BUCKETS (b);
- if (BLOCK_HASHTABLE (b))
- fprintf_filtered (outfile, ", %d buckets in ", blen);
- else
- fprintf_filtered (outfile, ", %d syms in ", blen);
+ fprintf_filtered (outfile, ", %d syms/buckets in ",
+ dict_size (BLOCK_DICT (b)));
print_address_numeric (BLOCK_START (b), 1, outfile);
fprintf_filtered (outfile, "..");
print_address_numeric (BLOCK_END (b), 1, outfile);
@@ -518,7 +517,7 @@ dump_symtab (struct objfile *objfile, struct symtab *symtab,
fprintf_filtered (outfile, "\n");
/* Now print each symbol in this block (in no particular order, if
we're using a hashtable). */
- ALL_BLOCK_SYMBOLS (b, j, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
struct print_symbol_args s;
s.symbol = sym;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 1e1b5def91b..ddf8748b7d4 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -46,6 +46,7 @@
#include "gdb_obstack.h"
#include "block.h"
+#include "dictionary.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -76,11 +77,6 @@ static int find_line_common (struct linetable *, int, int *);
char *operator_chars (char *p, char **end);
-static struct partial_symbol *lookup_partial_symbol (struct partial_symtab *,
- const char *,
- const char *, int,
- domain_enum);
-
static struct symbol *lookup_symbol_aux (const char *name,
const char *linkage_name,
const struct block *block,
@@ -135,8 +131,6 @@ static void print_msymbol_info (struct minimal_symbol *);
static void symtab_symbol_info (char *, domain_enum, int);
-static void overload_list_add_symbol (struct symbol *sym, char *oload_name);
-
void _initialize_symtab (void);
/* */
@@ -1233,7 +1227,7 @@ lookup_symbol_aux_minsyms (const char *name,
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- /* This call used to pass `DEPRECATED_SYMBOL_NAME (msymbol)' as the
+ /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the
`name' argument to lookup_block_symbol. But the name
of a minimal symbol is always mangled, so that seems
to be clearly the wrong thing to pass as the
@@ -1391,7 +1385,7 @@ lookup_symbol_global (const char *name,
linkage name matches it. Check the global symbols if GLOBAL, the
static symbols if not */
-static struct partial_symbol *
+struct partial_symbol *
lookup_partial_symbol (struct partial_symtab *pst, const char *name,
const char *linkage_name, int global,
domain_enum domain)
@@ -1633,127 +1627,39 @@ lookup_block_symbol (register const struct block *block, const char *name,
const char *linkage_name,
const domain_enum domain)
{
- register int bot, top, inc;
- register struct symbol *sym;
- register struct symbol *sym_found = NULL;
- register int do_linear_search = 1;
+ struct dict_iterator iter;
+ struct symbol *sym;
- if (BLOCK_HASHTABLE (block))
+ if (!BLOCK_FUNCTION (block))
{
- unsigned int hash_index;
- hash_index = msymbol_hash_iw (name);
- hash_index = hash_index % BLOCK_BUCKETS (block);
- for (sym = BLOCK_BUCKET (block, hash_index); sym; sym = sym->hash_next)
+ for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
+ sym != NULL;
+ sym = dict_iter_name_next (name, &iter))
{
- if (SYMBOL_DOMAIN (sym) == domain
- && (linkage_name
- ? strcmp (DEPRECATED_SYMBOL_NAME (sym), linkage_name) == 0
- : SYMBOL_MATCHES_NATURAL_NAME (sym, name)))
+ if (SYMBOL_DOMAIN (sym) == domain
+ && (linkage_name != NULL
+ ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1))
return sym;
}
return NULL;
}
-
- /* If the blocks's symbols were sorted, start with a binary search. */
-
- if (BLOCK_SHOULD_SORT (block))
+ else
{
- /* Reset the linear search flag so if the binary search fails, we
- won't do the linear search once unless we find some reason to
- do so */
-
- do_linear_search = 0;
- top = BLOCK_NSYMS (block);
- bot = 0;
+ /* Note that parameter symbols do not always show up last in the
+ list; this loop makes sure to take anything else other than
+ parameter symbols first; it only uses parameter symbols as a
+ last resort. Note that this only takes up extra computation
+ time on a match. */
- /* Advance BOT to not far before the first symbol whose name is NAME. */
+ struct symbol *sym_found = NULL;
- while (1)
- {
- inc = (top - bot + 1);
- /* No need to keep binary searching for the last few bits worth. */
- if (inc < 4)
- {
- break;
- }
- inc = (inc >> 1) + bot;
- sym = BLOCK_SYM (block, inc);
- if (!do_linear_search && (SYMBOL_LANGUAGE (sym) == language_java))
- {
- do_linear_search = 1;
- }
- if (SYMBOL_NATURAL_NAME (sym)[0] < name[0])
- {
- bot = inc;
- }
- else if (SYMBOL_NATURAL_NAME (sym)[0] > name[0])
- {
- top = inc;
- }
- else if (strcmp (SYMBOL_NATURAL_NAME (sym), name) < 0)
- {
- bot = inc;
- }
- else
- {
- top = inc;
- }
- }
-
- /* Now scan forward until we run out of symbols, find one whose
- name is greater than NAME, or find one we want. If there is
- more than one symbol with the right name and domain, we
- return the first one; I believe it is now impossible for us
- to encounter two symbols with the same name and domain
- here, because blocks containing argument symbols are no
- longer sorted. The exception is for C++, where multiple functions
- (cloned constructors / destructors, in particular) can have
- the same demangled name. So if we have a particular
- mangled name to match, try to do so. */
-
- top = BLOCK_NSYMS (block);
- while (bot < top)
- {
- sym = BLOCK_SYM (block, bot);
- if (SYMBOL_DOMAIN (sym) == domain
- && (linkage_name
- ? strcmp (DEPRECATED_SYMBOL_NAME (sym), linkage_name) == 0
- : SYMBOL_MATCHES_NATURAL_NAME (sym, name)))
- {
- return sym;
- }
- if (SYMBOL_PRINT_NAME (sym)[0] > name[0])
- {
- break;
- }
- bot++;
- }
- }
-
- /* Here if block isn't sorted, or we fail to find a match during the
- binary search above. If during the binary search above, we find a
- symbol which is a Java symbol, then we have re-enabled the linear
- search flag which was reset when starting the binary search.
-
- This loop is equivalent to the loop above, but hacked greatly for speed.
-
- Note that parameter symbols do not always show up last in the
- list; this loop makes sure to take anything else other than
- parameter symbols first; it only uses parameter symbols as a
- last resort. Note that this only takes up extra computation
- time on a match. */
-
- if (do_linear_search)
- {
- top = BLOCK_NSYMS (block);
- bot = 0;
- while (bot < top)
+ for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
+ sym != NULL;
+ sym = dict_iter_name_next (name, &iter))
{
- sym = BLOCK_SYM (block, bot);
if (SYMBOL_DOMAIN (sym) == domain
- && (linkage_name
- ? strcmp (DEPRECATED_SYMBOL_NAME (sym), linkage_name) == 0
- : SYMBOL_MATCHES_NATURAL_NAME (sym, name)))
+ && (linkage_name != NULL
+ ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1))
{
/* If SYM has aliases, then use any alias that is active
at the current PC. If no alias is active at the current
@@ -1762,18 +1668,18 @@ lookup_block_symbol (register const struct block *block, const char *name,
?!? Is checking the current pc correct? Is this routine
ever called to look up a symbol from another context?
- FIXME: No, it's not correct. If someone sets a
- conditional breakpoint at an address, then the
- breakpoint's `struct expression' should refer to the
- `struct symbol' appropriate for the breakpoint's
- address, which may not be the PC.
+ FIXME: No, it's not correct. If someone sets a
+ conditional breakpoint at an address, then the
+ breakpoint's `struct expression' should refer to the
+ `struct symbol' appropriate for the breakpoint's
+ address, which may not be the PC.
- Even if it were never called from another context,
- it's totally bizarre for lookup_symbol's behavior to
- depend on the value of the inferior's current PC. We
- should pass in the appropriate PC as well as the
- block. The interface to lookup_symbol should change
- to require the caller to provide a PC. */
+ Even if it were never called from another context,
+ it's totally bizarre for lookup_symbol's behavior to
+ depend on the value of the inferior's current PC. We
+ should pass in the appropriate PC as well as the
+ block. The interface to lookup_symbol should change
+ to require the caller to provide a PC. */
if (SYMBOL_ALIASES (sym))
sym = find_active_alias (sym, read_pc ());
@@ -1790,10 +1696,9 @@ lookup_block_symbol (register const struct block *block, const char *name,
break;
}
}
- bot++;
}
+ return (sym_found); /* Will be NULL if not found. */
}
- return (sym_found); /* Will be NULL if not found. */
}
/* Given a main symbol SYM and ADDR, search through the alias
@@ -1896,16 +1801,16 @@ find_pc_sect_symtab (CORE_ADDR pc, asection *section)
}
if (section != 0)
{
- int i;
+ struct dict_iterator iter;
struct symbol *sym = NULL;
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
fixup_symbol_section (sym, objfile);
if (section == SYMBOL_BFD_SECTION (sym))
break;
}
- if ((i >= BLOCK_BUCKETS (b)) && (sym == NULL))
+ if (sym == NULL)
continue; /* no symbol in this symtab matches section */
}
distance = BLOCK_END (b) - BLOCK_START (b);
@@ -2056,7 +1961,8 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
if (msymbol != NULL)
if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
{
- mfunsym = lookup_minimal_symbol_text (DEPRECATED_SYMBOL_NAME (msymbol), NULL, NULL);
+ mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol),
+ NULL, NULL);
if (mfunsym == NULL)
/* I eliminated this warning since it is coming out
* in the following situation:
@@ -2067,12 +1973,12 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
* so of course we can't find the real func/line info,
* but the "break" still works, and the warning is annoying.
* So I commented out the warning. RT */
- /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol))
/* Avoid infinite recursion */
/* See above comment about why warning is commented out */
- /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
else
return find_pc_line (SYMBOL_VALUE (mfunsym), 0);
@@ -2842,7 +2748,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
struct blockvector *prev_bv = 0;
register struct block *b;
register int i = 0;
- register int j;
+ struct dict_iterator iter;
register struct symbol *sym;
struct partial_symbol **psym;
struct objfile *objfile;
@@ -3006,7 +2912,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
symbol associated to a given minimal symbol (if
any). */
if (kind == FUNCTIONS_DOMAIN
- || lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol),
+ || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol),
(struct block *) NULL,
VAR_DOMAIN,
0, (struct symtab **) NULL) == NULL)
@@ -3031,7 +2937,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
struct symbol_search *prevtail = tail;
int nfound = 0;
b = BLOCKVECTOR_BLOCK (bv, i);
- ALL_BLOCK_SYMBOLS (b, j, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
QUIT;
if (file_matches (s->filename, files, nfiles)
@@ -3098,7 +3004,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
(0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))))
{
/* Variables/Absolutes: Look up by name */
- if (lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol),
+ if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol),
(struct block *) NULL, VAR_DOMAIN,
0, (struct symtab **) NULL) == NULL)
{
@@ -3278,12 +3184,12 @@ rbreak_command (char *regexp, int from_tty)
{
if (p->msymbol == NULL)
{
- char *string = (char *) alloca (strlen (p->symtab->filename)
- + strlen (DEPRECATED_SYMBOL_NAME (p->symbol))
- + 4);
+ char *string = alloca (strlen (p->symtab->filename)
+ + strlen (SYMBOL_LINKAGE_NAME (p->symbol))
+ + 4);
strcpy (string, p->symtab->filename);
strcat (string, ":'");
- strcat (string, DEPRECATED_SYMBOL_NAME (p->symbol));
+ strcat (string, SYMBOL_LINKAGE_NAME (p->symbol));
strcat (string, "'");
break_command (string, from_tty);
print_symbol_info (FUNCTIONS_DOMAIN,
@@ -3294,7 +3200,7 @@ rbreak_command (char *regexp, int from_tty)
}
else
{
- break_command (DEPRECATED_SYMBOL_NAME (p->msymbol), from_tty);
+ break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty);
printf_filtered ("<function, no debug info> %s;\n",
SYMBOL_PRINT_NAME (p->msymbol));
}
@@ -3311,17 +3217,8 @@ static int return_val_index;
static char **return_val;
#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \
- do { \
- if (SYMBOL_DEMANGLED_NAME (symbol) != NULL) \
- /* Put only the mangled name on the list. */ \
- /* Advantage: "b foo<TAB>" completes to "b foo(int, int)" */ \
- /* Disadvantage: "b foo__i<TAB>" doesn't complete. */ \
completion_list_add_name \
- (SYMBOL_DEMANGLED_NAME (symbol), (sym_text), (len), (text), (word)); \
- else \
- completion_list_add_name \
- (DEPRECATED_SYMBOL_NAME (symbol), (sym_text), (len), (text), (word)); \
- } while (0)
+ (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word))
/* Test to see if the symbol specified by SYMNAME (which is already
demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
@@ -3492,13 +3389,14 @@ language_search_unquoted_string (char *text, char *p)
char **
make_symbol_completion_list (char *text, char *word)
{
- register struct symbol *sym;
- register struct symtab *s;
- register struct partial_symtab *ps;
- register struct minimal_symbol *msymbol;
- register struct objfile *objfile;
- register struct block *b, *surrounding_static_block = 0;
- register int i, j;
+ struct symbol *sym;
+ struct symtab *s;
+ struct partial_symtab *ps;
+ struct minimal_symbol *msymbol;
+ struct objfile *objfile;
+ struct block *b, *surrounding_static_block = 0;
+ struct dict_iterator iter;
+ int j;
struct partial_symbol **psym;
/* The symbol we are completing on. Points in same buffer as text. */
char *sym_text;
@@ -3621,7 +3519,7 @@ make_symbol_completion_list (char *text, char *word)
/* Also catch fields of types defined in this places which match our
text string. Only complete on types visible from current context. */
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
QUIT;
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
@@ -3652,7 +3550,7 @@ make_symbol_completion_list (char *text, char *word)
{
QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
@@ -3665,7 +3563,7 @@ make_symbol_completion_list (char *text, char *word)
/* Don't do this block twice. */
if (b == surrounding_static_block)
continue;
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
@@ -3683,7 +3581,7 @@ make_file_symbol_completion_list (char *text, char *word, char *srcfile)
register struct symbol *sym;
register struct symtab *s;
register struct block *b;
- register int i;
+ struct dict_iterator iter;
/* The symbol we are completing on. Points in same buffer as text. */
char *sym_text;
/* Length of sym_text. */
@@ -3762,13 +3660,13 @@ make_file_symbol_completion_list (char *text, char *word, char *srcfile)
symbols which match. */
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
}
@@ -4009,211 +3907,6 @@ in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
return func_addr <= pc && pc < sal.end;
}
-
-/* Begin overload resolution functions */
-
-static char *
-remove_params (const char *demangled_name)
-{
- const char *argp;
- char *new_name;
- int depth;
-
- if (demangled_name == NULL)
- return NULL;
-
- /* First find the end of the arg list. */
- argp = strrchr (demangled_name, ')');
- if (argp == NULL)
- return NULL;
-
- /* Back up to the beginning. */
- depth = 1;
-
- while (argp-- > demangled_name)
- {
- if (*argp == ')')
- depth ++;
- else if (*argp == '(')
- {
- depth --;
-
- if (depth == 0)
- break;
- }
- }
- if (depth != 0)
- internal_error (__FILE__, __LINE__,
- "bad demangled name %s\n", demangled_name);
- while (argp[-1] == ' ' && argp > demangled_name)
- argp --;
-
- new_name = xmalloc (argp - demangled_name + 1);
- memcpy (new_name, demangled_name, argp - demangled_name);
- new_name[argp - demangled_name] = '\0';
- return new_name;
-}
-
-/* Helper routine for make_symbol_completion_list. */
-
-static int sym_return_val_size;
-static int sym_return_val_index;
-static struct symbol **sym_return_val;
-
-/* Test to see if the symbol specified by SYMNAME (which is already
- demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
- characters. If so, add it to the current completion list. */
-
-static void
-overload_list_add_symbol (struct symbol *sym, char *oload_name)
-{
- int newsize;
- int i;
- char *sym_name;
-
- /* If there is no type information, we can't do anything, so skip */
- if (SYMBOL_TYPE (sym) == NULL)
- return;
-
- /* skip any symbols that we've already considered. */
- for (i = 0; i < sym_return_val_index; ++i)
- if (!strcmp (DEPRECATED_SYMBOL_NAME (sym), DEPRECATED_SYMBOL_NAME (sym_return_val[i])))
- return;
-
- /* Get the demangled name without parameters */
- sym_name = remove_params (SYMBOL_DEMANGLED_NAME (sym));
- if (!sym_name)
- return;
-
- /* skip symbols that cannot match */
- if (strcmp (sym_name, oload_name) != 0)
- {
- xfree (sym_name);
- return;
- }
-
- xfree (sym_name);
-
- /* We have a match for an overload instance, so add SYM to the current list
- * of overload instances */
- if (sym_return_val_index + 3 > sym_return_val_size)
- {
- newsize = (sym_return_val_size *= 2) * sizeof (struct symbol *);
- sym_return_val = (struct symbol **) xrealloc ((char *) sym_return_val, newsize);
- }
- sym_return_val[sym_return_val_index++] = sym;
- sym_return_val[sym_return_val_index] = NULL;
-}
-
-/* Return a null-terminated list of pointers to function symbols that
- * match name of the supplied symbol FSYM.
- * This is used in finding all overloaded instances of a function name.
- * This has been modified from make_symbol_completion_list. */
-
-
-struct symbol **
-make_symbol_overload_list (struct symbol *fsym)
-{
- register struct symbol *sym;
- register struct symtab *s;
- register struct partial_symtab *ps;
- register struct objfile *objfile;
- register struct block *b, *surrounding_static_block = 0;
- register int i;
- /* The name we are completing on. */
- char *oload_name = NULL;
- /* Length of name. */
- int oload_name_len = 0;
-
- /* Look for the symbol we are supposed to complete on. */
-
- oload_name = remove_params (SYMBOL_DEMANGLED_NAME (fsym));
- if (!oload_name)
- {
- sym_return_val_size = 1;
- sym_return_val = (struct symbol **) xmalloc (2 * sizeof (struct symbol *));
- sym_return_val[0] = fsym;
- sym_return_val[1] = NULL;
-
- return sym_return_val;
- }
- oload_name_len = strlen (oload_name);
-
- sym_return_val_size = 100;
- sym_return_val_index = 0;
- sym_return_val = (struct symbol **) xmalloc ((sym_return_val_size + 1) * sizeof (struct symbol *));
- sym_return_val[0] = NULL;
-
- /* Read in all partial symtabs containing a partial symbol named
- OLOAD_NAME. */
-
- ALL_PSYMTABS (objfile, ps)
- {
- struct partial_symbol **psym;
-
- /* If the psymtab's been read in we'll get it when we search
- through the blockvector. */
- if (ps->readin)
- continue;
-
- if ((lookup_partial_symbol (ps, oload_name, NULL, 1, VAR_DOMAIN)
- != NULL)
- || (lookup_partial_symbol (ps, oload_name, NULL, 0, VAR_DOMAIN)
- != NULL))
- PSYMTAB_TO_SYMTAB (ps);
- }
-
- /* Search upwards from currently selected frame (so that we can
- complete on local vars. */
-
- for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b))
- {
- if (!BLOCK_SUPERBLOCK (b))
- {
- surrounding_static_block = b; /* For elimination of dups */
- }
-
- /* Also catch fields of types defined in this places which match our
- text string. Only complete on types visible from current context. */
-
- ALL_BLOCK_SYMBOLS (b, i, sym)
- {
- overload_list_add_symbol (sym, oload_name);
- }
- }
-
- /* Go through the symtabs and check the externs and statics for
- symbols which match. */
-
- ALL_SYMTABS (objfile, s)
- {
- QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- ALL_BLOCK_SYMBOLS (b, i, sym)
- {
- overload_list_add_symbol (sym, oload_name);
- }
- }
-
- ALL_SYMTABS (objfile, s)
- {
- QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- /* Don't do this block twice. */
- if (b == surrounding_static_block)
- continue;
- ALL_BLOCK_SYMBOLS (b, i, sym)
- {
- overload_list_add_symbol (sym, oload_name);
- }
- }
-
- xfree (oload_name);
-
- return (sym_return_val);
-}
-
-/* End of overload resolution functions */
struct symtabs_and_lines
decode_line_spec (char *string, int funfirstline)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 26ea51ea4d2..771675a7dc0 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -743,9 +743,6 @@ struct section_offsets
(sizeof (struct section_offsets) \
+ sizeof (((struct section_offsets *) 0)->offsets) * ((n)-1))
-/* The maximum possible size of a section_offsets table. */
-#define SIZEOF_SECTION_OFFSETS (SIZEOF_N_SECTION_OFFSETS (SECT_OFF_MAX))
-
/* Each source file or header is represented by a struct symtab.
These objects are chained through the `next' field. */
@@ -804,10 +801,10 @@ struct symtab
}
free_code;
- /* Pointer to one block of storage to be freed, if nonzero. */
- /* This is IN ADDITION to the action indicated by free_code. */
+ /* A function to call to free space, if necessary. This is IN
+ ADDITION to the action indicated by free_code. */
- char *free_ptr;
+ void (*free_func)(struct symtab *symtab);
/* Total number of lines found in source file. */
@@ -1027,6 +1024,13 @@ extern struct symbol *lookup_symbol_aux_block (const char *name,
const domain_enum domain,
struct symtab **symtab);
+/* Lookup a partial symbol. */
+
+extern struct partial_symbol *lookup_partial_symbol (struct partial_symtab *,
+ const char *,
+ const char *, int,
+ domain_enum);
+
/* lookup a symbol by name, within a specified block */
extern struct symbol *lookup_block_symbol (const struct block *, const char *,
@@ -1289,8 +1293,6 @@ extern char **make_symbol_completion_list (char *, char *);
extern char **make_file_symbol_completion_list (char *, char *, char *);
-extern struct symbol **make_symbol_overload_list (struct symbol *);
-
extern char **make_source_files_completion_list (char *, char *);
/* symtab.c */
diff --git a/gdb/target.h b/gdb/target.h
index cd822799ed6..c2d87937dad 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -945,12 +945,6 @@ extern void (*target_new_objfile_hook) (struct objfile *);
#define target_get_thread_local_address_p() \
(target_get_thread_local_address != NULL)
-/* Hook to call target-dependent code after reading in a new symbol table. */
-
-#ifndef TARGET_SYMFILE_POSTREAD
-#define TARGET_SYMFILE_POSTREAD(OBJFILE)
-#endif
-
/* Hook to call target dependent code just after inferior target process has
started. */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 33204fdbb8c..4392f543e5e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,9 +1,85 @@
-2003-05-28 Jim Blandy <jimb@redhat.com>
+2003-06-12 Jeff Johnston <jjohnstn@redhat.com>
- * gdb.asm/asm-source.exp: Don't handle powerpc64-*-* along with
- powerpc-*-*; treat the former as an architecture this test doesn't
- support. At the moment, the asm-source test program hangs and
- becomes an unkillable process on PPC64 Linux.
+ * gdb.base/float.exp: Add ia64 support.
+
+2003-06-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/fileio.exp: Run only on remote targets.
+
+2003-06-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/fileio.c: New file, testing File-I/O.
+ * gdb.base/fileio.exp: Ditto.
+
+2003-06-09 Raoul Gough <RaoulGough@yahoo.co.uk>
+
+ * gdb.base/shreloc.exp: New file, check symbol values obtained from
+ shared objects after relocation at load time (gdb PR/1132).
+ * gdb.base/shreloc.c, gdb.base/shreloc1.c, gdb.base/shreloc2.c:
+ as above, part of the shared object relocation test.
+
+2003-06-08 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/readline.exp: Add tests for operate-and-get-next with a
+ fully filled history list.
+ * gdb.base/gdb_history: New file.
+
+ * gdb.base/signals.exp: XFAIL "continue to func1" on
+ i*86-*-freebsd*.
+
+ * gdb.base/attach.exp: When trying to attach to a nonexistent
+ process, make it possible to specify the PID based on the target,
+ and do so for *-*-freebsd*.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * gdb.base/float.exp: Add expected regexp for alpha-*-*.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * gdb.base/selftest.exp: Next over lim_at_start initialization.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * gdb.base/dump.exp [alpha*-*-*]: Add -taso linker switch.
+
+2003-06-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.asm/asm-source.exp: Dissassemble from &globalvar instead
+ of globalvar.
+
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Check for memory read errors in
+ disassembler test on *BSD too.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * gdb.asm/alpha.inc (gdbasm_enter): Use numeric register names
+ for .frame.
+ (gdbasm_call): Lose ldgp.
+ (gdbasm_startup): Add frame information.
+ * gdb.asm/asm-source.exp (alpha*-*): Add -no-mdebug to asm-flags.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/float.exp: Expect similar output for x86_64-*-* as for
+ i?86-*-*.
+
+2003-05-30 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Make sure the final link succeeds on
+ FreeBSD.
+
+2003-05-29 Richard Henderson <rth@redhat.com>
+
+ * gdb.asm/alpha.inc: New file.
+ * gdb.asm/asm-source.exp: Use it.
+
+2003-05-29 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/corefile.exp: Find corefiles on Linux, which names them
+ 'core.PID'.
2003-05-22 Jim Blandy <jimb@redhat.com>
diff --git a/gdb/testsuite/gdb.asm/alpha.inc b/gdb/testsuite/gdb.asm/alpha.inc
new file mode 100644
index 00000000000..f9741c479e5
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/alpha.inc
@@ -0,0 +1,62 @@
+ comment "subroutine declare"
+ .macro gdbasm_declare name
+ .ent \name
+\name:
+ .endm
+
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ .frame $30, 16, $26, 0
+ .mask 0x04000000, -16
+ ldgp $gp, 0($27)
+ subq $sp, 16, $sp
+ stq $26, 0($sp)
+ .prologue 1
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ ldq $26, 0($sp)
+ addq $sp, 16, $sp
+ ret
+ .endm
+
+ comment "subroutine end"
+ .macro gdbasm_end name
+ .end \name
+ .endm
+
+ comment "subroutine call"
+ /* Can't use ldgp here because the finish-frame test expects the
+ pc to wind up on the next line. That's ok, we're all local. */
+ .macro gdbasm_call subr
+ jsr $26, \subr
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ lda $16, 0($31)
+ lda $0, 1($31)
+ callsys
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ .frame $31, 0, $31, 0
+ .prologue
+ ldgp $gp, 0($27)
+ .endm
+
+ comment "Declare a data variable"
+ .macro gdbasm_datavar name value
+ .data
+\name:
+ .long \value
+ .endm
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 46ffbd93e64..8c3f00325ad 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -36,6 +36,12 @@ set asm-flags ""
set link-flags ""
switch -glob -- [istarget] {
+ "alpha*-*-*" {
+ set asm-arch alpha
+ # ??? Won't work with ecoff systems like Tru64, but then we also
+ # don't have any other -g flag that creates mdebug output.
+ set asm-flags "-gdwarf2 -no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ }
"*arm-*-*" {
set asm-arch arm
}
@@ -75,10 +81,6 @@ switch -glob -- [istarget] {
"mips*-*" {
set asm-arch mips
}
- "powerpc64-*-linux*" {
- # At the moment, this test makes the kernel hang; we're
- # disabling it until we can sort that out.
- }
"powerpc*-*" {
set asm-arch powerpc
}
@@ -103,6 +105,15 @@ if { "${asm-arch}" == "" } {
gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
}
+# On FreeBSD, crt1.o the final link will fail because of unresolved
+# symbols. It turns out that libc.so references symbols that are
+# normally provided by crt1.o, which isn't linked in since we specify
+# -nostartfiles. Using -nostdlib doesn't help since target_compile
+# automatically adds -lm. Linking statically avoids this mess.
+if [istarget "*-*-freebsd*"] then {
+ set link-flags "-static"
+}
+
# Watch out, we are invoking the assembler, but the testsuite sets multilib
# switches according to compiler syntax. If we pass these options straight
# to the assembler, they won't always make sense. If we don't pass them to
@@ -308,7 +319,7 @@ proc test_dis { command var } {
global gdb_prompt
send_gdb "${command}\n"
gdb_expect {
- -re "${var}.*:.*Cannot access" {
+ -re "${var}.*:.*(Cannot access|Bad address)" {
# The "disassembler" was only accessing the local
# executable and that would cause attempts to disassemble
# variables to fail (memory not valid).
@@ -325,7 +336,7 @@ proc test_dis { command var } {
# See if we can look at a global variable, three ways
gdb_test "print globalvar" ".* = 11" "look at global variable"
-test_dis "x/i globalvar" "globalvar"
+test_dis "x/i &globalvar" "globalvar"
test_dis "disassem &globalvar &globalvar+1" "globalvar"
# See if we can look at a static variable, three ways
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index c561080f4fe..6adb6e3aa4b 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -106,32 +106,41 @@ proc do_attach_tests {} {
}
# Verify that we cannot attach to what appears to be a valid
- # process ID, but is a process that doesn't exist. (I don't
- # believe any process is ever assigned #0, at least on HPUX.)
+ # process ID, but is a process that doesn't exist. Traditionally,
+ # most systems didn't have a process with ID 0, so we take that as
+ # the default. However, there are a few exceptions.
#
- send_gdb "attach 0\n"
+ set boguspid 0
+ if { [istarget "*-*-freebsd*"] } {
+ # In FreeBSD 5.0, PID 0 is used for "swapper". Use -1 instead
+ # (which should have the desired effect on any version of FreeBSD).
+ set boguspid -1
+ }
+ send_gdb "attach $boguspid\n"
gdb_expect {
- -re "Attaching to.*, process 0.*No such process.*$gdb_prompt $"\
- {
- # Response expected on HP-UX 10.20 (i.e., ptrace-based).
- pass "attach to nonexistent process is prohibited"
- }
- -re "Attaching to.*, process 0 failed.*Hint.*$gdb_prompt $"\
- {
- # Response expected on HP-UX 11.0 (i.e., ttrace-based).
- pass "attach to nonexistent process is prohibited"
- }
- -re "Attaching to.*, process 0.*denied.*$gdb_prompt $"\
- {pass "attach to nonexistent process is prohibited"}
- -re "Attaching to.*, process 0.*Operation not permitted.*$gdb_prompt $"\
- {pass "attach to nonexistent process is prohibited"}
- -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
- {
- # Response expected from /proc-based systems.
- pass "attach to nonexistent process is prohibited"
- }
- -re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"}
- timeout {fail "(timeout) attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process $boguspid.*No such process.*$gdb_prompt $"\
+ {
+ # Response expected on ptrace-based systems (i.e. HP-UX 10.20).
+ pass "attach to nonexistent process is prohibited"
+ }
+ -re "Attaching to.*, process $boguspid failed.*Hint.*$gdb_prompt $"\
+ {
+ # Response expected on ttrace-based systems (i.e. HP-UX 11.0).
+ pass "attach to nonexistent process is prohibited"
+ }
+ -re "Attaching to.*, process $boguspid.*denied.*$gdb_prompt $"\
+ {pass "attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process $boguspid.*not permitted.*$gdb_prompt $"\
+ {pass "attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
+ {
+ # Response expected from /proc-based systems.
+ pass "attach to nonexistent process is prohibited"
+ }
+ -re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"}
+ timeout {
+ fail "(timeout) attach to nonexistent process is prohibited"
+ }
}
# Verify that we can attach to the process by first giving its
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 73217775e0d..d059ef56b25 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -54,16 +54,30 @@ if [get_compiler_info ${binfile}] {
# allows us to generate a core on systems where it does.
#
# Some systems append "core" to the name of the program; others append
-# the name of the program to "core".
+# the name of the program to "core"; still others (like Linux, as of
+# May 2003) create cores named "core.PID". In the latter case, we
+# could have many core files lying around, and it may be difficult to
+# tell which one is ours, so let's run the program in a subdirectory.
set found 0
-catch "system \"(cd ${objdir}/${subdir}; ulimit -c unlimited; ${binfile}; true) >/dev/null 2>&1\""
+set coredir "${objdir}/${subdir}/coredir.[getpid]"
+file mkdir $coredir
+catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile}; true) >/dev/null 2>&1\""
# remote_exec host "${binfile}"
-foreach i "${objdir}/${subdir}/core ${objdir}/${subdir}/core.coremaker.c ${binfile}.core" {
+foreach i "${coredir}/core ${coredir}/core.coremaker.c ${binfile}.core" {
if [remote_file build exists $i] {
remote_exec build "mv $i ${objdir}/${subdir}/corefile"
set found 1
}
}
+# Check for "core.PID".
+if { $found == 0 } {
+ set names [glob -nocomplain -directory $coredir core.*]
+ if {[llength $names] == 1} {
+ set corefile [file join $coredir [lindex $names 0]]
+ remote_exec build "mv $corefile ${objdir}/${subdir}/corefile"
+ set found 1
+ }
+}
if { $found == 0 } {
# The braindamaged HPUX shell quits after the ulimit -c above
# without executing ${binfile}. So we try again without the
@@ -77,11 +91,15 @@ if { $found == 0 } {
set found 1
}
}
+}
+
+# Try to clean up after ourselves.
+remote_file build delete [file join $coredir coremmap.data]
+remote_exec build "rmdir $coredir"
- if { $found == 0 } {
- warning "can't generate a core file - core tests suppressed - check ulimit -c"
- return 0
- }
+if { $found == 0 } {
+ warning "can't generate a core file - core tests suppressed - check ulimit -c"
+ return 0
}
#
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 5885307cea7..1120d41321c 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -31,8 +31,15 @@ set testfile "dump"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
+set options {debug}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if [istarget "alpha*-*-*"] then {
+ # SREC etc cannot handle 64-bit addresses. Force the test
+ # program into the low 31 bits of the address space.
+ lappend options "additional_flags=-Wl,-taso"
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
new file mode 100644
index 00000000000..fd410cd24fc
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fileio.c
@@ -0,0 +1,468 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/errno.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+/**************************************************************************
+ * TESTS :
+ * - open(const char *pathname, int flags, mode_t mode);
+1) Attempt to create file that already exists - EEXIST
+2) Attempt to open a directory for writing - EISDIR
+3) Pathname does not exist - ENOENT
+4) Open for write but no write permission - EACCES
+
+read(int fd, void *buf, size_t count);
+1) Read using invalid file descriptor - EBADF
+
+write(int fd, const void *buf, size_t count);
+1) Write using invalid file descriptor - EBADF
+2) Attempt to write to read-only file - EBADF
+
+lseek(int fildes, off_t offset, int whence);
+1) Seeking on an invalid file descriptor - EBADF
+2) Invalid "whence" (3rd param) value - EINVAL
+
+close(int fd);
+1) Attempt to close an invalid file descriptor - EBADF
+
+stat(const char *file_name, struct stat *buf);
+1) Pathname is a null string - ENOENT
+2) Pathname does not exist - ENOENT
+
+fstat(int filedes, struct stat *buf);
+1) Attempt to stat using an invalid file descriptor - EBADF
+
+isatty (int desc);
+Not applicable. We will test that it returns 1 when expected and a case
+where it should return 0.
+
+rename(const char *oldpath, const char *newpath);
+1) newpath is an existing directory, but oldpath is not a directory. - EISDIR
+2) newpath is a non-empty directory. - ENOTEMPTY or EEXIST
+3) newpath is a subdirectory of old path. - EINVAL
+4) oldpath does not exist. - ENOENT
+
+unlink(const char *pathname);
+1) pathname does not have write access. - EACCES
+2) pathname does not exist. - ENOENT
+
+time(time_t *t);
+Not applicable.
+
+system (const char * string);
+1) Invalid string/command. - returns 127.
+
+ ***************************************************************************/
+
+#define FILENAME "foo.fileio.test"
+#define RENAMED "bar.fileio.test"
+#define NONEXISTANT "nofoo.fileio.test"
+#define NOWRITE "nowrt.fileio.test"
+
+#define TESTDIR1 "dir1.fileio.test"
+#define TESTDIR2 "dir2.fileio.test"
+#define TESTSUBDIR "dir1.fileio.test/subdir.fileio.test"
+
+#define STRING "Hello World"
+
+int
+test_open ()
+{
+ int ret;
+
+ /* Test opening */
+ errno = 0;
+ ret = open (FILENAME, O_CREAT | O_TRUNC | O_RDONLY, S_IWUSR | S_IRUSR);
+ printf ("open 1: ret = %d, errno = %d %s\n", ret, errno,
+ ret >= 0 ? "OK" : "");
+ if (ret >= 0)
+ close (ret);
+ /* Creating an already existing file (created by fileio.exp) */
+ errno = 0;
+ ret = open (FILENAME, O_CREAT | O_EXCL | O_WRONLY, S_IWUSR | S_IRUSR);
+ printf ("open 2: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EEXIST ? "OK" : "");
+ if (ret >= 0)
+ close (ret);
+ /* Open directory (for writing) */
+ errno = 0;
+ ret = open (".", O_WRONLY);
+ printf ("open 3: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EISDIR ? "OK" : "");
+ if (ret >= 0)
+ close (ret);
+ /* Opening nonexistant file */
+ errno = 0;
+ ret = open (NONEXISTANT, O_RDONLY);
+ printf ("open 4: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOENT ? "OK" : "");
+ if (ret >= 0)
+ close (ret);
+ /* Open for write but no write permission */
+ errno = 0;
+ ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ if (ret >= 0)
+ {
+ close (ret);
+ errno = 0;
+ ret = open (NOWRITE, O_WRONLY);
+ printf ("open 5: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EACCES ? "OK" : "");
+ if (ret >= 0)
+ close (ret);
+ }
+ else
+ printf ("open 5: ret = %d, errno = %d\n", ret, errno);
+}
+
+int
+test_write ()
+{
+ int fd, ret;
+
+ /* Test writing */
+ errno = 0;
+ fd = open (FILENAME, O_WRONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = write (fd, STRING, strlen (STRING));
+ printf ("write 1: ret = %d, errno = %d %s\n", ret, errno,
+ ret == strlen (STRING) ? "OK" : "");
+ close (fd);
+ }
+ else
+ printf ("write 1: ret = %d, errno = %d\n", ret, errno);
+ /* Write using invalid file descriptor */
+ errno = 0;
+ ret = write (999, STRING, strlen (STRING));
+ printf ("write 2: ret = %d, errno = %d, %s\n", ret, errno,
+ errno == EBADF ? "OK" : "");
+ /* Write to a read-only file */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = write (fd, STRING, strlen (STRING));
+ printf ("write 3: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EBADF ? "OK" : "");
+ }
+ else
+ printf ("write 3: ret = %d, errno = %d\n", ret, errno);
+}
+
+int
+test_read ()
+{
+ int fd, ret;
+ char buf[16];
+
+ /* Test reading */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ memset (buf, 0, 16);
+ errno = 0;
+ ret = read (fd, buf, 16);
+ buf[15] = '\0'; /* Don't trust anybody... */
+ if (ret == strlen (STRING))
+ printf ("read 1: %s %s\n", buf, !strcmp (buf, STRING) ? "OK" : "");
+ else
+ printf ("read 1: ret = %d, errno = %d\n", ret, errno);
+ close (fd);
+ }
+ else
+ printf ("read 1: ret = %d, errno = %d\n", ret, errno);
+ /* Read using invalid file descriptor */
+ errno = 0;
+ ret = read (999, buf, 16);
+ printf ("read 2: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EBADF ? "OK" : "");
+}
+
+int
+test_lseek ()
+{
+ int fd;
+ off_t ret;
+
+ /* Test seeking */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = lseek (fd, 0, SEEK_CUR);
+ printf ("lseek 1: ret = %ld, errno = %d, %s\n", ret, errno,
+ ret == 0 ? "OK" : "");
+ errno = 0;
+ ret = lseek (fd, 0, SEEK_END);
+ printf ("lseek 2: ret = %ld, errno = %d, %s\n", ret, errno,
+ ret == 11 ? "OK" : "");
+ errno = 0;
+ ret = lseek (fd, 3, SEEK_SET);
+ printf ("lseek 3: ret = %ld, errno = %d, %s\n", ret, errno,
+ ret == 3 ? "OK" : "");
+ close (fd);
+ }
+ else
+ {
+ printf ("lseek 1: ret = %d, errno = %d\n", ret, errno);
+ printf ("lseek 2: ret = %d, errno = %d\n", ret, errno);
+ printf ("lseek 3: ret = %d, errno = %d\n", ret, errno);
+ }
+ /* Seeking on an invalid file descriptor */
+
+}
+
+int
+test_close ()
+{
+ int fd, ret;
+
+ /* Test close */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = close (fd);
+ printf ("close 1: ret = %ld, errno = %d, %s\n", ret, errno,
+ ret == 0 ? "OK" : "");
+ }
+ else
+ printf ("close 1: ret = %d, errno = %d\n", ret, errno);
+ /* Close an invalid file descriptor */
+ errno = 0;
+ ret = close (999);
+ printf ("close 2: ret = %ld, errno = %d, %s\n", ret, errno,
+ errno == EBADF ? "OK" : "");
+}
+
+int
+test_stat ()
+{
+ int ret;
+ struct stat st;
+
+ /* Test stat */
+ errno = 0;
+ ret = stat (FILENAME, &st);
+ if (!ret)
+ printf ("stat 1: ret = %d, errno = %d %s\n", ret, errno,
+ st.st_size == 11 ? "OK" : "");
+ else
+ printf ("stat 1: ret = %d, errno = %d\n", ret, errno);
+ /* NULL pathname */
+ errno = 0;
+ ret = stat (NULL, &st);
+ printf ("stat 2: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOENT ? "OK" : "");
+ /* Empty pathname */
+ errno = 0;
+ ret = stat ("", &st);
+ printf ("stat 3: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOENT ? "OK" : "");
+ /* Nonexistant file */
+ errno = 0;
+ ret = stat (NONEXISTANT, &st);
+ printf ("stat 4: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOENT ? "OK" : "");
+}
+
+int
+test_fstat ()
+{
+ int fd, ret;
+ struct stat st;
+
+ /* Test fstat */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = fstat (fd, &st);
+ if (!ret)
+ printf ("fstat 1: ret = %d, errno = %d %s\n", ret, errno,
+ st.st_size == 11 ? "OK" : "");
+ else
+ printf ("fstat 1: ret = %d, errno = %d\n", ret, errno);
+ close (fd);
+ }
+ else
+ printf ("fstat 1: ret = %d, errno = %d\n", ret, errno);
+ /* Fstat using invalid file descriptor */
+ errno = 0;
+ ret = fstat (999, &st);
+ printf ("fstat 2: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EBADF ? "OK" : "");
+}
+
+int
+test_isatty ()
+{
+ int fd;
+
+ /* Check std I/O */
+ printf ("isatty 1: stdin %s\n", isatty (0) ? "yes OK" : "no");
+ printf ("isatty 2: stdout %s\n", isatty (1) ? "yes OK" : "no");
+ printf ("isatty 3: stderr %s\n", isatty (2) ? "yes OK" : "no");
+ /* Check invalid fd */
+ printf ("isatty 4: invalid %s\n", isatty (999) ? "yes" : "no OK");
+ /* Check open file */
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ printf ("isatty 5: file %s\n", isatty (fd) ? "yes" : "no OK");
+ close (fd);
+ }
+ else
+ printf ("isatty 5: file couldn't open\n");
+}
+
+int
+test_system ()
+{
+ /*
+ * Requires test framework to switch on "set remote system-call-allowed 1"
+ */
+ int ret;
+ char sys[512];
+
+ /* This test prepares the directory for test_rename() */
+ sprintf (sys, "mkdir -p %s %s", TESTSUBDIR, TESTDIR2);
+ ret = system (sys);
+ if (ret == 127)
+ printf ("system 1: ret = %d /bin/sh unavailable???\n", ret);
+ else
+ printf ("system 1: ret = %d %s\n", ret, ret == 0 ? "OK" : "");
+ /* Invalid command (just guessing ;-) ) */
+ ret = system ("wrtzlpfrmpft");
+ printf ("system 2: ret = %d %s\n", ret, ret == 127 ? "OK" : "");
+}
+
+int
+test_rename ()
+{
+ int ret;
+ struct stat st;
+
+ /* Test rename */
+ errno = 0;
+ ret = rename (FILENAME, RENAMED);
+ if (!ret)
+ {
+ errno = 0;
+ ret = stat (FILENAME, &st);
+ if (ret && errno == ENOENT)
+ {
+ errno = 0;
+ ret = stat (RENAMED, &st);
+ printf ("rename 1: ret = %d, errno = %d %s\n", ret, errno,
+ errno == 0 ? "OK" : "");
+ errno = 0;
+ }
+ else
+ printf ("rename 1: ret = %d, errno = %d\n", ret, errno);
+ }
+ else
+ printf ("rename 1: ret = %d, errno = %d\n", ret, errno);
+ /* newpath is existing directory, oldpath is not a directory */
+ errno = 0;
+ ret = rename (RENAMED, TESTDIR2);
+ printf ("rename 2: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EISDIR ? "OK" : "");
+ /* newpath is a non-empty directory */
+ errno = 0;
+ ret = rename (TESTDIR2, TESTDIR1);
+ printf ("rename 3: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOTEMPTY || errno == EEXIST ? "OK" : "");
+ /* newpath is a subdirectory of old path */
+ errno = 0;
+ ret = rename (TESTDIR1, TESTSUBDIR);
+ printf ("rename 4: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EINVAL ? "OK" : "");
+ /* oldpath does not exist */
+ errno = 0;
+ ret = rename (NONEXISTANT, FILENAME);
+ printf ("rename 5: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOENT ? "OK" : "");
+}
+
+int
+test_unlink ()
+{
+ int ret;
+ char name[256];
+ char sys[512];
+
+ /* Test unlink */
+ errno = 0;
+ ret = unlink (RENAMED);
+ printf ("unlink 1: ret = %d, errno = %d %s\n", ret, errno,
+ errno == 0 ? "OK" : "");
+ /* No write access */
+ sprintf (name, "%s/%s", TESTDIR2, FILENAME);
+ errno = 0;
+ ret = open (name, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ if (ret >= 0)
+ {
+ sprintf (sys, "chmod -w %s", TESTDIR2);
+ ret = system (sys);
+ if (!ret)
+ {
+ errno = 0;
+ ret = unlink (name);
+ printf ("unlink 2: ret = %d, errno = %d %s\n", ret, errno,
+ errno == EACCES ? "OK" : "");
+ }
+ else
+ printf ("unlink 2: ret = %d chmod failed\n", ret, errno);
+ }
+ else
+ printf ("unlink 2: ret = %d, errno = %d\n", ret, errno);
+ /* pathname doesn't exist */
+ errno = 0;
+ ret = unlink (NONEXISTANT);
+ printf ("unlink 3: ret = %d, errno = %d %s\n", ret, errno,
+ errno == ENOENT ? "OK" : "");
+}
+
+int
+test_time ()
+{
+ time_t ret, t;
+
+ errno = 0;
+ ret = time (&t);
+ printf ("time 1: ret = %d, errno = %d, t = %d %s\n", ret, errno, t, ret == t ? "OK" : "");
+ errno = 0;
+ ret = time (NULL);
+ printf ("time 2: ret = %d, errno = %d, t = %d %s\n", ret, errno, t,
+ ret >= t && ret < t + 10 ? "OK" : "");
+}
+
+int
+main ()
+{
+ /* Don't change the order of the calls. They partly depend on each other */
+ test_open ();
+ test_write ();
+ test_read ();
+ test_lseek ();
+ test_close ();
+ test_stat ();
+ test_fstat ();
+ test_isatty ();
+ test_system ();
+ test_rename ();
+ test_unlink ();
+ test_time ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
new file mode 100644
index 00000000000..49e8c384611
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -0,0 +1,272 @@
+# Copyright 2002
+# 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 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.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Corinna Vinschen <vinschen@redhat.com>
+
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "fileio"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# test only on a remote target board
+if {! [is_remote target]} {
+ return 0;
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+catch "system \"chmod -f +w dir2.fileio.test\""
+catch "system \"rm -rf *.fileio.test\""
+
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+send_gdb "set print sevenbit-strings\n" ; gdb_expect -re "$gdb_prompt $"
+send_gdb "set print address off\n" ; gdb_expect -re "$gdb_prompt $"
+send_gdb "set width 0\n" ; gdb_expect -re "$gdb_prompt $"
+
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+send_gdb "tbreak 81\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 1:.*OK.*test_open \\(\\) at.*$srcfile:81.*" \
+"Open a file"
+
+send_gdb "tbreak 88\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 2:.*OK.*test_open \\(\\) at.*$srcfile:88.*" \
+"Creating already existing file returns EEXIST"
+
+send_gdb "tbreak 95\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 3:.*OK.*test_open \\(\\) at.*$srcfile:95.*" \
+"Open directory for writing returns EISDIR"
+
+send_gdb "tbreak 102\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 4:.*OK.*test_open \\(\\) at.*$srcfile:102.*" \
+"Opening nonexistant file returns ENOENT"
+
+send_gdb "tbreak 109\n" ; gdb_expect -re "$gdb_prompt $"
+send_gdb "continue\n" ; gdb_expect -re "$gdb_prompt $"
+catch "system \"chmod -f -w nowrt.fileio.test\""
+
+send_gdb "tbreak 119\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 5:.*OK.*test_open \\(\\) at.*$srcfile:119.*" \
+"Open for write but no write permission returns EACCES"
+
+send_gdb "tbreak 140\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*write 1:.*OK.*test_write \\(\\) at.*$srcfile:140.*" \
+"Writing to a file"
+
+send_gdb "tbreak 145\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*write 2:.*OK.*test_write \\(\\) at.*$srcfile:145.*" \
+"Write using invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 156\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*write 3:.*OK.*test_write \\(\\) at.*$srcfile:156.*" \
+"Writing to a read-only file returns EBADF"
+
+send_gdb "tbreak 182\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*read 1:.*OK.*test_read \\(\\) at.*$srcfile:182.*" \
+"Reading from a file"
+
+send_gdb "tbreak 186\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*read 2:.*OK.*test_read \\(\\) at.*$srcfile:186.*" \
+"Read using invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 221\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*lseek 1:.*OK.*lseek 2:.*OK.*lseek 3:.*OK.*test_lseek \\(\\) at.*$srcfile:221.*" \
+"Lseeking a file"
+
+send_gdb "tbreak 241\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*close 1:.*OK.*test_close \\(\\) at.*$srcfile:241.*" \
+"Closing a file"
+
+send_gdb "tbreak 245\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*close 2:.*OK.*test_close \\(\\) at.*$srcfile:245.*" \
+"Closing an invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 262\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 1:.*OK.*test_stat \\(\\) at.*$srcfile:262.*" \
+"Stat a file"
+
+send_gdb "tbreak 267\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 2:.*OK.*test_stat \\(\\) at.*$srcfile:267.*" \
+"Stat a NULL pathname returns ENOENT"
+
+send_gdb "tbreak 272\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 3:.*OK.*test_stat \\(\\) at.*$srcfile:272.*" \
+"Stat an empty pathname returns ENOENT"
+
+send_gdb "tbreak 276\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 4:.*OK.*test_stat \\(\\) at.*$srcfile:276.*" \
+"Stat a nonexistant file returns ENOENT"
+
+send_gdb "tbreak 301\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*fstat 1:.*OK.*test_fstat \\(\\) at.*$srcfile:301.*" \
+"Fstat an open file"
+
+send_gdb "tbreak 305\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*fstat 2:.*OK.*test_fstat \\(\\) at.*$srcfile:305.*" \
+"Fstat an invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 314\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 1:.*OK.*test_isatty \\(\\) at.*$srcfile:314.*" \
+"Isatty (stdin)"
+
+send_gdb "tbreak 315\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 2:.*OK.*test_isatty \\(\\) at.*$srcfile:315.*" \
+"Isatty (stdout)"
+
+send_gdb "tbreak 317\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 3:.*OK.*test_isatty \\(\\) at.*$srcfile:317.*" \
+"Isatty (stderr)"
+
+send_gdb "tbreak 319\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 4:.*OK.*test_isatty \\(\\) at.*$srcfile:319.*" \
+"Isatty (invalid fd)"
+
+send_gdb "tbreak 327\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 5:.*OK.*test_isatty \\(\\) at.*$srcfile:327.*" \
+"Isatty (open file)"
+
+send_gdb "set remote system-call-allowed 1\n"; gdb_expect -re ".*$gdb_prompt $"
+send_gdb "tbreak 347\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*system 1:.*OK.*test_system \\(\\) at.*$srcfile:347.*" \
+"System(3) call"
+
+send_gdb "tbreak 349\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*system 2:.*OK.*test_system \\(\\) at.*$srcfile:349.*" \
+"System with invalid command returns 127"
+
+send_gdb "tbreak 378\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 1:.*OK.*test_rename \\(\\) at.*$srcfile:378.*" \
+"Rename a file"
+
+send_gdb "tbreak 383\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 2:.*OK.*test_rename \\(\\) at.*$srcfile:383.*" \
+"Renaming a file to existing directory returns EISDIR"
+
+send_gdb "tbreak 388\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 3:.*OK.*test_rename \\(\\) at.*$srcfile:388.*" \
+"Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+
+send_gdb "tbreak 393\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 4:.*OK.*test_rename \\(\\) at.*$srcfile:393.*" \
+"Renaming a directory to a subdir of itself returns EINVAL"
+
+send_gdb "tbreak 397\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 5:.*OK.*test_rename \\(\\) at.*$srcfile:397.*" \
+"Renaming a nonexistant file returns ENOENT"
+
+send_gdb "tbreak 412\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*unlink 1:.*OK.*test_unlink \\(\\) at.*$srcfile:412.*" \
+"Unlink a file"
+
+send_gdb "tbreak 432\n" ; gdb_expect -re "$gdb_prompt $"
+# This test fails on Cygwin because unlink() succeeds on Win32 systems
+# in that situation.
+if [ishost *cygwin*] {
+ setup_xfail "*-*-*"
+}
+gdb_test continue \
+"Continuing\\..*unlink 2:.*OK.*test_unlink \\(\\) at.*$srcfile:432.*" \
+"Unlinking a file in a directory w/o write access returns EACCES"
+
+send_gdb "tbreak 436\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*unlink 3:.*OK.*test_unlink \\(\\) at.*$srcfile:436.*" \
+"Unlinking a nonexistant file returns ENOENT"
+
+send_gdb "tbreak 446\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*time 1:.*OK.*test_time \\(\\) at.*$srcfile:446.*" \
+"Time(2) call returns the same value as in parameter"
+
+sleep 2
+send_gdb "tbreak 450\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*time 2:.*OK.*test_time \\(\\) at.*$srcfile:450.*" \
+"Time(2) returns feasible values"
+
+send_gdb "quit\n"
+send_gdb "y\n"
+
+catch "system \"chmod -f +w dir2.fileio.test\""
+catch "system \"rm -rf *.fileio.test\""
+
+set timeout $oldtimeout
+return 0
+
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 66943eff7dd..7aa75f35889 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -51,12 +51,16 @@ if ![runto_main] then {
# Test "info float".
-if { [istarget "arm*-*-*"] || \
+if { [istarget "alpha*-*-*"] } then {
+ gdb_test "info float" "f0.*" "info float"
+} elseif { [istarget "arm*-*-*"] || \
[istarget "xscale*-*-*"] || \
[istarget "strongarm*-*-*"] } then {
gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
-} elseif [istarget "i?86-*-*"] then {
+} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } then {
gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
+} elseif [istarget "ia64-*-*"] then {
+ gdb_test "info float" "f0.*f1.*f127.*" "info float"
} else {
gdb_test "info float" "No floating.point info available for this processor." "info float"
}
diff --git a/gdb/testsuite/gdb.base/gdb_history b/gdb/testsuite/gdb.base/gdb_history
new file mode 100644
index 00000000000..cc22f69c2cf
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb_history
@@ -0,0 +1,256 @@
+add-symbol-file
+append
+append binary
+append memory
+append value
+append binary memory
+append binary value
+attach
+break
+b
+br
+bre
+brea
+backtrace
+bt
+ba
+bac
+continue
+c
+call
+catch
+cd
+clear
+commands
+condition
+core-file
+d
+delete
+define
+delete breakpoints
+delete display
+detach
+directory
+dis
+disa
+disable
+disable breakpoints
+disable display
+disassemble
+display
+do
+document
+down
+down-silently
+dump
+dump binary
+dump ihex
+dump memory
+dump srec
+dump tekhex
+dump value
+dump binary memory
+dump binary value
+dump ihex memory
+dump ihex value
+dump srec memory
+dump srec value
+dump tekhex memory
+dump tekhex value
+echo
+enable breakpoints delete
+enable breakpoints once
+enable breakpoints
+enable delete
+enable display
+enable once
+enable
+exec-file
+f
+frame
+fg
+file
+finish
+forward-search
+gcore
+generate-core-file
+h
+help
+handle
+i
+info
+ignore
+info address
+info all-registers
+info args
+info bogus-gdb-command
+info breakpoints
+info catch
+info copying
+info display
+info f
+info frame
+info files
+info float
+info functions
+info locals
+info program
+info registers
+info s
+info stack
+info set
+info symbol
+info source
+info sources
+info target
+info terminal
+info types
+info variables
+info warranty
+info watchpoints
+inspect
+jump
+kill
+l
+list
+load
+n
+next
+ni
+nexti
+output
+overlay
+overlay on
+overlay manual
+overlay auto
+overlay off
+overlay list
+overlay map
+overlay unmap
+overlay manual
+overlay map
+overlay unmap
+p
+print
+printf
+ptype
+pwd
+r
+run
+rbreak
+restore
+return
+reverse-search
+s
+step
+search
+section
+set annotate
+set args
+set c
+set ch
+set check
+set check range
+set check type
+set complaints
+set confirm
+set environment
+set height
+set history expansion
+set history filename
+set history save
+set history size
+set history
+set language
+set listsize
+set p
+set pr
+set print
+set print address
+set print array
+set print asm-demangle
+set print demangle
+set print elements
+set print object
+set print pretty
+set print sevenbit-strings
+set print union
+set print vtbl
+set radix
+set symbol-reloading
+set variable
+set verbose
+set width
+set write
+set
+shell echo Hi dad!
+show annotate
+show args
+show c
+show ch
+show check
+show check range
+show check type
+show commands
+show complaints
+show confirm
+show convenience
+show directories
+show editing
+show height
+show history expansion
+show history filename
+show history save
+show history size
+show history
+show language
+show listsize
+show p
+show pr
+show print
+show paths
+show print address
+show print array
+show print asm-demangle
+show print demangle
+show print elements
+show print object
+show print pretty
+show print sevenbit-strings
+show print union
+show print vtbl
+show prompt
+show radix
+show symbol-reloading
+show user
+show values
+show verbose
+show version
+show width
+show write
+show
+si
+stepi
+signal
+source
+s
+step
+symbol-file
+target child
+target procfs
+target core
+target exec
+target remote
+target
+tbreak
+tty
+u
+until
+undisplay
+unset environment
+unset
+up-silently
+watch
+whatis
+where
+x
diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp
index 8edd1333db4..511cb6ba2e5 100644
--- a/gdb/testsuite/gdb.base/readline.exp
+++ b/gdb/testsuite/gdb.base/readline.exp
@@ -169,7 +169,7 @@ set timeout 30
# A simple test of operate-and-get-next.
operate_and_get_next "Simple operate-and-get-next" \
"p 1" ".* = 1" \
- "p 2" ".* = 2"\
+ "p 2" ".* = 2" \
"p 3" ".* = 3"
# Test operate-and-get-next with a secondary prompt.
@@ -179,12 +179,44 @@ operate_and_get_next "operate-and-get-next with secondary prompt" \
"end" ".* = 5"
+# Now repeat the first test with a history file that fills the entire
+# history list.
+
+if [info exists env(GDBHISTFILE)] {
+ set old_gdbhistfile $env(GDBHISTFILE)
+}
+if [info exists env(HISTSIZE)] {
+ set old_histsize $env(HISTSIZE)
+}
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+set env(HISTSIZE) "10"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+operate_and_get_next "Simple operate-and-get-next" \
+ "p 7" ".* = 7" \
+ "p 8" ".* = 8" \
+ "p 9" ".* = 9"
+
+
# Restore globals modified in this test...
if [info exists old_inputrc] {
set env(INPUTRC) $old_inputrc
} else {
unset env(INPUTRC)
}
+if [info exists old_gdbhistfile] {
+ set env(GDBHISTFILE) $old_gdbhistfile
+} else {
+ unset env(GDBHISTFILE)
+}
+if [info exists old_histsize] {
+ set env(HISTSIZE) $old_histsize
+} else {
+ unset env(HISTSIZE)
+}
set timeout $oldtimeout1
return 0
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp
index 5d9419ed298..a899e360111 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.base/selftest.exp
@@ -115,6 +115,10 @@ proc do_steps_and_nexts {} {
set description "next over init_malloc and everything it calls"
set command "next"
}
+ -re ".*lim_at_start.*$gdb_prompt $" {
+ set description "next over lim_at_start initialization"
+ set command "next"
+ }
-re ".*count . 0x3.*$gdb_prompt $" {
set description "next over conditional stack alignment code 1"
set command "next"
diff --git a/gdb/testsuite/gdb.base/shreloc.c b/gdb/testsuite/gdb.base/shreloc.c
new file mode 100644
index 00000000000..6867362bf0a
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc.c
@@ -0,0 +1,18 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define ATTRIBUTES __attribute((__dllimport__))
+#else
+# define ATTRIBUTES
+#endif
+
+extern ATTRIBUTES void fn_1 (int);
+extern ATTRIBUTES void fn_2 (int);
+extern ATTRIBUTES int extern_var_1;
+extern ATTRIBUTES int extern_var_2;
+
+int main ()
+{
+ fn_1 (extern_var_1);
+ fn_2 (extern_var_2);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
new file mode 100644
index 00000000000..ac48774676f
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -0,0 +1,257 @@
+# Copyright (C) 2003 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 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.
+#
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# Tests for shared object file relocation. If two shared objects have
+# the same load address (actually, overlapping load spaces), one of
+# them gets relocated at load-time. Check that gdb gets the right
+# values for the debugging and minimal symbols.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# This file uses shreloc.c, shreloc1.c and shreloc2.c
+#
+
+set prms_id 0
+set bug_id 0
+
+set workdir ${objdir}/${subdir}
+
+foreach module [list "shreloc" "shreloc1" "shreloc2"] {
+ if {[gdb_compile "${srcdir}/${subdir}/${module}.c" "${workdir}/${module}.o" object {debug}] != ""} {
+ untested "Couldn't compile ${module}.c"
+ return -1
+ }
+}
+
+set additional_flags "additional_flags=-shared"
+
+if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } {
+ set additional_flags "${additional_flags} -Wl,--image-base,0x04000000"
+}
+
+foreach module [list "shreloc1" "shreloc2"] {
+ if {[gdb_compile "${workdir}/${module}.o" "${workdir}/${module}.dll" executable [list debug $additional_flags]] != ""} {
+ untested "Couldn't link ${module}.dll"
+ return -1
+ }
+}
+
+if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable debug] != ""} {
+ untested "Couldn't link shreloc executable"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${workdir}/shreloc
+
+# Load up the shared objects
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+proc get_var_address { var } {
+ global gdb_prompt hex
+
+ send_gdb "print &${var}\n"
+ # Match output like:
+ # $1 = (int *) 0x0
+ # $5 = (int (*)()) 0
+ # $6 = (int (*)()) 0x24 <function_bar>
+ gdb_expect {
+ -re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $"
+ {
+ pass "get address of ${var}"
+ if { $expect_out(1,string) == "0" } {
+ return "0x0"
+ } else {
+ return $expect_out(1,string)
+ }
+ }
+ -re "${gdb_prompt} $"
+ { fail "get address of ${var} (unknown output)" }
+ timeout
+ { fail "get address of ${var} (timeout)" }
+ }
+ return ""
+}
+
+#
+# Check debugging symbol relocations
+#
+
+# Check extern function for relocation
+set fn_1_addr [get_var_address fn_1]
+set fn_2_addr [get_var_address fn_2]
+
+if { "${fn_1_addr}" == "${fn_2_addr}" } {
+ fail "relocated extern functions have different addresses"
+} else {
+ pass "relocated extern functions have different addresses"
+}
+
+# Check extern var for relocation
+set extern_var_1_addr [get_var_address extern_var_1]
+set extern_var_2_addr [get_var_address extern_var_2]
+
+if { "${extern_var_1_addr}" == "${extern_var_2_addr}" } {
+ fail "relocated extern variables have different addresses"
+} else {
+ pass "relocated extern variables have different addresses"
+}
+
+# Check static var for relocation
+set static_var_1_addr [get_var_address static_var_1]
+set static_var_2_addr [get_var_address static_var_2]
+
+if { "${static_var_1_addr}" == "${static_var_2_addr}" } {
+ fail "relocated static variables have different addresses"
+} else {
+ pass "relocated static variables have different addresses"
+}
+
+#
+# Check minimal symbol relocations
+#
+
+proc send_gdb_discard { command } {
+ # Send a command to gdb and discard output up to the next prompt
+
+ global gdb_prompt
+
+ send_gdb "${command}\n"
+
+ # Discard output
+ gdb_expect {
+ -re ".*\[\r\n]+${gdb_prompt} $" {
+ return 1
+ }
+ timeout {
+ fail "{$command} (timeout)"
+ return 0
+ }
+ }
+}
+
+proc get_msym_addrs { var msymfile } {
+ # Extract the list of values for symbols matching var in the
+ # minimal symbol output file
+
+ global gdb_prompt hex
+ set result ""
+
+ send_gdb "shell grep -E \" ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n"
+
+ while 1 {
+ gdb_expect {
+ -re "\[\[\]\[ 0-9\]+\] . (${hex}) ${var}(\[ \t\]+\[^\r\n\]*)?\[\r\n\]+" {
+ set result [concat $result $expect_out(1,string)]
+ }
+
+ -re "$gdb_prompt $" {
+ pass "get_msym_addrs ${var} (${result})"
+ return "${result}"
+ }
+
+ -re "\[^\r\n\]*\[\r\n\]+" {
+ # Skip
+ }
+
+ timeout {
+ fail "get_msym_addrs ${var} (timeout)"
+ return -1
+ }
+ }
+ }
+}
+
+proc check_same {var msymfile} {
+ # Check that the minimal symbol values matching var are the same
+
+ set len [llength [lsort -unique [get_msym_addrs "${var}" "${msymfile}"]]]
+
+ if { $len == 1 } {
+ return 1
+ } else {
+ return 0
+ }
+}
+
+proc check_different {var msymfile} {
+ # Check that the minimal symbol values matching var are different
+
+ set addr_list [lsort [get_msym_addrs "${var}" "${msymfile}"]]
+ set prev ""
+
+ if { [llength ${addr_list}] < 2 } {
+ return 0
+ }
+
+ foreach addr ${addr_list} {
+ if { ${prev} == ${addr} } {
+ return 0
+ }
+ set prev ${addr}
+ }
+
+ return 1
+}
+
+set msymfile "${workdir}/shreloc.txt"
+
+if [send_gdb_discard "maint print msymbols ${msymfile}"] {
+ if {[check_different "static_var_\[12\]" "${msymfile}"]} {
+ pass "(msymbol) relocated static vars have different addresses"
+ } else {
+ fail "(msymbol) relocated static vars have different addresses"
+ }
+
+ if {[check_different "extern_var_\[12\]" "${msymfile}"]} {
+ pass "(msymbol) relocated extern vars have different addresses"
+ } else {
+ fail "(msymbol) relocated extern vars have different addresses"
+ }
+
+ if {[check_different "fn_\[12\]" "${msymfile}"]} {
+ pass "(msymbol) relocated functions have different addresses"
+ } else {
+ fail "(msymbol) relocated functions have different addresses"
+ }
+}
+
+if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } {
+ #
+ # We know the names of some absolute symbols included in the
+ # portable-executable (DLL) format. Check that they didn't get
+ # relocated.
+ #
+ # A better approach would be include absolute symbols via the assembler.
+ #
+ if {[check_same "_minor_os_version__" "${msymfile}"]} {
+ pass "Absolute symbols not relocated"
+ } else {
+ fail "Absolute symbols not relocated"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/shreloc1.c b/gdb/testsuite/gdb.base/shreloc1.c
new file mode 100644
index 00000000000..b1bffde5c5c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc1.c
@@ -0,0 +1,10 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define ATTRIBUTES __attribute((__dllexport__))
+#else
+# define ATTRIBUTES
+#endif
+
+static int static_var_1;
+
+ATTRIBUTES void fn_1 (int unused) { }
+ATTRIBUTES int extern_var_1 = 0;
diff --git a/gdb/testsuite/gdb.base/shreloc2.c b/gdb/testsuite/gdb.base/shreloc2.c
new file mode 100644
index 00000000000..1459093eeeb
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc2.c
@@ -0,0 +1,10 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define ATTRIBUTES __attribute((__dllexport__))
+#else
+# define ATTRIBUTES
+#endif
+
+static int static_var_2;
+
+ATTRIBUTES void fn_2 (int unused) { }
+ATTRIBUTES int extern_var_2 = 0;
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index be974550e21..a07e3a8500a 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -195,6 +195,7 @@ proc signal_tests_1 {} {
# a SIGTRAP, but with different symptoms.
setup_xfail "vax-*-ultrix*"
setup_xfail "i*86-*-bsd*"
+ setup_xfail "i*86-*-freebsd*"
setup_xfail "i*86-pc-linux-gnu*"
setup_xfail "i*86-*-solaris2*"
send_gdb "continue\n"
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 0a6138b3afa..a039ca28add 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -775,64 +775,73 @@ check_event (ptid_t ptid)
td_thrinfo_t ti;
td_err_e err;
CORE_ADDR stop_pc;
+ int loop = 0;
/* Bail out early if we're not at a thread event breakpoint. */
stop_pc = read_pc_pid (ptid) - DECR_PC_AFTER_BREAK;
if (stop_pc != td_create_bp_addr && stop_pc != td_death_bp_addr)
return;
- err = td_ta_event_getmsg_p (thread_agent, &msg);
- if (err != TD_OK)
+ /* If we are at a create breakpoint, we do not know what new lwp
+ was created and cannot specifically locate the event message for it.
+ We have to call td_ta_event_getmsg() to get
+ the latest message. Since we have no way of correlating whether
+ the event message we get back corresponds to our breakpoint, we must
+ loop and read all event messages, processing them appropriately.
+ This guarantees we will process the correct message before continuing
+ from the breakpoint.
+
+ Currently, death events are not enabled. If they are enabled,
+ the death event can use the td_thr_event_getmsg() interface to
+ get the message specifically for that lwp and avoid looping
+ below. */
+
+ loop = 1;
+
+ do
{
- if (err == TD_NOMSG)
- return;
+ err = td_ta_event_getmsg_p (thread_agent, &msg);
+ if (err != TD_OK)
+ {
+ if (err == TD_NOMSG)
+ return;
- error ("Cannot get thread event message: %s", thread_db_err_str (err));
- }
+ error ("Cannot get thread event message: %s",
+ thread_db_err_str (err));
+ }
- err = td_thr_get_info_p (msg.th_p, &ti);
- if (err != TD_OK)
- error ("check_event: cannot get thread info: %s",
- thread_db_err_str (err));
+ err = td_thr_get_info_p (msg.th_p, &ti);
+ if (err != TD_OK)
+ error ("Cannot get thread info: %s", thread_db_err_str (err));
- ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
+ ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
- switch (msg.event)
- {
- case TD_CREATE:
-#if 0
- /* FIXME: kettenis/2000-08-26: Since we use td_ta_event_getmsg,
- there is no guarantee that the breakpoint will match the
- event. Should we use td_thr_event_getmsg instead? */
+ switch (msg.event)
+ {
+ case TD_CREATE:
- if (stop_pc != td_create_bp_addr)
- error ("Thread creation event doesn't match breakpoint.");
-#endif
+ /* We may already know about this thread, for instance when the
+ user has issued the `info threads' command before the SIGTRAP
+ for hitting the thread creation breakpoint was reported. */
+ if (!in_thread_list (ptid))
+ attach_thread (ptid, msg.th_p, &ti, 1);
- /* We may already know about this thread, for instance when the
- user has issued the `info threads' command before the SIGTRAP
- for hitting the thread creation breakpoint was reported. */
- if (!in_thread_list (ptid))
- attach_thread (ptid, msg.th_p, &ti, 1);
- return;
+ break;
- case TD_DEATH:
-#if 0
- /* FIXME: See TD_CREATE. */
+ case TD_DEATH:
- if (stop_pc != td_death_bp_addr)
- error ("Thread death event doesn't match breakpoint.");
-#endif
+ if (!in_thread_list (ptid))
+ error ("Spurious thread death event.");
- if (!in_thread_list (ptid))
- error ("Spurious thread death event.");
+ detach_thread (ptid, 1);
- detach_thread (ptid, 1);
- return;
+ break;
- default:
- error ("Spurious thread event.");
+ default:
+ error ("Spurious thread event.");
+ }
}
+ while (loop);
}
static ptid_t
@@ -1011,6 +1020,18 @@ thread_db_mourn_inferior (void)
proc_handle.pid = 0;
target_beneath->to_mourn_inferior ();
+
+ /* Detach thread_db target ops if not dealing with a statically
+ linked threaded program. This allows a corefile to be debugged
+ after finishing debugging of a threaded program. At present,
+ debugging a statically-linked threaded program is broken, but
+ the check is added below in the event that it is fixed in the
+ future. */
+ if (!keep_thread_db)
+ {
+ unpush_target (&thread_db_ops);
+ using_thread_db = 0;
+ }
}
static int
diff --git a/gdb/top.c b/gdb/top.c
index fea71dfd87f..3efebecb3ec 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -171,6 +171,11 @@ int target_executing = 0;
/* Level of control structure. */
static int control_level;
+/* Sbrk location on entry to main. Used for statistics only. */
+#ifdef HAVE_SBRK
+char *lim_at_start;
+#endif
+
/* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT. */
#ifndef STOP_SIGNAL
@@ -485,7 +490,7 @@ struct catch_errors_args
void *func_args;
};
-int
+static int
do_catch_errors (struct ui_out *uiout, void *data)
{
struct catch_errors_args *args = data;
@@ -782,10 +787,8 @@ command_loop (void)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
-
- space_at_cmd_start = (long) (lim - (char *) &environ);
+ space_at_cmd_start = lim - lim_at_start;
#endif
}
@@ -805,9 +808,8 @@ command_loop (void)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
+ long space_now = lim - lim_at_start;
long space_diff = space_now - space_at_cmd_start;
printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
@@ -1059,7 +1061,7 @@ static int operate_saved_history = -1;
/* This is put on the appropriate hook and helps operate-and-get-next
do its work. */
-void
+static void
gdb_rl_operate_and_get_next_completion (void)
{
int delta = where_history () - operate_saved_history;
diff --git a/gdb/top.h b/gdb/top.h
index ca0b3d13dc6..50361dc07ab 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -70,5 +70,16 @@ extern char *source_error;
extern char *source_pre_error;
extern int history_expansion_p;
extern int server_command;
+extern char *lim_at_start;
+
+extern void show_commands (char *args, int from_tty);
+
+extern void set_history (char *, int);
+
+extern void show_history (char *, int);
+
+extern void set_verbose (char *, int, struct cmd_list_element *);
+
+extern void do_restore_instream_cleanup (void *stream);
#endif
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 17ee07c898d..3b1cfd54424 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -38,6 +38,7 @@
#include "completer.h"
#include "gdb-events.h"
#include "block.h"
+#include "dictionary.h"
#include "ax.h"
#include "ax-gdb.h"
@@ -1289,13 +1290,14 @@ add_local_symbols (struct collection_list *collect, CORE_ADDR pc,
{
struct symbol *sym;
struct block *block;
- int i, count = 0;
+ struct dict_iterator iter;
+ int count = 0;
block = block_for_pc (pc);
while (block != 0)
{
QUIT; /* allow user to bail out with ^C */
- ALL_BLOCK_SYMBOLS (block, i, sym)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
switch (SYMBOL_CLASS (sym))
{
@@ -2333,7 +2335,8 @@ scope_info (char *args, int from_tty)
struct minimal_symbol *msym;
struct block *block;
char **canonical, *symname, *save_args = args;
- int i, j, count = 0;
+ struct dict_iterator iter;
+ int j, count = 0;
if (args == 0 || *args == 0)
error ("requires an argument (function, line or *addr) to define a scope");
@@ -2349,7 +2352,7 @@ scope_info (char *args, int from_tty)
while (block != 0)
{
QUIT; /* allow user to bail out with ^C */
- ALL_BLOCK_SYMBOLS (block, i, sym)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
QUIT; /* allow user to bail out with ^C */
if (count == 0)
diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c
new file mode 100644
index 00000000000..92e6f83eecb
--- /dev/null
+++ b/gdb/trad-frame.c
@@ -0,0 +1,96 @@
+/* Traditional frame unwind support, for GDB the GNU Debugger.
+
+ Copyright 2003 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 "trad-frame.h"
+#include "regcache.h"
+
+/* A traditional frame is unwound by analysing the function prologue
+ and using the information gathered to track registers. For
+ non-optimized frames, the technique is reliable (just need to check
+ for all potential instruction sequences). */
+
+struct trad_frame_saved_reg *
+trad_frame_alloc_saved_regs (struct frame_info *next_frame)
+{
+ int regnum;
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ struct trad_frame_saved_reg *this_saved_regs
+ = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg);
+ for (regnum = 0; regnum < numregs; regnum++)
+ this_saved_regs[regnum].realnum = regnum;
+ return this_saved_regs;
+}
+
+void
+trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, LONGEST val)
+{
+ /* Make the REALNUM invalid, indicating that the ADDR contains the
+ register's value. */
+ this_saved_regs[regnum].realnum = -1;
+ this_saved_regs[regnum].addr = val;
+}
+
+void
+trad_frame_prev_register (struct frame_info *next_frame,
+ struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ if (this_saved_regs[regnum].realnum >= 0
+ && this_saved_regs[regnum].addr != 0)
+ {
+ /* The register was saved in memory. */
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = this_saved_regs[regnum].addr;
+ *realnump = -1;
+ if (bufferp != NULL)
+ {
+ /* Read the value in from memory. */
+ get_frame_memory (next_frame, this_saved_regs[regnum].addr, bufferp,
+ register_size (gdbarch, regnum));
+ }
+ }
+ else if (this_saved_regs[regnum].realnum >= 0
+ && this_saved_regs[regnum].addr == 0)
+ {
+ /* As the next frame to return the value of the register. */
+ frame_register_unwind (next_frame, this_saved_regs[regnum].realnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
+ }
+ else
+ {
+ /* The register's value is available. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_unsigned_integer (bufferp, register_size (gdbarch, regnum),
+ this_saved_regs[regnum].addr);
+ }
+}
diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h
new file mode 100644
index 00000000000..4d753153b2e
--- /dev/null
+++ b/gdb/trad-frame.h
@@ -0,0 +1,68 @@
+/* Traditional frame unwind support, for GDB the GNU Debugger.
+
+ Copyright 2003 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. */
+
+#ifndef TRAD_FRAME_H
+#define TRAD_FRAME_H
+
+/* A traditional saved regs table, indexed by REGNUM, encoding where
+ the value of REGNUM for the previous frame can be found in this
+ frame.
+
+ The table is initialized with an identity encoding (ADDR == 0,
+ REALNUM == REGNUM) indicating that the value of REGNUM in the
+ previous frame can be found in register REGNUM (== REALNUM) in this
+ frame.
+
+ The initial encoding can then be changed:
+
+ Modify ADDR (REALNUM >= 0, ADDR != 0) to indicate that the value of
+ register REGNUM in the previous frame can be found in memory at
+ ADDR in this frame.
+
+ Modify REALNUM (REALNUM >= 0, ADDR == 0) to indicate that the value
+ of register REGNUM in the previous frame is found in register
+ REALNUM in this frame.
+
+ Call trad_frame_register_value (REALNUM < 0) to indicate that the
+ value of register REGNUM in the previous frame is found in ADDR. */
+
+struct trad_frame_saved_reg
+{
+ LONGEST addr; /* A CORE_ADDR fits in a longest. */
+ int realnum;
+};
+
+/* Convenience function, encode REGNUM's location in the trad-frame. */
+void trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, LONGEST val);
+
+/* Return a freshly allocated (and initialized) trad_frame array. */
+struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *next_frame);
+
+/* Given the trad_frame info, return the location of the specified
+ register. */
+void trad_frame_prev_register (struct frame_info *next_frame,
+ struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp);
+
+#endif
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index f44f9aa9a48..79a3353e3dc 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,14 @@
+2003-06-12 Andreas Schwab <schwab@suse.de>
+
+ * tuiSource.c (tuiVerticalSourceScroll): Use get_frame_pc.
+ * tuiSourceWin.c (tuiHorizontalSourceScroll): Likewise.
+ * tuiStack.c (tui_get_function_from_frame): Likewise.
+ (tuiShowFrameInfo): Likewise.
+ * tuiWin.c (_makeVisibleWithNewHeight): Likewise.
+ * tui-hooks.c (tui_selected_frame_level_changed_hook): Likewise.
+ * tuiDisassem.c (tuiVerticalDisassemScroll): Likewise.
+ Include "disasm.h".
+
2003-05-08 Andrew Cagney <cagney@redhat.com>
* tuiRegs.c: Use MAX_REGISTER_SIZE instead of
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index db6c3f666bf..569ab078cf1 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -250,7 +250,7 @@ tui_selected_frame_level_changed_hook (int level)
{
struct symtab *s;
- s = find_pc_symtab (fi->pc);
+ s = find_pc_symtab (get_frame_pc (fi));
/* elz: this if here fixes the problem with the pc not being displayed
in the tui asm layout, with no debug symbols. The value of s
would be 0 here, and select_source_symtab would abort the
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c
index 0ddf32c1b99..a8668c4132d 100644
--- a/gdb/tui/tuiDisassem.c
+++ b/gdb/tui/tuiDisassem.c
@@ -45,6 +45,7 @@
#include "frame.h"
#include "value.h"
#include "source.h"
+#include "disasm.h"
#include "tui.h"
#include "tuiData.h"
@@ -408,7 +409,7 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
content = (TuiWinContent) disassemWin->generic.content;
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c
index ceccd64532e..68e7d9978d2 100644
--- a/gdb/tui/tuiSource.c
+++ b/gdb/tui/tuiSource.c
@@ -340,7 +340,7 @@ tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c
index ae844ce7029..cd52333c109 100644
--- a/gdb/tui/tuiSourceWin.c
+++ b/gdb/tui/tuiSourceWin.c
@@ -355,7 +355,7 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index 69a6b6c662f..dca06189d80 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -233,7 +233,7 @@ tui_get_function_from_frame (struct frame_info *fi)
struct ui_file *stream = tui_sfileopen (256);
char *p;
- print_address_symbolic (fi->pc, stream, demangle, "");
+ print_address_symbolic (get_frame_pc (fi), stream, demangle, "");
p = tui_file_get_strbuf (stream);
/* Use simple heuristics to isolate the function name. The symbol can
@@ -356,7 +356,7 @@ tuiShowFrameInfo (struct frame_info *fi)
tui_set_locator_info (sal.symtab == 0 ? "??" : sal.symtab->filename,
tui_get_function_from_frame (fi),
sal.line,
- fi->pc);
+ get_frame_pc (fi));
tuiShowLocatorContent ();
startLine = 0;
for (i = 0; i < (sourceWindows ())->count; i++)
@@ -374,10 +374,11 @@ tuiShowFrameInfo (struct frame_info *fi)
}
else
{
- if (find_pc_partial_function (fi->pc, (char **) NULL, &low, (CORE_ADDR) NULL) == 0)
+ if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
+ &low, (CORE_ADDR) NULL) == 0)
error ("No function contains program counter for selected frame.\n");
else
- low = tuiGetLowDisassemblyAddress (low, fi->pc);
+ low = tuiGetLowDisassemblyAddress (low, get_frame_pc (fi));
}
if (winInfo == srcWin)
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 9ad82f57a65..268562efa33 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -1406,7 +1406,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
if (winInfo->generic.type == SRC_WIN)
line.lineNo = cursal.line;
else
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 22a1eab9707..a9a74473845 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -33,7 +33,7 @@
#include "target.h"
#include "language.h"
#include "cp-abi.h"
-
+#include "typeprint.h"
#include "gdb_string.h"
#include <errno.h>
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index 3af6d2cc3b2..6ad5414b19f 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -25,9 +25,12 @@
#include "ui-file.h"
#include "gdb_string.h"
+#include <errno.h>
+
static ui_file_isatty_ftype null_file_isatty;
static ui_file_write_ftype null_file_write;
static ui_file_fputs_ftype null_file_fputs;
+static ui_file_read_ftype null_file_read;
static ui_file_flush_ftype null_file_flush;
static ui_file_delete_ftype null_file_delete;
static ui_file_rewind_ftype null_file_rewind;
@@ -39,6 +42,7 @@ struct ui_file
ui_file_flush_ftype *to_flush;
ui_file_write_ftype *to_write;
ui_file_fputs_ftype *to_fputs;
+ ui_file_read_ftype *to_read;
ui_file_delete_ftype *to_delete;
ui_file_isatty_ftype *to_isatty;
ui_file_rewind_ftype *to_rewind;
@@ -56,6 +60,7 @@ ui_file_new (void)
set_ui_file_flush (file, null_file_flush);
set_ui_file_write (file, null_file_write);
set_ui_file_fputs (file, null_file_fputs);
+ set_ui_file_read (file, null_file_read);
set_ui_file_isatty (file, null_file_isatty);
set_ui_file_rewind (file, null_file_rewind);
set_ui_file_put (file, null_file_put);
@@ -123,6 +128,15 @@ null_file_write (struct ui_file *file,
}
}
+static long
+null_file_read (struct ui_file *file,
+ char *buf,
+ long sizeof_buf)
+{
+ errno = EBADF;
+ return 0;
+}
+
static void
null_file_fputs (const char *buf, struct ui_file *file)
{
@@ -186,6 +200,12 @@ ui_file_write (struct ui_file *file,
file->to_write (file, buf, length_buf);
}
+long
+ui_file_read (struct ui_file *file, char *buf, long length_buf)
+{
+ return file->to_read (file, buf, length_buf);
+}
+
void
fputs_unfiltered (const char *buf, struct ui_file *file)
{
@@ -224,6 +244,12 @@ set_ui_file_write (struct ui_file *file,
}
void
+set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read)
+{
+ file->to_read = read;
+}
+
+void
set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs)
{
file->to_fputs = fputs;
@@ -383,6 +409,7 @@ mem_file_write (struct ui_file *file,
static ui_file_write_ftype stdio_file_write;
static ui_file_fputs_ftype stdio_file_fputs;
+static ui_file_read_ftype stdio_file_read;
static ui_file_isatty_ftype stdio_file_isatty;
static ui_file_delete_ftype stdio_file_delete;
static struct ui_file *stdio_file_new (FILE * file, int close_p);
@@ -409,6 +436,7 @@ stdio_file_new (FILE *file, int close_p)
set_ui_file_flush (ui_file, stdio_file_flush);
set_ui_file_write (ui_file, stdio_file_write);
set_ui_file_fputs (ui_file, stdio_file_fputs);
+ set_ui_file_read (ui_file, stdio_file_read);
set_ui_file_isatty (ui_file, stdio_file_isatty);
return ui_file;
}
@@ -437,6 +465,16 @@ stdio_file_flush (struct ui_file *file)
fflush (stdio->file);
}
+static long
+stdio_file_read (struct ui_file *file, char *buf, long length_buf)
+{
+ struct stdio_file *stdio = ui_file_data (file);
+ if (stdio->magic != &stdio_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_read: bad magic number");
+ return read (fileno (stdio->file), buf, length_buf);
+}
+
static void
stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
{
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
index 989c343dfa0..8b28d1a4139 100644
--- a/gdb/ui-file.h
+++ b/gdb/ui-file.h
@@ -41,6 +41,9 @@ extern void set_ui_file_write (struct ui_file *stream, ui_file_write_ftype *fput
typedef void (ui_file_fputs_ftype) (const char *, struct ui_file * stream);
extern void set_ui_file_fputs (struct ui_file *stream, ui_file_fputs_ftype * fputs);
+typedef long (ui_file_read_ftype) (struct ui_file * stream, char *buf, long length_buf);
+extern void set_ui_file_read (struct ui_file *stream, ui_file_read_ftype *fread);
+
typedef int (ui_file_isatty_ftype) (struct ui_file * stream);
extern void set_ui_file_isatty (struct ui_file *stream, ui_file_isatty_ftype * isatty);
@@ -78,6 +81,8 @@ extern char *ui_file_xstrdup (struct ui_file *file, long *length);
+extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
+
/* Create/open a memory based file. Can be used as a scratch buffer
for collecting output. */
extern struct ui_file *mem_fileopen (void);
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index ed32da3ded8..71e6d6ac070 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -437,15 +437,6 @@ make_cleanup_ui_out_end (struct ui_out *uiout,
}
struct cleanup *
-make_cleanup_ui_out_begin_end (struct ui_out *uiout,
- enum ui_out_type type,
- const char *id)
-{
- ui_out_begin (uiout, type, id);
- return make_cleanup_ui_out_end (uiout, type);
-}
-
-struct cleanup *
make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
const char *id)
{
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 0f896a49fb3..19bdec398e0 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -797,7 +797,7 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
when trying to get the value of caller-saves registers for an inner
frame. */
-CORE_ADDR
+static CORE_ADDR
v850_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = get_next_frame (fi))
@@ -819,7 +819,7 @@ v850_find_callers_reg (struct frame_info *fi, int regnum)
just return the stack pointer that was in use at the time the
function call was made. */
-CORE_ADDR
+static CORE_ADDR
v850_frame_chain (struct frame_info *fi)
{
struct prologue_info pi;
@@ -850,7 +850,7 @@ v850_frame_chain (struct frame_info *fi)
/* Function: skip_prologue
Return the address of the first code past the prologue of the function. */
-CORE_ADDR
+static CORE_ADDR
v850_skip_prologue (CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
@@ -880,7 +880,7 @@ v850_skip_prologue (CORE_ADDR pc)
This routine gets called when either the user uses the `return'
command, or the call dummy breakpoint gets hit. */
-void
+static void
v850_pop_frame (void)
{
struct frame_info *frame = get_current_frame ();
@@ -917,7 +917,7 @@ v850_pop_frame (void)
Stack space for the args has NOT been allocated: that job is up to us.
*/
-CORE_ADDR
+static CORE_ADDR
v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -973,7 +973,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
CORE_ADDR regval;
- regval = extract_address (val, v850_register_raw_size (argreg));
+ regval = extract_unsigned_integer (val, v850_register_raw_size (argreg));
write_register (argreg, regval);
len -= v850_register_raw_size (argreg);
@@ -997,7 +997,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
Set up the return address for the inferior function call.
Needed for targets where we don't actually execute a JSR/BSR instruction */
-CORE_ADDR
+static CORE_ADDR
v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (E_RP_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -1011,7 +1011,7 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
instead of RP, because that's where "caller" of the dummy-frame
will be found. */
-CORE_ADDR
+static CORE_ADDR
v850_frame_saved_pc (struct frame_info *fi)
{
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
@@ -1030,7 +1030,7 @@ v850_frame_saved_pc (struct frame_info *fi)
trap
*/
-void
+static void
v850_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
struct value **args, struct type *type, int gcc_p)
{
@@ -1068,8 +1068,8 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Aggregates and return values > 8 bytes are returned in memory,
pointed to by R6. */
return_buffer =
- extract_address (regbuf + REGISTER_BYTE (E_V0_REGNUM),
- REGISTER_RAW_SIZE (E_V0_REGNUM));
+ extract_unsigned_integer (regbuf + REGISTER_BYTE (E_V0_REGNUM),
+ REGISTER_RAW_SIZE (E_V0_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -1086,8 +1086,8 @@ v850_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
static CORE_ADDR
v850_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + v850_register_byte (E_V0_REGNUM),
- v850_register_raw_size (E_V0_REGNUM));
+ return extract_unsigned_integer (regbuf + v850_register_byte (E_V0_REGNUM),
+ v850_register_raw_size (E_V0_REGNUM));
}
static void
@@ -1231,12 +1231,12 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, v850_register_name);
set_gdbarch_deprecated_register_size (gdbarch, v850_reg_size);
set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
- set_gdbarch_register_byte (gdbarch, v850_register_byte);
- set_gdbarch_register_raw_size (gdbarch, v850_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, v850_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, v850_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, v850_reg_size);
- set_gdbarch_register_virtual_size (gdbarch, v850_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, v850_register_raw_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, v850_reg_size);
- set_gdbarch_register_virtual_type (gdbarch, v850_reg_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, v850_reg_virtual_type);
set_gdbarch_deprecated_target_read_fp (gdbarch, v850_target_read_fp);
@@ -1262,8 +1262,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/*
* Call Dummies
@@ -1288,11 +1286,13 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
+extern initialize_file_ftype _initialize_v850_tdep; /* -Wmissing-prototypes */
+
void
_initialize_v850_tdep (void)
{
diff --git a/gdb/valops.c b/gdb/valops.c
index 3e8589481f7..276763086d9 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -35,6 +35,8 @@
#include "cp-abi.h"
#include "block.h"
#include "infcall.h"
+#include "dictionary.h"
+#include "cp-support.h"
#include <errno.h>
#include "gdb_string.h"
@@ -605,10 +607,7 @@ value_assign (struct value *toval, struct value *fromval)
}
else
{
- for (frame = get_current_frame ();
- frame && get_frame_base (frame) != VALUE_FRAME (toval);
- frame = get_prev_frame (frame))
- ;
+ frame = frame_find_by_id (VALUE_FRAME_ID (toval));
value_reg = VALUE_FRAME_REGNUM (toval);
}
@@ -2478,7 +2477,6 @@ value_of_local (const char *name, int complain)
{
struct symbol *func, *sym;
struct block *b;
- int i;
struct value * ret;
if (deprecated_selected_frame == 0)
@@ -2499,8 +2497,7 @@ value_of_local (const char *name, int complain)
}
b = SYMBOL_BLOCK_VALUE (func);
- i = BLOCK_NSYMS (b);
- if (i <= 0)
+ if (dict_empty (BLOCK_DICT (b)))
{
if (complain)
error ("no args, no `%s'", name);
diff --git a/gdb/value.h b/gdb/value.h
index 254c82f1cb2..d50626edf17 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -25,6 +25,7 @@
#define VALUE_H 1
#include "doublest.h"
+#include "frame.h" /* For struct frame_id. */
struct block;
struct expression;
@@ -77,12 +78,12 @@ struct value
For BITS_BIG_ENDIAN=1 targets, it is the position of the MSB. */
int bitpos;
- /* Frame value is relative to. In practice, this address is only
- used if the value is stored in several registers in other than
- the current frame, and these registers have not all been saved
- at the same place in memory. This will be described in the
- lval enum above as "lval_reg_frame_relative". */
- CORE_ADDR frame_addr;
+ /* Frame value is relative to. In practice, this ID is only used if
+ the value is stored in several registers in other than the
+ current frame, and these registers have not all been saved at the
+ same place in memory. This will be described in the lval enum
+ above as "lval_reg_frame_relative". */
+ struct frame_id frame_id;
/* Type of the value. */
struct type *type;
@@ -216,7 +217,7 @@ extern int value_fetch_lazy (struct value *val);
#define VALUE_ADDRESS(val) (val)->location.address
#define VALUE_INTERNALVAR(val) (val)->location.internalvar
#define VALUE_FRAME_REGNUM(val) ((val)->location.regnum)
-#define VALUE_FRAME(val) ((val)->frame_addr)
+#define VALUE_FRAME_ID(val) ((val)->frame_id)
#define VALUE_OFFSET(val) (val)->offset
#define VALUE_BITSIZE(val) (val)->bitsize
#define VALUE_BITPOS(val) (val)->bitpos
diff --git a/gdb/values.c b/gdb/values.c
index db667669ff5..42395c886e2 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -90,7 +90,7 @@ allocate_value (struct type *type)
VALUE_ENCLOSING_TYPE (val) = type;
VALUE_LVAL (val) = not_lval;
VALUE_ADDRESS (val) = 0;
- VALUE_FRAME (val) = 0;
+ VALUE_FRAME_ID (val) = null_frame_id;
VALUE_OFFSET (val) = 0;
VALUE_BITPOS (val) = 0;
VALUE_BITSIZE (val) = 0;
@@ -222,7 +222,7 @@ value_copy (struct value *arg)
VALUE_OFFSET (val) = VALUE_OFFSET (arg);
VALUE_BITPOS (val) = VALUE_BITPOS (arg);
VALUE_BITSIZE (val) = VALUE_BITSIZE (arg);
- VALUE_FRAME (val) = VALUE_FRAME (arg);
+ VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
VALUE_REGNO (val) = VALUE_REGNO (arg);
VALUE_LAZY (val) = VALUE_LAZY (arg);
VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg);
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 814fedd8543..1b6f8cab9c3 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -34,10 +34,6 @@
#include "vax-tdep.h"
static gdbarch_register_name_ftype vax_register_name;
-static gdbarch_register_byte_ftype vax_register_byte;
-static gdbarch_register_raw_size_ftype vax_register_raw_size;
-static gdbarch_register_virtual_size_ftype vax_register_virtual_size;
-static gdbarch_register_virtual_type_ftype vax_register_virtual_type;
static gdbarch_skip_prologue_ftype vax_skip_prologue;
static gdbarch_frame_num_args_ftype vax_frame_num_args;
@@ -162,40 +158,24 @@ vax_frame_saved_pc (struct frame_info *frame)
return (read_memory_integer (get_frame_base (frame) + 16, 4));
}
-CORE_ADDR
-vax_frame_args_address_correct (struct frame_info *frame)
-{
- /* Cannot find the AP register value directly from the FP value. Must
- find it saved in the frame called by this one, or in the AP register
- for the innermost frame. However, there is no way to tell the
- difference between the innermost frame and a frame for which we
- just don't know the frame that it called (e.g. "info frame 0x7ffec789").
- For the sake of argument, suppose that the stack is somewhat trashed
- (which is one reason that "info frame" exists). So, return 0 (indicating
- we don't know the address of the arglist) if we don't know what frame
- this frame calls. */
- if (get_next_frame (frame))
- return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
-
- return (0);
-}
-
static CORE_ADDR
vax_frame_args_address (struct frame_info *frame)
{
- /* In most of GDB, getting the args address is too important to
- just say "I don't know". This is sometimes wrong for functions
- that aren't on top of the stack, but c'est la vie. */
+ /* In most of GDB, getting the args address is too important to just
+ say "I don't know". This is sometimes wrong for functions that
+ aren't on top of the stack, but c'est la vie. */
if (get_next_frame (frame))
return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
-
- return (read_register (VAX_AP_REGNUM));
-}
-
-static CORE_ADDR
-vax_frame_locals_address (struct frame_info *frame)
-{
- return (get_frame_base (frame));
+ /* Cannot find the AP register value directly from the FP value.
+ Must find it saved in the frame called by this one, or in the AP
+ register for the innermost frame. However, there is no way to
+ tell the difference between the innermost frame and a frame for
+ which we just don't know the frame that it called (e.g. "info
+ frame 0x7ffec789"). For the sake of argument, suppose that the
+ stack is somewhat trashed (which is one reason that "info frame"
+ exists). So, return 0 (indicating we don't know the address of
+ the arglist) if we don't know what frame this frame calls. */
+ return 0;
}
static int
@@ -300,7 +280,8 @@ vax_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR
vax_extract_struct_value_address (char *regbuf)
{
- return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0),
+ REGISTER_RAW_SIZE (0)));
}
static const unsigned char *
@@ -380,13 +361,13 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, vax_register_name);
set_gdbarch_deprecated_register_size (gdbarch, VAX_REGISTER_SIZE);
set_gdbarch_deprecated_register_bytes (gdbarch, VAX_REGISTER_BYTES);
- set_gdbarch_register_byte (gdbarch, vax_register_byte);
- set_gdbarch_register_raw_size (gdbarch, vax_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, vax_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, vax_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
- set_gdbarch_register_virtual_size (gdbarch, vax_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, vax_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
VAX_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, vax_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, vax_register_virtual_type);
/* Frame and stack info */
set_gdbarch_skip_prologue (gdbarch, vax_skip_prologue);
@@ -400,7 +381,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);
set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, vax_frame_locals_address);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
@@ -434,7 +414,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -444,6 +424,8 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return (gdbarch);
}
+extern initialize_file_ftype _initialize_vax_tdep; /* -Wmissing-prototypes */
+
void
_initialize_vax_tdep (void)
{
diff --git a/gdb/version.in b/gdb/version.in
index 4c17a67d46c..d7456ac1c6c 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-05-28-cvs
+2003-06-13-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 72e8c3f4c73..c2227cd29fe 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -842,14 +842,17 @@ solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
else
{
/* Fallback on handling just the .text section. */
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs;
+ struct cleanup *my_cleanups;
- memset (&section_addrs, 0, sizeof (section_addrs));
- section_addrs.other[0].name = ".text";
- section_addrs.other[0].addr = load_addr;
+ section_addrs = alloc_section_addr_info (1);
+ my_cleanups = make_cleanup (xfree, section_addrs);
+ section_addrs->other[0].name = ".text";
+ section_addrs->other[0].addr = load_addr;
result = safe_symbol_file_add (name, from_tty, &section_addrs,
0, OBJF_SHARED);
+ do_cleanups (my_cleanups);
}
return result;
diff --git a/gdb/wince.c b/gdb/wince.c
index 322564e015e..41541dc11cb 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -56,6 +56,9 @@
#include "wince-stub.h"
#include <time.h>
#include "regcache.h"
+#ifdef MIPS
+#include "mips-tdep.h"
+#endif
/* The ui's event loop. */
extern int (*ui_loop_hook) (int signo);
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 044236ce320..4a989ce07a7 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -25,20 +25,30 @@
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
+
#include "gdb_assert.h"
#include "gdb_string.h"
-#include "x86-64-tdep.h"
-
#include <sys/ptrace.h>
#include <sys/debugreg.h>
#include <sys/syscall.h>
#include <sys/procfs.h>
#include <sys/reg.h>
+/* Prototypes for supply_gregset etc. */
+#include "gregset.h"
+
+#include "x86-64-tdep.h"
+
+/* The register sets used in GNU/Linux ELF core-dumps are identical to
+ the register sets used by `ptrace'. The corresponding types are
+ `elf_gregset_t' for the general-purpose registers (with
+ `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
+ for the floating-point registers. */
+
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. */
-
-static int x86_64_regmap[] = {
+static int regmap[] =
+{
RAX, RBX, RCX, RDX,
RSI, RDI, RBP, RSP,
R8, R9, R10, R11,
@@ -47,85 +57,12 @@ static int x86_64_regmap[] = {
DS, ES, FS, GS
};
-static unsigned long
-x86_64_linux_dr_get (int regnum)
-{
- int tid;
- unsigned long value;
-
- /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
- multi-threaded processes here. For now, pretend there is just
- one thread. */
- tid = PIDGET (inferior_ptid);
-
- /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
- ptrace call fails breaks debugging remote targets. The correct
- way to fix this is to add the hardware breakpoint and watchpoint
- stuff to the target vectore. For now, just return zero if the
- ptrace call fails. */
- errno = 0;
- value = ptrace (PT_READ_U, tid,
- offsetof (struct user, u_debugreg[regnum]), 0);
- if (errno != 0)
-#if 0
- perror_with_name ("Couldn't read debug register");
-#else
- return 0;
-#endif
-
- return value;
-}
-
-static void
-x86_64_linux_dr_set (int regnum, unsigned long value)
-{
- int tid;
-
- /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
- multi-threaded processes here. For now, pretend there is just
- one thread. */
- tid = PIDGET (inferior_ptid);
-
- errno = 0;
- ptrace (PT_WRITE_U, tid, offsetof (struct user, u_debugreg[regnum]), value);
- if (errno != 0)
- perror_with_name ("Couldn't write debug register");
-}
-
-void
-x86_64_linux_dr_set_control (unsigned long control)
-{
- x86_64_linux_dr_set (DR_CONTROL, control);
-}
-
-void
-x86_64_linux_dr_set_addr (int regnum, CORE_ADDR addr)
-{
- gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
-
- x86_64_linux_dr_set (DR_FIRSTADDR + regnum, addr);
-}
-
-void
-x86_64_linux_dr_reset_addr (int regnum)
-{
- gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
-
- x86_64_linux_dr_set (DR_FIRSTADDR + regnum, 0L);
-}
-
-unsigned long
-x86_64_linux_dr_get_status (void)
-{
- return x86_64_linux_dr_get (DR_STATUS);
-}
-
-
-/* The register sets used in GNU/Linux ELF core-dumps are identical to
- the register sets used by `ptrace'. */
+/* Which ptrace request retrieves which registers?
+ These apply to the corresponding SET requests as well. */
#define GETREGS_SUPPLIES(regno) \
- (0 <= (regno) && (regno) < x86_64_num_gregs)
+ (0 <= (regno) && (regno) < X86_64_NUM_GREGS)
+
#define GETFPREGS_SUPPLIES(regno) \
(FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM)
@@ -137,13 +74,13 @@ x86_64_linux_dr_get_status (void)
in *GREGSETP. */
void
-supply_gregset (elf_gregset_t * gregsetp)
+supply_gregset (elf_gregset_t *gregsetp)
{
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < x86_64_num_gregs; i++)
- supply_register (i, (char *) (regp + x86_64_regmap[i]));
+ for (i = 0; i < X86_64_NUM_GREGS; i++)
+ supply_register (i, regp + regmap[i]);
}
/* Fill register REGNO (if it is a general-purpose register) in
@@ -151,14 +88,14 @@ supply_gregset (elf_gregset_t * gregsetp)
do this for all registers. */
void
-fill_gregset (elf_gregset_t * gregsetp, int regno)
+fill_gregset (elf_gregset_t *gregsetp, int regno)
{
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < x86_64_num_gregs; i++)
- if ((regno == -1 || regno == i))
- regcache_collect (i, (char *) (regp + x86_64_regmap[i]));
+ for (i = 0; i < X86_64_NUM_GREGS; i++)
+ if (regno == -1 || regno == i)
+ regcache_collect (i, regp + regmap[i]);
}
/* Fetch all general-purpose registers from process/thread TID and
@@ -195,73 +132,23 @@ store_regs (int tid, int regno)
/* Transfering floating-point registers between GDB, inferiors and cores. */
-static void *
-x86_64_fxsave_offset (elf_fpregset_t * fxsave, int regnum)
-{
- const char *reg_name;
- int reg_index;
-
- gdb_assert (x86_64_num_gregs - 1 < regnum && regnum < x86_64_num_regs);
-
- reg_name = x86_64_register_name (regnum);
-
- if (reg_name[0] == 's' && reg_name[1] == 't')
- {
- reg_index = reg_name[2] - '0';
- return &fxsave->st_space[reg_index * 2];
- }
-
- if (reg_name[0] == 'x' && reg_name[1] == 'm' && reg_name[2] == 'm')
- {
- reg_index = reg_name[3] - '0';
- return &fxsave->xmm_space[reg_index * 4];
- }
-
- if (strcmp (reg_name, "mxcsr") == 0)
- return &fxsave->mxcsr;
-
- return NULL;
-}
-
/* Fill GDB's register array with the floating-point and SSE register
- values in *FXSAVE. This function masks off any of the reserved
- bits in *FXSAVE. */
+ values in *FPREGSETP. */
void
-supply_fpregset (elf_fpregset_t * fxsave)
+supply_fpregset (elf_fpregset_t *fpregsetp)
{
- int i, reg_st0, reg_mxcsr;
-
- reg_st0 = x86_64_register_number ("st0");
- reg_mxcsr = x86_64_register_number ("mxcsr");
-
- gdb_assert (reg_st0 > 0 && reg_mxcsr > reg_st0);
-
- for (i = reg_st0; i <= reg_mxcsr; i++)
- supply_register (i, x86_64_fxsave_offset (fxsave, i));
+ x86_64_supply_fxsave ((char *) fpregsetp);
}
/* Fill register REGNUM (if it is a floating-point or SSE register) in
- *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
- this for all registers. This function doesn't touch any of the
- reserved bits in *FXSAVE. */
+ *FPREGSETP with the value in GDB's register array. If REGNUM is
+ -1, do this for all registers. */
void
-fill_fpregset (elf_fpregset_t * fxsave, int regnum)
+fill_fpregset (elf_fpregset_t *fpregsetp, int regnum)
{
- int i, last_regnum = MXCSR_REGNUM;
- void *ptr;
-
- if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
- last_regnum = FOP_REGNUM;
-
- for (i = FP0_REGNUM; i <= last_regnum; i++)
- if (regnum == -1 || regnum == i)
- {
- ptr = x86_64_fxsave_offset (fxsave, i);
- if (ptr)
- regcache_collect (i, ptr);
- }
+ x86_64_fill_fxsave ((char *) fpregsetp, regnum);
}
/* Fetch all floating-point registers from process/thread TID and store
@@ -308,8 +195,9 @@ fetch_inferior_registers (int regno)
int tid;
/* GNU/Linux LWP ID's are process ID's. */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
if (regno == -1)
{
@@ -335,16 +223,18 @@ fetch_inferior_registers (int regno)
}
/* Store register REGNO back into the child process. If REGNO is -1,
- do this for all registers (including the floating point and SSE
+ do this for all registers (including the floating-point and SSE
registers). */
+
void
store_inferior_registers (int regno)
{
int tid;
/* GNU/Linux LWP ID's are process ID's. */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
if (regno == -1)
{
@@ -370,123 +260,75 @@ store_inferior_registers (int regno)
}
-static const unsigned char linux_syscall[] = { 0x0f, 0x05 };
-
-#define LINUX_SYSCALL_LEN (sizeof linux_syscall)
-
-/* The system call number is stored in the %rax register. */
-#define LINUX_SYSCALL_REGNUM 0 /* %rax */
+static unsigned long
+x86_64_linux_dr_get (int regnum)
+{
+ int tid;
+ unsigned long value;
-/* We are specifically interested in the sigreturn and rt_sigreturn
- system calls. */
+ /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
+ multi-threaded processes here. For now, pretend there is just
+ one thread. */
+ tid = PIDGET (inferior_ptid);
-#ifndef SYS_sigreturn
-#define SYS_sigreturn __NR_sigreturn
-#endif
-#ifndef SYS_rt_sigreturn
-#define SYS_rt_sigreturn __NR_rt_sigreturn
+ /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
+ ptrace call fails breaks debugging remote targets. The correct
+ way to fix this is to add the hardware breakpoint and watchpoint
+ stuff to the target vectore. For now, just return zero if the
+ ptrace call fails. */
+ errno = 0;
+ value = ptrace (PT_READ_U, tid,
+ offsetof (struct user, u_debugreg[regnum]), 0);
+ if (errno != 0)
+#if 0
+ perror_with_name ("Couldn't read debug register");
+#else
+ return 0;
#endif
-/* Offset to saved processor flags, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_EFLAGS_OFFSET (152)
-/* Offset to saved processor registers from <asm/ucontext.h> */
-#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
-
-/* Interpreting register set info found in core files. */
-/* Provide registers to GDB from a core file.
-
- CORE_REG_SECT points to an array of bytes, which are the contents
- of a `note' from a core file which BFD thinks might contain
- register contents. CORE_REG_SIZE is its size.
-
- WHICH says which register set corelow suspects this is:
- 0 --- the general-purpose register set, in elf_gregset_t format
- 2 --- the floating-point register set, in elf_fpregset_t format
-
- REG_ADDR isn't used on GNU/Linux. */
+ return value;
+}
static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
+x86_64_linux_dr_set (int regnum, unsigned long value)
{
- elf_gregset_t gregset;
- elf_fpregset_t fpregset;
- switch (which)
- {
- case 0:
- if (core_reg_size != sizeof (gregset))
- warning ("Wrong size gregset in core file.");
- else
- {
- memcpy (&gregset, core_reg_sect, sizeof (gregset));
- supply_gregset (&gregset);
- }
- break;
-
- case 2:
- if (core_reg_size != sizeof (fpregset))
- warning ("Wrong size fpregset in core file.");
- else
- {
- memcpy (&fpregset, core_reg_sect, sizeof (fpregset));
- supply_fpregset (&fpregset);
- }
- break;
-
- default:
- /* We've covered all the kinds of registers we know about here,
- so this must be something we wouldn't know what to do with
- anyway. Just ignore it. */
- break;
- }
-}
+ int tid;
-/* Register that we are able to handle GNU/Linux ELF core file formats. */
+ /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
+ multi-threaded processes here. For now, pretend there is just
+ one thread. */
+ tid = PIDGET (inferior_ptid);
-static struct core_fns linux_elf_core_fns = {
- bfd_target_elf_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
+ errno = 0;
+ ptrace (PT_WRITE_U, tid, offsetof (struct user, u_debugreg[regnum]), value);
+ if (errno != 0)
+ perror_with_name ("Couldn't write debug register");
+}
-#if !defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
+void
+x86_64_linux_dr_set_control (unsigned long control)
+{
+ x86_64_linux_dr_set (DR_CONTROL, control);
+}
-/* Return the address of register REGNUM. BLOCKEND is the value of
- u.u_ar0, which should point to the registers. */
-CORE_ADDR
-x86_64_register_u_addr (CORE_ADDR blockend, int regnum)
+void
+x86_64_linux_dr_set_addr (int regnum, CORE_ADDR addr)
{
- struct user u;
- CORE_ADDR fpstate;
- CORE_ADDR ubase;
- ubase = blockend;
- if (IS_FP_REGNUM (regnum))
- {
- fpstate = ubase + ((char *) &u.i387.st_space - (char *) &u);
- return (fpstate + 16 * (regnum - FP0_REGNUM));
- }
- else if (IS_SSE_REGNUM (regnum))
- {
- fpstate = ubase + ((char *) &u.i387.xmm_space - (char *) &u);
- return (fpstate + 16 * (regnum - XMM0_REGNUM));
- }
- else
- return (ubase + 8 * x86_64_regmap[regnum]);
+ gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
+
+ x86_64_linux_dr_set (DR_FIRSTADDR + regnum, addr);
}
void
-_initialize_x86_64_linux_nat (void)
+x86_64_linux_dr_reset_addr (int regnum)
{
- add_core_fns (&linux_elf_core_fns);
+ gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
+
+ x86_64_linux_dr_set (DR_FIRSTADDR + regnum, 0L);
}
-int
-kernel_u_size (void)
+unsigned long
+x86_64_linux_dr_get_status (void)
{
- return (sizeof (struct user));
+ return x86_64_linux_dr_get (DR_STATUS);
}
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index 932e6d6f01b..8532685c896 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -24,19 +24,21 @@
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
-#include "gdb_string.h"
#include "regcache.h"
-#include "x86-64-tdep.h"
-#include "dwarf2cfi.h"
#include "osabi.h"
-#define LINUX_SIGTRAMP_INSN0 (0x48) /* mov $NNNNNNNN,%rax */
-#define LINUX_SIGTRAMP_OFFSET0 (0)
-#define LINUX_SIGTRAMP_INSN1 (0x0f) /* syscall */
-#define LINUX_SIGTRAMP_OFFSET1 (7)
+#include "gdb_string.h"
+
+#include "x86-64-tdep.h"
+
+#define LINUX_SIGTRAMP_INSN0 0x48 /* mov $NNNNNNNN, %rax */
+#define LINUX_SIGTRAMP_OFFSET0 0
+#define LINUX_SIGTRAMP_INSN1 0x0f /* syscall */
+#define LINUX_SIGTRAMP_OFFSET1 7
-static const unsigned char linux_sigtramp_code[] = {
- /* mov $__NR_rt_sigreturn,%rax */
+static const unsigned char linux_sigtramp_code[] =
+{
+ /* mov $__NR_rt_sigreturn, %rax */
LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00,
/* syscall */
LINUX_SIGTRAMP_INSN1, 0x05
@@ -51,6 +53,14 @@ static CORE_ADDR
x86_64_linux_sigtramp_start (CORE_ADDR pc)
{
unsigned char buf[LINUX_SIGTRAMP_LEN];
+
+ /* We only recognize a signal trampoline if PC is at the start of
+ one of the two instructions. We optimize for finding the PC at
+ the start, as will be the case when the trampoline is not the
+ first frame on the stack. We assume that in the case where the
+ PC is not at the start of the instruction sequence, there will be
+ a few trailing readable bytes on the stack. */
+
if (read_memory_nobpt (pc, (char *) buf, LINUX_SIGTRAMP_LEN) != 0)
return 0;
@@ -71,133 +81,93 @@ x86_64_linux_sigtramp_start (CORE_ADDR pc)
return pc;
}
-#define LINUX_SIGINFO_SIZE 0
-
-/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
-#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
-
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_PC_OFFSET 128
-#define LINUX_SIGCONTEXT_FP_OFFSET 120
-
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
- address of the associated sigcontext structure. */
-static CORE_ADDR
-x86_64_linux_sigcontext_addr (struct frame_info *frame)
-{
- CORE_ADDR pc;
- ULONGEST rsp;
-
- pc = x86_64_linux_sigtramp_start (get_frame_pc (frame));
- if (pc)
- {
- if (get_next_frame (frame))
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. The sigcontext structure is part of
- the user context. */
- return get_frame_base (get_next_frame (frame)) + LINUX_SIGINFO_SIZE +
- LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-
-
- /* This is the top frame. */
- rsp = read_register (SP_REGNUM);
- return rsp + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-
- }
-
- error ("Couldn't recognize signal trampoline.");
- return 0;
-}
-
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
- saved program counter. */
-
-static CORE_ADDR
-x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)
-{
- CORE_ADDR addr;
-
- addr = x86_64_linux_sigcontext_addr (frame);
- return read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
-}
-
-/* Immediately after a function call, return the saved pc. */
-
-CORE_ADDR
-x86_64_linux_saved_pc_after_call (struct frame_info *frame)
-{
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return x86_64_linux_sigtramp_saved_pc (frame);
-
- return read_memory_integer (read_register (SP_REGNUM), 8);
-}
-
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-CORE_ADDR
-x86_64_linux_frame_saved_pc (struct frame_info *frame)
-{
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return x86_64_linux_sigtramp_saved_pc (frame);
- return cfi_get_ra (frame);
-}
-
/* Return whether PC is in a GNU/Linux sigtramp routine. */
-int
-x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
+static int
+x86_64_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- if (name)
- return strcmp ("__restore_rt", name) == 0;
-
- return (x86_64_linux_sigtramp_start (pc) != 0);
+ /* If we have NAME, we can optimize the search. The trampoline is
+ named __restore_rt. However, it isn't dynamically exported from
+ the shared C library, so the trampoline may appear to be part of
+ the preceding function. This should always be sigaction,
+ __sigaction, or __libc_sigaction (all aliases to the same
+ function). */
+ if (name == NULL || strstr (name, "sigaction") != NULL)
+ return (x86_64_linux_sigtramp_start (pc) != 0);
+
+ return (strcmp ("__restore_rt", name) == 0);
}
-CORE_ADDR
-x86_64_linux_frame_chain (struct frame_info *fi)
-{
- ULONGEST addr;
- CORE_ADDR fp, pc;
-
- if (!(get_frame_type (fi) == SIGTRAMP_FRAME))
- {
- fp = cfi_frame_chain (fi);
- if (fp)
- return fp;
- else
- addr = get_frame_base (fi);
- }
- else
- addr = get_frame_base (get_next_frame (fi));
-
- addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-
- fp = read_memory_integer (addr + LINUX_SIGCONTEXT_FP_OFFSET, 8) + 8;
+/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
+#define X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
- return fp;
-}
+/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
+ routine, return the address of the associated sigcontext structure. */
-CORE_ADDR
-x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
+static CORE_ADDR
+x86_64_linux_sigcontext_addr (struct frame_info *next_frame)
{
- CORE_ADDR addr;
-
- if (get_next_frame (fi)
- && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
- {
- addr = get_frame_base (get_next_frame (get_next_frame (fi)))
- + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
- return read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
- }
- else
- return cfi_init_frame_pc (fromleaf, fi);
+ CORE_ADDR sp;
+ char buf[8];
+
+ frame_unwind_register (next_frame, SP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 8);
+
+ /* The sigcontext structure is part of the user context. A pointer
+ to the user context is passed as the third argument to the signal
+ handler, i.e. in %rdx. Unfortunately %rdx isn't preserved across
+ function calls so we can't use it. Fortunately the user context
+ is part of the signal frame and the unwound %rsp directly points
+ at it. */
+ return sp + X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
+/* From <asm/sigcontext.h>. */
+static int x86_64_linux_sc_reg_offset[X86_64_NUM_GREGS] =
+{
+ 13 * 8, /* %rax */
+ 11 * 8, /* %rbx */
+ 14 * 8, /* %rcx */
+ 12 * 8, /* %rdx */
+ 9 * 8, /* %rsi */
+ 8 * 8, /* %rdi */
+ 10 * 8, /* %rbp */
+ 15 * 8, /* %rsp */
+ 0 * 8, /* %r8 */
+ 1 * 8, /* %r9 */
+ 2 * 8, /* %r10 */
+ 3 * 8, /* %r11 */
+ 4 * 8, /* %r12 */
+ 5 * 8, /* %r13 */
+ 6 * 8, /* %r14 */
+ 7 * 8, /* %r15 */
+ 16 * 8, /* %rip */
+ 17 * 8, /* %eflags */
+ -1, /* %ds */
+ -1, /* %es */
+
+ /* FIXME: kettenis/2002030531: The registers %fs and %gs are
+ available in `struct sigcontext'. However, they only occupy two
+ bytes instead of four, which makes using them here rather
+ difficult. Leave them out for now. */
+ -1, /* %fs */
+ -1 /* %gs */
+};
+
static void
x86_64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
x86_64_init_abi (info, gdbarch);
+
+ set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_pc_in_sigtramp);
+
+ tdep->sigcontext_addr = x86_64_linux_sigcontext_addr;
+ tdep->sc_reg_offset = x86_64_linux_sc_reg_offset;
+ tdep->sc_num_regs = X86_64_NUM_GREGS;
}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
extern void _initialize_x86_64_linux_tdep (void);
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 121c85eef39..6c38f8d3c15 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -21,249 +21,198 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "arch-utils.h"
+#include "block.h"
+#include "dummy-frame.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
#include "inferior.h"
-#include "gdbcore.h"
#include "gdbcmd.h"
-#include "arch-utils.h"
+#include "gdbcore.h"
+#include "objfiles.h"
#include "regcache.h"
#include "symfile.h"
-#include "objfiles.h"
-#include "x86-64-tdep.h"
-#include "dwarf2cfi.h"
+
#include "gdb_assert.h"
-#include "block.h"
+
+#include "x86-64-tdep.h"
+#include "i387-tdep.h"
/* Register numbers of various important registers. */
-#define RAX_REGNUM 0
-#define RDX_REGNUM 3
-#define RDI_REGNUM 5
-#define EFLAGS_REGNUM 17
-#define ST0_REGNUM 22
-#define XMM1_REGNUM 39
-
-struct register_info
+
+#define X86_64_RAX_REGNUM 0 /* %rax */
+#define X86_64_RDX_REGNUM 3 /* %rdx */
+#define X86_64_RDI_REGNUM 5 /* %rdi */
+#define X86_64_RBP_REGNUM 6 /* %rbp */
+#define X86_64_RSP_REGNUM 7 /* %rsp */
+#define X86_64_RIP_REGNUM 16 /* %rip */
+#define X86_64_EFLAGS_REGNUM 17 /* %eflags */
+#define X86_64_ST0_REGNUM 22 /* %st0 */
+#define X86_64_XMM0_REGNUM 38 /* %xmm0 */
+#define X86_64_XMM1_REGNUM 39 /* %xmm1 */
+
+struct x86_64_register_info
{
- int size;
char *name;
struct type **type;
};
-/* x86_64_register_raw_size_table[i] is the number of bytes of storage in
- GDB's register array occupied by register i. */
-static struct register_info x86_64_register_info_table[] = {
- /* 0 */ {8, "rax", &builtin_type_int64},
- /* 1 */ {8, "rbx", &builtin_type_int64},
- /* 2 */ {8, "rcx", &builtin_type_int64},
- /* 3 */ {8, "rdx", &builtin_type_int64},
- /* 4 */ {8, "rsi", &builtin_type_int64},
- /* 5 */ {8, "rdi", &builtin_type_int64},
- /* 6 */ {8, "rbp", &builtin_type_void_func_ptr},
- /* 7 */ {8, "rsp", &builtin_type_void_func_ptr},
- /* 8 */ {8, "r8", &builtin_type_int64},
- /* 9 */ {8, "r9", &builtin_type_int64},
- /* 10 */ {8, "r10", &builtin_type_int64},
- /* 11 */ {8, "r11", &builtin_type_int64},
- /* 12 */ {8, "r12", &builtin_type_int64},
- /* 13 */ {8, "r13", &builtin_type_int64},
- /* 14 */ {8, "r14", &builtin_type_int64},
- /* 15 */ {8, "r15", &builtin_type_int64},
- /* 16 */ {8, "rip", &builtin_type_void_func_ptr},
- /* 17 */ {4, "eflags", &builtin_type_int32},
- /* 18 */ {4, "ds", &builtin_type_int32},
- /* 19 */ {4, "es", &builtin_type_int32},
- /* 20 */ {4, "fs", &builtin_type_int32},
- /* 21 */ {4, "gs", &builtin_type_int32},
- /* 22 */ {10, "st0", &builtin_type_i387_ext},
- /* 23 */ {10, "st1", &builtin_type_i387_ext},
- /* 24 */ {10, "st2", &builtin_type_i387_ext},
- /* 25 */ {10, "st3", &builtin_type_i387_ext},
- /* 26 */ {10, "st4", &builtin_type_i387_ext},
- /* 27 */ {10, "st5", &builtin_type_i387_ext},
- /* 28 */ {10, "st6", &builtin_type_i387_ext},
- /* 29 */ {10, "st7", &builtin_type_i387_ext},
- /* 30 */ {4, "fctrl", &builtin_type_int32},
- /* 31 */ {4, "fstat", &builtin_type_int32},
- /* 32 */ {4, "ftag", &builtin_type_int32},
- /* 33 */ {4, "fiseg", &builtin_type_int32},
- /* 34 */ {4, "fioff", &builtin_type_int32},
- /* 35 */ {4, "foseg", &builtin_type_int32},
- /* 36 */ {4, "fooff", &builtin_type_int32},
- /* 37 */ {4, "fop", &builtin_type_int32},
- /* 38 */ {16, "xmm0", &builtin_type_v4sf},
- /* 39 */ {16, "xmm1", &builtin_type_v4sf},
- /* 40 */ {16, "xmm2", &builtin_type_v4sf},
- /* 41 */ {16, "xmm3", &builtin_type_v4sf},
- /* 42 */ {16, "xmm4", &builtin_type_v4sf},
- /* 43 */ {16, "xmm5", &builtin_type_v4sf},
- /* 44 */ {16, "xmm6", &builtin_type_v4sf},
- /* 45 */ {16, "xmm7", &builtin_type_v4sf},
- /* 46 */ {16, "xmm8", &builtin_type_v4sf},
- /* 47 */ {16, "xmm9", &builtin_type_v4sf},
- /* 48 */ {16, "xmm10", &builtin_type_v4sf},
- /* 49 */ {16, "xmm11", &builtin_type_v4sf},
- /* 50 */ {16, "xmm12", &builtin_type_v4sf},
- /* 51 */ {16, "xmm13", &builtin_type_v4sf},
- /* 52 */ {16, "xmm14", &builtin_type_v4sf},
- /* 53 */ {16, "xmm15", &builtin_type_v4sf},
- /* 54 */ {4, "mxcsr", &builtin_type_int32}
-};
-
-/* This array is a mapping from Dwarf-2 register
- numbering to GDB's one. Dwarf-2 numbering is
- defined in x86-64 ABI, section 3.6. */
-static int x86_64_dwarf2gdb_regno_map[] = {
- 0, 3, 2, 1, /* RAX, RDX, RCX, RBX */
- 4, 5, 6, 7, /* RSI, RDI, RBP, RSP */
- 8, 9, 10, 11, /* R8 - R11 */
- 12, 13, 14, 15, /* R12 - R15 */
- -1, /* RA - not mapped */
- XMM1_REGNUM - 1, XMM1_REGNUM, /* XMM0 ... */
- XMM1_REGNUM + 1, XMM1_REGNUM + 2,
- XMM1_REGNUM + 3, XMM1_REGNUM + 4,
- XMM1_REGNUM + 5, XMM1_REGNUM + 6,
- XMM1_REGNUM + 7, XMM1_REGNUM + 8,
- XMM1_REGNUM + 9, XMM1_REGNUM + 10,
- XMM1_REGNUM + 11, XMM1_REGNUM + 12,
- XMM1_REGNUM + 13, XMM1_REGNUM + 14, /* ... XMM15 */
- ST0_REGNUM + 0, ST0_REGNUM + 1, /* ST0 ... */
- ST0_REGNUM + 2, ST0_REGNUM + 3,
- ST0_REGNUM + 4, ST0_REGNUM + 5,
- ST0_REGNUM + 6, ST0_REGNUM + 7 /* ... ST7 */
+static struct x86_64_register_info x86_64_register_info[] =
+{
+ { "rax", &builtin_type_int64 },
+ { "rbx", &builtin_type_int64 },
+ { "rcx", &builtin_type_int64 },
+ { "rdx", &builtin_type_int64 },
+ { "rsi", &builtin_type_int64 },
+ { "rdi", &builtin_type_int64 },
+ { "rbp", &builtin_type_void_data_ptr },
+ { "rsp", &builtin_type_void_data_ptr },
+
+ /* %r8 is indeed register number 8. */
+ { "r8", &builtin_type_int64 },
+ { "r9", &builtin_type_int64 },
+ { "r10", &builtin_type_int64 },
+ { "r11", &builtin_type_int64 },
+ { "r12", &builtin_type_int64 },
+ { "r13", &builtin_type_int64 },
+ { "r14", &builtin_type_int64 },
+ { "r15", &builtin_type_int64 },
+ { "rip", &builtin_type_void_func_ptr },
+ { "eflags", &builtin_type_int32 },
+ { "ds", &builtin_type_int32 },
+ { "es", &builtin_type_int32 },
+ { "fs", &builtin_type_int32 },
+ { "gs", &builtin_type_int32 },
+
+ /* %st0 is register number 22. */
+ { "st0", &builtin_type_i387_ext },
+ { "st1", &builtin_type_i387_ext },
+ { "st2", &builtin_type_i387_ext },
+ { "st3", &builtin_type_i387_ext },
+ { "st4", &builtin_type_i387_ext },
+ { "st5", &builtin_type_i387_ext },
+ { "st6", &builtin_type_i387_ext },
+ { "st7", &builtin_type_i387_ext },
+ { "fctrl", &builtin_type_int32 },
+ { "fstat", &builtin_type_int32 },
+ { "ftag", &builtin_type_int32 },
+ { "fiseg", &builtin_type_int32 },
+ { "fioff", &builtin_type_int32 },
+ { "foseg", &builtin_type_int32 },
+ { "fooff", &builtin_type_int32 },
+ { "fop", &builtin_type_int32 },
+
+ /* %xmm0 is register number 38. */
+ { "xmm0", &builtin_type_v4sf },
+ { "xmm1", &builtin_type_v4sf },
+ { "xmm2", &builtin_type_v4sf },
+ { "xmm3", &builtin_type_v4sf },
+ { "xmm4", &builtin_type_v4sf },
+ { "xmm5", &builtin_type_v4sf },
+ { "xmm6", &builtin_type_v4sf },
+ { "xmm7", &builtin_type_v4sf },
+ { "xmm8", &builtin_type_v4sf },
+ { "xmm9", &builtin_type_v4sf },
+ { "xmm10", &builtin_type_v4sf },
+ { "xmm11", &builtin_type_v4sf },
+ { "xmm12", &builtin_type_v4sf },
+ { "xmm13", &builtin_type_v4sf },
+ { "xmm14", &builtin_type_v4sf },
+ { "xmm15", &builtin_type_v4sf },
+ { "mxcsr", &builtin_type_int32 }
};
-static int x86_64_dwarf2gdb_regno_map_length =
- sizeof (x86_64_dwarf2gdb_regno_map) /
- sizeof (x86_64_dwarf2gdb_regno_map[0]);
-
-/* Number of all registers */
-#define X86_64_NUM_REGS (sizeof (x86_64_register_info_table) / \
- sizeof (x86_64_register_info_table[0]))
-
-/* Number of general registers. */
-#define X86_64_NUM_GREGS (22)
+/* Total number of registers. */
+#define X86_64_NUM_REGS \
+ (sizeof (x86_64_register_info) / sizeof (x86_64_register_info[0]))
-int x86_64_num_regs = X86_64_NUM_REGS;
-int x86_64_num_gregs = X86_64_NUM_GREGS;
+/* Return the name of register REGNUM. */
-/* Did we already print a note about frame pointer? */
-int omit_fp_note_printed = 0;
-
-/* Number of bytes of storage in the actual machine representation for
- register REGNO. */
-int
-x86_64_register_raw_size (int regno)
+static const char *
+x86_64_register_name (int regnum)
{
- return x86_64_register_info_table[regno].size;
-}
-
-/* x86_64_register_byte_table[i] is the offset into the register file of the
- start of register number i. We initialize this from
- x86_64_register_info_table. */
-int x86_64_register_byte_table[X86_64_NUM_REGS];
+ if (regnum >= 0 && regnum < X86_64_NUM_REGS)
+ return x86_64_register_info[regnum].name;
-/* Index within `registers' of the first byte of the space for register REGNO. */
-int
-x86_64_register_byte (int regno)
-{
- return x86_64_register_byte_table[regno];
+ return NULL;
}
/* Return the GDB type object for the "standard" data type of data in
- register N. */
-static struct type *
-x86_64_register_virtual_type (int regno)
-{
- return *x86_64_register_info_table[regno].type;
-}
-
-/* x86_64_register_convertible is true if register N's virtual format is
- different from its raw format. Note that this definition assumes
- that the host supports IEEE 32-bit floats, since it doesn't say
- that SSE registers need conversion. Even if we can't find a
- counterexample, this is still sloppy. */
-int
-x86_64_register_convertible (int regno)
-{
- return IS_FP_REGNUM (regno);
-}
+ register REGNUM. */
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. In principle both
- formats are identical except that the virtual format has two extra
- bytes appended that aren't used. We set these to zero. */
-void
-x86_64_register_convert_to_virtual (int regnum, struct type *type,
- char *from, char *to)
+static struct type *
+x86_64_register_type (struct gdbarch *gdbarch, int regnum)
{
- char buf[12];
+ gdb_assert (regnum >= 0 && regnum < X86_64_NUM_REGS);
- /* We only support floating-point values. */
- if (TYPE_CODE (type) != TYPE_CODE_FLT)
- {
- warning ("Cannot convert floating-point register value "
- "to non-floating-point type.");
- memset (to, 0, TYPE_LENGTH (type));
- return;
- }
- /* First add the necessary padding. */
- memcpy (buf, from, FPU_REG_RAW_SIZE);
- memset (buf + FPU_REG_RAW_SIZE, 0, sizeof buf - FPU_REG_RAW_SIZE);
- /* Convert to TYPE. This should be a no-op, if TYPE is equivalent
- to the extended floating-point format used by the FPU. */
- convert_typed_floating (to, type, buf,
- x86_64_register_virtual_type (regnum));
+ return *x86_64_register_info[regnum].type;
}
-/* Convert data from virtual format with type TYPE in buffer FROM to
- raw format for register REGNUM in buffer TO. Simply omit the two
- unused bytes. */
-
-void
-x86_64_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
-{
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) == 12);
- /* Simply omit the two unused bytes. */
- memcpy (to, from, FPU_REG_RAW_SIZE);
-}
+/* DWARF Register Number Mapping as defined in the System V psABI,
+ section 3.6. */
-/* Dwarf-2 <-> GDB register numbers mapping. */
-int
-x86_64_dwarf2_reg_to_regnum (int dw_reg)
+static int x86_64_dwarf_regmap[] =
{
- if (dw_reg < 0 || dw_reg > x86_64_dwarf2gdb_regno_map_length)
- {
- warning ("Dwarf-2 uses unmapped register #%d\n", dw_reg);
- return dw_reg;
- }
+ /* General Purpose Registers RAX, RDX, RCX, RBX, RSI, RDI. */
+ X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, 3, 2,
+ 4, X86_64_RDI_REGNUM,
+
+ /* Frame Pointer Register RBP. */
+ X86_64_RBP_REGNUM,
+
+ /* Stack Pointer Register RSP. */
+ X86_64_RSP_REGNUM,
+
+ /* Extended Integer Registers 8 - 15. */
+ 8, 9, 10, 11, 12, 13, 14, 15,
+
+ /* Return Address RA. Not mapped. */
+ -1,
+
+ /* SSE Registers 0 - 7. */
+ X86_64_XMM0_REGNUM + 0, X86_64_XMM1_REGNUM,
+ X86_64_XMM0_REGNUM + 2, X86_64_XMM0_REGNUM + 3,
+ X86_64_XMM0_REGNUM + 4, X86_64_XMM0_REGNUM + 5,
+ X86_64_XMM0_REGNUM + 6, X86_64_XMM0_REGNUM + 7,
+
+ /* Extended SSE Registers 8 - 15. */
+ X86_64_XMM0_REGNUM + 8, X86_64_XMM0_REGNUM + 9,
+ X86_64_XMM0_REGNUM + 10, X86_64_XMM0_REGNUM + 11,
+ X86_64_XMM0_REGNUM + 12, X86_64_XMM0_REGNUM + 13,
+ X86_64_XMM0_REGNUM + 14, X86_64_XMM0_REGNUM + 15,
+
+ /* Floating Point Registers 0-7. */
+ X86_64_ST0_REGNUM + 0, X86_64_ST0_REGNUM + 1,
+ X86_64_ST0_REGNUM + 2, X86_64_ST0_REGNUM + 3,
+ X86_64_ST0_REGNUM + 4, X86_64_ST0_REGNUM + 5,
+ X86_64_ST0_REGNUM + 6, X86_64_ST0_REGNUM + 7
+};
- return x86_64_dwarf2gdb_regno_map[dw_reg];
-}
+static const int x86_64_dwarf_regmap_len =
+ (sizeof (x86_64_dwarf_regmap) / sizeof (x86_64_dwarf_regmap[0]));
-/* Push the return address (pointing to the call dummy) onto the stack
- and return the new value for the stack pointer. */
+/* Convert DWARF register number REG to the appropriate register
+ number used by GDB. */
-static CORE_ADDR
-x86_64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+static int
+x86_64_dwarf_reg_to_regnum (int reg)
{
- char buf[8];
+ int regnum = -1;
- store_unsigned_integer (buf, 8, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 8, buf, 8);
- return sp - 8;
-}
+ if (reg >= 0 || reg < x86_64_dwarf_regmap_len)
+ regnum = x86_64_dwarf_regmap[reg];
-static void
-x86_64_pop_frame (void)
-{
- generic_pop_current_frame (cfi_pop_frame);
+ if (regnum == -1)
+ warning ("Unmapped DWARF Register #%d encountered\n", reg);
+
+ return regnum;
}
/* The returning of values is done according to the special algorithm.
- Some types are returned in registers an some (big structures) in memory.
- See ABI for details.
- */
+ Some types are returned in registers an some (big structures) in
+ memory. See the System V psABI for details. */
#define MAX_CLASSES 4
@@ -282,27 +231,27 @@ enum x86_64_reg_class
};
/* Return the union class of CLASS1 and CLASS2.
- See the x86-64 ABI for details. */
+ See the System V psABI for details. */
static enum x86_64_reg_class
merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
{
- /* Rule #1: If both classes are equal, this is the resulting class. */
+ /* Rule (a): If both classes are equal, this is the resulting class. */
if (class1 == class2)
return class1;
- /* Rule #2: If one of the classes is NO_CLASS, the resulting class
+ /* Rule (b): If one of the classes is NO_CLASS, the resulting class
is the other class. */
if (class1 == X86_64_NO_CLASS)
return class2;
if (class2 == X86_64_NO_CLASS)
return class1;
- /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
+ /* Rule (c): If one of the classes is MEMORY, the result is MEMORY. */
if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
return X86_64_MEMORY_CLASS;
- /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
+ /* Rule (d): If one of the classes is INTEGER, the result is INTEGER. */
if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
|| (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
return X86_64_INTEGERSI_CLASS;
@@ -310,12 +259,13 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
|| class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
return X86_64_INTEGER_CLASS;
- /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
+ /* Rule (e): If one of the classes is X87 or X87UP class, MEMORY is
+ used as class. */
if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
|| class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
return X86_64_MEMORY_CLASS;
- /* Rule #6: Otherwise class SSE is used. */
+ /* Rule (f): Otherwise class SSE is used. */
return X86_64_SSE_CLASS;
}
@@ -325,7 +275,7 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
is returned. As a special case for zero sized containers,
classes[0] will be NO_CLASS and 1 is returned.
- See the x86-64 psABI for details. */
+ See the System V psABI for details. */
static int
classify_argument (struct type *type,
@@ -533,7 +483,8 @@ examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
memory. If this function returns 1, GDB will call
STORE_STRUCT_RETURN and EXTRACT_STRUCT_VALUE_ADDRESS else
STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE will be used. */
-int
+
+static int
x86_64_use_struct_convention (int gcc_p, struct type *value_type)
{
enum x86_64_reg_class class[MAX_CLASSES];
@@ -550,7 +501,7 @@ x86_64_use_struct_convention (int gcc_p, struct type *value_type)
function return value of TYPE, and copy that, in virtual format,
into VALBUF. */
-void
+static void
x86_64_extract_return_value (struct type *type, struct regcache *regcache,
void *valbuf)
{
@@ -561,15 +512,15 @@ x86_64_extract_return_value (struct type *type, struct regcache *regcache,
int intreg = 0;
int ssereg = 0;
int offset = 0;
- int ret_int_r[RET_INT_REGS] = { RAX_REGNUM, RDX_REGNUM };
- int ret_sse_r[RET_SSE_REGS] = { XMM0_REGNUM, XMM1_REGNUM };
+ int ret_int_r[RET_INT_REGS] = { X86_64_RAX_REGNUM, X86_64_RDX_REGNUM };
+ int ret_sse_r[RET_SSE_REGS] = { X86_64_XMM0_REGNUM, X86_64_XMM1_REGNUM };
if (!n ||
!examine_argument (class, n, &needed_intregs, &needed_sseregs) ||
needed_intregs > RET_INT_REGS || needed_sseregs > RET_SSE_REGS)
{ /* memory class */
CORE_ADDR addr;
- regcache_cooked_read (regcache, RAX_REGNUM, &addr);
+ regcache_cooked_read (regcache, X86_64_RAX_REGNUM, &addr);
read_memory (addr, valbuf, TYPE_LENGTH (type));
return;
}
@@ -610,12 +561,12 @@ x86_64_extract_return_value (struct type *type, struct regcache *regcache,
ssereg++;
break;
case X86_64_X87_CLASS:
- regcache_cooked_read_part (regcache, FP0_REGNUM,
+ regcache_cooked_read_part (regcache, X86_64_ST0_REGNUM,
0, 8, (char *) valbuf + offset);
offset += 8;
break;
case X86_64_X87UP_CLASS:
- regcache_cooked_read_part (regcache, FP0_REGNUM,
+ regcache_cooked_read_part (regcache, X86_64_ST0_REGNUM,
8, 2, (char *) valbuf + offset);
offset += 8;
break;
@@ -628,33 +579,29 @@ x86_64_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-static void
-x86_64_frame_init_saved_regs (struct frame_info *fi)
-{
- /* Do nothing. Everything is handled by the stack unwinding code. */
-}
-
#define INT_REGS 6
-#define SSE_REGS 16
+#define SSE_REGS 8
-CORE_ADDR
-x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+static CORE_ADDR
+x86_64_push_arguments (struct regcache *regcache, int nargs,
+ struct value **args, CORE_ADDR sp)
{
int intreg = 0;
int ssereg = 0;
int i;
- static int int_parameter_registers[INT_REGS] = {
- 5 /* RDI */ , 4 /* RSI */ ,
- 3 /* RDX */ , 2 /* RCX */ ,
- 8 /* R8 */ , 9 /* R9 */
+ static int int_parameter_registers[INT_REGS] =
+ {
+ X86_64_RDI_REGNUM, 4, /* %rdi, %rsi */
+ X86_64_RDX_REGNUM, 2, /* %rdx, %rcx */
+ 8, 9 /* %r8, %r9 */
};
- /* XMM0 - XMM15 */
- static int sse_parameter_registers[SSE_REGS] = {
- XMM1_REGNUM - 1, XMM1_REGNUM, XMM1_REGNUM + 1, XMM1_REGNUM + 2,
- XMM1_REGNUM + 3, XMM1_REGNUM + 4, XMM1_REGNUM + 5, XMM1_REGNUM + 6,
- XMM1_REGNUM + 7, XMM1_REGNUM + 8, XMM1_REGNUM + 9, XMM1_REGNUM + 10,
- XMM1_REGNUM + 11, XMM1_REGNUM + 12, XMM1_REGNUM + 13, XMM1_REGNUM + 14
+ /* %xmm0 - %xmm7 */
+ static int sse_parameter_registers[SSE_REGS] =
+ {
+ X86_64_XMM0_REGNUM + 0, X86_64_XMM1_REGNUM,
+ X86_64_XMM0_REGNUM + 2, X86_64_XMM0_REGNUM + 3,
+ X86_64_XMM0_REGNUM + 4, X86_64_XMM0_REGNUM + 5,
+ X86_64_XMM0_REGNUM + 6, X86_64_XMM0_REGNUM + 7,
};
int stack_values_count = 0;
int *stack_values;
@@ -676,27 +623,26 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
else
{
int j;
+ int offset = 0;
for (j = 0; j < n; j++)
{
- int offset = 0;
switch (class[j])
{
case X86_64_NO_CLASS:
break;
case X86_64_INTEGER_CLASS:
- deprecated_write_register_gen (int_parameter_registers
- [(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ regcache_cooked_write
+ (regcache, int_parameter_registers[(intreg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
{
- LONGEST num
- = extract_signed_integer (VALUE_CONTENTS_ALL (args[i])
- + offset, 4);
- regcache_raw_write_signed (current_regcache,
- int_parameter_registers[intreg / 2], num);
+ LONGEST val = extract_signed_integer
+ (VALUE_CONTENTS_ALL (args[i]) + offset, 4);
+ regcache_cooked_write_signed
+ (regcache, int_parameter_registers[intreg / 2], val);
offset += 8;
intreg++;
@@ -705,15 +651,16 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
- deprecated_write_register_gen (sse_parameter_registers
- [(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[(ssereg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg += 2;
break;
case X86_64_SSEUP_CLASS:
- deprecated_write_register_gen (sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg++;
break;
@@ -732,21 +679,25 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
}
}
+
+ /* Push any remaining arguments onto the stack. */
while (--stack_values_count >= 0)
{
struct value *arg = args[stack_values[stack_values_count]];
int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
- len += 7;
- len -= len % 8;
- sp -= len;
+
+ /* Make sure the stack stays eightbyte-aligned. */
+ sp -= (len + 7) & ~7;
write_memory (sp, VALUE_CONTENTS_ALL (arg), len);
}
+
return sp;
}
/* Write into the appropriate registers a function return value stored
in VALBUF of type TYPE, given in virtual format. */
-void
+
+static void
x86_64_store_return_value (struct type *type, struct regcache *regcache,
const void *valbuf)
{
@@ -754,27 +705,32 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
if (TYPE_CODE_FLT == TYPE_CODE (type))
{
- /* Floating-point return values can be found in %st(0). */
- if (len == TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT
- && TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext)
- {
- /* Copy straight over. */
- regcache_cooked_write (regcache, FP0_REGNUM, valbuf);
- }
- else
- {
- char buf[FPU_REG_RAW_SIZE];
- DOUBLEST val;
-
- /* Convert the value found in VALBUF to the extended
- floating point format used by the FPU. This is probably
- not exactly how it would happen on the target itself, but
- it is the best we can do. */
- val = deprecated_extract_floating (valbuf, TYPE_LENGTH (type));
- floatformat_from_doublest (&floatformat_i387_ext, &val, buf);
- regcache_cooked_write_part (regcache, FP0_REGNUM,
- 0, FPU_REG_RAW_SIZE, buf);
- }
+ ULONGEST fstat;
+ char buf[FPU_REG_RAW_SIZE];
+
+ /* Returning floating-point values is a bit tricky. Apart from
+ storing the return value in %st(0), we have to simulate the
+ state of the FPU at function return point. */
+
+ /* Convert the value found in VALBUF to the extended
+ floating-point format used by the FPU. This is probably
+ not exactly how it would happen on the target itself, but
+ it is the best we can do. */
+ convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
+ regcache_raw_write (regcache, X86_64_ST0_REGNUM, buf);
+
+ /* Set the top of the floating-point register stack to 7. The
+ actual value doesn't really matter, but 7 is what a normal
+ function return would end up with if the program started out
+ with a freshly initialized FPU. */
+ regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
+ fstat |= (7 << 11);
+ regcache_raw_write_unsigned (regcache, FSTAT_REGNUM, fstat);
+
+ /* Mark %st(1) through %st(7) as empty. Since we set the top of
+ the floating-point register stack to 7, the appropriate value
+ for the tag word is 0x3fff. */
+ regcache_raw_write_unsigned (regcache, FTAG_REGNUM, 0x3fff);
}
else
{
@@ -797,126 +753,391 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
}
-const char *
-x86_64_register_name (int reg_nr)
+static CORE_ADDR
+x86_64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr,
+ int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
- if (reg_nr < 0 || reg_nr >= X86_64_NUM_REGS)
- return NULL;
- return x86_64_register_info_table[reg_nr].name;
+ char buf[8];
+
+ /* Pass arguments. */
+ sp = x86_64_push_arguments (regcache, nargs, args, sp);
+
+ /* Pass "hidden" argument". */
+ if (struct_return)
+ {
+ store_unsigned_integer (buf, 8, struct_addr);
+ regcache_cooked_write (regcache, X86_64_RDI_REGNUM, buf);
+ }
+
+ /* Store return address. */
+ sp -= 8;
+ store_unsigned_integer (buf, 8, bp_addr);
+ write_memory (sp, buf, 8);
+
+ /* Finally, update the stack pointer... */
+ store_unsigned_integer (buf, 8, sp);
+ regcache_cooked_write (regcache, X86_64_RSP_REGNUM, buf);
+
+ /* ...and fake a frame pointer. */
+ regcache_cooked_write (regcache, X86_64_RBP_REGNUM, buf);
+
+ return sp + 16;
}
+
-int
-x86_64_register_number (const char *name)
+/* The maximum number of saved registers. This should include %rip. */
+#define X86_64_NUM_SAVED_REGS X86_64_NUM_GREGS
+
+struct x86_64_frame_cache
{
- int reg_nr;
+ /* Base address. */
+ CORE_ADDR base;
+ CORE_ADDR sp_offset;
+ CORE_ADDR pc;
+
+ /* Saved registers. */
+ CORE_ADDR saved_regs[X86_64_NUM_SAVED_REGS];
+ CORE_ADDR saved_sp;
- for (reg_nr = 0; reg_nr < X86_64_NUM_REGS; reg_nr++)
- if (strcmp (name, x86_64_register_info_table[reg_nr].name) == 0)
- return reg_nr;
- return -1;
+ /* Do we have a frame? */
+ int frameless_p;
+};
+
+/* Allocate and initialize a frame cache. */
+
+static struct x86_64_frame_cache *
+x86_64_alloc_frame_cache (void)
+{
+ struct x86_64_frame_cache *cache;
+ int i;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct x86_64_frame_cache);
+
+ /* Base address. */
+ cache->base = 0;
+ cache->sp_offset = -8;
+ cache->pc = 0;
+
+ /* Saved registers. We initialize these to -1 since zero is a valid
+ offset (that's where %rbp is supposed to be stored). */
+ for (i = 0; i < X86_64_NUM_SAVED_REGS; i++)
+ cache->saved_regs[i] = -1;
+ cache->saved_sp = 0;
+
+ /* Frameless until proven otherwise. */
+ cache->frameless_p = 1;
+
+ return cache;
}
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-void
-x86_64_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+/* Do a limited analysis of the prologue at PC and update CACHE
+ accordingly. Bail out early if CURRENT_PC is reached. Return the
+ address where the analysis stopped.
+
+ We will handle only functions beginning with:
+
+ pushq %rbp 0x55
+ movq %rsp, %rbp 0x48 0x89 0xe5
+
+ Any function that doesn't start with this sequence will be assumed
+ to have no prologue and thus no valid frame pointer in %rbp. */
+
+static CORE_ADDR
+x86_64_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct x86_64_frame_cache *cache)
{
- write_register (RDI_REGNUM, addr);
+ static unsigned char proto[3] = { 0x48, 0x89, 0xe5 };
+ unsigned char buf[3];
+ unsigned char op;
+
+ if (current_pc <= pc)
+ return current_pc;
+
+ op = read_memory_unsigned_integer (pc, 1);
+
+ if (op == 0x55) /* pushq %rbp */
+ {
+ /* Take into account that we've executed the `pushq %rbp' that
+ starts this instruction sequence. */
+ cache->saved_regs[X86_64_RBP_REGNUM] = 0;
+ cache->sp_offset += 8;
+
+ /* If that's all, return now. */
+ if (current_pc <= pc + 1)
+ return current_pc;
+
+ /* Check for `movq %rsp, %rbp'. */
+ read_memory (pc + 1, buf, 3);
+ if (memcmp (buf, proto, 3) != 0)
+ return pc + 1;
+
+ /* OK, we actually have a frame. */
+ cache->frameless_p = 0;
+ return pc + 4;
+ }
+
+ return pc;
}
-int
-x86_64_frameless_function_invocation (struct frame_info *frame)
+/* Return PC of first real instruction. */
+
+static CORE_ADDR
+x86_64_skip_prologue (CORE_ADDR start_pc)
{
- return 0;
+ struct x86_64_frame_cache cache;
+ CORE_ADDR pc;
+
+ pc = x86_64_analyze_prologue (start_pc, 0xffffffffffffffff, &cache);
+ if (cache.frameless_p)
+ return start_pc;
+
+ return pc;
}
+
+
+/* Normal frames. */
-/* We will handle only functions beginning with:
- 55 pushq %rbp
- 48 89 e5 movq %rsp,%rbp
- Any function that doesn't start with this sequence
- will be assumed to have no prologue and thus no valid
- frame pointer in %rbp. */
-#define PROLOG_BUFSIZE 4
-int
-x86_64_function_has_prologue (CORE_ADDR pc)
+static struct x86_64_frame_cache *
+x86_64_frame_cache (struct frame_info *next_frame, void **this_cache)
{
+ struct x86_64_frame_cache *cache;
+ char buf[8];
int i;
- unsigned char prolog_expect[PROLOG_BUFSIZE] = { 0x55, 0x48, 0x89, 0xe5 },
- prolog_buf[PROLOG_BUFSIZE];
- read_memory (pc, (char *) prolog_buf, PROLOG_BUFSIZE);
+ if (*this_cache)
+ return *this_cache;
- /* First check, whether pc points to pushq %rbp, movq %rsp,%rbp. */
- for (i = 0; i < PROLOG_BUFSIZE; i++)
- if (prolog_expect[i] != prolog_buf[i])
- return 0; /* ... no, it doesn't. Nothing to skip. */
-
- return 1;
+ cache = x86_64_alloc_frame_cache ();
+ *this_cache = cache;
+
+ frame_unwind_register (next_frame, X86_64_RBP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8);
+ if (cache->base == 0)
+ return cache;
+
+ /* For normal frames, %rip is stored at 8(%rbp). */
+ cache->saved_regs[X86_64_RIP_REGNUM] = 8;
+
+ cache->pc = frame_func_unwind (next_frame);
+ if (cache->pc != 0)
+ x86_64_analyze_prologue (cache->pc, frame_pc_unwind (next_frame), cache);
+
+ if (cache->frameless_p)
+ {
+ /* We didn't find a valid frame, which means that CACHE->base
+ currently holds the frame pointer for our calling frame. If
+ we're at the start of a function, or somewhere half-way its
+ prologue, the function's frame probably hasn't been fully
+ setup yet. Try to reconstruct the base address for the stack
+ frame by looking at the stack pointer. For truly "frameless"
+ functions this might work too. */
+
+ frame_unwind_register (next_frame, X86_64_RSP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8) + cache->sp_offset;
+ }
+
+ /* Now that we have the base address for the stack frame we can
+ calculate the value of %rsp in the calling frame. */
+ cache->saved_sp = cache->base + 16;
+
+ /* Adjust all the saved registers such that they contain addresses
+ instead of offsets. */
+ for (i = 0; i < X86_64_NUM_SAVED_REGS; i++)
+ if (cache->saved_regs[i] != -1)
+ cache->saved_regs[i] += cache->base;
+
+ return cache;
}
-/* If a function with debugging information and known beginning
- is detected, we will return pc of the next line in the source
- code. With this approach we effectively skip the prolog. */
+static void
+x86_64_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct x86_64_frame_cache *cache =
+ x86_64_frame_cache (next_frame, this_cache);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
-CORE_ADDR
-x86_64_skip_prologue (CORE_ADDR pc)
+ (*this_id) = frame_id_build (cache->base + 16, cache->pc);
+}
+
+static void
+x86_64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
{
+ struct x86_64_frame_cache *cache =
+ x86_64_frame_cache (next_frame, this_cache);
+
+ gdb_assert (regnum >= 0);
+
+ if (regnum == SP_REGNUM && cache->saved_sp)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_unsigned_integer (valuep, 8, cache->saved_sp);
+ }
+ return;
+ }
+
+ if (regnum < X86_64_NUM_SAVED_REGS && cache->saved_regs[regnum] != -1)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->saved_regs[regnum];
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ return;
+ }
+
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind x86_64_frame_unwind =
+{
+ NORMAL_FRAME,
+ x86_64_frame_this_id,
+ x86_64_frame_prev_register
+};
+
+static const struct frame_unwind *
+x86_64_frame_p (CORE_ADDR pc)
+{
+ return &x86_64_frame_unwind;
+}
+
+
+/* Signal trampolines. */
+
+/* FIXME: kettenis/20030419: Perhaps, we can unify the 32-bit and
+ 64-bit variants. This would require using identical frame caches
+ on both platforms. */
+
+static struct x86_64_frame_cache *
+x86_64_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct x86_64_frame_cache *cache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR addr;
+ char buf[8];
int i;
- struct symtab_and_line v_sal;
- struct symbol *v_function;
- CORE_ADDR endaddr;
- if (! x86_64_function_has_prologue (pc))
- return pc;
+ if (*this_cache)
+ return *this_cache;
- /* OK, we have found the prologue and want PC of the first
- non-prologue instruction. */
- pc += PROLOG_BUFSIZE;
+ cache = x86_64_alloc_frame_cache ();
- v_function = find_pc_function (pc);
- v_sal = find_pc_line (pc, 0);
+ frame_unwind_register (next_frame, X86_64_RSP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8) - 8;
- /* If pc doesn't point to a function with debuginfo, some of the
- following may be NULL. */
- if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
- return pc;
+ addr = tdep->sigcontext_addr (next_frame);
+ gdb_assert (tdep->sc_reg_offset);
+ gdb_assert (tdep->sc_num_regs <= X86_64_NUM_SAVED_REGS);
+ for (i = 0; i < tdep->sc_num_regs; i++)
+ if (tdep->sc_reg_offset[i] != -1)
+ cache->saved_regs[i] = addr + tdep->sc_reg_offset[i];
- endaddr = BLOCK_END (SYMBOL_BLOCK_VALUE (v_function));
+ *this_cache = cache;
+ return cache;
+}
- for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
- if (v_sal.symtab->linetable->item[i].pc >= pc
- && v_sal.symtab->linetable->item[i].pc < endaddr)
- {
- pc = v_sal.symtab->linetable->item[i].pc;
- break;
- }
+static void
+x86_64_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_cache, struct frame_id *this_id)
+{
+ struct x86_64_frame_cache *cache =
+ x86_64_sigtramp_frame_cache (next_frame, this_cache);
- return pc;
+ (*this_id) = frame_id_build (cache->base + 16, frame_pc_unwind (next_frame));
}
static void
-x86_64_save_dummy_frame_tos (CORE_ADDR sp)
+x86_64_sigtramp_frame_prev_register (struct frame_info *next_frame,
+ void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
{
- /* We must add the size of the return address that is already
- put on the stack. */
- generic_save_dummy_frame_tos (sp +
- TYPE_LENGTH (builtin_type_void_func_ptr));
+ /* Make sure we've initialized the cache. */
+ x86_64_sigtramp_frame_cache (next_frame, this_cache);
+
+ x86_64_frame_prev_register (next_frame, this_cache, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind x86_64_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ x86_64_sigtramp_frame_this_id,
+ x86_64_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+x86_64_sigtramp_frame_p (CORE_ADDR pc)
+{
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ {
+ gdb_assert (gdbarch_tdep (current_gdbarch)->sigcontext_addr);
+
+ return &x86_64_sigtramp_frame_unwind;
+ }
+
+ return NULL;
+}
+
+
+static CORE_ADDR
+x86_64_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct x86_64_frame_cache *cache =
+ x86_64_frame_cache (next_frame, this_cache);
+
+ return cache->base;
}
+static const struct frame_base x86_64_frame_base =
+{
+ &x86_64_frame_unwind,
+ x86_64_frame_base_address,
+ x86_64_frame_base_address,
+ x86_64_frame_base_address
+};
+
static struct frame_id
-x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame)
+x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- CORE_ADDR base;
- frame_unwind_unsigned_register (frame, SP_REGNUM, &base);
- return frame_id_build (base, frame_pc_unwind (frame));
+ char buf[8];
+ CORE_ADDR fp;
+
+ frame_unwind_register (next_frame, X86_64_RBP_REGNUM, buf);
+ fp = extract_unsigned_integer (buf, 8);
+
+ return frame_id_build (fp + 16, frame_pc_unwind (next_frame));
}
void
x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int i, sum;
/* The x86-64 has 16 SSE registers. */
tdep->num_xmm_regs = 16;
@@ -932,115 +1153,93 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_num_regs (gdbarch, X86_64_NUM_REGS);
+ set_gdbarch_register_name (gdbarch, x86_64_register_name);
+ set_gdbarch_register_type (gdbarch, x86_64_register_type);
/* Register numbers of various important registers. */
- set_gdbarch_sp_regnum (gdbarch, 7); /* %rsp */
- set_gdbarch_deprecated_fp_regnum (gdbarch, 6); /* %rbp */
- set_gdbarch_pc_regnum (gdbarch, 16); /* %rip */
- set_gdbarch_ps_regnum (gdbarch, 17); /* %eflags */
- set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* %st(0) */
+ set_gdbarch_sp_regnum (gdbarch, X86_64_RSP_REGNUM); /* %rsp */
+ set_gdbarch_pc_regnum (gdbarch, X86_64_RIP_REGNUM); /* %rip */
+ set_gdbarch_ps_regnum (gdbarch, X86_64_EFLAGS_REGNUM); /* %eflags */
+ set_gdbarch_fp0_regnum (gdbarch, X86_64_ST0_REGNUM); /* %st(0) */
/* The "default" register numbering scheme for the x86-64 is
- referred to as the "DWARF register number mapping" in the psABI.
- The preferred debugging format for all known x86-64 targets is
- actually DWARF2, and GCC doesn't seem to support DWARF (that is
- DWARF-1), but we provide the same mapping just in case. This
- mapping is also used for stabs, which GCC does support. */
- set_gdbarch_stab_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
- set_gdbarch_dwarf_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
-
- /* We don't override SDB_REG_RO_REGNUM, sice COFF doesn't seem to be
- in use on any of the supported x86-64 targets. */
+ referred to as the "DWARF Register Number Mapping" in the System
+ V psABI. The preferred debugging format for all known x86-64
+ targets is actually DWARF2, and GCC doesn't seem to support DWARF
+ (that is DWARF-1), but we provide the same mapping just in case.
+ This mapping is also used for stabs, which GCC does support. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, x86_64_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, x86_64_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf_reg_to_regnum);
- set_gdbarch_register_name (gdbarch, x86_64_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, 8);
+ /* We don't override SDB_REG_RO_REGNUM, since COFF doesn't seem to
+ be in use on any of the supported x86-64 targets. */
- /* Total amount of space needed to store our copies of the machine's
- register (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS +
- SIZEOF_SSE_REGS) */
- for (i = 0, sum = 0; i < X86_64_NUM_REGS; i++)
- sum += x86_64_register_info_table[i].size;
- set_gdbarch_deprecated_register_bytes (gdbarch, sum);
-
- set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
- set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
- set_gdbarch_register_virtual_type (gdbarch, x86_64_register_virtual_type);
-
- set_gdbarch_register_convertible (gdbarch, x86_64_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- x86_64_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch,
- x86_64_register_convert_to_raw);
-
- /* Getting saved registers is handled by unwind information. */
- set_gdbarch_deprecated_get_saved_register (gdbarch, cfi_get_saved_register);
-
- /* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */
- set_gdbarch_deprecated_target_read_fp (gdbarch, cfi_read_fp);
+ /* Call dummy code. */
+ set_gdbarch_push_dummy_call (gdbarch, x86_64_push_dummy_call);
set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
-
- set_gdbarch_deprecated_push_arguments (gdbarch, x86_64_push_arguments);
- set_gdbarch_deprecated_push_return_address (gdbarch, x86_64_push_return_address);
- set_gdbarch_deprecated_pop_frame (gdbarch, x86_64_pop_frame);
- set_gdbarch_deprecated_store_struct_return (gdbarch, x86_64_store_struct_return);
set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
/* Override, since this is handled by x86_64_extract_return_value. */
set_gdbarch_extract_struct_value_address (gdbarch, NULL);
set_gdbarch_use_struct_convention (gdbarch, x86_64_use_struct_convention);
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
- set_gdbarch_deprecated_frame_chain (gdbarch, x86_64_linux_frame_chain);
- set_gdbarch_frameless_function_invocation (gdbarch,
- x86_64_frameless_function_invocation);
- /* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
- should be moved elsewhere. */
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- /* FIXME: kettenis/20021026: This one is GNU/Linux-specific too. */
- set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_in_sigtramp);
-
+ /* Avoid wiring in the MMX registers for now. */
set_gdbarch_num_pseudo_regs (gdbarch, 0);
- /* Build call frame information (CFI) from DWARF2 frame debug info. */
- set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
-
- /* Initialization of per-frame CFI. */
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, cfi_init_extra_frame_info);
-
- /* Frame PC initialization is handled by using CFI. */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, x86_64_init_frame_pc);
-
- /* Cons up virtual frame pointer for trace. */
- set_gdbarch_virtual_frame_pointer (gdbarch, cfi_virtual_frame_pointer);
+ set_gdbarch_unwind_dummy_id (gdbarch, x86_64_unwind_dummy_id);
/* FIXME: kettenis/20021026: This is ELF-specific. Fine for now,
since all supported x86-64 targets are ELF, but that might change
in the future. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
-
- /* Dummy frame helper functions. */
- set_gdbarch_save_dummy_frame_tos (gdbarch, x86_64_save_dummy_frame_tos);
- set_gdbarch_unwind_dummy_id (gdbarch, x86_64_unwind_dummy_id);
+
+ frame_unwind_append_predicate (gdbarch, x86_64_sigtramp_frame_p);
+ frame_unwind_append_predicate (gdbarch, x86_64_frame_p);
+ frame_base_set_default (gdbarch, &x86_64_frame_base);
}
+
+
+#define I387_FISEG_REGNUM FISEG_REGNUM
+#define I387_FOSEG_REGNUM FOSEG_REGNUM
+
+/* The 64-bit FXSAVE format differs from the 32-bit format in the
+ sense that the instruction pointer and data pointer are simply
+ 64-bit offsets into the code segment and the data segment instead
+ of a selector offset pair. The functions below store the upper 32
+ bits of these pointers (instead of just the 16-bits of the segment
+ selector). */
+
+/* Fill GDB's register array with the floating-point and SSE register
+ values in *FXSAVE. This function masks off any of the reserved
+ bits in *FXSAVE. */
void
-_initialize_x86_64_tdep (void)
+x86_64_supply_fxsave (char *fxsave)
{
- /* Initialize the table saying where each register starts in the
- register file. */
- {
- int i, offset;
+ i387_supply_fxsave (fxsave);
- offset = 0;
- for (i = 0; i < X86_64_NUM_REGS; i++)
- {
- x86_64_register_byte_table[i] = offset;
- offset += x86_64_register_info_table[i].size;
- }
- }
+ if (fxsave)
+ {
+ supply_register (I387_FISEG_REGNUM, fxsave + 12);
+ supply_register (I387_FOSEG_REGNUM, fxsave + 20);
+ }
+}
+
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+ *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
+ this for all registers. This function doesn't touch any of the
+ reserved bits in *FXSAVE. */
+
+void
+x86_64_fill_fxsave (char *fxsave, int regnum)
+{
+ i387_fill_fxsave (fxsave, regnum);
+
+ if (regnum == -1 || regnum == I387_FISEG_REGNUM)
+ regcache_collect (I387_FISEG_REGNUM, fxsave + 12);
+ if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
+ regcache_collect (I387_FOSEG_REGNUM, fxsave + 20);
}
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index 6885a7cb856..70ceffbbda2 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -1,6 +1,8 @@
-/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2001
+/* Target-dependent code for the x86-64.
+
+ Copyright 2001, 2003
Free Software Foundation, Inc.
+
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -28,19 +30,22 @@ struct frame_info;
#include "i386-tdep.h"
-extern int x86_64_num_regs;
-extern int x86_64_num_gregs;
+/* Number of general purpose registers. */
+#define X86_64_NUM_GREGS 22
+
+void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
-int x86_64_register_number (const char *name);
-const char *x86_64_register_name (int reg_nr);
+/* Fill GDB's register array with the floating-point and SSE register
+ values in *FXSAVE. This function masks off any of the reserved
+ bits in *FXSAVE. */
-gdbarch_deprecated_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
-gdbarch_deprecated_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
-gdbarch_pc_in_sigtramp_ftype x86_64_linux_in_sigtramp;
-CORE_ADDR x86_64_linux_frame_chain (struct frame_info *fi);
-CORE_ADDR x86_64_init_frame_pc (int fromleaf, struct frame_info *fi);
-int x86_64_function_has_prologue (CORE_ADDR pc);
+void x86_64_supply_fxsave (char *fxsave);
-void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+ *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
+ this for all registers. This function doesn't touch any of the
+ reserved bits in *FXSAVE. */
+
+void x86_64_fill_fxsave (char *fxsave, int regnum);
-#endif
+#endif /* x86-64-tdep.h */
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 5a0b2862fef..de23d5d054a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2981,9 +2981,10 @@ xcoff_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
asection *sect = NULL;
int i;
- objfile->num_sections = SECT_OFF_MAX;
+ objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* Initialize the section indexes for future use. */
sect = bfd_get_section_by_name (objfile->obfd, ".text");
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index f792423a544..9c0c70aeadc 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -228,8 +228,8 @@ xstormy16_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Aggregates and return values > 12 bytes are returned in memory,
pointed to by R2. */
return_buffer =
- extract_address (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM),
- REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
+ extract_unsigned_integer (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM),
+ REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -307,7 +307,7 @@ xstormy16_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
(which may or may not be the same as before).
*/
-CORE_ADDR
+static CORE_ADDR
xstormy16_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
unsigned char buf[xstormy16_pc_size];
@@ -410,9 +410,8 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
static CORE_ADDR
xstormy16_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf +
- xstormy16_register_byte (E_PTR_RET_REGNUM),
- xstormy16_reg_size);
+ return extract_unsigned_integer (regbuf + xstormy16_register_byte (E_PTR_RET_REGNUM),
+ xstormy16_reg_size);
}
/* Function: xstormy16_use_struct_convention
@@ -962,7 +961,7 @@ static CORE_ADDR
xstormy16_pointer_to_address (struct type *type, const void *buf)
{
enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
- CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
+ CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
{
@@ -996,7 +995,7 @@ xstormy16_stack_align (CORE_ADDR addr)
return addr;
}
-void
+static void
xstormy16_save_dummy_frame_tos (CORE_ADDR sp)
{
generic_save_dummy_frame_tos (sp - xstormy16_pc_size);
@@ -1040,12 +1039,12 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, xstormy16_register_name);
set_gdbarch_deprecated_register_size (gdbarch, xstormy16_reg_size);
set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
- set_gdbarch_register_byte (gdbarch, xstormy16_register_byte);
- set_gdbarch_register_raw_size (gdbarch, xstormy16_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, xstormy16_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, xstormy16_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, xstormy16_pc_size);
- set_gdbarch_register_virtual_size (gdbarch, xstormy16_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, xstormy16_register_raw_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_type (gdbarch, xstormy16_reg_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, xstormy16_reg_virtual_type);
/*
* Frame Info
@@ -1076,8 +1075,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/*
* Call Dummies
@@ -1115,7 +1112,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
xstormy16_in_solib_call_trampoline);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
@@ -1124,6 +1121,8 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
Initializer function for the Sanyo Xstormy16a module.
Called by gdb at start-up. */
+extern initialize_file_ftype _initialize_xstormy16_tdep; /* -Wmissing-prototypes */
+
void
_initialize_xstormy16_tdep (void)
{
diff --git a/include/ChangeLog b/include/ChangeLog
index 8dfa46f77c9..18d0b3509e7 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,18 @@
+2003-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack.
+ * elf/common.h (PT_GNU_STACK): Define.
+
+2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfdlink.h (LD_DEFINITION_IN_DISCARDED_SECTION): New.
+
+2003-05-30 Ulrich Drepper <drepper@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add pie and executable
+ bits.
+
2003-05-21 Nick Clifton <nickc@redhat.com>
* bfdlink.h (struct bfd_link_hash_table): Fix typo in comment.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 89d916ee83b..4636025b8b9 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -291,6 +291,20 @@ struct bfd_link_info
/* TRUE if relaxation is being finalized. */
unsigned int relax_finalizing: 1;
+ /* TRUE if generating a position independent executable. */
+ unsigned int pie: 1;
+
+ /* TRUE if generating an executable, position independent or not. */
+ unsigned int executable : 1;
+
+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
+ flags. */
+ unsigned int execstack: 1;
+
+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
+ flags. */
+ unsigned int noexecstack: 1;
+
/* Which symbols to strip. */
enum bfd_link_strip strip;
@@ -489,6 +503,9 @@ struct bfd_link_callbacks
ld. */
bfd_boolean (*error_handler)
PARAMS ((int id, const char * fmt, ...));
+
+/* Identifiers of linker error messages used by error_handler. */
+#define LD_DEFINITION_IN_DISCARDED_SECTION 1
};
/* The linker builds link_order structures which tell the code how to
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 59e05e318ad..eb4b7ccb55e 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,17 @@
+2003-06-13 Robert Millan <zeratul2@wanadoo.es>
+
+ * common.h (GNU_ABI_TAG_NETBSD): New tag.
+ (GNU_ABI_TAG_FREEBSD): New tag.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8.h (E_H8_MACH_H8300SXN): New flag.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * v850.h (R_V850_32): Rename to R_V850_ABS32.
+ Add R_V850_REL32.
+
2003-05-15 Roland McGrath <roland@redhat.com>
* common.h (NT_AUXV, AT_*): New macros.
diff --git a/include/elf/common.h b/include/elf/common.h
index f342d573710..1a843393d85 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -288,6 +288,7 @@
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
+#define PT_GNU_STACK (PT_LOOS + 0x474e551)
/* Program segment permissions, in program header p_flags field. */
@@ -396,6 +397,8 @@
#define GNU_ABI_TAG_LINUX 0
#define GNU_ABI_TAG_HURD 1
#define GNU_ABI_TAG_SOLARIS 2
+#define GNU_ABI_TAG_FREEBSD 3
+#define GNU_ABI_TAG_NETBSD 4
/* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */
diff --git a/include/elf/h8.h b/include/elf/h8.h
index 79c0a34fb32..1aad7a4ed5b 100644
--- a/include/elf/h8.h
+++ b/include/elf/h8.h
@@ -95,5 +95,6 @@ END_RELOC_NUMBERS (R_H8_max)
#define E_H8_MACH_H8300HN 0x00830000
#define E_H8_MACH_H8300SN 0x00840000
#define E_H8_MACH_H8300SX 0x00850000
+#define E_H8_MACH_H8300SXN 0x00860000
#endif
diff --git a/include/elf/v850.h b/include/elf/v850.h
index a15c9ee0864..c949ab01f8c 100644
--- a/include/elf/v850.h
+++ b/include/elf/v850.h
@@ -53,7 +53,7 @@ START_RELOC_NUMBERS (v850_reloc_type)
RELOC_NUMBER (R_V850_HI16_S, 3)
RELOC_NUMBER (R_V850_HI16, 4)
RELOC_NUMBER (R_V850_LO16, 5)
- RELOC_NUMBER (R_V850_32, 6)
+ RELOC_NUMBER (R_V850_ABS32, 6)
RELOC_NUMBER (R_V850_16, 7)
RELOC_NUMBER (R_V850_8, 8)
RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
@@ -75,6 +75,7 @@ START_RELOC_NUMBERS (v850_reloc_type)
RELOC_NUMBER (R_V850_LONGCALL, 25)
RELOC_NUMBER (R_V850_LONGJUMP, 26)
RELOC_NUMBER (R_V850_ALIGN, 27)
+ RELOC_NUMBER (R_V850_REL32, 28)
END_RELOC_NUMBERS (R_V850_max)
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index 77a8551a460..79c817871ec 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb/fileio.h: New file.
+
2003-05-07 Andrew Cagney <cagney@redhat.com>
* sim-d10v.h (sim_d10v_translate_addr): Add regcache parameter.
diff --git a/include/gdb/fileio.h b/include/gdb/fileio.h
new file mode 100644
index 00000000000..d84478103e2
--- /dev/null
+++ b/include/gdb/fileio.h
@@ -0,0 +1,146 @@
+/* Hosted File I/O interface definitions, for GDB, the GNU Debugger.
+
+ Copyright 2003 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 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. */
+
+#ifndef GDB_FILEIO_H_
+#define GDB_FILEIO_H_
+
+/* The following flags are defined to be independent of the host
+ as well as the target side implementation of these constants.
+ All constants are defined with a leading FILEIO_ in the name
+ to allow the usage of these constants together with the
+ corresponding implementation dependent constants in one module. */
+
+/* open(2) flags */
+#define FILEIO_O_RDONLY 0x0
+#define FILEIO_O_WRONLY 0x1
+#define FILEIO_O_RDWR 0x2
+#define FILEIO_O_APPEND 0x8
+#define FILEIO_O_CREAT 0x200
+#define FILEIO_O_TRUNC 0x400
+#define FILEIO_O_EXCL 0x800
+#define FILEIO_O_SUPPORTED (FILEIO_O_RDONLY | FILEIO_O_WRONLY| \
+ FILEIO_O_RDWR | FILEIO_O_APPEND| \
+ FILEIO_O_CREAT | FILEIO_O_TRUNC| \
+ FILEIO_O_EXCL)
+
+/* mode_t bits */
+#define FILEIO_S_IFREG 0100000
+#define FILEIO_S_IFDIR 040000
+#define FILEIO_S_IFCHR 020000
+#define FILEIO_S_IRUSR 0400
+#define FILEIO_S_IWUSR 0200
+#define FILEIO_S_IXUSR 0100
+#define FILEIO_S_IRWXU 0700
+#define FILEIO_S_IRGRP 040
+#define FILEIO_S_IWGRP 020
+#define FILEIO_S_IXGRP 010
+#define FILEIO_S_IRWXG 070
+#define FILEIO_S_IROTH 04
+#define FILEIO_S_IWOTH 02
+#define FILEIO_S_IXOTH 01
+#define FILEIO_S_IRWXO 07
+#define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \
+ FILEIO_S_IRWXU|FILEIO_S_IRWXG| \
+ FILEIO_S_IRWXO)
+
+/* lseek(2) flags */
+#define FILEIO_SEEK_SET 0
+#define FILEIO_SEEK_CUR 1
+#define FILEIO_SEEK_END 2
+
+/* errno values */
+#define FILEIO_EPERM 1
+#define FILEIO_ENOENT 2
+#define FILEIO_EINTR 4
+#define FILEIO_EIO 5
+#define FILEIO_EBADF 9
+#define FILEIO_EACCES 13
+#define FILEIO_EFAULT 14
+#define FILEIO_EBUSY 16
+#define FILEIO_EEXIST 17
+#define FILEIO_ENODEV 19
+#define FILEIO_ENOTDIR 20
+#define FILEIO_EISDIR 21
+#define FILEIO_EINVAL 22
+#define FILEIO_ENFILE 23
+#define FILEIO_EMFILE 24
+#define FILEIO_EFBIG 27
+#define FILEIO_ENOSPC 28
+#define FILEIO_ESPIPE 29
+#define FILEIO_EROFS 30
+#define FILEIO_ENOSYS 88
+#define FILEIO_ENAMETOOLONG 91
+#define FILEIO_EUNKNOWN 9999
+
+/* limits */
+#define FILEIO_INT_MIN -2147483648L
+#define FILEIO_INT_MAX 2147483647L
+#define FILEIO_UINT_MAX 4294967295UL
+#define FILEIO_LONG_MIN -9223372036854775808LL
+#define FILEIO_LONG_MAX 9223372036854775807LL
+#define FILEIO_ULONG_MAX 18446744073709551615ULL
+
+/* Integral types as used in protocol. */
+#if 0
+typedef __int32_t fio_int_t;
+typedef __uint32_t fio_uint_t, fio_mode_t, fio_time_t;
+typedef __int64_t fio_long_t;
+typedef __uint64_t fio_ulong_t;
+#endif
+
+#define FIO_INT_LEN 4
+#define FIO_UINT_LEN 4
+#define FIO_MODE_LEN 4
+#define FIO_TIME_LEN 4
+#define FIO_LONG_LEN 8
+#define FIO_ULONG_LEN 8
+
+typedef char fio_int_t[FIO_INT_LEN];
+typedef char fio_uint_t[FIO_UINT_LEN];
+typedef char fio_mode_t[FIO_MODE_LEN];
+typedef char fio_time_t[FIO_TIME_LEN];
+typedef char fio_long_t[FIO_LONG_LEN];
+typedef char fio_ulong_t[FIO_ULONG_LEN];
+
+/* Struct stat as used in protocol. For complete independence
+ of host/target systems, it's defined as an array with offsets
+ to the members. */
+
+struct fio_stat {
+ fio_uint_t fst_dev;
+ fio_uint_t fst_ino;
+ fio_mode_t fst_mode;
+ fio_uint_t fst_nlink;
+ fio_uint_t fst_uid;
+ fio_uint_t fst_gid;
+ fio_uint_t fst_rdev;
+ fio_ulong_t fst_size;
+ fio_ulong_t fst_blksize;
+ fio_ulong_t fst_blocks;
+ fio_time_t fst_atime;
+ fio_time_t fst_mtime;
+ fio_time_t fst_ctime;
+};
+
+struct fio_timeval {
+ fio_time_t ftv_sec;
+ fio_long_t ftv_usec;
+};
+
+#endif /* GDB_FILEIO_H_ */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 9514813354b..94c30314465 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,27 @@
+2003-06-10 Gary Hade <garyhade@us.ibm.com>
+
+ * ppc.h (PPC_OPERAND_DQ): Define.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8300.h (IMM4_NS, IMM8_NS): New.
+ (h8_opcodes): Replace IMM4 with IMM4_NS in mov.b and mov.w entries.
+ Likewise IMM8 for mov.w and mov.l. Likewise IMM16U for mov.l.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * h8sx.h (enum h8_model): Add AV_H8S to distinguish from H8H.
+ (ldc): Split ccr ops from exr ops (which are only available
+ on H8S or H8SX).
+ (stc): Ditto.
+ (andc, orc, xorc): Ditto.
+ (ldmac, stmac, clrmac, mac): Change access to AV_H8S.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+ and Bernd Schmidt <bernds@redhat.com>
+ and Alexandre Oliva <aoliva@redhat.com>
+ * h8300.h: Add support for h8300sx instruction set.
+
2003-05-23 Jason Eckhardt <jle@rice.edu>
* i860.h (expand_type): Add XP_ONLY.
@@ -140,7 +164,7 @@
fields.
(h8_opcodes). Modify initializer and initializer macros to no
longer initialize the removed fields.
-
+
2002-11-19 Svein E. Seldal <Svein.Seldal@solidas.com>
* tic4x.h (c4x_insts): Fixed LDHI constraint
@@ -177,10 +201,10 @@
* cgen.h: Test __BFD_H_SEEN__ rather than BFD_VERSION_DATE.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* mips.h: Update comment for new opcodes.
(OP_MASK_VECBYTE, OP_SH_VECBYTE): New.
@@ -191,12 +215,12 @@
Don't match CPU_R4111 with INSN_4100.
2002-08-19 Elena Zannoni <ezannoni@redhat.com>
-
- From matthew green <mrg@redhat.com>
- * ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
+ From matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
instructions.
- (PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
+ (PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
PPC_OPCODE_CACHELCK, PPC_OPCODE_RFMCI): New opcode flags for the
e500x2 Integer select, branch locking, performance monitor,
cache locking and machine check APUs, respectively.
@@ -251,9 +275,9 @@
2002-05-17 Andrey Volkov <avolkov@sources.redhat.com>
- * h8300.h: Corrected defs of all control regs
+ * h8300.h: Corrected defs of all control regs
and eepmov instr.
-
+
2002-04-11 Alan Modra <amodra@bigpond.net.au>
* i386.h: Add intel mode cmpsd and movsd.
@@ -520,9 +544,9 @@ Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
2001-02-02 Patrick Macdonald <patrickm@redhat.com>
- * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
- (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
- (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
+ * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
+ (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
+ (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
2001-01-24 Karsten Keil <kkeil@suse.de>
@@ -597,35 +621,35 @@ Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
2000-12-01 Chris Demetriou <cgd@sibyte.com>
- mips.h (OP_MASK_SYSCALL, OP_SH_SYSCALL): Delete.
- (OP_MASK_CODE20, OP_SH_CODE20): Define, with values of old
- OP_*_SYSCALL definitions.
- (OP_SH_CODE19, OP_MASK_CODE19): Define, for use as
- 19 bit wait codes.
- (MIPS operand specifier comments): Remove 'm', add 'U' and
- 'J', and update the meaning of 'B' so that it's more general.
-
- * mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
- INSN_ISA5): Renumber, redefine to mean the ISA at which the
- instruction was added.
- (INSN_ISA32): New constant.
- (INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
- Renumber to avoid new and/or renumbered INSN_* constants.
- (INSN_MIPS32): Delete.
- (ISA_UNKNOWN): New constant to indicate unknown ISA.
- (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
- ISA_MIPS32): New constants, defined to be the mask of INSN_*
- constants available at that ISA level.
- (CPU_UNKNOWN): New constant to indicate unknown CPU.
- (CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
- define it with a unique value.
- (OPCODE_IS_MEMBER): Update for new ISA membership-related
- constant meanings.
-
- * mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
- definitions.
-
- * mips.h (CPU_SB1): New constant.
+ mips.h (OP_MASK_SYSCALL, OP_SH_SYSCALL): Delete.
+ (OP_MASK_CODE20, OP_SH_CODE20): Define, with values of old
+ OP_*_SYSCALL definitions.
+ (OP_SH_CODE19, OP_MASK_CODE19): Define, for use as
+ 19 bit wait codes.
+ (MIPS operand specifier comments): Remove 'm', add 'U' and
+ 'J', and update the meaning of 'B' so that it's more general.
+
+ * mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
+ INSN_ISA5): Renumber, redefine to mean the ISA at which the
+ instruction was added.
+ (INSN_ISA32): New constant.
+ (INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
+ Renumber to avoid new and/or renumbered INSN_* constants.
+ (INSN_MIPS32): Delete.
+ (ISA_UNKNOWN): New constant to indicate unknown ISA.
+ (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
+ ISA_MIPS32): New constants, defined to be the mask of INSN_*
+ constants available at that ISA level.
+ (CPU_UNKNOWN): New constant to indicate unknown CPU.
+ (CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
+ define it with a unique value.
+ (OPCODE_IS_MEMBER): Update for new ISA membership-related
+ constant meanings.
+
+ * mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
+ definitions.
+
+ * mips.h (CPU_SB1): New constant.
2000-10-20 Jakub Jelinek <jakub@redhat.com>
@@ -806,14 +830,14 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
- * d30v.h:
- (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
- (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
- (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
- (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
- (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
- (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
- (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
+ * d30v.h:
+ (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
+ (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
+ (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
+ (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
+ (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
+ (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
+ (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -823,7 +847,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2000-02-24 Nick Clifton <nickc@cygnus.com>
* cgen.h (cgen_cpu_desc): Rename field 'flags' to
- 'signed_overflow_ok_p'.
+ 'signed_overflow_ok_p'.
Delete prototypes for cgen_set_flags() and cgen_get_flags().
2000-02-24 Andrew Haley <aph@cygnus.com>
@@ -892,14 +916,14 @@ Wed Nov 24 20:28:58 1999 Jeffrey A Law (law@cygnus.com)
Sun Oct 10 01:46:56 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
- * hppa.h (pa_opcodes): Add load and store cache control to
+ * hppa.h (pa_opcodes): Add load and store cache control to
instructions. Add ordered access load and store.
* hppa.h (pa_opcode): Add new entries for addb and addib.
* hppa.h (pa_opcodes): Fix cmpb and cmpib entries.
- * hppa.h (pa_opcodes): Add entries for cmpb and cmpib.
+ * hppa.h (pa_opcodes): Add entries for cmpb and cmpib.
Thu Oct 7 00:12:25 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
@@ -983,22 +1007,22 @@ Sat Aug 28 00:25:25 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Add extrd, extrw, depd, depdi, depw, depwi.
Add supporting args.
- * hppa.h: Document new completers and args.
- * hppa.h (pa_opcodes): Add 64 bit patterns and pa2.0 syntax for uxor,
+ * 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.
- * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
+ * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
hshr, hsub, mixh, mixw, permh.
* hppa.h (pa_opcodes): Change completers in instructions to
use 'c' prefix.
- * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
+ * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
hshladd, hshradd, shrpd, and shrpw instructions. Update arg comments.
- * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
+ * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
fnegabs to use 'I' instead of 'F'.
1999-08-21 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -1016,7 +1040,7 @@ Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Add 64 bit versions of or, xor, and,
and andcm. Add 32 and 64 bit version of cmpclr, cmpiclr.
- * hppa.h: Document 64 bit condition completers.
+ * hppa.h: Document 64 bit condition completers.
Thu Aug 5 16:56:07 1999 Jerry Quinn <jquinn@nortelnetworks.com>
@@ -1035,7 +1059,7 @@ Wed Jul 28 02:04:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
- * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
+ * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
and fmpynfadd to use 'J' and 'K' instead of 'E' and 'X'.
1999-07-13 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -1192,22 +1216,22 @@ Sat Feb 13 14:13:44 1999 Richard Henderson <rth@cygnus.com>
Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
- * i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
- (x_FP, d_FP, dls_FP, sldx_FP): Define.
- Change *Suf definitions to include x and d suffixes.
- (movsx): Use w_Suf and b_Suf.
- (movzx): Likewise.
- (movs): Use bwld_Suf.
- (fld): Change ordering. Use sld_FP.
- (fild): Add Intel Syntax equivalent of fildq.
- (fst): Use sld_FP.
- (fist): Use sld_FP.
- (fstp): Use sld_FP. Add x_FP version.
- (fistp): LLongMem version for Intel Syntax.
- (fcom, fcomp): Use sld_FP.
- (fadd, fiadd, fsub): Use sld_FP.
- (fsubr): Use sld_FP.
- (fmul, fimul, fdvi, fidiv, fdivr): Use sld_FP.
+ * i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
+ (x_FP, d_FP, dls_FP, sldx_FP): Define.
+ Change *Suf definitions to include x and d suffixes.
+ (movsx): Use w_Suf and b_Suf.
+ (movzx): Likewise.
+ (movs): Use bwld_Suf.
+ (fld): Change ordering. Use sld_FP.
+ (fild): Add Intel Syntax equivalent of fildq.
+ (fst): Use sld_FP.
+ (fist): Use sld_FP.
+ (fstp): Use sld_FP. Add x_FP version.
+ (fistp): LLongMem version for Intel Syntax.
+ (fcom, fcomp): Use sld_FP.
+ (fadd, fiadd, fsub): Use sld_FP.
+ (fsubr): Use sld_FP.
+ (fmul, fimul, fdvi, fidiv, fdivr): Use sld_FP.
1999-01-27 Doug Evans <devans@casey.cygnus.com>
@@ -1777,7 +1801,7 @@ Fri Apr 4 14:02:32 1997 Ian Lance Taylor <ian@cygnus.com>
Tue Mar 25 22:57:26 1997 Stu Grossman (grossman@critters.cygnus.com)
- * v850.h (extract): Make unsigned.
+ * v850.h (extract): Make unsigned.
Mon Mar 24 14:38:15 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -1995,7 +2019,7 @@ Wed Oct 2 21:31:26 1996 Jeffrey A Law (law@cygnus.com)
Fri Sep 27 18:26:46 1996 Stu Grossman (grossman@critters.cygnus.com)
- * v850.h: Add new flag to indicate this instruction uses a PC
+ * v850.h: Add new flag to indicate this instruction uses a PC
displacement.
Fri Sep 13 14:58:13 1996 Jeffrey A Law (law@cygnus.com)
@@ -2364,9 +2388,9 @@ Mon Jan 23 16:45:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
- * vax.h (struct vot_wot, field `args'): Make it pointer to const
+ * vax.h (struct vot_wot, field `args'): Make it pointer to const
char.
- (struct vot, field `name'): ditto.
+ (struct vot, field `name'): ditto.
Thu Jan 19 14:47:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
@@ -2622,7 +2646,7 @@ Thu Aug 5 09:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
Fri Jul 30 18:41:11 1993 John Gilmore (gnu@cygnus.com)
- * sparc.h (F_JSR, F_UNBR, F_CONDBR): Add new flags to mark
+ * sparc.h (F_JSR, F_UNBR, F_CONDBR): Add new flags to mark
jump instructions, for use in disassemblers.
Thu Jul 22 07:25:27 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -2741,29 +2765,29 @@ Fri Apr 9 13:26:16 1993 Jim Kingdon (kingdon@cygnus.com)
Thu Mar 18 13:45:31 1993 Per Bothner (bothner@rtl.cygnus.com)
- * i386.h: 486 extensions from John Hassey (hassey@dg-rtp.dg.com).
- * mips.h: Add casts, to suppress warnings about shifting too much.
- * m68k.h: Document the placement code '9'.
+ * i386.h: 486 extensions from John Hassey (hassey@dg-rtp.dg.com).
+ * mips.h: Add casts, to suppress warnings about shifting too much.
+ * m68k.h: Document the placement code '9'.
Thu Feb 18 02:03:14 1993 John Gilmore (gnu@cygnus.com)
- * m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
+ * m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
allows callers to break up the large initialized struct full of
opcodes into two half-sized ones. This permits GCC to compile
this module, since it takes exponential space for initializers.
- (numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
+ (numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
Thu Feb 4 02:06:56 1993 John Gilmore (gnu@cygnus.com)
- * a29k.h: Remove RCS crud, update GPL to v2, update copyrights.
- * convex.h: Added, from GDB's convx-opcode.h. Added CONST to all
+ * a29k.h: Remove RCS crud, update GPL to v2, update copyrights.
+ * convex.h: Added, from GDB's convx-opcode.h. Added CONST to all
initialized structs in it.
Thu Jan 28 21:32:22 1993 John Gilmore (gnu@cygnus.com)
Delta 88 changes inspired by Carl Greco, <cgreco@Creighton.Edu>:
- * m88k.h (PMEM): Avoid previous definition from <sys/param.h>.
- (AND): Change to AND_ to avoid ansidecl.h `AND' conflict.
+ * m88k.h (PMEM): Avoid previous definition from <sys/param.h>.
+ (AND): Change to AND_ to avoid ansidecl.h `AND' conflict.
Sat Jan 23 18:10:49 PST 1993 Ralph Campbell (ralphc@pyramid.com)
@@ -2779,7 +2803,7 @@ Sun Jan 3 14:13:35 1993 Steve Chamberlain (sac@thepub.cygnus.com)
Mon Dec 21 21:29:08 1992 Stu Grossman (grossman at cygnus.com)
- * hppa.h: Move handy aliases to the front. Fix masks for extract
+ * hppa.h: Move handy aliases to the front. Fix masks for extract
and deposit instructions.
Sat Dec 12 16:09:48 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -2814,7 +2838,7 @@ Tue Sep 22 14:08:14 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
Tue Sep 22 00:38:41 1992 John Gilmore (gnu@cygnus.com)
- * mips.h (break): Disassemble the argument. Patch from
+ * mips.h (break): Disassemble the argument. Patch from
jonathan@cs.stanford.edu (Jonathan Stone).
Wed Sep 9 11:25:28 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -2851,10 +2875,10 @@ Wed Aug 19 11:22:24 1992 Ian Lance Taylor (ian@cygnus.com)
Fri Aug 14 14:20:38 1992 Per Bothner (bothner@cygnus.com)
- * m68k.h: Merged in patches (mostly m68040-specific) from
+ * m68k.h: Merged in patches (mostly m68040-specific) from
Colin Smith <colin@wrs.com>.
- * m68k.h: Merged m68kmri.h and m68k.h (using the former as a
+ * m68k.h: Merged m68kmri.h and m68k.h (using the former as a
base). Also cleaned up duplicates, re-ordered instructions for
the sake of dis-assembling (so aliases come after standard names).
* m68kmri.h: Now just defines some macros, and #includes m68k.h.
@@ -2872,24 +2896,24 @@ Mon Aug 10 23:22:33 1992 Ken Raeburn (raeburn@cygnus.com)
Sun Jun 28 13:29:03 1992 Fred Fish (fnf@cygnus.com)
- * h8300.h: Finish filling in all the holes in the opcode table,
+ * h8300.h: Finish filling in all the holes in the opcode table,
so that the Lucid C compiler can digest this as well...
Fri Jun 26 21:27:17 1992 John Gilmore (gnu at cygnus.com)
- * i386.h: Add setc, setnc, addr16, data16, repz, repnz aliases.
+ * i386.h: Add setc, setnc, addr16, data16, repz, repnz aliases.
Fix opcodes on various sizes of fild/fist instructions
(16bit=no suffix, 32bit="l" suffix, 64bit="ll" suffix).
Use tabs to indent for comments. Fixes suggested by Minh Tran-Le.
Thu Jun 25 16:13:26 1992 Stu Grossman (grossman at cygnus.com)
- * h8300.h: Fill in all the holes in the opcode table so that the
+ * h8300.h: Fill in all the holes in the opcode table so that the
losing HPUX C compiler can digest this...
Thu Jun 11 12:15:25 1992 John Gilmore (gnu at cygnus.com)
- * mips.h: Fix decoding of coprocessor instructions, somewhat.
+ * mips.h: Fix decoding of coprocessor instructions, somewhat.
(Fix by Eric Anderson, 3jean@maas-neotek.arc.nasa.gov.)
Thu May 28 11:17:44 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
@@ -2899,35 +2923,35 @@ Thu May 28 11:17:44 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
Tue May 5 14:23:27 1992 Per Bothner (bothner@rtl.cygnus.com)
- * mips.h: Add some more opcode synonyms (from Frank Yellin,
+ * mips.h: Add some more opcode synonyms (from Frank Yellin,
fy@lucid.com).
Thu Apr 16 18:25:26 1992 Per Bothner (bothner@cygnus.com)
- * rs6k.h: New version from IBM (Metin).
+ * rs6k.h: New version from IBM (Metin).
Thu Apr 9 00:31:19 1992 Per Bothner (bothner@rtl.cygnus.com)
* rs6k.h: Fix incorrect extended opcode for instructions `fm'
- and `fd'. (From metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).)
+ and `fd'. (From metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).)
Tue Apr 7 13:38:47 1992 Stu Grossman (grossman at cygnus.com)
- * rs6k.h: Move from ../../gdb/rs6k-opcode.h.
+ * rs6k.h: Move from ../../gdb/rs6k-opcode.h.
Fri Apr 3 11:30:20 1992 Fred Fish (fnf@cygnus.com)
- * m68k.h (one, two): Cast macro args to unsigned to suppress
+ * m68k.h (one, two): Cast macro args to unsigned to suppress
complaints from compiler and lint about integer overflow during
shift.
Sun Mar 29 12:22:08 1992 John Gilmore (gnu at cygnus.com)
- * sparc.h (OP): Avoid signed overflow when shifting to high order bit.
+ * sparc.h (OP): Avoid signed overflow when shifting to high order bit.
Fri Mar 6 00:22:38 1992 John Gilmore (gnu at cygnus.com)
- * mips.h: Make bitfield layout depend on the HOST compiler,
+ * mips.h: Make bitfield layout depend on the HOST compiler,
not on the TARGET system.
Fri Feb 21 01:29:51 1992 K. Richard Pixley (rich@cygnus.com)
@@ -2942,15 +2966,15 @@ Thu Jan 30 07:31:44 1992 Steve Chamberlain (sac at rtl.cygnus.com)
Thu Jan 30 01:07:24 1992 John Gilmore (gnu at cygnus.com)
- * sparc.h: Remove "cypress" architecture. Remove "fitox" and
+ * sparc.h: Remove "cypress" architecture. Remove "fitox" and
similar instructions -- they've been renamed to "fitoq", etc.
REALLY fix tsubcctv. Fix "fcmpeq" and "fcmpq" which had wrong
number of arguments.
- * h8300.h: Remove extra ; which produces compiler warning.
+ * h8300.h: Remove extra ; which produces compiler warning.
Tue Jan 28 22:59:22 1992 Stu Grossman (grossman at cygnus.com)
- * sparc.h: fix opcode for tsubcctv.
+ * sparc.h: fix opcode for tsubcctv.
Tue Jan 7 17:19:39 1992 K. Richard Pixley (rich at cygnus.com)
@@ -2958,7 +2982,7 @@ Tue Jan 7 17:19:39 1992 K. Richard Pixley (rich at cygnus.com)
Fri Dec 27 10:55:50 1991 Per Bothner (bothner at cygnus.com)
- * sparc.h (nop): Made the 'lose' field be even tighter,
+ * sparc.h (nop): Made the 'lose' field be even tighter,
so only a standard 'nop' is disassembled as a nop.
Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
@@ -2968,7 +2992,7 @@ Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
- * m68k.h, sparc.h: ANSIfy enums.
+ * m68k.h, sparc.h: ANSIfy enums.
Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 02f415be846..4318dccbc09 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -26,119 +26,219 @@
typedef int op_type;
-#define Hex0 0
-#define Hex1 1
-#define Hex2 2
-#define Hex3 3
-#define Hex4 4
-#define Hex5 5
-#define Hex6 6
-#define Hex7 7
-#define Hex8 8
-#define Hex9 9
-#define HexA 10
-#define HexB 11
-#define HexC 12
-#define HexD 13
-#define HexE 14
-#define HexF 15
-
-#define L_8 0x01
-#define L_16 0x02
-#define L_32 0x04
-#define L_P 0x08
-#define L_24 0x10
-#define MEMRELAX 0x20 /* Move insn which may relax. */
-#define SRC 0x40
-#define DST 0x80
-
-#define REG 0x100
-#define EXR 0x200
-#define MACREG 0x800
-#define SRC_IN_DST 0x400
-#define IMM 0x1000
-#define DISP 0x2000
-#define IND 0x4000
-#define INC 0x8000
-#define DEC 0x10000
-#define L_3 0x20000
-#define KBIT 0x40000
-#define DBIT 0x80000
-#define DISPREG 0x100000
-#define IGNORE 0x200000
-#define E 0x400000 /* FIXME: end of nibble sequence? */
-#define L_2 0x800000
-#define B30 0x1000000 /* Bit 3 must be low. */
-#define B31 0x2000000 /* Bit 3 must be high. */
-#define CCR 0x4000000
-#define ABS 0x8000000
-#define ABSJMP 0x10000000
-#define ABS8MEM 0x20000000
-#define PCREL 0x40000000
-#define MEMIND 0x80000000
-
-#define IMM3 IMM | L_3
-#define IMM2 IMM | L_2
-
-#define SIZE (L_2 | L_3 | L_8 | L_16 | L_32 | L_P | L_24)
-#define MODE (REG | IMM | DISP | IND | INC | DEC | CCR | ABS | MEMIND | EXR)
-
-#define RD8 (DST | L_8 | REG)
-#define RD16 (DST | L_16 | REG)
-#define RD32 (DST | L_32 | REG)
-#define RS8 (SRC | L_8 | REG)
-#define RS16 (SRC | L_16 | REG)
-#define RS32 (SRC | L_32 | REG)
-
-#define RSP (SRC | L_P | REG)
-#define RDP (DST | L_P | REG)
-
-#define IMM8 (IMM | SRC | L_8)
-#define IMM16 (IMM | SRC | L_16)
-#define IMM32 (IMM | SRC | L_32)
-
-#define ABS8SRC (SRC | ABS | L_8 | ABS8MEM)
-#define ABS8DST (DST | ABS | L_8 | ABS8MEM)
-
-#define DISP8 (PCREL | L_8)
-#define DISP16 (PCREL | L_16)
-
-#define DISP8SRC (DISP | L_8 | SRC)
-#define DISP16SRC (DISP | L_16 | SRC)
-
-#define DISP8DST (DISP | L_8 | DST)
-#define DISP16DST (DISP | L_16 | DST)
-
-#define ABS16SRC (SRC | ABS | L_16)
-#define ABS16DST (DST | ABS | L_16)
-#define ABS24SRC (SRC | ABS | L_24)
-#define ABS24DST (DST | ABS | L_24)
-#define ABS32SRC (SRC | ABS | L_32)
-#define ABS32DST (DST | ABS | L_32)
-
-#define RDDEC (DST | DEC)
-#define RSINC (SRC | INC)
-#define RDINC (DST | INC)
-
-#define RDIND (DST | IND)
-#define RSIND (SRC | IND)
-
-#define MS32 (SRC | L_32 | MACREG)
-#define MD32 (DST | L_32 | MACREG)
+enum h8_flags {
+ L_2 = 0x10,
+ L_3 = 0x20,
+ /* 3 bit constant, zero not accepted. */
+ L_3NZ = 0x30,
+ L_4 = 0x40,
+ L_5 = 0x50,
+ L_8 = 0x60,
+ L_8U = 0x70,
+ L_16 = 0x80,
+ L_16U = 0x90,
+ L_24 = 0xA0,
+ L_32 = 0xB0,
+ L_P = 0xC0,
+
+ /* Mask to isolate the L_x size bits. */
+ SIZE = 0xF0,
+
+ REG = 0x0100,
+ ABS = 0x0200,
+ MEMIND = 0x0300,
+ IMM = 0x0400,
+ DISP = 0x0500,
+ IND = 0x0600,
+ POSTINC = 0x0700,
+ POSTDEC = 0x0800,
+ PREINC = 0x0900,
+ PREDEC = 0x0A00,
+ PCREL = 0x0B00,
+ KBIT = 0x0C00,
+ DBIT = 0x0D00,
+ CONST_2 = 0x0E00,
+ CONST_4 = 0x0F00,
+ CONST_8 = 0x1000,
+ CONST_16 = 0x1100,
+ INDEXB = 0x1200,
+ INDEXW = 0x1300,
+ INDEXL = 0x1400,
+ PCIDXB = 0x1500,
+ PCIDXW = 0x1600,
+ PCIDXL = 0x1700,
+ VECIND = 0x1800,
+ LOWREG = 0x1900,
+ DATA = 0x2000,
+
+ /* Synonyms. */
+ INC = POSTINC,
+ DEC = PREDEC,
+ /* Control Registers. */
+ CCR = 0x4000,
+ EXR = 0x4100,
+ MACH = 0x4200,
+ MACL = 0x4300,
+ RESERV1 = 0x4400,
+ RESERV2 = 0x4500,
+ VBR = 0x4600,
+ SBR = 0x4700,
+ MACREG = 0x4800,
+ CCR_EXR = 0x4900,
+ VBR_SBR = 0x4A00,
+ CC_EX_VB_SB = 0x4B00,
+ RESERV3 = 0x4C00,
+ RESERV4 = 0x4D00,
+ RESERV5 = 0x4E00,
+ RESERV6 = 0x4F00,
+
+ /* Mask to isolate the addressing mode bits (REG .. PREDEC). */
+ MODE = 0x7F00,
+
+ CTRL = 0x4000,
+
+ NO_SYMBOLS = 0x8000,
+ SRC = 0x10000,
+ DST = 0x20000,
+ OP3 = 0x40000,
+ MEMRELAX = 0x80000, /* Move insn which may relax. */
+
+ DISPREG = 0x100000,
+ IGNORE = 0x200000,
+ ABSJMP = 0x400000,
+
+ B00 = 0x800000, /* Bit 0 must be low. */
+ B01 = 0x1000000, /* Bit 0 must be high. */
+ B10 = 0x2000000, /* Bit 1 must be low. */
+ B11 = 0x4000000, /* Bit 1 must be high. */
+ B20 = 0x8000000, /* Bit 2 must be low. */
+ B21 = 0x10000000, /* Bit 2 must be high. */
+ B30 = 0x20000000, /* Bit 3 must be low. */
+ B31 = 0x40000000, /* Bit 3 must be high. */
+ E = 0x80000000, /* End of nibble sequence. */
+
+ IMM3 = IMM | L_3,
+ IMM4 = IMM | L_4,
+ IMM5 = IMM | L_5,
+ IMM3NZ = IMM | L_3NZ,
+ IMM2 = IMM | L_2,
+
+ IMM8 = IMM | SRC | L_8,
+ IMM16 = IMM | SRC | L_16,
+ IMM16U = IMM | SRC | L_16U,
+ IMM32 = IMM | SRC | L_32,
+
+ IMM3NZ_NS = IMM3NZ | NO_SYMBOLS,
+ IMM2_NS = IMM2 | NO_SYMBOLS,
+ IMM4_NS = IMM4 | NO_SYMBOLS,
+ IMM8_NS = IMM8 | NO_SYMBOLS,
+ IMM16_NS = IMM16 | NO_SYMBOLS,
+ IMM16U_NS = IMM16U | NO_SYMBOLS,
+
+ RD8 = DST | L_8 | REG,
+ RD16 = DST | L_16 | REG,
+ RD32 = DST | L_32 | REG,
+ R3_8 = OP3 | L_8 | REG,
+ R3_16 = OP3 | L_16 | REG,
+ R3_32 = OP3 | L_32 | REG,
+ RS8 = SRC | L_8 | REG,
+ RS16 = SRC | L_16 | REG,
+ RS32 = SRC | L_32 | REG,
+
+ RSP = SRC | L_P | REG,
+ RDP = DST | L_P | REG,
+
+ PCREL8 = PCREL | L_8,
+ PCREL16 = PCREL | L_16,
+
+ OP3PCREL8 = OP3 | PCREL | L_8,
+ OP3PCREL16 = OP3 | PCREL | L_16,
+
+ INDEXB16 = INDEXB | L_16,
+ INDEXW16 = INDEXW | L_16,
+ INDEXL16 = INDEXL | L_16,
+ INDEXB16D = INDEXB | L_16 | DST,
+ INDEXW16D = INDEXW | L_16 | DST,
+ INDEXL16D = INDEXL | L_16 | DST,
+
+ INDEXB32 = INDEXB | L_32,
+ INDEXW32 = INDEXW | L_32,
+ INDEXL32 = INDEXL | L_32,
+ INDEXB32D = INDEXB | L_32 | DST,
+ INDEXW32D = INDEXW | L_32 | DST,
+ INDEXL32D = INDEXL | L_32 | DST,
+
+ DISP2SRC = DISP | L_2 | SRC,
+ DISP16SRC = DISP | L_16 | SRC,
+ DISP32SRC = DISP | L_32 | SRC,
+
+ DISP2DST = DISP | L_2 | DST,
+ DISP16DST = DISP | L_16 | DST,
+ DISP32DST = DISP | L_32 | DST,
+
+ DSTDISPREG = DST | DISPREG,
+ SRCDISPREG = SRC | DISPREG,
+
+ ABS8SRC = SRC | ABS | L_8,
+ ABS16SRC = SRC | ABS | L_16U,
+ ABS24SRC = SRC | ABS | L_24,
+ ABS32SRC = SRC | ABS | L_32,
+
+ ABS8DST = DST | ABS | L_8,
+ ABS16DST = DST | ABS | L_16U,
+ ABS24DST = DST | ABS | L_24,
+ ABS32DST = DST | ABS | L_32,
+
+ ABS8OP3 = OP3 | ABS | L_8,
+ ABS16OP3 = OP3 | ABS | L_16U,
+ ABS24OP3 = OP3 | ABS | L_24,
+ ABS32OP3 = OP3 | ABS | L_32,
+
+ RDDEC = DST | DEC,
+ RSINC = SRC | INC,
+ RDINC = DST | INC,
+
+ RSPOSTINC = SRC | POSTINC,
+ RDPOSTINC = DST | POSTINC,
+ RSPREINC = SRC | PREINC,
+ RDPREINC = DST | PREINC,
+ RSPOSTDEC = SRC | POSTDEC,
+ RDPOSTDEC = DST | POSTDEC,
+ RSPREDEC = SRC | PREDEC,
+ RDPREDEC = DST | PREDEC,
+
+ RSIND = SRC | IND,
+ RDIND = DST | IND,
+ R3_IND = OP3 | IND,
+
+#define MS32 (SRC | L_32 | MACREG)
+#define MD32 (DST | L_32 | MACREG)
#if 1
-#define OR8 RS8 /* ??? OR as in One Register? */
-#define OR16 RS16
-#define OR32 RS32
+ OR8 = RS8, /* ??? OR as in One Register. */
+ OR16 = RS16,
+ OR32 = RS32,
#else
-#define OR8 RD8
-#define OR16 RD16
-#define OR32 RD32
+ OR8 = RD8,
+ OR16 = RD16,
+ OR32 = RD32
#endif
+};
+
+enum ctrlreg {
+ C_CCR = 0,
+ C_EXR = 1,
+ C_MACH = 2,
+ C_MACL = 3,
+ C_VBR = 6,
+ C_SBR = 7
+};
+
+enum {MAX_CODE_NIBBLES = 33};
struct code
{
- op_type nib[30];
+ op_type nib[MAX_CODE_NIBBLES];
};
struct arg
@@ -146,10 +246,18 @@ struct arg
op_type nib[3];
};
+/* Availability of instructions on processor models. */
+enum h8_model {
+ AV_H8,
+ AV_H8H,
+ AV_H8S,
+ AV_H8SX
+};
+
struct h8_opcode
{
int how;
- int inbase;
+ enum h8_model available;
int time;
char *name;
struct arg args;
@@ -158,454 +266,1627 @@ struct h8_opcode
#ifdef DEFINE_TABLE
-#define BITOP(code, imm, name, op00, op01,op10,op11, op20,op21,op30)\
-{ code, 1, 2, name, {{imm,RD8,E}}, {{op00, op01, imm, RD8, E, 0, 0, 0, 0}}},\
-{ code, 1, 6, name, {{imm,RDIND,E}},{{op10, op11, B30|RDIND, 0, op00,op01, imm, 0, E}}},\
-{ code, 1, 6, name, {{imm,ABS8DST,E}},{{op20, op21, ABS8DST, IGNORE, op00,op01, imm, 0,E}}}\
-,{ code, 0, 6, name, {{imm,ABS16DST,E}},{{0x6,0xa,0x1,op30,ABS16DST,IGNORE,IGNORE,IGNORE, op00,op01, imm, 0,E}}},\
-{ code, 0, 6, name, {{imm,ABS32DST,E}},{{0x6,0xa,0x3,op30,ABS32DST,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE, op00,op01, imm, 0,E}}}
-
-
-#define EBITOP(code, imm, name, op00, op01,op10,op11, op20,op21,op30)\
- BITOP(code,imm, name, op00+1, op01, op10,op11, op20,op21,op30),\
- BITOP(code,RS8, name, op00, op01, op10,op11, op20,op21,op30)
-
-#define WTWOP(code,name, op1, op2) \
-{ code, 1, 2, name, {{RS16, RD16, E}}, {{ op1, op2, RS16, RD16, E, 0, 0, 0, 0}}}
+#define DATA2 DATA, DATA
+#define DATA3 DATA, DATA, DATA
+#define DATA5 DATA, DATA, DATA, DATA, DATA
+#define DATA7 DATA, DATA, DATA, DATA, DATA, DATA, DATA
+
+#define IMM8LIST IMM8, DATA
+#define IMM16LIST IMM16, DATA3
+#define IMM16ULIST IMM16U, DATA3
+#define IMM24LIST IMM24, DATA5
+#define IMM32LIST IMM32, DATA7
+
+#define DISP16LIST DISP | L_16, DATA3
+#define DISP24LIST DISP | L_24, DATA5
+#define DISP32LIST DISP | L_32, DATA7
+
+#define ABS8LIST ABS | L_8, DATA
+#define ABS16LIST ABS | L_16U, DATA3
+#define ABS24LIST ABS | L_24, DATA5
+#define ABS32LIST ABS | L_32, DATA7
+
+#define DSTABS8LIST DST | ABS | L_8, DATA
+#define DSTABS16LIST DST | ABS | L_16U, DATA3
+#define DSTABS24LIST DST | ABS | L_24, DATA5
+#define DSTABS32LIST DST | ABS | L_32, DATA7
+
+#define OP3ABS8LIST OP3 | ABS | L_8, DATA
+#define OP3ABS16LIST OP3 | ABS | L_16, DATA3
+#define OP3ABS24LIST OP3 | ABS | L_24, DATA5
+#define OP3ABS32LIST OP3 | ABS | L_32, DATA7
+
+#define DSTDISP16LIST DST | DISP | L_16, DATA3
+#define DSTDISP24LIST DST | DISP | L_24, DATA5
+#define DSTDISP32LIST DST | DISP | L_32, DATA7
+
+#define A16LIST L_16, DATA3
+#define A24LIST L_24, DATA5
+#define A32LIST L_32, DATA7
+
+/* Extended Operand Prefixes: */
+
+#define PREFIX_010 0x0, 0x1, 0x0
+#define PREFIX_015 0x0, 0x1, 0x5
+#define PREFIX_017 0x0, 0x1, 0x7
+
+#define PREFIX_0100 0x0, 0x1, 0x0, 0x0
+#define PREFIX_010_D2 0x0, 0x1, 0x0, B30 | B21 | DISP2SRC
+#define PREFIX_0101 0x0, 0x1, 0x0, 0x1
+#define PREFIX_0102 0x0, 0x1, 0x0, 0x2
+#define PREFIX_0103 0x0, 0x1, 0x0, 0x3
+#define PREFIX_0104 0x0, 0x1, 0x0, 0x4
+#define PREFIX_0105 0x0, 0x1, 0x0, 0x5
+#define PREFIX_0106 0x0, 0x1, 0x0, 0x6
+#define PREFIX_0107 0x0, 0x1, 0x0, 0x7
+#define PREFIX_0108 0x0, 0x1, 0x0, 0x8
+#define PREFIX_0109 0x0, 0x1, 0x0, 0x9
+#define PREFIX_010A 0x0, 0x1, 0x0, 0xa
+#define PREFIX_010D 0x0, 0x1, 0x0, 0xd
+#define PREFIX_010E 0x0, 0x1, 0x0, 0xe
+
+#define PREFIX_0150 0x0, 0x1, 0x5, 0x0
+#define PREFIX_015_D2 0x0, 0x1, 0x5, B30 | B21 | DISP2SRC
+#define PREFIX_0151 0x0, 0x1, 0x5, 0x1
+#define PREFIX_0152 0x0, 0x1, 0x5, 0x2
+#define PREFIX_0153 0x0, 0x1, 0x5, 0x3
+#define PREFIX_0154 0x0, 0x1, 0x5, 0x4
+#define PREFIX_0155 0x0, 0x1, 0x5, 0x5
+#define PREFIX_0156 0x0, 0x1, 0x5, 0x6
+#define PREFIX_0157 0x0, 0x1, 0x5, 0x7
+#define PREFIX_0158 0x0, 0x1, 0x5, 0x8
+#define PREFIX_0159 0x0, 0x1, 0x5, 0x9
+#define PREFIX_015A 0x0, 0x1, 0x5, 0xa
+#define PREFIX_015D 0x0, 0x1, 0x5, 0xd
+#define PREFIX_015E 0x0, 0x1, 0x5, 0xe
+#define PREFIX_015F 0x0, 0x1, 0x5, 0xf
+
+#define PREFIX_0170 0x0, 0x1, 0x7, 0x0
+#define PREFIX_017_D2S 0x0, 0x1, 0x7, B30 | B21 | DISP2SRC
+#define PREFIX_017_D2D 0x0, 0x1, 0x7, B30 | B21 | DISP2DST
+#define PREFIX_0171 0x0, 0x1, 0x7, 0x1
+#define PREFIX_0172 0x0, 0x1, 0x7, 0x2
+#define PREFIX_0173 0x0, 0x1, 0x7, 0x3
+#define PREFIX_0174 0x0, 0x1, 0x7, 0x4
+#define PREFIX_0175 0x0, 0x1, 0x7, 0x5
+#define PREFIX_0176 0x0, 0x1, 0x7, 0x6
+#define PREFIX_0177 0x0, 0x1, 0x7, 0x7
+#define PREFIX_0178 0x0, 0x1, 0x7, 0x8
+#define PREFIX_0179 0x0, 0x1, 0x7, 0x9
+#define PREFIX_017A 0x0, 0x1, 0x7, 0xa
+#define PREFIX_017D 0x0, 0x1, 0x7, 0xd
+#define PREFIX_017E 0x0, 0x1, 0x7, 0xe
+#define PREFIX_017F 0x0, 0x1, 0x7, 0xf
+
+#define PREFIX_6A15 0x6, 0xa, 0x1, 0x5
+#define PREFIX_6A35 0x6, 0xa, 0x3, 0x5
+#define PREFIX_6B15 0x6, 0xb, 0x1, 0x5
+#define PREFIX_6B35 0x6, 0xb, 0x3, 0x5
+
+#define PREFIX_78R4 0x7, 0x8, B31 | DISPREG, 0x4
+#define PREFIX_78R5 0x7, 0x8, B31 | DISPREG, 0x5
+#define PREFIX_78R6 0x7, 0x8, B31 | DISPREG, 0x6
+#define PREFIX_78R7 0x7, 0x8, B31 | DISPREG, 0x7
+
+#define PREFIX_78R4W 0x7, 0x8, B30 | DISPREG, 0x4
+#define PREFIX_78R5W 0x7, 0x8, B30 | DISPREG, 0x5
+#define PREFIX_78R6W 0x7, 0x8, B30 | DISPREG, 0x6
+#define PREFIX_78R7W 0x7, 0x8, B30 | DISPREG, 0x7
+
+#define PREFIX_78R4WD 0x7, 0x8, B30 | DSTDISPREG, 0x4
+#define PREFIX_78R5WD 0x7, 0x8, B30 | DSTDISPREG, 0x5
+#define PREFIX_78R6WD 0x7, 0x8, B30 | DSTDISPREG, 0x6
+#define PREFIX_78R7WD 0x7, 0x8, B30 | DSTDISPREG, 0x7
+
+#define PREFIX_7974 0x7, 0x9, 0x7, 0x4
+#define PREFIX_7A74 0x7, 0xa, 0x7, 0x4
+#define PREFIX_7A7C 0x7, 0xa, 0x7, 0xc
+
+
+/* Source standard fragment: */
+#define FROM_IND 0, RSIND
+#define FROM_POSTINC 8, RSPOSTINC
+#define FROM_POSTDEC 10, RSPOSTDEC
+#define FROM_PREINC 9, RSPREINC
+#define FROM_PREDEC 11, RSPREDEC
+#define FROM_DISP2 B30 | B20 | DISP2SRC, DISPREG
+#define FROM_DISP16 12, B30 | DISPREG
+#define FROM_DISP32 12, B31 | DISPREG
+#define FROM_DISP16B 13, B30 | DISPREG
+#define FROM_DISP16W 14, B30 | DISPREG
+#define FROM_DISP16L 15, B30 | DISPREG
+#define FROM_DISP32B 13, B31 | DISPREG
+#define FROM_DISP32W 14, B31 | DISPREG
+#define FROM_DISP32L 15, B31 | DISPREG
+#define FROM_ABS16 4, B30 | IGNORE
+#define FROM_ABS32 4, B31 | IGNORE
+
+/* Destination standard fragment: */
+#define TO_IND 0, RDIND
+#define TO_IND_MOV 0, RDIND | B30
+#define TO_POSTINC 8, RDPOSTINC
+#define TO_POSTINC_MOV 8, RDPOSTINC | B30
+#define TO_POSTDEC 10, RDPOSTDEC
+#define TO_POSTDEC_MOV 10, RDPOSTDEC | B30
+#define TO_PREINC 9, RDPREINC
+#define TO_PREINC_MOV 9, RDPREINC | B30
+#define TO_PREDEC 11, RDPREDEC
+#define TO_PREDEC_MOV 11, RDPREDEC | B30
+#define TO_DISP2 B30 | B20 | DISP2DST, DSTDISPREG
+#define TO_DISP2_MOV B30 | B20 | DISP2DST, DSTDISPREG | B30
+#define TO_DISP16 12, B30 | DSTDISPREG
+#define TO_DISP32 12, B31 | DSTDISPREG
+#define TO_DISP16B 13, B30 | DSTDISPREG
+#define TO_DISP16W 14, B30 | DSTDISPREG
+#define TO_DISP16L 15, B30 | DSTDISPREG
+#define TO_DISP32B 13, B31 | DSTDISPREG
+#define TO_DISP32W 14, B31 | DSTDISPREG
+#define TO_DISP32L 15, B31 | DSTDISPREG
+#define TO_ABS16 4, B30 | IGNORE
+#define TO_ABS32 4, B31 | IGNORE
+
+/* Source fragment for three-word instruction: */
+#define TFROM_IND 6, 9, B30 | RSIND, 12
+#define TFROM_DISP2 6, 9, B30 | DISPREG, 12
+#define TFROM_ABS16 6, 11, B30 | B20 | B10 | IGNORE, 12, ABS16LIST
+#define TFROM_ABS32 6, 11, B30 | B20 | B11 | IGNORE, 12, ABS32LIST
+#define TFROM_POSTINC 6, 13, B30 | RSPOSTINC, 12
+#define TFROM_PREINC 6, 13, B30 | RSPREINC, 12
+#define TFROM_POSTDEC 6, 13, B30 | RSPOSTDEC, 12
+#define TFROM_PREDEC 6, 13, B30 | RSPREDEC, 12
+#define TFROM_DISP16 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32 6, 11, 2, 12, DISP32LIST
+#define TFROM_DISP16B 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16W 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16L 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32B 6, 11, 2, 12, DISP32LIST
+#define TFROM_DISP32W 6, 11, 2, 12, DISP32LIST
+#define TFROM_DISP32L 6, 11, 2, 12, DISP32LIST
+#define TFROM_ABS16W 6, 11, 1, 12, ABS16LIST
+#define TFROM_ABS32W 6, 11, 3, 12, ABS32LIST
+
+/* Source fragment for three-word instruction: */
+#define TFROM_IND_B 6, 8, B30 | RSIND, 12
+#define TFROM_ABS16_B 6, 10, B30 | B20 | B10 | IGNORE, 12, ABS16LIST
+#define TFROM_ABS32_B 6, 10, B30 | B20 | B11 | IGNORE, 12, ABS32LIST
+
+#define TFROM_DISP2_B 6, 8, B30 | DISPREG, 12
+#define TFROM_POSTINC_B 6, 12, B30 | RSPOSTINC, 12
+#define TFROM_PREINC_B 6, 12, B30 | RSPREINC, 12
+#define TFROM_POSTDEC_B 6, 12, B30 | RSPOSTDEC, 12
+#define TFROM_PREDEC_B 6, 12, B30 | RSPREDEC, 12
+#define TFROM_DISP16_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32_B 6, 10, 2, 12, DISP32LIST
+#define TFROM_DISP16B_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16W_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16L_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32B_B 6, 10, 2, 12, DISP32LIST
+#define TFROM_DISP32W_B 6, 10, 2, 12, DISP32LIST
+#define TFROM_DISP32L_B 6, 10, 2, 12, DISP32LIST
+
+#define TFROM_ABS16W_B 6, 10, 1, 12, ABS16LIST
+#define TFROM_ABS32W_B 6, 10, 3, 12, ABS32LIST
+
+/* Extended Operand Class Expanders: */
+
+#define MOVFROM_STD(CODE, PREFIX, NAME, SRC, SRC_INFIX) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, SRC_INFIX, TO_IND_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, SRC_INFIX, TO_POSTINC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, SRC_INFIX, TO_POSTDEC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, SRC_INFIX, TO_PREINC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, SRC_INFIX, TO_PREDEC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP2_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP16, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP32, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16B, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16W, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16L, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32B, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32W, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32L, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS16, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS32, DSTABS32LIST, E}}}
+
+#define MOVFROM_AD(CODE, PREFIX, NAME, SRC, SRC_INFIX, SRC_SUFFIX) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, SRC_INFIX, TO_IND_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, SRC_INFIX, TO_POSTINC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, SRC_INFIX, TO_POSTDEC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, SRC_INFIX, TO_PREINC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, SRC_INFIX, TO_PREDEC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP2_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP16, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP32, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16B, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16W, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16L, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32B, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32W, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32L, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS16, SRC_SUFFIX, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS32, SRC_SUFFIX, DSTABS32LIST, E}}}
+
+#define MOVFROM_IMM8(CODE, PREFIX, NAME, SRC) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, 0, RDIND, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, 8, RDPOSTINC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, 10, RDPOSTDEC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, 9, RDPREINC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, 11, RDPREDEC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, B30 | B20 | DISP2DST, DSTDISPREG, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, 12, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, 12, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, 13, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, 14, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, 15, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, 13, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, 14, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, 15, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, 4, B30 | IGNORE, IMM8LIST, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, 4, B31 | IGNORE, IMM8LIST, DSTABS32LIST, E}}}
+
+#define MOVFROM_IMM(CODE, PREFIX, NAME, SRC, LIST) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, LIST, 0, RDIND, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, LIST, 8, RDPOSTINC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, LIST, 10, RDPOSTDEC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, LIST, 9, RDPREINC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, LIST, 11, RDPREDEC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, LIST, B30 | B20 | DISP2DST, DSTDISPREG, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, LIST, 12, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, LIST, 12, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, LIST, 13, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, LIST, 14, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, LIST, 15, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, LIST, 13, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, LIST, 14, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, LIST, 15, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, LIST, 4, B30 | IGNORE, DATA2, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, LIST, 4, B31 | IGNORE, DATA2, DSTABS32LIST, E}}}
+
+#define MOVFROM_REG_BW(CODE, NAME, SRC, PREFIX, OP1, OP2, OP3, OP4, RELAX16) \
+ {CODE, AV_H8, 4, NAME, {{SRC, RDIND, E}}, {{ 6, OP1, B31 | RDIND, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, 3, 6, OP3, B31 | RDPOSTINC, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, 1, 6, OP3, B31 | RDPOSTDEC, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, 2, 6, OP3, B31 | RDPREINC, SRC, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, RDPREDEC, E}}, {{ 6, OP3, B31 | RDPREDEC, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, B30 | B20 | DISP2DST, 6, OP1, B31 | DSTDISPREG, SRC, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, DISP16DST, E}}, {{ 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 0, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, 1, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, 2, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, 3, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 1, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 2, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 3, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8, 4, NAME, {{SRC, ABS16DST, E}}, {{ 6, OP2, 8, SRC, RELAX16 | DSTABS16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, ABS32DST, E}}, {{ 6, OP2, 10, SRC, MEMRELAX | DSTABS32LIST, E}}}
+
+#define MOVTO_REG_BW(CODE, NAME, DST, PREFIX, OP1, OP2, OP3, OP4, RELAX16) \
+ {CODE, AV_H8, 4, NAME, {{RSIND, DST, E}}, {{ 6, OP1, B30 | RSIND, DST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{RSPOSTINC, DST, E}}, {{ 6, OP3, B30 | RSPOSTINC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, DST, E}}, {{PREFIX, 2, 6, OP3, B30 | RSPOSTDEC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, DST, E}}, {{PREFIX, 1, 6, OP3, B30 | RSPREINC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, DST, E}}, {{PREFIX, 3, 6, OP3, B30 | RSPREDEC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, DST, E}}, {{PREFIX, B30 | B20 | DISP2SRC, 6, OP1, B30 | DISPREG, DST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{DISP16SRC, DST, E}}, {{ 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{DISP32SRC, DST, E}}, {{7, 8, B30 | DISPREG, 0, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, DST, E}}, {{PREFIX, 1, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, DST, E}}, {{PREFIX, 2, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, DST, E}}, {{PREFIX, 3, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, DST, E}}, {{7, 8, B30 | DISPREG, 1, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, DST, E}}, {{7, 8, B30 | DISPREG, 2, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, DST, E}}, {{7, 8, B30 | DISPREG, 3, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8, 4, NAME, {{ABS16SRC, DST, E}}, {{ 6, OP2, 0, DST, RELAX16 | ABS16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{ABS32SRC, DST, E}}, {{ 6, OP2, 2, DST, MEMRELAX | ABS32LIST, E}}}
+
+/*
+ * Expansion macros for two-word (plus data) instructions.
+ */
+
+/* Expansion from one source to "standard" destinations. */
+#define EXPAND2_STD_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, NIB1, NIB2) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, TO_POSTINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, TO_POSTDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, TO_PREINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, TO_PREDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, TO_DISP2, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, TO_DISP16, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, TO_DISP32, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, TO_DISP16B, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, TO_DISP16W, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, TO_DISP16L, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, TO_DISP32B, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, TO_DISP32W, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, TO_DISP32L, NIB1, NIB2, DSTDISP32LIST, E}}}
+
+/* Expansion from one destination to "standard" sources. */
+#define EXPAND2_STD_DST(CODE, WEIGHT, NAME, DST, PREFIX, NIB1, NIB2) \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, DST, E}}, {{PREFIX, FROM_POSTINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, DST, E}}, {{PREFIX, FROM_POSTDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, DST, E}}, {{PREFIX, FROM_PREINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, DST, E}}, {{PREFIX, FROM_PREDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, DST, E}}, {{PREFIX, FROM_DISP2, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, DST, E}}, {{PREFIX, FROM_DISP16, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, DST, E}}, {{PREFIX, FROM_DISP32, NIB1, NIB2, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, DST, E}}, {{PREFIX, FROM_DISP16B, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, DST, E}}, {{PREFIX, FROM_DISP16W, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, DST, E}}, {{PREFIX, FROM_DISP16L, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, DST, E}}, {{PREFIX, FROM_DISP32B, NIB1, NIB2, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, DST, E}}, {{PREFIX, FROM_DISP32W, NIB1, NIB2, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, DST, E}}, {{PREFIX, FROM_DISP32L, NIB1, NIB2, DISP32LIST, E}}}
+
+/* Expansion from immediate source to "standard" destinations. */
+#define EXPAND2_STD_IMM(CODE, WEIGHT, NAME, SRC, PREFIX, OPCODE, IGN, IMMLIST) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, TO_POSTINC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, TO_POSTDEC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, TO_PREINC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, TO_PREDEC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, TO_DISP2, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, TO_DISP16, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, TO_DISP32, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, TO_DISP16B, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, TO_DISP16W, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, TO_DISP16L, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, TO_DISP32B, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, TO_DISP32W, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, TO_DISP32L, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}
+
+/* Expansion from abs/disp source to "standard" destinations. */
+#define EXPAND2_STD_ABSDISP(CODE, WEIGHT, NAME, SRC, PREFIX, DSTLIST, NIB1, NIB2) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, DSTLIST, TO_POSTINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, DSTLIST, TO_POSTDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, DSTLIST, TO_PREINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, DSTLIST, TO_PREDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, DSTLIST, TO_DISP2, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, DSTLIST, TO_DISP16, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, DSTLIST, TO_DISP32, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, DSTLIST, TO_DISP16B, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, DSTLIST, TO_DISP16W, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, DSTLIST, TO_DISP16L, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, DSTLIST, TO_DISP32B, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, DSTLIST, TO_DISP32W, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, DSTLIST, TO_DISP32L, NIB1, NIB2, DSTDISP32LIST, E}}}
+
+/* Expansion from ind source to "standard" destinations. */
+#define EXPAND2_STD_IND(CODE, WEIGHT, NAME, OPCODE, BIT) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPOSTINC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_POSTINC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPOSTDEC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_POSTDEC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPREINC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_PREINC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPREDEC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_PREDEC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP2DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP2, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP16DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP32DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXB16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16B, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXW16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16W, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXL16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16L, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXB32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32B, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXW32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32W, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXL32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32L, OPCODE, IGNORE, DSTDISP32LIST, E}}}
+
+/*
+ * Expansion macros for three word (plus data) instructions.
+ */
+
+#define EXPAND3_STD_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, INFIX, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, INFIX, 8, RDPOSTINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, INFIX, 10, RDPOSTDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, INFIX, 9, RDPREINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, INFIX, 11, RDPREDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, INFIX, B30 | B20 | DISP2DST, DSTDISPREG, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, INFIX, 12, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, INFIX, 12, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, INFIX, 13, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, INFIX, 14, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, INFIX, 15, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, INFIX, 13, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, INFIX, 14, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, INFIX, 15, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}
+
+#define EXPAND3_L_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, INFIX, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, INFIX, 0, RDIND, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, INFIX, 8, RDPOSTINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, INFIX, 10, RDPOSTDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, INFIX, 9, RDPREINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, INFIX, 11, RDPREDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, INFIX, B30 | B20 | DISP2DST, DSTDISPREG, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, INFIX, 12, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, INFIX, 12, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, INFIX, 13, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, INFIX, 14, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, INFIX, 15, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, INFIX, 13, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, INFIX, 14, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, INFIX, 15, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, INFIX, 4, B30 | IGNORE, OPCODE, B30 | IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, INFIX, 4, B31 | IGNORE, OPCODE, B30 | IGNORE, DSTABS32LIST, E}}}
+
+
+#define EXPAND_STD_MATRIX_L(CODE, NAME, OPCODE) \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSIND, PREFIX_0104, TFROM_IND, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPOSTINC, PREFIX_0104, TFROM_POSTINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPOSTDEC, PREFIX_0106, TFROM_POSTDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPREINC, PREFIX_0105, TFROM_PREINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPREDEC, PREFIX_0107, TFROM_PREDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, DISP2SRC, PREFIX_010_D2, TFROM_DISP2, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, DISP16SRC, PREFIX_0104, TFROM_DISP16, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, DISP32SRC, PREFIX_78R4, TFROM_DISP32, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXB16, PREFIX_0105, TFROM_DISP16B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXW16, PREFIX_0106, TFROM_DISP16W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXL16, PREFIX_0107, TFROM_DISP16L, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXB32, PREFIX_78R5, TFROM_DISP32B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXW32, PREFIX_78R6, TFROM_DISP32W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXL32, PREFIX_78R7, TFROM_DISP32L, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, ABS16SRC, PREFIX_0104, TFROM_ABS16, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, ABS32SRC, PREFIX_0104, TFROM_ABS32, OPCODE)
+
+
+#define EXPAND_STD_MATRIX_W(CODE, NAME, OPCODE) \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTINC, PREFIX_0154, TFROM_POSTINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTDEC, PREFIX_0156, TFROM_POSTDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREINC, PREFIX_0155, TFROM_PREINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREDEC, PREFIX_0157, TFROM_PREDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP2SRC, PREFIX_015_D2, TFROM_DISP2, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP16SRC, PREFIX_0154, TFROM_DISP16, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP32SRC, PREFIX_78R4W, TFROM_DISP32, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB16, PREFIX_0155, TFROM_DISP16B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW16, PREFIX_0156, TFROM_DISP16W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL16, PREFIX_0157, TFROM_DISP16L, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB32, PREFIX_78R5W, TFROM_DISP32B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW32, PREFIX_78R6W, TFROM_DISP32W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL32, PREFIX_78R7W, TFROM_DISP32L, OPCODE)
+
+#define EXPAND_STD_MATRIX_B(CODE, NAME, OPCODE) \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTINC, PREFIX_0174, TFROM_POSTINC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTDEC, PREFIX_0176, TFROM_POSTDEC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREINC, PREFIX_0175, TFROM_PREINC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREDEC, PREFIX_0177, TFROM_PREDEC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP2SRC, PREFIX_017_D2S, TFROM_DISP2_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP16SRC, PREFIX_0174, TFROM_DISP16_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP32SRC, PREFIX_78R4W, TFROM_DISP32_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB16, PREFIX_0175, TFROM_DISP16B_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW16, PREFIX_0176, TFROM_DISP16W_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL16, PREFIX_0177, TFROM_DISP16L_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB32, PREFIX_78R5W, TFROM_DISP32B_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW32, PREFIX_78R6W, TFROM_DISP32W_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL32, PREFIX_78R7W, TFROM_DISP32L_B, OPCODE)
+
+
+/*
+ * Use the expansion macros to fill out the opcode table.
+ */
+
+#define EXPAND_FROM_REG8(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, OP1, OP2, RS8, IGNORE, E}}}, \
+ EXPAND2_STD_SRC (CODE, 2, NAME, RS8, PREFIX_0179, OP3, RS8), \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, ABS8DST, E}}, {{0x7, 0xf, DSTABS8LIST, OP1, OP2, RS8, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, ABS16DST, E}}, {{0x6, 0xa, 0x1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, RS8, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, ABS32DST, E}}, {{0x6, 0xa, 0x3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, RS8, IGNORE, E}}}
+
+#define EXPAND_TO_REG8(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, OP1, OP2, IGNORE, RD8, E}}}, \
+ EXPAND2_STD_DST (CODE, 2, NAME, RD8, PREFIX_017A, OP3, RD8), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS8SRC, RD8, E}}, {{0x7, 0xe, ABS8LIST, OP1, OP2, IGNORE, RD8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD8, E}}, {{0x6, 0xa, 0x1, B30 | IGNORE, ABS16LIST, OP1, OP2, IGNORE, RD8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD8, E}}, {{0x6, 0xa, 0x3, B30 | IGNORE, ABS32LIST, OP1, OP2, IGNORE, RD8, E}}}
+
+#define EXPAND_FROM_IND8(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDIND, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_IND (CODE, 2, NAME, OPCODE, B30), \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS16DST, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS32DST, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS16_B(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RDIND, E}}, {{PREFIX_6A15, ABS16LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS16SRC, PREFIX_6A15, ABS16LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS16DST, E}}, {{PREFIX_6A15, ABS16LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS32DST, E}}, {{PREFIX_6A15, ABS16LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS32_B(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RDIND, E}}, {{PREFIX_6A35, ABS32LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS32SRC, PREFIX_6A35, ABS32LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS16DST, E}}, {{PREFIX_6A35, ABS32LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS32DST, E}}, {{PREFIX_6A35, ABS32LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_IMM16_W(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16, RDIND, E}}, {{PREFIX_015E, TO_IND, OPCODE, IGNORE, IMM16LIST, E}}}, \
+ EXPAND2_STD_IMM (CODE, 2, NAME, IMM16, PREFIX_015E, OPCODE, IGNORE, IMM16LIST), \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16, ABS16DST, E}}, {{PREFIX_015E, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, IMM16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16, ABS32DST, E}}, {{PREFIX_015E, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, IMM16LIST, E}}}
+
+#define EXPAND_FROM_REG16(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, OP1, OP2, RS16, IGNORE, E}}}, \
+ EXPAND2_STD_SRC (CODE, 2, NAME, RS16, PREFIX_0159, OP3, RS16), \
+ {CODE, AV_H8SX, 0, NAME, {{RS16, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, RS16, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS16, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, RS16, IGNORE, E}}}
+
+#define EXPAND_TO_REG16(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, IGNORE, OP1, OP2, IGNORE, RD16, E}}}, \
+ EXPAND2_STD_DST (CODE, 2, NAME, RD16, PREFIX_015A, OP3, RD16), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD16, E}}, {{0x6, 0xb, 0x1, B30 | IGNORE, ABS16LIST, OP1, OP2, IGNORE, RD16, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD16, E}}, {{0x6, 0xb, 0x3, B30 | IGNORE, ABS32LIST, OP1, OP2, IGNORE, RD16, E}}}
+
+#define EXPAND_FROM_IND16(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDIND, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_IND (CODE, 2, NAME, OPCODE, B31), \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS16DST, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS32DST, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS16_W(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RDIND, E}}, {{PREFIX_6B15, ABS16LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS16SRC, PREFIX_6B15, ABS16LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS16DST, E}}, {{PREFIX_6B15, ABS16LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS32DST, E}}, {{PREFIX_6B15, ABS16LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS32_W(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RDIND, E}}, {{PREFIX_6B35, ABS32LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS32SRC, PREFIX_6B35, ABS32LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS16DST, E}}, {{PREFIX_6B35, ABS32LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS32DST, E}}, {{PREFIX_6B35, ABS32LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_IMM16_L(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, RDIND, E}}, {{PREFIX_010E, TO_IND, OPCODE, B30 | IGNORE, IMM16ULIST, E}}}, \
+ EXPAND2_STD_IMM (CODE, 2, NAME, IMM16U_NS, PREFIX_010E, OPCODE, B30 | IGNORE, IMM16ULIST), \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, ABS16DST, E}}, {{PREFIX_010E, TO_ABS16, OPCODE, B30 | IGNORE, DSTABS16LIST, IMM16ULIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, ABS32DST, E}}, {{PREFIX_010E, TO_ABS32, OPCODE, B30 | IGNORE, DSTABS32LIST, IMM16ULIST, E}}}
+
+#define EXPAND_FROM_IMM32_L(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM32, RDIND, E}}, {{PREFIX_010E, TO_IND, OPCODE, B31 | IGNORE, IMM32LIST, E}}}, \
+ EXPAND2_STD_IMM (CODE, 2, NAME, IMM32, PREFIX_010E, OPCODE, B31 | IGNORE, IMM32LIST), \
+ {CODE, AV_H8SX, 0, NAME, {{IMM32, ABS16DST, E}}, {{PREFIX_010E, TO_ABS16, OPCODE, B31 | IGNORE, DSTABS16LIST, IMM32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM32, ABS32DST, E}}, {{PREFIX_010E, TO_ABS32, OPCODE, B31 | IGNORE, DSTABS32LIST, IMM32LIST, E}}}
+
+#define EXPAND_FROM_REG32(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RS32, RDIND, E}}, {{PREFIX_0109, TO_IND, OPCODE, B30 | RS32, E}}}, \
+ EXPAND2_STD_SRC (CODE, 2, NAME, RS32, PREFIX_0109, OPCODE, B30 | RS32), \
+ {CODE, AV_H8SX, 0, NAME, {{RS32, ABS16DST, E}}, {{PREFIX_0109, TO_ABS16, OPCODE, B30 | RS32, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS32, ABS32DST, E}}, {{PREFIX_0109, TO_ABS32, OPCODE, B30 | RS32, DSTABS32LIST, E}}}
+
+#define EXPAND_TO_REG32(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RD32, E}}, {{PREFIX_010A, FROM_IND, OPCODE, B30 | RD32, E}}}, \
+ EXPAND2_STD_DST (CODE, 2, NAME, RD32, PREFIX_010A, OPCODE, B30 | RD32), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD32, E}}, {{PREFIX_010A, FROM_ABS16, OPCODE, B30 | RD32, ABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD32, E}}, {{PREFIX_010A, FROM_ABS32, OPCODE, B30 | RD32, ABS32LIST, E}}}
+
+
+#define EXPAND_TWOOP_B(CODE, NAME, OP1, OP2, OP3, OP4, BIT) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPOSTINC, E}}, {{PREFIX_0174, 0x6, 0xc, B30 | RDPOSTINC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPREINC, E}}, {{PREFIX_0175, 0x6, 0xc, B30 | RDPREINC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPREDEC, E}}, {{PREFIX_0177, 0x6, 0xc, B30 | RDPREDEC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP2DST, E}}, {{PREFIX_017_D2D, 0x6, 0x8, B30 | DSTDISPREG, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP16DST, E}}, {{PREFIX_0174, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP32DST, E}}, {{PREFIX_78R4WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXB16D, E}}, {{PREFIX_0175, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXW16D, E}}, {{PREFIX_0176, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXL16D, E}}, {{PREFIX_0177, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXB32D, E}}, {{PREFIX_78R5WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXW32D, E}}, {{PREFIX_78R6WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXL32D, E}}, {{PREFIX_78R7WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS8DST, E}}, {{0x7, 0xf, DSTABS8LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS16DST, E}}, {{0x6, 0xa, 0x1, B31 | B20 | IGNORE, DSTABS16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS32DST, E}}, {{0x6, 0xa, 0x3, B31 | B20 | IGNORE, DSTABS32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8, 2, NAME, {{RS8, RD8, E}}, {{OP2, OP3, RS8, RD8, E}}}, \
+ EXPAND_FROM_REG8 (CODE, NAME, OP2, OP3, OP4), \
+ EXPAND_TO_REG8 (CODE, NAME, OP2, OP3, OP4), \
+ EXPAND_FROM_IND8 (CODE, NAME, OP4), \
+ EXPAND_STD_MATRIX_B (CODE, NAME, OP4), \
+ EXPAND_FROM_ABS16_B (CODE, NAME, OP4), \
+ EXPAND_FROM_ABS32_B (CODE, NAME, OP4)
+
+#define EXPAND_TWOOP_W(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8H, 6, NAME, {{IMM16, RD16, E}}, {{0x7, 0x9, OP3, RD16, IMM16LIST, E}}}, \
+ EXPAND_FROM_IMM16_W (CODE, NAME, OP3), \
+ EXPAND_FROM_REG16 (CODE, NAME, OP1, OP2, OP3), \
+ EXPAND_TO_REG16 (CODE, NAME, OP1, OP2, OP3), \
+ EXPAND_FROM_IND16 (CODE, NAME, OP3), \
+ EXPAND_STD_MATRIX_W (CODE, NAME, OP3), \
+ EXPAND_FROM_ABS16_W (CODE, NAME, OP3), \
+ EXPAND_FROM_ABS32_W (CODE, NAME, OP3)
+
+#define EXPAND_TWOOP_L(CODE, NAME, OP1) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, RD32, E}}, {{0x7, 0xa, OP1, B31 | RD32, IMM16ULIST, E}}}, \
+ {CODE, AV_H8H, 6, NAME, {{IMM32, RD32, E}}, {{0x7, 0xa, OP1, B30 | RD32, IMM32LIST, E}}}, \
+ EXPAND_FROM_IMM16_L (CODE, NAME, OP1), \
+ EXPAND_FROM_IMM32_L (CODE, NAME, OP1), \
+ EXPAND_FROM_REG32 (CODE, NAME, OP1), \
+ EXPAND_TO_REG32 (CODE, NAME, OP1), \
+ EXPAND_STD_MATRIX_L (CODE, NAME, OP1)
+
+
+/*
+ * Old expanders:
+ */
+
+#define BITOP(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ {code, AV_H8, 2, name, {{imm, RD8, E}}, {{op00, op01, imm, RD8, E}}}, \
+ {code, AV_H8, 6, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, 0, E}}}, \
+ {code, AV_H8, 6, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, 0, E}}}, \
+ {code, AV_H8H, 6, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | ABS16LIST, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8H, 6, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | ABS32LIST, op00, op01, imm, op4, E}}}
+
+#define BITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ {code, AV_H8SX, 0, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8SX, 0, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8SX, 0, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | ABS16LIST, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8SX, 0, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | ABS32LIST, op00, op01, imm, op4, E}}}
+
+#define EBITOP(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ BITOP(code, imm, name, op00+1, op01, op10, op11, op20, op21, op30, op4), \
+ BITOP(code, RS8, name, op00, op01, op10, op11, op20, op21, op30, op4)
+
+#define EBITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ BITOP_B(code, imm, name, op00+1, op01, op10, op11, op20, op21, op30, op4), \
+ BITOP_B(code, RS8, name, op00, op01, op10, op11, op20, op21, op30, op4)
+
+#define WTWOP(code, name, op1, op2) \
+ {code, AV_H8, 2, name, {{RS16, RD16, E}}, {{op1, op2, RS16, RD16, E}}}
#define BRANCH(code, name, op) \
-{ code, 1, 4,name,{{DISP8,E,0}}, {{ 0x4, op, DISP8, IGNORE, E, 0, 0, 0, 0}}}, \
-{ code, 0, 6,name,{{DISP16,E,0}}, {{ 0x5, 0x8, op, 0x0, DISP16, IGNORE, IGNORE, IGNORE, E,0}}}
-
-#define SOP(code, x,name) \
-{code, 1, x, name
-
-#define NEW_SOP(code, in,x,name) \
-{code, in, x, name
-#define EOP }
-
-#define TWOOP(code, name, op1, op2,op3) \
-{ code,1, 2,name, {{IMM8, RD8, E}}, {{ op1, RD8, IMM8, IGNORE, E, 0, 0, 0, 0}}},\
-{ code, 1, 2,name, {{RS8, RD8, E}}, {{ op2, op3, RS8, RD8, E, 0, 0, 0, 0}}}
-
-#define UNOP(code,name, op1, op2) \
-{ code, 1, 2, name, {{OR8, E, 0}}, {{ op1, op2, 0, OR8, E, 0, 0, 0, 0}}}
-
-#define UNOP3(code, name, op1, op2, op3) \
-{ O(code,SB), 1, 2, name, {{OR8, E, 0}}, {{op1, op2, op3+0, OR8, E, 0, 0, 0, 0}}}, \
-{ O(code,SW), 0, 2, name, {{OR16, E, 0}}, {{op1, op2, op3+1, OR16, E, 0, 0, 0, 0}}}, \
-{ O(code,SL), 0, 2, name, {{OR32, E, 0}}, {{op1, op2, op3+3, OR32|B30, E, 0, 0, 0, 0}}} \
-,{ O(code,SB), 1, 2, name, {{IMM, OR8 | SRC_IN_DST, E}}, {{op1, op2, op3+4, OR8 | SRC_IN_DST, E, 0, 0, 0, 0}}}, \
-{ O(code,SW), 0, 2, name, {{IMM, OR16 | SRC_IN_DST, E}}, {{op1, op2, op3+5, OR16 | SRC_IN_DST, E, 0, 0, 0, 0}}}, \
-{ O(code,SL), 0, 2, name, {{IMM, OR32 | SRC_IN_DST, E}}, {{op1, op2, op3+7, OR32 | SRC_IN_DST|B30 , E, 0, 0, 0, 0}}}
-
-
-#define IMM32LIST IMM32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM24LIST IMM24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM16LIST IMM16,IGNORE,IGNORE,IGNORE
-#define A16LIST L_16,IGNORE,IGNORE,IGNORE
-#define DISP24LIST DISP|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define DISP32LIST DISP|L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS24LIST ABS|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS32LIST ABS|L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A24LIST L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A32LIST L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define PREFIX32 0x0,0x1,0x0,0x0
-#define PREFIXLDC 0x0,0x1,0x4,0x0
-
-
-#define O(op, size) (op * 4 + size)
-
-#define O_RECOMPILE 0
-#define O_ADD 1
-#define O_ADDX 2
-#define O_AND 3
-#define O_BAND 4
-#define O_BRA 5
-#define O_BRN 6
-#define O_BHI 7
-#define O_BLS 8
-#define O_BCC 9
-#define O_BCS 10
-#define O_BNE 11
-#define O_BVC 12
-#define O_BVS 13
-#define O_BPL 14
-#define O_BMI 15
-#define O_BGE 16
-#define O_BLT 17
-#define O_BGT 18
-#define O_BLE 19
-#define O_ANDC 20
-#define O_BEQ 21
-#define O_BCLR 22
-#define O_BIAND 23
-#define O_BILD 24
-#define O_BIOR 25
-#define O_BIXOR 26
-#define O_BIST 27
-#define O_BLD 28
-#define O_BNOT 29
-#define O_BSET 30
-#define O_BSR 31
-#define O_BXOR 32
-#define O_CMP 33
-#define O_DAA 34
-#define O_DAS 35
-#define O_DEC 36
-#define O_DIVU 37
-#define O_DIVS 38
-#define O_INC 39
-#define O_LDC 40
-#define O_MOV_TO_MEM 41
-#define O_OR 42
-#define O_ROTL 43
-#define O_ROTR 44
-#define O_ROTXL 45
-#define O_ROTXR 46
-#define O_BPT 47
-#define O_SHAL 48
-#define O_SHAR 49
-#define O_SHLL 50
-#define O_SHLR 51
-#define O_SUB 52
-#define O_SUBS 53
-#define O_TRAPA 54
-#define O_XOR 55
-#define O_XORC 56
-#define O_BOR 57
-#define O_BST 58
-#define O_BTST 59
-#define O_EEPMOV 60
-#define O_EXTS 61
-#define O_EXTU 62
-#define O_JMP 63
-#define O_JSR 64
-#define O_MULU 65
-#define O_MULS 66
-#define O_NOP 67
-#define O_NOT 68
-#define O_ORC 69
-#define O_RTE 70
-#define O_STC 71
-#define O_SUBX 72
-#define O_NEG 73
-#define O_RTS 74
-#define O_SLEEP 75
-#define O_ILL 76
-#define O_ADDS 77
-#define O_SYSCALL 78
-#define O_MOV_TO_REG 79
-#define O_TAS 80
-#define O_CLRMAC 82
-#define O_LDMAC 83
-#define O_MAC 84
-#define O_LDM 85
-#define O_STM 86
-#define O_STMAC 87
-#define O_LAST 88
-/* Change made for System Call processing. */
-#define O_SYS_CREAT 100
-#define O_SYS_OPEN 101
-#define O_SYS_READ 102
-#define O_SYS_WRITE 103
-#define O_SYS_LSEEK 104
-#define O_SYS_CLOSE 105
-#define O_SYS_STAT 106
-#define O_SYS_FSTAT 107
+ {code, AV_H8H, 6, name, {{PCREL16, E}}, {{0x5, 0x8, op, 0x0, PCREL16, DATA3 | B00, E}}}, \
+ {code, AV_H8, 4, name, {{PCREL8, E}}, {{0x4, op, PCREL8, DATA | B00, E}}}
+
+
+#define UNOP(code, name, op1, op2) \
+ {code, AV_H8, 2, name, {{OR8, E}}, {{op1, op2, 0, OR8, E}}}
+
+#define EXPAND_UNOP_STD_B(CODE, NAME, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{OR8, E}}, {{ OP1, OP2, OP3, OR8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{ 7, 13, B30 | RSIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 12, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 12, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 12, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 12, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 8, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B30 | DISPREG, 4, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B30 | DISPREG, 5, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B30 | DISPREG, 6, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B30 | DISPREG, 7, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS8SRC, E}}, {{ 7, 15, ABS8LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{ 6, 10, 1, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{ 6, 10, 3, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_STD_W(CODE, NAME, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8H, 2, NAME, {{OR16, E}}, {{ OP1, OP2, OP3, OR16, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{ 7, 13, B31 | RSIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 9, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B30 | DISPREG, 4, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B30 | DISPREG, 5, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B30 | DISPREG, 6, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B30 | DISPREG, 7, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{ 6, 11, 1, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{ 6, 11, 3, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_STD_L(CODE, NAME, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8H, 2, NAME, {{OR32, E}}, {{ OP1, OP2, OP3, B30 | OR32, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{PREFIX, 4, 6, 9, B30 | RSIND, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 9, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B31 | DISPREG, 4, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B31 | DISPREG, 5, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B31 | DISPREG, 6, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B31 | DISPREG, 7, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{PREFIX, 4, 6, 11, 0, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{PREFIX, 4, 6, 11, 2, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}
+
+#define EXPAND_UNOP_EXTENDED_B(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{CONST, RD8, E}}, {{ OP1, OP2, OP3, RD8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{ 7, 13, B30 | RDIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 12, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 12, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 12, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 12, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 8, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 4, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 5, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 6, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 7, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS8DST, E}}, {{ 7, 15, DSTABS8LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{ 6, 10, 1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{ 6, 10, 3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_EXTENDED_W(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{CONST, RD16, E}}, {{ OP1, OP2, OP3, RD16, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{ 7, 13, B31 | RDIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 9, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 4, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 5, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 6, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 7, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{ 6, 11, 1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{ 6, 11, 3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_EXTENDED_L(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3, BIT) \
+ {CODE, AV_H8, 2, NAME, {{CONST, RD32, E}}, {{ OP1, OP2, OP3, BIT | RD32, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{PREFIX, 4, 6, 9, B30 | RDIND, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 9, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B31 | DSTDISPREG, 4, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B31 | DSTDISPREG, 5, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B31 | DSTDISPREG, 6, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B31 | DSTDISPREG, 7, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{PREFIX, 4, 6, 11, 0, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{PREFIX, 4, 6, 11, 2, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}
+
+#define PREFIXLDC 0x0, 0x1, 0x4, B30 | CCR_EXR | DST
+#define PREFIXSTC 0x0, 0x1, 0x4, B30 | CCR_EXR | SRC
+
+#define O(op, size) (op*4+size)
+#define OP_SIZE(HOW) (HOW % 4)
+#define OP_KIND(HOW) (HOW / 4)
+
+enum h8_asm_codes {
+ O_RECOMPILE = 0,
+ O_ADD,
+ O_ADDX,
+ O_AND,
+ O_BAND,
+ O_BRA,
+ O_BRAB,
+ O_BRAW,
+ O_BRAL,
+ O_BRAS,
+ O_BRABC,
+ O_BRABS,
+ O_BSRBC,
+ O_BSRBS,
+ O_BRN,
+ O_BHI,
+ O_BLS,
+ O_BCC,
+ O_BCS,
+ O_BNE,
+ O_BVC,
+ O_BVS,
+ O_BPL,
+ O_BMI,
+ O_BGE,
+ O_BLT,
+ O_BGT,
+ O_BLE,
+ O_ANDC,
+ O_BEQ,
+ O_BCLR,
+ O_BCLREQ,
+ O_BCLRNE,
+ O_BSETEQ,
+ O_BSETNE,
+ O_BFLD,
+ O_BFST,
+ O_BIAND,
+ O_BILD,
+ O_BIOR,
+ O_BIXOR,
+ O_BIST,
+ O_BISTZ,
+ O_BLD,
+ O_BNOT,
+ O_BOR,
+ O_BSET,
+ O_BSR,
+ O_BXOR,
+ O_CMP,
+ O_DAA,
+ O_DAS,
+ O_DEC,
+ O_DIVU,
+ O_DIVS,
+ O_DIVXU,
+ O_DIVXS,
+ O_INC,
+ O_LDC,
+ O_MOV,
+ O_MOVAB,
+ O_MOVAW,
+ O_MOVAL,
+ O_MOVMD,
+ O_MOVSD,
+ O_OR,
+ O_ROTL,
+ O_ROTR,
+ O_ROTXL,
+ O_ROTXR,
+ O_BPT,
+ O_SHAL,
+ O_SHAR,
+ O_SHLL,
+ O_SHLR,
+ O_SUB,
+ O_SUBS,
+ O_TRAPA,
+ O_XOR,
+ O_XORC,
+ O_BST,
+ O_BSTZ,
+ O_BTST,
+ O_EEPMOV,
+ O_EXTS,
+ O_EXTU,
+ O_JMP,
+ O_JSR,
+ O_MULU,
+ O_MULUU,
+ O_MULS,
+ O_MULSU,
+ O_MULXU,
+ O_MULXS,
+ O_NOP,
+ O_NOT,
+ O_ORC,
+ O_RTE,
+ O_RTEL,
+ O_STC,
+ O_SUBX,
+ O_NEG,
+ O_RTS,
+ O_RTSL,
+ O_SLEEP,
+ O_ILL,
+ O_ADDS,
+ O_SYSCALL,
+ O_TAS,
+ O_CLRMAC,
+ O_LDMAC,
+ O_MAC,
+ O_LDM,
+ O_STM,
+ O_STMAC,
+ O_LAST,
+ /* Change made for System Call processing. */
+ O_SYS_CREAT,
+ O_SYS_OPEN,
+ O_SYS_READ,
+ O_SYS_WRITE,
+ O_SYS_LSEEK,
+ O_SYS_CLOSE,
+ O_SYS_STAT,
+ O_SYS_FSTAT,
/* Space reserved for future file I/O system calls. */
-#define O_SYS_CMDLINE 120
-/* End of System Call specific Changes. */
-#define SB 0
-#define SW 1
-#define SL 2
-#define SN 3
+ O_SYS_CMDLINE
+ /* End of System Call specific Changes. */
+};
+
+enum h8_size {
+ SB = 0,
+ SW = 1,
+ SL = 2,
+ SN = 3
+};
+
/* FIXME: Lots of insns have "E, 0, 0, 0, 0" in the nibble code sequences.
Methinks the zeroes aren't necessary. Once confirmed, nuke 'em. */
-const struct h8_opcode h8_opcodes[] =
+struct h8_opcode h8_opcodes[] =
{
- TWOOP(O(O_ADD,SB),"add.b", 0x8, 0x0,0x8),
-
- NEW_SOP(O(O_ADD,SW),1,2,"add.w"),{{RS16,RD16,E}},{{0x0,0x9,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_ADD,SW),0,4,"add.w"),{{IMM16,RD16,E}},{{0x7,0x9,0x1,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_ADD,SL),0,2,"add.l"),{{RS32,RD32,E }}, {{0x0,0xA,B31|RS32,B30|RD32,E}} EOP,
- NEW_SOP(O(O_ADD,SL),0,6,"add.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x1,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_ADDS,SL),1,2,"adds"), {{KBIT,RDP,E}}, {{0x0,0xB,KBIT,RDP,E,0,0,0,0}} EOP,
-
- TWOOP(O(O_ADDX,SB),"addx",0x9,0x0,0xE),
- TWOOP(O(O_AND,SB), "and.b",0xE,0x1,0x6),
-
- NEW_SOP(O(O_AND,SW),0,2,"and.w"),{{RS16,RD16,E }},{{0x6,0x6,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_AND,SW),0,4,"and.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x6,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
+ {O (O_ADD, SB), AV_H8, 2, "add.b", {{IMM8, RD8, E}}, {{0x8, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_ADD, SB), "add.b", 0x8, 0x0, 0x8, 0x1, 0),
+
+ {O (O_ADD, SW), AV_H8, 6, "add.w", {{RS16, RD16, E}}, {{0x0, 0x9, RS16, RD16, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, RD16, E}}, {{0x0, 0xa, B30 | IMM3NZ, RD16, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ EXPAND_TWOOP_W (O (O_ADD, SW), "add.w", 0x0, 0x9, 0x1),
+
+ {O (O_ADD, SL), AV_H8H, 6, "add.l", {{RS32, RD32, E}}, {{0x0, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_ADD, SL), AV_H8SX, 0, "add.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_ADD, SL), "add.l", 0x1),
+
+ {O (O_ADDS, SL), AV_H8, 2, "adds", {{KBIT, RDP, E}}, {{0x0, 0xB,KBIT, RDP, E}}},
+
+ {O (O_ADDX, SB), AV_H8, 2, "addx", {{IMM8, RD8, E}}, {{0x9, RD8, IMM8LIST, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
+ {O (O_ADDX, SB), AV_H8, 2, "addx", {{RS8, RD8, E}}, {{0x0, 0xe, RS8, RD8, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x0, 0xe, RS8, IGNORE, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RS8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x0, 0xe, RS8, IGNORE, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, 0x0, 0xe, IGNORE, RD8, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSPOSTDEC, RD8, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, B30 | B20 | IGNORE, 0x0, 0xe, IGNORE, RD8, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSIND, RDIND, E}}, {{PREFIX_0174, 0x6, 0x8, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
+
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RD16, E}}, {{PREFIX_0151, 0x7, 0x9, 0x1, RD16, IMM16LIST, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x7, 0x9, 0x1, IGNORE, IMM16LIST, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0x9, 0x1, IGNORE, IMM16LIST, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RD16, E}}, {{PREFIX_0151, 0x0, 0x9, RS16, RD16, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x0, 0x9, RS16, IGNORE, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x0, 0x9, RS16, IGNORE, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, B01 | IGNORE, 0x0, 0x9, IGNORE, RD16, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSPOSTDEC, RD16, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x0, 0x9, IGNORE, RD16, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSIND, RDIND, E}}, {{PREFIX_0154, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
+
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RD32, E}}, {{PREFIX_0101, 0x7, 0xa, 0x1, RD32, IMM32LIST, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x1, IGNORE, IMM32LIST, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x1, IGNORE, IMM32LIST, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RD32, E}}, {{PREFIX_0101, 0x0, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSIND, RD32, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, B30 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSIND, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
+
+ {O (O_AND, SB), AV_H8, 2, "and.b", {{IMM8, RD8, E}}, {{0xe, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_AND, SB), "and.b", 0xe, 0x1, 0x6, 0x6, 0),
+
+ {O (O_AND, SW), AV_H8, 2, "and.w", {{RS16, RD16, E}}, {{0x6, 0x6, RS16, RD16, E}}},
+ EXPAND_TWOOP_W (O (O_AND, SW), "and.w", 0x6, 0x6, 0x6),
+
+ {O (O_AND, SL), AV_H8H, 2, "and.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x6, B30 | RS32, B30 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_AND, SL), "and.l", 0x6),
+
+ {O (O_ANDC, SB), AV_H8, 2, "andc", {{IMM8, CCR | DST, E}}, {{0x0, 0x6, IMM8LIST, E}}},
+ {O (O_ANDC, SB), AV_H8S, 2, "andc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x6, IMM8LIST, E}}},
+
+ BRANCH (O (O_BRA, SB), "bra", 0x0),
+
+ {O (O_BRAB, SB), AV_H8SX, 0, "bra", {{LOWREG | L_8, E}}, {{0x5, 0x9, LOWREG | L_8 | B30, 0x5, E}}},
+ {O (O_BRAW, SW), AV_H8SX, 0, "bra", {{LOWREG | L_16, E}}, {{0x5, 0x9, LOWREG | L_16 | B30, 0x6, E}}},
+ {O (O_BRAL, SL), AV_H8SX, 0, "bra", {{RS32, E}}, {{0x5, 0x9, RS32 | B30, 0x7, E}}},
+
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, RDIND, OP3PCREL8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS8DST, OP3PCREL8}}, {{0x7, 0xE, DSTABS8LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS16DST, OP3PCREL8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS32DST, OP3PCREL8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, RDIND, OP3PCREL8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS8DST, OP3PCREL8}}, {{0x7, 0xE, DSTABS8LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS16DST, OP3PCREL8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS32DST, OP3PCREL8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- NEW_SOP(O(O_AND,SL),0,6,"and.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x6,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_AND,SL),0,2,"and.l") ,{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x6,B30|RS32,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {{IMM8,CCR|DST,E}},{{ 0x0,0x6,IMM8,IGNORE,E,0,0,0,0}} EOP,
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {{IMM8,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x6,IMM8,IGNORE,E,0,0,0,0}} EOP,
-
- BITOP(O(O_BAND,SB), IMM3|B30,"band",0x7,0x6,0x7,0xC,0x7,0xE,0x0),
- BRANCH(O(O_BRA,SB),"bra",0x0),
- BRANCH(O(O_BRA,SB),"bt",0x0),
- BRANCH(O(O_BRN,SB),"brn",0x1),
- BRANCH(O(O_BRN,SB),"bf",0x1),
- BRANCH(O(O_BHI,SB),"bhi",0x2),
- BRANCH(O(O_BLS,SB),"bls",0x3),
- BRANCH(O(O_BCC,SB),"bcc",0x4),
- BRANCH(O(O_BCC,SB),"bhs",0x4),
- BRANCH(O(O_BCS,SB),"bcs",0x5),
- BRANCH(O(O_BCS,SB),"blo",0x5),
- BRANCH(O(O_BNE,SB),"bne",0x6),
- BRANCH(O(O_BEQ,SB),"beq",0x7),
- BRANCH(O(O_BVC,SB),"bvc",0x8),
- BRANCH(O(O_BVS,SB),"bvs",0x9),
- BRANCH(O(O_BPL,SB),"bpl",0xA),
- BRANCH(O(O_BMI,SB),"bmi",0xB),
- BRANCH(O(O_BGE,SB),"bge",0xC),
- BRANCH(O(O_BLT,SB),"blt",0xD),
- BRANCH(O(O_BGT,SB),"bgt",0xE),
- BRANCH(O(O_BLE,SB),"ble",0xF),
-
- EBITOP(O(O_BCLR,SB),IMM3|B30,"bclr", 0x6,0x2,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BIAND,SB),IMM3|B31,"biand",0x7,0x6,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BILD,SB), IMM3|B31,"bild", 0x7,0x7,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BIOR,SB), IMM3|B31,"bior", 0x7,0x4,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BIST,SB), IMM3|B31,"bist", 0x6,0x7,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BIXOR,SB),IMM3|B31,"bixor",0x7,0x5,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BLD,SB), IMM3|B30,"bld", 0x7,0x7,0x7,0xC,0x7,0xE,0x0),
- EBITOP(O(O_BNOT,SB),IMM3|B30,"bnot", 0x6,0x1,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BOR,SB), IMM3|B30,"bor", 0x7,0x4,0x7,0xC,0x7,0xE,0x0),
- EBITOP(O(O_BSET,SB),IMM3|B30,"bset", 0x6,0x0,0x7,0xD,0x7,0xF,0x8),
-
- SOP(O(O_BSR,SB),6,"bsr"),{{DISP8,E,0}},{{ 0x5,0x5,DISP8,IGNORE,E,0,0,0,0}} EOP,
- SOP(O(O_BSR,SB),6,"bsr"),{{DISP16,E,0}},{{ 0x5,0xC,0x0,0x0,DISP16,IGNORE,IGNORE,IGNORE,E,0,0,0,0}} EOP,
- BITOP(O(O_BST,SB), IMM3|B30,"bst",0x6,0x7,0x7,0xD,0x7,0xF,0x8),
- EBITOP(O(O_BTST,SB), IMM3|B30,"btst",0x6,0x3,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BXOR,SB), IMM3|B30,"bxor",0x7,0x5,0x7,0xC,0x7,0xE,0x0),
-
- TWOOP(O(O_CMP,SB), "cmp.b",0xA,0x1,0xC),
- WTWOP(O(O_CMP,SW), "cmp.w",0x1,0xD),
-
- NEW_SOP(O(O_CMP,SW),1,2,"cmp.w"),{{RS16,RD16,E }},{{0x1,0xD,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_CMP,SW),0,4,"cmp.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x2,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
-
- NEW_SOP(O(O_CMP,SL),0,6,"cmp.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x2,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_CMP,SL),0,2,"cmp.l") ,{{RS32,RD32,E }},{{0x1,0xF,B31|RS32,B30|RD32,E}} EOP,
-
- UNOP(O(O_DAA,SB), "daa",0x0,0xF),
- UNOP(O(O_DAS,SB), "das",0x1,0xF),
- UNOP(O(O_DEC,SB), "dec.b",0x1,0xA),
-
- NEW_SOP(O(O_DEC, SW),0,2,"dec.w") ,{{DBIT,RD16,E }},{{0x1,0xB,0x5|DBIT,RD16,E}} EOP,
- NEW_SOP(O(O_DEC, SL),0,2,"dec.l") ,{{DBIT,RD32,E }},{{0x1,0xB,0x7|DBIT,RD32|B30,E}} EOP,
-
- NEW_SOP(O(O_DIVU,SB),1,13,"divxu.b"), {{RS8,RD16,E}}, {{0x5,0x1,RS8,RD16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_DIVU,SW),0,21,"divxu.w"),{{RS16,RD32,E}},{{0x5,0x3,RS16,B30|RD32,E}}EOP,
-
- NEW_SOP(O(O_DIVS,SB),0,13,"divxs.b") ,{{RS8,RD16,E }},{{0x0,0x1,0xD,0x0,0x5,0x1,RS8,RD16,E}} EOP,
- NEW_SOP(O(O_DIVS,SW),0,21,"divxs.w") ,{{RS16,RD32,E }},{{0x0,0x1,0xD,0x0,0x5,0x3,RS16,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_EEPMOV,SB),1,4,"eepmov.b"),{{E,0,0}},{{0x7,0xB,0x5,0xC,0x5,0x9,0x8,0xF,E}}EOP,
- NEW_SOP(O(O_EEPMOV,SW),0,4,"eepmov.w"),{{E,0,0}},{{0x7,0xB,0xD,0x4,0x5,0x9,0x8,0xF,E}} EOP,
-
- NEW_SOP(O(O_EXTS,SW),0,2,"exts.w"),{{OR16,E,0}},{{0x1,0x7,0xD,OR16,E }}EOP,
- NEW_SOP(O(O_EXTS,SL),0,2,"exts.l"),{{OR32,E,0}},{{0x1,0x7,0xF,OR32|B30,E }}EOP,
-
- NEW_SOP(O(O_EXTU,SW),0,2,"extu.w"),{{OR16,E,0}},{{0x1,0x7,0x5,OR16,E }}EOP,
- NEW_SOP(O(O_EXTU,SL),0,2,"extu.l"),{{OR32,E,0}},{{0x1,0x7,0x7,OR32|B30,E }}EOP,
-
- UNOP(O(O_INC,SB), "inc",0x0,0xA),
-
- NEW_SOP(O(O_INC,SW),0,2,"inc.w") ,{{DBIT,RD16,E }},{{0x0,0xB,0x5|DBIT,RD16,E}} EOP,
- NEW_SOP(O(O_INC,SL),0,2,"inc.l") ,{{DBIT,RD32,E }},{{0x0,0xB,0x7|DBIT,RD32|B30,E}} EOP,
-
- SOP(O(O_JMP,SB),4,"jmp"),{{RSIND,E,0}},{{0x5,0x9,B30|RSIND,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_JMP,SB),6,"jmp"),{{SRC|ABSJMP,E,0}},{{0x5,0xA,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_JMP,SB),8,"jmp"),{{SRC|MEMIND,E,0}},{{0x5,0xB,SRC|MEMIND,IGNORE,E,0,0,0,0}}EOP,
-
- SOP(O(O_JSR,SB),6,"jsr"),{{SRC|RSIND,E,0}}, {{0x5,0xD,B30|RSIND,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{{SRC|ABSJMP,E,0}},{{0x5,0xE,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{{SRC|MEMIND,E,0}},{{0x5,0xF,SRC|MEMIND,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{IMM8,CCR|DST,E}}, {{ 0x0,0x7,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{OR8,CCR|DST,E}}, {{ 0x0,0x3,0x0,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS16SRC,CCR|DST,E}}, {{PREFIXLDC,0x6,0xB,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS32SRC,CCR|DST,E}}, {{PREFIXLDC,0x6,0xB,0x2,0x0,SRC|ABS32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_16,CCR|DST,E}},{{PREFIXLDC,0x6,0xF,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_32,CCR|DST,E}},{{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,SRC|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSINC,CCR|DST,E}}, {{PREFIXLDC,0x6,0xD,B30|RSINC,0x0,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSIND,CCR|DST,E}}, {{PREFIXLDC,0x6,0x9,B30|RSIND,0x0,E}} EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{IMM8,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x0,0x7,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{OR8,EXR|DST,E}}, {{ 0x0,0x3,0x1,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS16SRC,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xb,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS32SRC,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xb,0x2,0x0,SRC|ABS32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_16,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x6,0xf,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_32,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,SRC|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSINC,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xd,B30|RSINC,0x0,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSIND,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0x9,B30|RSIND,0x0,E}} EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{ABS|SRC|L_16|MEMRELAX,RD8,E}}, {{ 0x6,0xA,0x0,RD8,SRC|ABS|MEMRELAX|A16LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{ABS|SRC|L_32|MEMRELAX,RD8,E }}, {{ 0x6,0xA,0x2,RD8,SRC|ABS|MEMRELAX|A32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,ABS|L_16|MEMRELAX|DST,E}}, {{ 0x6,0xA,0x8,RS8,DST|ABS|MEMRELAX|A16LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,ABS|DST|L_32|MEMRELAX,E }}, {{ 0x6,0xA,0xA,RS8,DST|ABS|MEMRELAX|A32LIST,E }}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{DISP|L_32|SRC,RD8,E}}, {{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0x2,RD8,SRC|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,DISP|L_32|DST,E}}, {{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0xA,RS8,DST|DISP32LIST,E}}EOP,
-
-
-
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{{RS8,RD8,E}}, {{ 0x0,0xC,RS8,RD8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{{IMM8,RD8,E}}, {{ 0xF,RD8,IMM8,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{RSIND,RD8,E}}, {{ 0x6,0x8,B30|RSIND,RD8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{DISP16SRC,RD8,E}}, {{ 0x6,0xE,B30|DISPREG,RD8,DISP16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{RSINC,RD8,E}}, {{ 0x6,0xC,B30|RSINC,RD8,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{ABS8SRC,RD8,E}}, {{ 0x2,RD8,ABS8SRC,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,RDIND,E}}, {{ 0x6,0x8,RDIND|B31,RS8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,DISP16DST,E}}, {{ 0x6,0xE,DISPREG|B31,RS8,DISP16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,RDDEC|B31,E}}, {{ 0x6,0xC,RDDEC|B31,RS8,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,ABS8DST,E}}, {{ 0x3,RS8,ABS8DST,IGNORE,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,RDIND,E}}, {{ 0x6,0x9,RDIND|B31,RS16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{DISP|L_32|SRC,RD16,E}},{{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,RD16,SRC|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,DISP|L_32|DST,E}},{{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0xA,RS16,DST|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{ABS|L_32|MEMRELAX|SRC,RD16,E }},{{ 0x6,0xB,0x2,RD16,SRC|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,ABS|L_32|MEMRELAX|DST,E }},{{ 0x6,0xB,0xA,RS16,DST|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_REG,SW),2,"mov.w"),{{RS16,RD16,E}}, {{ 0x0,0xD,RS16, RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{{IMM16,RD16,E}}, {{ 0x7,0x9,0x0,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{{RSIND,RD16,E}}, {{ 0x6,0x9,B30|RSIND,RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{DISP16SRC,RD16,E}}, {{ 0x6,0xF,B30|DISPREG,RD16,DISP16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{RSINC,RD16,E}}, {{ 0x6,0xD,B30|RSINC,RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{ABS16SRC,RD16,E}}, {{ 0x6,0xB,0x0,RD16,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,DISP16DST,E}}, {{ 0x6,0xF,DISPREG|B31,RS16,DISP16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,RDDEC,E}}, {{ 0x6,0xD,RDDEC|B31,RS16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,ABS16DST,E}}, {{ 0x6,0xB,0x8,RS16,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{{IMM32,RD32,E}}, {{ 0x7,0xA,0x0,B30|RD32,IMM32LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SL),2,"mov.l"),{{RS32,RD32,E}}, {{ 0x0,0xF,B31|RS32,B30|RD32,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{{RSIND,RD32,E}}, {{ PREFIX32,0x6,0x9,RSIND|B30,B30|RD32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{DISP16SRC,RD32,E}}, {{ PREFIX32,0x6,0xF,DISPREG|B30,B30|RD32,DISP16SRC,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{DISP|L_32|SRC,RD32,E}},{{ PREFIX32,0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,B30|RD32,SRC|DISP32LIST,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{RSINC,RD32,E}}, {{ PREFIX32,0x6,0xD,B30|RSINC,B30|RD32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{ABS16SRC,RD32,E}}, {{ PREFIX32,0x6,0xB,0x0,B30|RD32,ABS16SRC,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{ABS32SRC|MEMRELAX,RD32,E }}, {{ PREFIX32,0x6,0xB,0x2,B30|RD32,SRC|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,RDIND,E}}, {{ PREFIX32,0x6,0x9,RDIND|B31,B30|RS32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,DISP16DST,E}}, {{ PREFIX32,0x6,0xF,DISPREG|B31,B30|RS32,DISP16DST,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,DISP|L_32|DST,E}},{{ PREFIX32,0x7,0x8,B31|DISPREG,0x0,0x6,0xB,0xA,B30|RS32,DST|DISP32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,RDDEC,E}}, {{ PREFIX32,0x6,0xD,RDDEC|B31,B30|RS32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,ABS16DST,E}}, {{ PREFIX32,0x6,0xB,0x8,B30|RS32,ABS16DST,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,ABS32DST|MEMRELAX,E }}, {{ PREFIX32,0x6,0xB,0xA,B30|RS32,DST|MEMRELAX|ABS32LIST,E }}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),10,"movfpe"),{{ABS16SRC,RD8,E}},{{ 0x6,0xA,0x4,RD8,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),10,"movtpe"),{{RS8,ABS16DST,E}},{{ 0x6,0xA,0xC,RS8,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- NEW_SOP(O(O_MULU,SB),1,14,"mulxu.b"),{{RS8,RD16,E}}, {{ 0x5,0x0,RS8,RD16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MULU,SW),0,14,"mulxu.w"),{{RS16,RD32,E}},{{ 0x5,0x2,RS16,B30|RD32,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_MULS,SB),0,20,"mulxs.b"),{{RS8,RD16,E}}, {{ 0x0,0x1,0xc,0x0,0x5,0x0,RS8,RD16,E}}EOP,
- NEW_SOP(O(O_MULS,SW),0,20,"mulxs.w"),{{RS16,RD32,E}},{{ 0x0,0x1,0xc,0x0,0x5,0x2,RS16,B30|RD32,E}}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NEG,SB),1,2,"neg.b"),{{ OR8,E, 0}},{{ 0x1,0x7,0x8,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_NEG,SW),0,2,"neg.w"),{{ OR16,E,0}},{{ 0x1,0x7,0x9,OR16,E}}EOP,
- NEW_SOP(O(O_NEG,SL),0,2,"neg.l"),{{ OR32,E,0}},{{ 0x1,0x7,0xB,B30|OR32,E}}EOP,
-
- NEW_SOP(O(O_NOP,SN),1,2,"nop"),{{E,0,0}},{{ 0x0,0x0,0x0,0x0,E,0,0,0,0}}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NOT,SB),1,2,"not.b"),{{ OR8,E, 0}},{{ 0x1,0x7,0x0,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_NOT,SW),0,2,"not.w"),{{ OR16,E,0}},{{ 0x1,0x7,0x1,OR16,E}}EOP,
- NEW_SOP(O(O_NOT,SL),0,2,"not.l"),{{ OR32,E,0}},{{ 0x1,0x7,0x3,B30|OR32,E}}EOP,
-
- TWOOP(O(O_OR, SB),"or.b",0xC,0x1,0x4),
- NEW_SOP(O(O_OR,SW),0,4,"or.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x4,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_OR,SW),0,2,"or.w"),{{RS16,RD16,E }},{{0x6,0x4,RS16,RD16,E}} EOP,
-
- NEW_SOP(O(O_OR,SL),0,6,"or.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x4,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_OR,SL),0,2,"or.l"),{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x4,B30|RS32,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{{IMM8,CCR|DST,E}},{{ 0x0,0x4,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{{IMM8,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x4,IMM8,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_MOV_TO_REG,SW),1,6,"pop.w"),{{OR16,E,0}},{{ 0x6,0xD,0x7,OR16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_REG,SL),0,6,"pop.l"),{{OR32,E,0}},{{ PREFIX32,0x6,0xD,0x7,OR32|B30,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SW),1,6,"push.w"),{{OR16,E,0}},{{ 0x6,0xD,0xF,OR16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SL),0,6,"push.l"),{{OR32,E,0}},{{ PREFIX32,0x6,0xD,0xF,OR32|B30,E,0,0,0,0}}EOP,
-
- UNOP3(O_ROTL, "rotl", 0x1,0x2,0x8),
- UNOP3(O_ROTR, "rotr", 0x1,0x3,0x8),
- UNOP3(O_ROTXL, "rotxl",0x1,0x2,0x0),
- UNOP3(O_ROTXR, "rotxr",0x1,0x3,0x0),
-
- SOP(O(O_BPT,SN), 10,"bpt"),{{E,0,0}},{{ 0x7,0xA,0xF,0xF,E,0,0,0,0}}EOP,
- SOP(O(O_RTE,SN), 10,"rte"),{{E,0,0}},{{ 0x5,0x6,0x7,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_RTS,SN), 8,"rts"),{{E,0,0}},{{ 0x5,0x4,0x7,0x0,E,0,0,0,0}}EOP,
-
- UNOP3(O_SHAL, "shal",0x1,0x0,0x8),
- UNOP3(O_SHAR, "shar",0x1,0x1,0x8),
- UNOP3(O_SHLL, "shll",0x1,0x0,0x0),
- UNOP3(O_SHLR, "shlr",0x1,0x1,0x0),
-
- SOP(O(O_SLEEP,SN),2,"sleep"),{{E,0,0}},{{ 0x0,0x1,0x8,0x0,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{{CCR|SRC,RD8,E}},{{ 0x0,0x2,0x0,RD8,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,RDIND,E}}, {{PREFIXLDC,0x6,0x9,B31|RDIND,0x0,E}} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,DISP|DST|L_16,E}},{{PREFIXLDC,0x6,0xF,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,DISP|DST|L_32,E}},{{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0xA,0x0,DST|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,RDDEC,E}}, {{PREFIXLDC,0x6,0xD,B31|RDDEC,0x0,E}}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,ABS16DST,E}}, {{PREFIXLDC,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,ABS32DST,E}}, {{PREFIXLDC,0x6,0xB,0xA,0x0,DST|ABS32LIST,E}}EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{{EXR|SRC,RD8,E}},{{ 0x0,0x2,0x1,RD8,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,RDIND,E}}, {{0x0,0x1,0x4,0x1,0x6,0x9,B31|RDIND,0x0,E}} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,DISP|DST|L_16,E}},{{0x0,0x1,0x4,0x1,0x6,0xF,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,DISP|DST|L_32,E}},{{0x0,0x1,0x4,0x1,0x7,0x8,B30|DISPREG,0,0x6,0xB,0xA,0x0,DST|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,RDDEC,E}}, {{0x0,0x1,0x4,0x1,0x6,0xD,B31|RDDEC,0x0,E}}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,ABS16DST,E}}, {{0x0,0x1,0x4,0x1,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,ABS32DST,E}}, {{0x0,0x1,0x4,0x1,0x6,0xB,0xA,0x0,DST|ABS32LIST,E}}EOP,
-
- SOP(O(O_SUB,SB),2,"sub.b"),{{RS8,RD8,E}},{{ 0x1,0x8,RS8,RD8,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_SUB,SW),1,2,"sub.w"),{{RS16,RD16,E }}, {{0x1,0x9,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_SUB,SW),0,4,"sub.w"),{{IMM16,RD16,E }}, {{0x7,0x9,0x3,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_SUB,SL),0,2,"sub.l") ,{{RS32,RD32,E }}, {{0x1,0xA,B31|RS32,B30|RD32,E}} EOP,
- NEW_SOP(O(O_SUB,SL),0,6,"sub.l"), {{IMM32,RD32,E }},{{0x7,0xA,0x3,B30|RD32,IMM32LIST,E}} EOP,
-
- SOP(O(O_SUBS,SL),2,"subs"),{{KBIT,RDP,E}},{{ 0x1,0xB,KBIT,RDP,E,0,0,0,0}}EOP,
- TWOOP(O(O_SUBX,SB),"subx",0xB,0x1,0xE),
-
- NEW_SOP(O(O_TRAPA,SB),0,2,"trapa"),{{ IMM2,E}}, {{0x5,0x7,IMM2,IGNORE,E }}EOP,
- NEW_SOP(O(O_TAS,SB),0,2,"tas"),{{RSIND,E}}, {{0x0,0x1,0xe,0x0,0x7,0xb,B30|RSIND,0xc,E }}EOP,
-
- TWOOP(O(O_XOR, SB),"xor",0xD,0x1,0x5),
-
- NEW_SOP(O(O_XOR,SW),0,4,"xor.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x5,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_XOR,SW),0,2,"xor.w"),{{RS16,RD16,E }},{{0x6,0x5,RS16,RD16,E}} EOP,
-
- NEW_SOP(O(O_XOR,SL),0,6,"xor.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x5,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_XOR,SL),0,2,"xor.l") ,{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x5,B30|RS32,B30|RD32,E}} EOP,
-
- SOP(O(O_XORC,SB),2,"xorc"),{{IMM8,CCR|DST,E}},{{ 0x0,0x5,IMM8,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_XORC,SB),2,"xorc"),{{IMM8,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x5,IMM8,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_CLRMAC,SN),1,2,"clrmac"),{{E, 0, 0}},{{0x0,0x1,0xa,0x0,E}} EOP,
- NEW_SOP(O(O_MAC,SL),1,2,"mac"),{{RSINC,RDINC,E}},{{0x0,0x1,0x6,0x0,0x6,0xd,B30|RSINC,B30|RDINC,E}} EOP,
- NEW_SOP(O(O_LDMAC,SL),1,2,"ldmac"),{{RS32,MD32,E}},{{0x0,0x3,MD32,RS32,E}} EOP,
- NEW_SOP(O(O_STMAC,SL),1,2,"stmac"),{{MS32,RD32,E}},{{0x0,0x2,MS32,RD32,E}} EOP,
- NEW_SOP(O(O_LDM,SL),0,6,"ldm.l"),{{RSINC, RS32, E}},{{ 0x0,0x1,IGNORE,0x0,0x6,0xD,0x7,IGNORE,E}}EOP,
- NEW_SOP(O(O_STM,SL),0,6,"stm.l"),{{RS32, RDDEC, E}},{{0x0,0x1,IGNORE,0x0,0x6,0xD,0xF,IGNORE,E}}EOP,
- {0, 0, 0, NULL, {{0,0,0}}, {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}
+ {O (O_BRAS, SB), AV_H8SX, 0, "bra/s", {{PCREL8, E}}, {{0x4, 0x0, PCREL8, DATA | B01, E}}},
+
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+
+ BRANCH (O (O_BRA, SB), "bt", 0x0),
+ BRANCH (O (O_BRN, SB), "brn", 0x1),
+ BRANCH (O (O_BRN, SB), "bf", 0x1),
+ BRANCH (O (O_BHI, SB), "bhi", 0x2),
+ BRANCH (O (O_BLS, SB), "bls", 0x3),
+ BRANCH (O (O_BCC, SB), "bcc", 0x4),
+ BRANCH (O (O_BCC, SB), "bhs", 0x4),
+ BRANCH (O (O_BCS, SB), "bcs", 0x5),
+ BRANCH (O (O_BCS, SB), "blo", 0x5),
+ BRANCH (O (O_BNE, SB), "bne", 0x6),
+ BRANCH (O (O_BEQ, SB), "beq", 0x7),
+ BRANCH (O (O_BVC, SB), "bvc", 0x8),
+ BRANCH (O (O_BVS, SB), "bvs", 0x9),
+ BRANCH (O (O_BPL, SB), "bpl", 0xA),
+ BRANCH (O (O_BMI, SB), "bmi", 0xB),
+ BRANCH (O (O_BGE, SB), "bge", 0xC),
+ BRANCH (O (O_BLT, SB), "blt", 0xD),
+ BRANCH (O (O_BGT, SB), "bgt", 0xE),
+ BRANCH (O (O_BLE, SB), "ble", 0xF),
+
+ EBITOP (O (O_BCLR, SB), IMM3 | B30, "bclr", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BAND, SB), IMM3 | B30, "band", 0x7, 0x6, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BIAND, SB), IMM3 | B31, "biand", 0x7, 0x6, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BILD, SB), IMM3 | B31, "bild", 0x7, 0x7, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BIOR, SB), IMM3 | B31, "bior", 0x7, 0x4, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BIST, SB), IMM3 | B31, "bist", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BIXOR, SB), IMM3 | B31, "bixor", 0x7, 0x5, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BLD, SB), IMM3 | B30, "bld", 0x7, 0x7, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ EBITOP (O (O_BNOT, SB), IMM3 | B30, "bnot", 0x6, 0x1, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BOR, SB), IMM3 | B30, "bor", 0x7, 0x4, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ EBITOP (O (O_BSET, SB), IMM3 | B30, "bset", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BST, SB), IMM3 | B30, "bst", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ EBITOP (O (O_BTST, SB), IMM3 | B30, "btst", 0x6, 0x3, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BXOR, SB), IMM3 | B30, "bxor", 0x7, 0x5, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+
+ EBITOP_B (O (O_BCLREQ, SB), IMM3 | B30, "bclr/eq", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+ EBITOP_B (O (O_BCLRNE, SB), IMM3 | B30, "bclr/ne", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0x6),
+ EBITOP_B (O (O_BSETEQ, SB), IMM3 | B30, "bset/eq", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+ EBITOP_B (O (O_BSETNE, SB), IMM3 | B30, "bset/ne", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0x6),
+ BITOP_B (O (O_BISTZ, SB), IMM3 | B31, "bistz", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+ BITOP_B (O (O_BSTZ, SB), IMM3 | B30, "bstz", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, RDIND, R3_8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0xF, R3_8, IMM8LIST, E}}},
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS8DST, R3_8}}, {{0x7, 0xE, DSTABS8LIST, 0xF, R3_8, IMM8LIST, E}}},
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS16DST, R3_8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0xF, R3_8, IMM8LIST, E}}},
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS32DST, R3_8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0xF, R3_8, IMM8LIST, E}}},
+
+ /* Because the assembler treats SRC, DST and OP3 as ordinals,
+ I must designate the second argument, an immediate value, as DST.
+ May God have mercy on my soul. */
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, R3_IND}}, {{0x7, 0xD, B30 | R3_IND, 0x0, 0xF, RS8, DST | IMM8LIST, E}}},
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS8OP3}}, {{0x7, 0xF, OP3ABS8LIST, 0xF, RS8, DST | IMM8LIST, E}}},
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS16OP3}}, {{0x6, 0xA, 0x1, 0x8, OP3ABS16LIST, 0xF, RS8, DST | IMM8LIST, E}}},
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS32OP3}}, {{0x6, 0xA, 0x3, 0x8, OP3ABS32LIST, 0xF, RS8, DST | IMM8LIST, E}}},
+
+ {O (O_BSR, SB), AV_H8, 6, "bsr", {{PCREL8, E}}, {{0x5, 0x5, PCREL8, DATA, E}}},
+ {O (O_BSR, SB), AV_H8, 6, "bsr", {{PCREL16, E}}, {{0x5, 0xC, 0x0, 0x0, PCREL16, DATA3, E}}},
+ {O (O_BSR, SB), AV_H8SX, 0, "bsr", {{LOWREG | L_8, E}}, {{0x5, 0xd, B30 | LOWREG | L_8, 0x5, E}}},
+ {O (O_BSR, SW), AV_H8SX, 0, "bsr", {{LOWREG | L_16, E}}, {{0x5, 0xd, B30 | LOWREG | L_16, 0x6, E}}},
+ {O (O_BSR, SL), AV_H8SX, 0, "bsr", {{OR32, E}}, {{0x5, 0xd, B30 | OR32, 0x7, E}}},
+
+ {O (O_CMP, SB), AV_H8, 2, "cmp.b", {{IMM8, RD8, E}}, {{0xa, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_CMP, SB), "cmp.b", 0xa, 0x1, 0xc, 0x2, B00),
+
+ {O (O_CMP, SW), AV_H8, 2, "cmp.w", {{RS16, RD16, E}}, {{0x1, 0xd, RS16, RD16, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, RD16, E}}, {{0x1, 0xf, B30 | IMM3NZ, RD16, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
+ EXPAND_TWOOP_W (O (O_CMP, SW), "cmp.w", 0x1, 0xd, 0x2),
+
+ {O (O_CMP, SL), AV_H8H, 6, "cmp.l", {{RS32, RD32, E}}, {{0x1, 0xf, B31 | RS32, B30 | RD32, E}}},
+ {O (O_CMP, SL), AV_H8SX, 0, "cmp.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xf, B31 | IMM3NZ, B31 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_CMP, SL), "cmp.l", 0x2),
+
+ UNOP (O (O_DAA, SB), "daa", 0x0, 0xF),
+ UNOP (O (O_DAS, SB), "das", 0x1, 0xF),
+ UNOP (O (O_DEC, SB), "dec.b", 0x1, 0xA),
+
+ {O (O_DEC, SW), AV_H8H, 2, "dec.w", {{DBIT, RD16, E}}, {{0x1, 0xB, 0x5 | DBIT, RD16, E}}},
+ {O (O_DEC, SL), AV_H8H, 2, "dec.l", {{DBIT, RD32, E}}, {{0x1, 0xB, 0x7 | DBIT, RD32 | B30, E}}},
+
+ {O (O_DIVS, SW), AV_H8SX, 0, "divs.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xd, 0x6, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVS, SW), AV_H8SX, 0, "divs.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xd, 0x2, 0x5, 0x1, RS16, RD16, E}}},
+ {O (O_DIVS, SL), AV_H8SX, 0, "divs.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xd, 0x6, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVS, SL), AV_H8SX, 0, "divs.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xd, 0x2, 0x5, 0x3, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_DIVU, SW), AV_H8SX, 0, "divu.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xd, 0xe, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVU, SW), AV_H8SX, 0, "divu.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xd, 0xa, 0x5, 0x1, RS16, RD16, E}}},
+ {O (O_DIVU, SL), AV_H8SX, 0, "divu.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xd, 0xe, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVU, SL), AV_H8SX, 0, "divu.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xd, 0xa, 0x5, 0x3, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_DIVXS, SB), AV_H8SX, 0, "divxs.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xD, 0x4, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVXS, SB), AV_H8H, 13, "divxs.b", {{RS8, RD16, E}}, {{0x0, 0x1, 0xD, 0x0, 0x5, 0x1, RS8, RD16, E}}},
+ {O (O_DIVXS, SW), AV_H8SX, 0, "divxs.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xD, 0x4, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVXS, SW), AV_H8H, 21, "divxs.w", {{RS16, RD32, E}}, {{0x0, 0x1, 0xD, 0x0, 0x5, 0x3, RS16, B30 | RD32, E}}},
+
+ {O (O_DIVXU, SB), AV_H8SX, 0, "divxu.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xD, 0xC, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVXU, SB), AV_H8, 13, "divxu.b", {{RS8, RD16, E}}, {{0x5, 0x1, RS8, RD16, E}}},
+ {O (O_DIVXU, SW), AV_H8SX, 0, "divxu.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xD, 0xC, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVXU, SW), AV_H8H, 21, "divxu.w", {{RS16, RD32, E}}, {{0x5, 0x3, RS16, B30 | RD32, E}}},
+
+ {O (O_EEPMOV, SB), AV_H8, 4, "eepmov.b", {{E}}, {{0x7, 0xB, 0x5, 0xC, 0x5, 0x9, 0x8, 0xF, E}}},
+ {O (O_EEPMOV, SW), AV_H8H, 4, "eepmov.w", {{E}}, {{0x7, 0xB, 0xD, 0x4, 0x5, 0x9, 0x8, 0xF, E}}},
+
+ EXPAND_UNOP_STD_W (O (O_EXTS, SW), "exts.w", PREFIX_015, 0x1, 0x7, 0xd),
+ EXPAND_UNOP_STD_L (O (O_EXTS, SL), "exts.l", PREFIX_010, 0x1, 0x7, 0xf),
+ EXPAND_UNOP_EXTENDED_L (O (O_EXTS, SL), "exts.l", CONST_2, PREFIX_010, 0x1, 0x7, 0xe, 0),
+ EXPAND_UNOP_STD_W (O (O_EXTU, SW), "extu.w", PREFIX_015, 0x1, 0x7, 0x5),
+ EXPAND_UNOP_STD_L (O (O_EXTU, SL), "extu.l", PREFIX_010, 0x1, 0x7, 0x7),
+ EXPAND_UNOP_EXTENDED_L (O (O_EXTU, SL), "extu.l", CONST_2, PREFIX_010, 0x1, 0x7, 0x6, 0),
+
+ UNOP (O (O_INC, SB), "inc", 0x0, 0xA),
+
+ {O (O_INC, SW), AV_H8H, 2, "inc.w", {{DBIT, RD16, E}}, {{0x0, 0xB, 0x5 | DBIT, RD16, E}}},
+ {O (O_INC, SL), AV_H8H, 2, "inc.l", {{DBIT, RD32, E}}, {{0x0, 0xB, 0x7 | DBIT, RD32 | B30, E}}},
+
+ {O (O_JMP, SN), AV_H8, 4, "jmp", {{RSIND, E}}, {{0x5, 0x9, B30 | RSIND, 0x0, E}}},
+ {O (O_JMP, SN), AV_H8, 6, "jmp", {{ABSJMP | L_24, E}}, {{0x5, 0xA, SRC | ABSJMP | L_24, DATA5, E}}},
+
+ {O (O_JMP, SN), AV_H8SX, 0, "jmp", {{ABSJMP | L_32, E}}, {{0x5, 0x9, 0x0, 0x8, ABSJMP | L_32, DATA7, E}}},
+
+ {O (O_JMP, SN), AV_H8, 8, "jmp", {{MEMIND, E}}, {{0x5, 0xB, SRC | MEMIND, DATA, E}}},
+ {O (O_JMP, SN), AV_H8SX, 0, "jmp", {{VECIND, E}}, {{0x5, 0x9, B31 | SRC | VECIND, DATA, E}}},
+
+ {O (O_JSR, SN), AV_H8, 6, "jsr", {{RSIND, E}}, {{0x5, 0xD, B30 | RSIND, 0x0, E}}},
+ {O (O_JSR, SN), AV_H8, 8, "jsr", {{ABSJMP | L_24, E}}, {{0x5, 0xE, SRC | ABSJMP | L_24, DATA5, E}}},
+
+ {O (O_JSR, SN), AV_H8SX, 0, "jsr", {{ABSJMP | L_32, E}}, {{0x5, 0xD, 0x0, 0x8, ABSJMP | L_32, DATA7, E}}},
+
+ {O (O_JSR, SN), AV_H8, 8, "jsr", {{MEMIND, E}}, {{0x5, 0xF, SRC | MEMIND, DATA, E}}},
+ {O (O_JSR, SN), AV_H8, 8, "jsr", {{VECIND, E}}, {{0x5, 0xD, SRC | VECIND, DATA, E}}},
+
+ {O (O_LDC, SB), AV_H8, 2, "ldc", {{IMM8, CCR | DST, E}}, {{ 0x0, 0x7, IMM8LIST, E}}},
+ {O (O_LDC, SB), AV_H8S, 2, "ldc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x7, IMM8LIST, E}}},
+ {O (O_LDC, SB), AV_H8, 2, "ldc", {{RS8, CCR | DST, E}}, {{0x0, 0x3, B30 | CCR | DST, RS8, E}}},
+ {O (O_LDC, SB), AV_H8S, 2, "ldc", {{RS8, EXR | DST, E}}, {{0x0, 0x3, B30 | EXR | DST, RS8, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{RSIND, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0x9, B30 | RSIND, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{RSIND, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0x9, B30 | RSIND, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{RSPOSTINC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xD, B30 | RSPOSTINC, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{RSPOSTINC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xD, B30 | RSPOSTINC, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{DISP16SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xF, B30 | DISPREG, IGNORE, SRC | DISP16LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{DISP16SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xF, B30 | DISPREG, IGNORE, SRC | DISP16LIST, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{DISP32SRC, CCR | DST, E}}, {{PREFIXLDC, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xB, 0x2, IGNORE, SRC | DISP32LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{DISP32SRC, EXR | DST, E}}, {{PREFIXLDC, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xB, 0x2, IGNORE, SRC | DISP32LIST, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{ABS16SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x0, IGNORE, SRC | ABS16LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{ABS16SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x0, IGNORE, SRC | ABS16LIST, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{ABS32SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x2, IGNORE, SRC | ABS32LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{ABS32SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x2, IGNORE, SRC | ABS32LIST, E}}},
+ {O (O_LDC, SL), AV_H8SX, 0, "ldc", {{RS32, B30 | VBR_SBR | DST, E}}, {{0x0, 0x3, B30 | VBR_SBR | DST, RS32, E}}},
+
+
+ {O (O_MOV, SB), AV_H8, 2, "mov.b", {{IMM8, RD8, E}}, {{0xF, RD8, IMM8LIST, E}}},
+ {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4_NS, ABS16DST, E}}, {{0x6, 0xa, 0xd, IMM4, DSTABS16LIST, E}}},
+ {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4_NS, ABS32DST, E}}, {{0x6, 0xa, 0xf, IMM4, DSTABS32LIST, E}}},
+ MOVFROM_IMM8 (O (O_MOV, SB), PREFIX_017D, "mov.b", IMM8),
+
+ {O (O_MOV, SB), AV_H8, 2, "mov.b", {{RS8, RD8, E}}, {{0x0, 0xC, RS8, RD8, E}}},
+ MOVFROM_REG_BW (O (O_MOV, SB), "mov.b", RS8, PREFIX_017, 8, 10, 12, 14, MEMRELAX),
+ {O (O_MOV, SB), AV_H8, 4, "mov.b", {{RS8, ABS8DST, E}}, {{0x3, RS8, DSTABS8LIST, E}}},
+ MOVTO_REG_BW (O (O_MOV, SB), "mov.b", RD8, PREFIX_017, 8, 10, 12, 14, MEMRELAX),
+ {O (O_MOV, SB), AV_H8, 4, "mov.b", {{ABS8SRC, RD8, E}}, {{0x2, RD8, ABS8LIST, E}}},
+
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSIND, FROM_IND),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPOSTINC, FROM_POSTINC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPOSTDEC, FROM_POSTDEC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPREINC, FROM_PREINC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPREDEC, FROM_PREDEC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP2SRC, FROM_DISP2),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP16SRC, FROM_DISP16, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP32SRC, FROM_DISP32, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXB16, FROM_DISP16B, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXW16, FROM_DISP16W, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXL16, FROM_DISP16L, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXB32, FROM_DISP32B, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXW32, FROM_DISP32W, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXL32, FROM_DISP32L, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", ABS16SRC, FROM_ABS16, ABS16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", ABS32SRC, FROM_ABS32, ABS32LIST),
+
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM3NZ_NS, RD16, E}}, {{0x0, 0xf, B30 | IMM3NZ, RD16, E}}},
+ {O (O_MOV, SW), AV_H8, 4, "mov.w", {{IMM16, RD16, E}}, {{0x7, 0x9, 0x0, RD16, IMM16LIST, E}}},
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4_NS, ABS16DST, E}}, {{0x6, 0xb, 0xd, IMM4, DSTABS16LIST, E}}},
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4_NS, ABS32DST, E}}, {{0x6, 0xb, 0xf, IMM4, DSTABS32LIST, E}}},
+
+ MOVFROM_IMM8 (O (O_MOV, SW), PREFIX_015D, "mov.w", IMM8_NS),
+ MOVFROM_IMM (O (O_MOV, SW), PREFIX_7974, "mov.w", IMM16, IMM16LIST),
+
+ {O (O_MOV, SW), AV_H8, 2, "mov.w", {{RS16, RD16, E}}, {{0x0, 0xD, RS16, RD16, E}}},
+ MOVFROM_REG_BW (O (O_MOV, SW), "mov.w", RS16, PREFIX_015, 9, 11, 13, 15, 0),
+ MOVTO_REG_BW (O (O_MOV, SW), "mov.w", RD16, PREFIX_015, 9, 11, 13, 15, 0),
+
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSIND, FROM_IND),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPOSTINC, FROM_POSTINC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPOSTDEC, FROM_POSTDEC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPREINC, FROM_PREINC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPREDEC, FROM_PREDEC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP2SRC, FROM_DISP2),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP16SRC, FROM_DISP16, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP32SRC, FROM_DISP32, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXB16, FROM_DISP16B, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXW16, FROM_DISP16W, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXL16, FROM_DISP16L, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXB32, FROM_DISP32B, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXW32, FROM_DISP32W, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXL32, FROM_DISP32L, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", ABS16SRC, FROM_ABS16, ABS16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", ABS32SRC, FROM_ABS32, ABS32LIST),
+
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xf, B31 | IMM3NZ, B31 | RD32, E}}},
+
+ MOVFROM_IMM8 (O (O_MOV, SL), PREFIX_010D, "mov.l", IMM8_NS),
+ MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A7C, "mov.l", IMM16U_NS, IMM16ULIST),
+
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{IMM16U_NS, RD32, E}}, {{0x7, 0xa, 0x0, B31 | RD32, IMM16ULIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 4, "mov.l", {{IMM32, RD32, E}}, {{0x7, 0xa, 0x0, B30 | RD32, IMM32LIST, E}}},
+
+ MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A74, "mov.l", IMM32, IMM32LIST),
+
+ {O (O_MOV, SL), AV_H8H, 2, "mov.l", {{RS32, RD32, E}}, {{0x0, 0xf, B31 | RS32, B30 | RD32, E}}},
+
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, RDIND, E}}, {{PREFIX_0100, 0x6, 0x9, B31 | RDIND, B30 | RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPOSTINC, E}}, {{PREFIX_0103, 0x6, 0xd, B31 | RDPOSTINC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0101, 0x6, 0xd, B31 | RDPOSTDEC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPREINC, E}}, {{PREFIX_0102, 0x6, 0xd, B31 | RDPREINC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, RDPREDEC, E}}, {{PREFIX_0100, 0x6, 0xd, B31 | RDPREDEC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, DISP2DST, E}}, {{PREFIX_010, B30 | B20 | DISP2DST, 0x6, 0x9, B31 | DSTDISPREG, RS32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP16DST, E}}, {{PREFIX_0100, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP32DST, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x0, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXB16D, E}}, {{PREFIX_0101, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXW16D, E}}, {{PREFIX_0102, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXL16D, E}}, {{PREFIX_0103, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXB32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x1, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXW32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x2, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXL32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x3, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, ABS16DST, E}}, {{PREFIX_0100, 0x6, 0xb, 0x8, RS32, DSTABS16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, ABS32DST, E}}, {{PREFIX_0100, 0x6, 0xb, 0xa, RS32, MEMRELAX | DSTABS32LIST, E}}},
+
+ {O (O_MOV, SL), AV_H8H, 4, "mov.l", {{RSIND, RD32, E}}, {{PREFIX_0100, 0x6, 0x9, B30 | RSIND, RD32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RSPOSTINC, RD32, E}}, {{PREFIX_0100, 0x6, 0xd, B30 | RSPOSTINC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0102, 0x6, 0xd, B30 | RSPOSTDEC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPREINC, RD32, E}}, {{PREFIX_0101, 0x6, 0xd, B30 | RSPREINC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPREDEC, RD32, E}}, {{PREFIX_0103, 0x6, 0xd, B30 | RSPREDEC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{DISP2SRC, RD32, E}}, {{PREFIX_010, B30 | B20 | DISP2SRC, 0x6, 0x9, B30 | DISPREG, RD32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP16SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP32SRC, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x0, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXB16, RD32, E}}, {{PREFIX_0101, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXW16, RD32, E}}, {{PREFIX_0102, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXL16, RD32, E}}, {{PREFIX_0103, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXB32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x1, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXW32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x2, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXL32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x3, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{ABS16SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xb, 0x0, RD32, SRC | ABS16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{ABS32SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xb, 0x2, RD32, SRC | MEMRELAX | ABS32LIST, E}}},
+
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSIND, FROM_IND),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPOSTINC, FROM_POSTINC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPOSTDEC, FROM_POSTDEC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPREINC, FROM_PREINC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPREDEC, FROM_PREDEC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP2SRC, FROM_DISP2),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP16SRC, FROM_DISP16, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP32SRC, FROM_DISP32, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXB16, FROM_DISP16B, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXW16, FROM_DISP16W, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXL16, FROM_DISP16L, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXB32, FROM_DISP32B, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXW32, FROM_DISP32W, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXL32, FROM_DISP32L, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", ABS16SRC, FROM_ABS16, ABS16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", ABS32SRC, FROM_ABS32, ABS32LIST),
+
+#define DO_MOVA1(TYPE, OP0, OP1) \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B30 | R3_32, DISP16LIST, E}}}, \
+\
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B31 | R3_32, DISP32LIST, E}}}
+
+#define DO_MOVA2(TYPE, OP0, OP1, OP2) \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+\
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B31 | R3_32, OP2, DISP32LIST, E}}}
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, E}}, {{0x7, 0xA, 0x8, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, E}}, {{0x7, 0xA, 0x9, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, E}}, {{0x7, 0xA, 0xA, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, E}}, {{0x7, 0xA, 0xB, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, E}}, {{0x7, 0xA, 0xC, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, E}}, {{0x7, 0xA, 0xD, B31 | DISPREG, DISP16LIST, E}}},
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, E}}, {{0x7, 0xA, 0x8, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, E}}, {{0x7, 0xA, 0x9, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, E}}, {{0x7, 0xA, 0xA, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, E}}, {{0x7, 0xA, 0xB, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, E}}, {{0x7, 0xA, 0xC, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, E}}, {{0x7, 0xA, 0xD, B30 | DISPREG, DISP32LIST, E}}},
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0x8, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0x9, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xA, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xB, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xC, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xD, B31 | R3_32, DISP16LIST, E}}},
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0x8, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0x9, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xA, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xB, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xC, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xD, B30 | R3_32, DISP32LIST, E}}},
+
+ DO_MOVA1 (RDIND, 0x0, B30 | RDIND),
+ DO_MOVA1 (RDPOSTINC, 0x8, B30 | RDPOSTINC),
+ DO_MOVA1 (RDPOSTDEC, 0xA, B30 | RDPOSTDEC),
+ DO_MOVA1 (RDPREINC, 0x9, B30 | RDPREINC),
+ DO_MOVA1 (RDPREDEC, 0xB, B30 | RDPREDEC),
+ DO_MOVA1 (DISP2DST, B30 | B20 | DISP2DST, B30 | DSTDISPREG),
+ DO_MOVA2 (DISP16DST, 0xC, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (DISP32DST, 0xC, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (INDEXB16 | DST, 0xD, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (INDEXW16 | DST, 0xE, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (INDEXL16 | DST, 0xF, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (INDEXB32 | DST, 0xD, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (INDEXW32 | DST, 0xE, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (INDEXL32 | DST, 0xF, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (ABS16DST | DST, 0x4, 0x0, DSTABS16LIST),
+ DO_MOVA2 (ABS32DST | DST, 0x4, 0x8, DSTABS32LIST),
+
+ {O (O_MOV, SB), AV_H8, 10, "movfpe", {{ABS16SRC, RD8, E}}, {{0x6, 0xA, 0x4, RD8, ABS16SRC, DATA3, E}}},
+ {O (O_MOV, SB), AV_H8, 10, "movtpe", {{RS8, ABS16DST, E}}, {{0x6, 0xA, 0xC, RS8, ABS16DST, DATA3, E}}},
+
+ {O (O_MOVMD, SB), AV_H8SX, 0, "movmd.b", {{E}}, {{0x7, 0xb, 0x9, 0x4, E}}},
+ {O (O_MOVMD, SW), AV_H8SX, 0, "movmd.w", {{E}}, {{0x7, 0xb, 0xa, 0x4, E}}},
+ {O (O_MOVMD, SL), AV_H8SX, 0, "movmd.l", {{E}}, {{0x7, 0xb, 0xb, 0x4, E}}},
+ {O (O_MOVSD, SB), AV_H8SX, 0, "movsd.b", {{PCREL16, E}}, {{0x7, 0xb, 0x8, 0x4, PCREL16, DATA3, E}}},
+
+ {O (O_MULS, SW), AV_H8SX, 0, "muls.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0x6, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULS, SW), AV_H8SX, 0, "muls.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xc, 0x2, 0x5, 0x0, RS16, RD16, E}}},
+ {O (O_MULS, SL), AV_H8SX, 0, "muls.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x6, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULS, SL), AV_H8SX, 0, "muls.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0x2, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_MULU, SW), AV_H8SX, 0, "mulu.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0xe, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULU, SW), AV_H8SX, 0, "mulu.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xc, 0xa, 0x5, 0x0, RS16, RD16, E}}},
+ {O (O_MULU, SL), AV_H8SX, 0, "mulu.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xe, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULU, SL), AV_H8SX, 0, "mulu.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0xa, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_MULSU, SL), AV_H8SX, 0, "muls/u.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x7, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULSU, SL), AV_H8SX, 0, "muls/u.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0x3, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+ {O (O_MULUU, SL), AV_H8SX, 0, "mulu/u.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xf, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULUU, SL), AV_H8SX, 0, "mulu/u.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0xb, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_MULXS, SB), AV_H8SX, 0, "mulxs.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0x4, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULXS, SB), AV_H8H, 20, "mulxs.b", {{RS8, RD16, E}}, {{0x0, 0x1, 0xc, 0x0, 0x5, 0x0, RS8, RD16, E}}},
+ {O (O_MULXS, SW), AV_H8SX, 0, "mulxs.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x4, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULXS, SW), AV_H8H, 20, "mulxs.w", {{RS16, RD32, E}}, {{0x0, 0x1, 0xc, 0x0, 0x5, 0x2, RS16, B30 | RD32, E}}},
+
+ {O (O_MULXU, SB), AV_H8SX, 0, "mulxu.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0xc, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULXU, SB), AV_H8, 14, "mulxu.b", {{RS8, RD16, E}}, {{0x5, 0x0, RS8, RD16, E}}},
+ {O (O_MULXU, SW), AV_H8SX, 0, "mulxu.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xc, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULXU, SW), AV_H8H, 14, "mulxu.w", {{RS16, RD32, E}}, {{0x5, 0x2, RS16, B30 | RD32, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_NEG, SB), "neg.b", PREFIX_017, 0x1, 0x7, 0x8),
+ EXPAND_UNOP_STD_W (O (O_NEG, SW), "neg.w", PREFIX_015, 0x1, 0x7, 0x9),
+ EXPAND_UNOP_STD_L (O (O_NEG, SL), "neg.l", PREFIX_010, 0x1, 0x7, 0xb),
+
+ {O (O_NOP, SN), AV_H8, 2, "nop", {{E}}, {{0x0, 0x0, 0x0, 0x0, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_NOT, SB), "not.b", PREFIX_017, 0x1, 0x7, 0x0),
+ EXPAND_UNOP_STD_W (O (O_NOT, SW), "not.w", PREFIX_015, 0x1, 0x7, 0x1),
+ EXPAND_UNOP_STD_L (O (O_NOT, SL), "not.l", PREFIX_010, 0x1, 0x7, 0x3),
+
+ {O (O_OR, SB), AV_H8, 2, "or.b", {{IMM8, RD8, E}}, {{0xc, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_OR, SB), "or.b", 0xc, 0x1, 0x4, 0x4, 0),
+
+ {O (O_OR, SW), AV_H8, 2, "or.w", {{RS16, RD16, E}}, {{0x6, 0x4, RS16, RD16, E}}},
+ EXPAND_TWOOP_W (O (O_OR, SW), "or.w", 0x6, 0x4, 0x4),
+
+ {O (O_OR, SL), AV_H8H, 2, "or.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x4, B30 | RS32, B30 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_OR, SL), "or.l", 0x4),
+
+ {O (O_ORC, SB), AV_H8, 2, "orc", {{IMM8, CCR | DST, E}}, {{0x0, 0x4, IMM8LIST, E}}},
+ {O (O_ORC, SB), AV_H8S, 2, "orc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x4, IMM8LIST, E}}},
+
+ {O (O_MOV, SW), AV_H8, 6, "pop.w", {{OR16, E}}, {{0x6, 0xD, 0x7, OR16, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "pop.l", {{OR32, E}}, {{PREFIX_0100, 0x6, 0xD, 0x7, OR32 | B30, E}}},
+ {O (O_MOV, SW), AV_H8, 6, "push.w", {{OR16, E}}, {{0x6, 0xD, 0xF, OR16, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "push.l", {{OR32, E}}, {{PREFIX_0100, 0x6, 0xD, 0xF, OR32 | B30, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_ROTL, SB), "rotl.b", PREFIX_017, 0x1, 0x2, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTL, SB), "rotl.b", CONST_2, PREFIX_017, 0x1, 0x2, 0xc),
+ EXPAND_UNOP_STD_W (O (O_ROTL, SW), "rotl.w", PREFIX_015, 0x1, 0x2, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTL, SW), "rotl.w", CONST_2, PREFIX_015, 0x1, 0x2, 0xd),
+ EXPAND_UNOP_STD_L (O (O_ROTL, SL), "rotl.l", PREFIX_010, 0x1, 0x2, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTL, SL), "rotl.l", CONST_2, PREFIX_010, 0x1, 0x2, 0xf, B30),
+ EXPAND_UNOP_STD_B (O (O_ROTR, SB), "rotr.b", PREFIX_017, 0x1, 0x3, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTR, SB), "rotr.b", CONST_2, PREFIX_017, 0x1, 0x3, 0xc),
+ EXPAND_UNOP_STD_W (O (O_ROTR, SW), "rotr.w", PREFIX_015, 0x1, 0x3, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTR, SW), "rotr.w", CONST_2, PREFIX_015, 0x1, 0x3, 0xd),
+ EXPAND_UNOP_STD_L (O (O_ROTR, SL), "rotr.l", PREFIX_010, 0x1, 0x3, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTR, SL), "rotr.l", CONST_2, PREFIX_010, 0x1, 0x3, 0xf, B30),
+ EXPAND_UNOP_STD_B (O (O_ROTXL, SB), "rotxl.b", PREFIX_017, 0x1, 0x2, 0x0),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTXL, SB), "rotxl.b", CONST_2, PREFIX_017, 0x1, 0x2, 0x4),
+ EXPAND_UNOP_STD_W (O (O_ROTXL, SW), "rotxl.w", PREFIX_015, 0x1, 0x2, 0x1),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTXL, SW), "rotxl.w", CONST_2, PREFIX_015, 0x1, 0x2, 0x5),
+ EXPAND_UNOP_STD_L (O (O_ROTXL, SL), "rotxl.l", PREFIX_010, 0x1, 0x2, 0x3),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTXL, SL), "rotxl.l", CONST_2, PREFIX_010, 0x1, 0x2, 0x7, B30),
+ EXPAND_UNOP_STD_B (O (O_ROTXR, SB), "rotxr.b", PREFIX_017, 0x1, 0x3, 0x0),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTXR, SB), "rotxr.b", CONST_2, PREFIX_017, 0x1, 0x3, 0x4),
+ EXPAND_UNOP_STD_W (O (O_ROTXR, SW), "rotxr.w", PREFIX_015, 0x1, 0x3, 0x1),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTXR, SW), "rotxr.w", CONST_2, PREFIX_015, 0x1, 0x3, 0x5),
+ EXPAND_UNOP_STD_L (O (O_ROTXR, SL), "rotxr.l", PREFIX_010, 0x1, 0x3, 0x3),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTXR, SL), "rotxr.l", CONST_2, PREFIX_010, 0x1, 0x3, 0x7, B30),
+
+
+ {O (O_BPT, SN), AV_H8, 10, "bpt", {{E}}, {{0x7, 0xA, 0xF, 0xF, E}}},
+ {O (O_RTE, SN), AV_H8, 10, "rte", {{E}}, {{0x5, 0x6, 0x7, 0x0, E}}},
+ {O (O_RTS, SN), AV_H8, 8, "rts", {{E}}, {{0x5, 0x4, 0x7, 0x0, E}}},
+ {O (O_RTEL, SN), AV_H8SX, 0, "rte/l", {{RS32, RD32, E}}, {{0x5, 0x6, RS32 | B30, RD32 | B30, E}}},
+ {O (O_RTSL, SN), AV_H8SX, 0, "rts/l", {{RS32, RD32, E}}, {{0x5, 0x4, RS32 | B30, RD32 | B30, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_SHAL, SB), "shal.b", PREFIX_017, 0x1, 0x0, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHAL, SB), "shal.b", CONST_2, PREFIX_017, 0x1, 0x0, 0xc),
+ EXPAND_UNOP_STD_W (O (O_SHAL, SW), "shal.w", PREFIX_015, 0x1, 0x0, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHAL, SW), "shal.w", CONST_2, PREFIX_015, 0x1, 0x0, 0xd),
+ EXPAND_UNOP_STD_L (O (O_SHAL, SL), "shal.l", PREFIX_010, 0x1, 0x0, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHAL, SL), "shal.l", CONST_2, PREFIX_010, 0x1, 0x0, 0xf, B30),
+ EXPAND_UNOP_STD_B (O (O_SHAR, SB), "shar.b", PREFIX_017, 0x1, 0x1, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHAR, SB), "shar.b", CONST_2, PREFIX_017, 0x1, 0x1, 0xc),
+ EXPAND_UNOP_STD_W (O (O_SHAR, SW), "shar.w", PREFIX_015, 0x1, 0x1, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHAR, SW), "shar.w", CONST_2, PREFIX_015, 0x1, 0x1, 0xd),
+ EXPAND_UNOP_STD_L (O (O_SHAR, SL), "shar.l", PREFIX_010, 0x1, 0x1, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHAR, SL), "shar.l", CONST_2, PREFIX_010, 0x1, 0x1, 0xf, B30),
+
+ EXPAND_UNOP_STD_B (O (O_SHLL, SB), "shll.b", PREFIX_017, 0x1, 0x0, 0x0),
+
+ {O (O_SHLL, SB), AV_H8SX, 0, "shll.b", {{RS8, RD8, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLL, SB), "shll.b", CONST_2, PREFIX_017, 0x1, 0x0, 0x4),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLL, SB), "shll.b", CONST_4, PREFIX_017, 0x1, 0x0, 0xa),
+ {O (O_SHLL, SB), AV_H8SX, 0, "shll.b", {{IMM5, RD8, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_STD_W (O (O_SHLL, SW), "shll.w", PREFIX_015, 0x1, 0x0, 0x1),
+
+ {O (O_SHLL, SW), AV_H8SX, 0, "shll.w", {{RS8, RD16, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_2, PREFIX_015, 0x1, 0x0, 0x5),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_4, PREFIX_015, 0x1, 0x0, 0x2),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_8, PREFIX_015, 0x1, 0x0, 0x6),
+ {O (O_SHLL, SW), AV_H8SX, 0, "shll.w", {{IMM5, RD16, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_STD_L (O (O_SHLL, SL), "shll.l", PREFIX_010, 0x1, 0x0, 0x3),
+
+ {O (O_SHLL, SL), AV_H8SX, 0, "shll.l", {{RS8, RD32, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x3, B30 | RD32, E}}},
+
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_2, PREFIX_010, 0x1, 0x0, 0x7, B30),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_4, PREFIX_010, 0x1, 0x0, 0x3, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_8, PREFIX_010, 0x1, 0x0, 0x7, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_16, PREFIX_010, 0x1, 0x0, 0xf, B31),
+ {O (O_SHLL, SL), AV_H8SX, 0, "shll.l", {{IMM5, RD32, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x3, B30 | RD32, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_SHLR, SB), "shlr.b", PREFIX_017, 0x1, 0x1, 0x0),
+
+ {O (O_SHLR, SB), AV_H8SX, 0, "shlr.b", {{RS8, RD8, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLR, SB), "shlr.b", CONST_2, PREFIX_017, 0x1, 0x1, 0x4),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLR, SB), "shlr.b", CONST_4, PREFIX_017, 0x1, 0x1, 0xa),
+ {O (O_SHLR, SB), AV_H8SX, 0, "shlr.b", {{IMM5, RD8, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_STD_W (O (O_SHLR, SW), "shlr.w", PREFIX_015, 0x1, 0x1, 0x1),
+
+ {O (O_SHLR, SW), AV_H8SX, 0, "shlr.w", {{RS8, RD16, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_2, PREFIX_015, 0x1, 0x1, 0x5),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_4, PREFIX_015, 0x1, 0x1, 0x2),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_8, PREFIX_015, 0x1, 0x1, 0x6),
+ {O (O_SHLR, SW), AV_H8SX, 0, "shlr.w", {{IMM5, RD16, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_STD_L (O (O_SHLR, SL), "shlr.l", PREFIX_010, 0x1, 0x1, 0x3),
+
+ {O (O_SHLR, SL), AV_H8SX, 0, "shlr.l", {{RS8, RD32, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x3, B30 | RD32, E}}},
+
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_2, PREFIX_010, 0x1, 0x1, 0x7, B30),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_4, PREFIX_010, 0x1, 0x1, 0x3, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_8, PREFIX_010, 0x1, 0x1, 0x7, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_16, PREFIX_010, 0x1, 0x1, 0xf, B31),
+ {O (O_SHLR, SL), AV_H8SX, 0, "shlr.l", {{IMM5, RD32, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x3, B30 | RD32, E}}},
+
+ {O (O_SLEEP, SN), AV_H8, 2, "sleep", {{E}}, {{0x0, 0x1, 0x8, 0x0, E}}},
+
+ {O (O_STC, SB), AV_H8, 2, "stc", {{CCR | SRC, RD8, E}}, {{0x0, 0x2, B30 | CCR | SRC, RD8, E}}},
+ {O (O_STC, SB), AV_H8S, 2, "stc", {{EXR | SRC, RD8, E}}, {{0x0, 0x2, B30 | EXR | SRC, RD8, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, RDIND, E}}, {{PREFIXSTC, 0x6, 0x9, B31 | RDIND, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, RDIND, E}}, {{PREFIXSTC, 0x6, 0x9, B31 | RDIND, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, RDPREDEC, E}}, {{PREFIXSTC, 0x6, 0xD, B31 | RDPREDEC, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, RDPREDEC, E}}, {{PREFIXSTC, 0x6, 0xD, B31 | RDPREDEC, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, DISP16DST, E}}, {{PREFIXSTC, 0x6, 0xF, B31 | DSTDISPREG, IGNORE, DSTDISP16LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, DISP16DST, E}}, {{PREFIXSTC, 0x6, 0xF, B31 | DSTDISPREG, IGNORE, DSTDISP16LIST, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, DISP32DST, E}}, {{PREFIXSTC, 0x7, 0x8, B30 | DSTDISPREG, 0, 0x6, 0xB, 0xA, IGNORE, DSTDISP32LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, DISP32DST, E}}, {{PREFIXSTC, 0x7, 0x8, B30 | DSTDISPREG, 0, 0x6, 0xB, 0xA, IGNORE, DSTDISP32LIST, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, ABS16DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0x8, IGNORE, DST | ABS16LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, ABS16DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0x8, IGNORE, DST | ABS16LIST, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, ABS32DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0xA, IGNORE, DST | ABS32LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, ABS32DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0xA, IGNORE, DST | ABS32LIST, E}}},
+ {O (O_STC, SL), AV_H8SX, 0, "stc", {{B30 | VBR_SBR | SRC, RD32, E}}, {{0x0, 0x2, B30 | VBR_SBR | SRC, RD32, E}}},
+
+
+ EXPAND_TWOOP_B (O (O_SUB, SB), "sub.b", 0xa, 0x1, 0x8, 0x3, B01),
+
+ {O (O_SUB, SW), AV_H8, 2, "sub.w", {{RS16, RD16, E}}, {{0x1, 0x9, RS16, RD16, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, RD16, E}}, {{0x1, 0xa, B30 | IMM3NZ, RD16, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ EXPAND_TWOOP_W (O (O_SUB, SW), "sub.w", 0x1, 0x9, 0x3),
+
+ {O (O_SUB, SL), AV_H8H, 6, "sub.l", {{RS32, RD32, E}}, {{0x1, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_SUB, SL), AV_H8SX, 0, "sub.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_SUB, SL), "sub.l", 0x3),
+
+ {O (O_SUBS, SL), AV_H8, 2, "subs", {{KBIT, RDP, E}}, {{0x1, 0xB,KBIT, RDP, E}}},
+
+ {O (O_SUBX, SB), AV_H8, 2, "subx", {{IMM8, RD8, E}}, {{0xb, RD8, IMM8LIST, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
+ {O (O_SUBX, SB), AV_H8, 2, "subx", {{RS8, RD8, E}}, {{0x1, 0xe, RS8, RD8, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x1, 0xe, RS8, IGNORE, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RS8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x1, 0xe, RS8, IGNORE, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, 0x1, 0xe, IGNORE, RD8, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSPOSTDEC, RD8, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, B30 | B20 | IGNORE, 0x1, 0xe, IGNORE, RD8, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSIND, RDIND, E}}, {{PREFIX_0174, 0x6, 0x8, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
+
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RD16, E}}, {{PREFIX_0151, 0x7, 0x9, 0x3, RD16, IMM16LIST, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x7, 0x9, 0x3, IGNORE, IMM16LIST, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0x9, 0x3, IGNORE, IMM16LIST, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RD16, E}}, {{PREFIX_0151, 0x1, 0x9, RS16, RD16, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x1, 0x9, RS16, IGNORE, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x1, 0x9, RS16, IGNORE, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, B01 | IGNORE, 0x1, 0x9, IGNORE, RD16, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSPOSTDEC, RD16, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x1, 0x9, IGNORE, RD16, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSIND, RDIND, E}}, {{PREFIX_0154, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
+
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RD32, E}}, {{PREFIX_0101, 0x7, 0xa, 0x3, RD32, IMM32LIST, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x3, IGNORE, IMM32LIST, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x3, IGNORE, IMM32LIST, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RD32, E}}, {{PREFIX_0101, 0x1, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSIND, RD32, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, B30 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSIND, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
+
+ {O (O_TRAPA, SB), AV_H8H, 2, "trapa", {{IMM2, E}}, {{0x5, 0x7, IMM2, IGNORE, E}}},
+ {O (O_TAS, SB), AV_H8H, 2, "tas", {{RSIND, E}}, {{0x0, 0x1, 0xe, 0x0, 0x7, 0xb, B30 | RSIND, 0xc, E}}},
+
+ {O (O_XOR, SB), AV_H8, 2, "xor.b", {{IMM8, RD8, E}}, {{0xd, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_XOR, SB), "xor.b", 0xd, 0x1, 0x5, 0x5, 0),
+
+ {O (O_XOR, SW), AV_H8, 2, "xor.w", {{RS16, RD16, E}}, {{0x6, 0x5, RS16, RD16, E}}},
+ EXPAND_TWOOP_W (O (O_XOR, SW), "xor.w", 0x6, 0x5, 0x5),
+
+ {O (O_XOR, SL), AV_H8H, 2, "xor.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x5, B30 | RS32, B30 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_XOR, SL), "xor.l", 0x5),
+
+ {O (O_XORC, SB), AV_H8, 2, "xorc", {{IMM8, CCR | DST, E}}, {{0x0, 0x5, IMM8LIST, E}}},
+ {O (O_XORC, SB), AV_H8S, 2, "xorc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x5, IMM8LIST, E}}},
+
+ {O (O_CLRMAC, SN), AV_H8S, 2, "clrmac", {{E}}, {{0x0, 0x1, 0xa, 0x0, E}}},
+ {O (O_MAC, SW), AV_H8S, 2, "mac", {{RSPOSTINC, RDPOSTINC, E}}, {{0x0, 0x1, 0x6, 0x0, 0x6, 0xd, B30 | RSPOSTINC, B30 | RDPOSTINC, E}}},
+ {O (O_LDMAC, SL), AV_H8S, 2, "ldmac", {{RS32, MD32, E}}, {{0x0, 0x3, MD32, RS32, E}}},
+ {O (O_STMAC, SL), AV_H8S, 2, "stmac", {{MS32, RD32, E}}, {{0x0, 0x2, MS32, RD32, E}}},
+ {O (O_LDM, SL), AV_H8H, 6, "ldm.l", {{RSPOSTINC, RD32, E}}, {{0x0, 0x1, DATA, 0x0, 0x6, 0xD, 0x7, B30 | RD32, E}}},
+ {O (O_STM, SL), AV_H8H, 6, "stm.l", {{RS32, RDPREDEC, E}}, {{0x0, 0x1, DATA, 0x0, 0x6, 0xD, 0xF, B30 | RS32, E}}},
+ {0, 0, 0, NULL, {{0, 0, 0}}, {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}
};
#else
extern const struct h8_opcode h8_opcodes[];
#endif
+
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index ffd313acd52..c4adf712b75 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
@@ -273,6 +273,9 @@ extern const struct powerpc_operand powerpc_operands[];
/* This operand is for the DS field in a DS form instruction. */
#define PPC_OPERAND_DS (020000)
+
+/* This operand is for the DQ field in a DQ form instruction. */
+#define PPC_OPERAND_DQ (040000)
/* The POWER and PowerPC assemblers use a few macros. We keep them
with the operands table for simplicity. The macro table is an
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index d26d5ef3e07..75b66361296 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,25 @@
+2003-06-09 Albert Chin-A-Young <china@thewrittenword.com>
+
+ PR bootstrap/10974
+ * physmem.c: Update comment.
+ * configure.in: Modify test for _system_configuration for older
+ AIX systems.
+
+ * config.in, configure: Regenerated.
+
+2003-06-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR other/10810
+ * test-demangle.c (getline): Fix fence-post error.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * asprintf.c: Change comment to note that -1 is returned upon
+ error.
+ * vasprintf.c: Likewise.
+ (vasprintf): Return -1 upon error.
+ * functions.texi: Document changes to asprintf and vasprintf.
+
2003-05-19 Kelley Cook <kelleycook@wideopenwest.com>
* config.table: Accept i[345867]86 variant.
diff --git a/libiberty/asprintf.c b/libiberty/asprintf.c
index 5de775616d0..cd0543aa7ad 100644
--- a/libiberty/asprintf.c
+++ b/libiberty/asprintf.c
@@ -1,6 +1,6 @@
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the libiberty library.
@@ -37,7 +37,7 @@ pass a pointer to a pointer. This function will compute the size of
the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{sprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
diff --git a/libiberty/config.in b/libiberty/config.in
index 14ab3793c5c..51d161a4606 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -316,9 +316,6 @@
/* Define if you have the sys_siglist variable. */
#undef HAVE_SYS_SIGLIST
-/* Define if you have the _system_configuration variable. */
-#undef HAVE__SYSTEM_CONFIGURATION
-
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP
systems. This function is required for alloca.c support on those
systems. */
@@ -331,6 +328,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
+/* Define if you have the _system_configuration variable. */
+#undef HAVE__SYSTEM_CONFIGURATION
+
/* Define if canonicalize_file_name is not declared in system header files. */
#undef NEED_DECLARATION_CANONICALIZE_FILE_NAME
diff --git a/libiberty/configure b/libiberty/configure
index d0899a2dcbb..9182fc3f98e 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -1875,7 +1875,7 @@ funcs="$funcs waitpid"
# Also in the old function.def file: alloca, vfork, getopt.
-vars="sys_errlist sys_nerr sys_siglist _system_configuration"
+vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
@@ -1959,10 +1959,6 @@ EOF
#define HAVE_SYS_SIGLIST 1
EOF
- cat >> confdefs.h <<\EOF
-#define HAVE__SYSTEM_CONFIGURATION 1
-EOF
-
fi
# For each of these functions, if the host does not provide the
@@ -2157,7 +2153,7 @@ if test -z "${setobjs}"; then
# We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works.
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2161: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2168,12 +2164,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2172 "configure"
+#line 2168 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2199,19 +2195,19 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2203: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
for ac_func in $funcs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2210: checking for $ac_func" >&5
+echo "configure:2206: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2215 "configure"
+#line 2211 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2234,7 +2230,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2261,12 +2257,12 @@ done
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2265: checking whether alloca needs Cray hooks" >&5
+echo "configure:2261: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2270 "configure"
+#line 2266 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2291,12 +2287,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2295: checking for $ac_func" >&5
+echo "configure:2291: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2300 "configure"
+#line 2296 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2319,7 +2315,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2345,7 +2341,7 @@ fi
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2349: checking stack direction for C alloca" >&5
+echo "configure:2345: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2353,7 +2349,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2357 "configure"
+#line 2353 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2372,7 +2368,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2394,17 +2390,17 @@ EOF
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2398: checking for vfork.h" >&5
+echo "configure:2394: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2399 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2429,18 +2425,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2433: checking for working vfork" >&5
+echo "configure:2429: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2439: checking for vfork" >&5
+echo "configure:2435: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2444 "configure"
+#line 2440 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2463,7 +2459,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2485,7 +2481,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2489 "configure"
+#line 2485 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2580,7 +2576,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2612,12 +2608,12 @@ fi
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2616: checking for $ac_func" >&5
+echo "configure:2612: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2621 "configure"
+#line 2617 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2640,7 +2636,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2670,12 +2666,12 @@ done
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2674: checking for $ac_func" >&5
+echo "configure:2670: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2679 "configure"
+#line 2675 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2698,7 +2694,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2726,19 +2722,19 @@ done
for v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2730: checking for $v" >&5
+echo "configure:2726: checking for $v" >&5
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2735 "configure"
+#line 2731 "configure"
#include "confdefs.h"
int *p;
int main() {
extern int $v []; p = $v;
; return 0; }
EOF
-if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "libiberty_cv_var_$v=yes"
else
@@ -2761,15 +2757,43 @@ EOF
echo "$ac_t""no" 1>&6
fi
done
+
+ # special check for _system_configuration because AIX <4.3.2 do not
+ # contain the `physmem' member.
+ echo $ac_n "checking for external symbol _system_configuration""... $ac_c" 1>&6
+echo "configure:2765: checking for external symbol _system_configuration" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 2767 "configure"
+#include "confdefs.h"
+#include <sys/systemcfg.h>
+int main() {
+double x = _system_configuration.physmem;
+; return 0; }
+EOF
+if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE__SYSTEM_CONFIGURATION 1
+EOF
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
for ac_func in $checkfuncs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2768: checking for $ac_func" >&5
+echo "configure:2792: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2773 "configure"
+#line 2797 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2792,7 +2816,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2817,12 +2841,12 @@ fi
done
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:2821: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:2845: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2826 "configure"
+#line 2850 "configure"
#include "confdefs.h"
#include "confdefs.h"
@@ -2844,7 +2868,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:2848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libiberty_cv_decl_needed_canonicalize_file_name=no
else
@@ -2880,17 +2904,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2884: checking for $ac_hdr" >&5
+echo "configure:2908: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2889 "configure"
+#line 2913 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2919,12 +2943,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2923: checking for $ac_func" >&5
+echo "configure:2947: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2928 "configure"
+#line 2952 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2947,7 +2971,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2972,7 +2996,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2976: checking for working mmap" >&5
+echo "configure:3000: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2980,7 +3004,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2984 "configure"
+#line 3008 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3120,7 +3144,7 @@ main()
}
EOF
-if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3144,7 +3168,7 @@ fi
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:3148: checking for working strncmp" >&5
+echo "configure:3172: checking for working strncmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3152,7 +3176,7 @@ else
ac_cv_func_strncmp_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
+#line 3180 "configure"
#include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi.
@@ -3216,7 +3240,7 @@ main ()
}
EOF
-if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strncmp_works=yes
else
diff --git a/libiberty/configure.in b/libiberty/configure.in
index 4a704e8cec2..0eab85513da 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -209,7 +209,7 @@ funcs="$funcs waitpid"
# Also in the old function.def file: alloca, vfork, getopt.
-vars="sys_errlist sys_nerr sys_siglist _system_configuration"
+vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
@@ -230,7 +230,6 @@ if test "x" = "y"; then
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
- AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, [Define if you have the _system_configuration variable.])
fi
# For each of these functions, if the host does not provide the
@@ -433,6 +432,17 @@ if test -z "${setobjs}"; then
AC_MSG_RESULT(no)
fi
done
+
+ # special check for _system_configuration because AIX <4.3.2 do not
+ # contain the `physmem' member.
+ AC_MSG_CHECKING([for external symbol _system_configuration])
+ AC_TRY_COMPILE([#include <sys/systemcfg.h>],
+ [double x = _system_configuration.physmem;],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
+ [Define if you have the _system_configuration variable.])],
+ [AC_MSG_RESULT([no])])
+
AC_CHECK_FUNCS($checkfuncs)
libiberty_NEED_DECLARATION(canonicalize_file_name)
fi
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index b34c20409e3..2d30c5da1f3 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -29,7 +29,7 @@ pass a pointer to a pointer. This function will compute the size of
the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{sprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
@@ -922,7 +922,7 @@ you pass a pointer to a pointer. This function will compute the size
of the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{vsprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
diff --git a/libiberty/physmem.c b/libiberty/physmem.c
index 9185c1224e8..f64e07c74d4 100644
--- a/libiberty/physmem.c
+++ b/libiberty/physmem.c
@@ -145,7 +145,7 @@ physmem_total ()
#endif
#if HAVE__SYSTEM_CONFIGURATION
- /* This works on AIX. */
+ /* This works on AIX 4.3.3+. */
return _system_configuration.physmem;
#endif
diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c
index 82f263e88af..6e5d0b4b973 100644
--- a/libiberty/testsuite/test-demangle.c
+++ b/libiberty/testsuite/test-demangle.c
@@ -65,7 +65,7 @@ getline(buf)
line: copy this line into the buffer and return. */
while (c != EOF && c != '\n')
{
- if (count >= alloc)
+ if (count + 1 >= alloc)
{
alloc *= 2;
data = xrealloc (data, alloc);
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c
index aa20e5bff00..775260475cb 100644
--- a/libiberty/vasprintf.c
+++ b/libiberty/vasprintf.c
@@ -1,6 +1,6 @@
/* Like vsprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2003 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -52,7 +52,7 @@ you pass a pointer to a pointer. This function will compute the size
of the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{vsprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
@@ -142,7 +142,7 @@ int_vasprintf (result, format, args)
if (*result != NULL)
return vsprintf (*result, format, *args);
else
- return 0;
+ return -1;
}
int
diff --git a/ltconfig b/ltconfig
index 7a4d63579f1..f49a2cfea3b 100755
--- a/ltconfig
+++ b/ltconfig
@@ -1111,6 +1111,18 @@ darwin* | rhapsody*)
shlibpath_var=DYLD_LIBRARY_PATH
;;
+freebsd*-gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+ soname_spec='${libname}${release}.so${major}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU/FreeBSD ld.so'
+ ;;
+
freebsd1*)
dynamic_linker=no
;;
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index cbdcc3cfa68..c5e3fff9332 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,75 @@
+2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * po/Make-in (DESTDIR): New.
+ (install-data-yes): Support $(DESTDIR).
+ (uninstall): Likewise.
+
+2003-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2003-06-10 Doug Evans <dje@sebabeach.org>
+
+ * cgen-asm.in (@arch@_cgen_assemble_insn): CGEN_INSN_RELAX renamed to
+ CGEN_INSN_RELAXED.
+ * fr30-asm.c,fr30-desc.c,fr30-desc.h: Regenerate.
+ * frv-asm.c,frv-desc.c,frv-desc.h: Regenerate.
+ * ip2k-asm.c,ip2k-desc.c,ip2k-desc.h: Regenerate.
+ * iq2000-asm.c,iq2000-desc.c,iq2000-desc.h: Regenerate.
+ * m32r-asm.c,m32r-desc.c,m32r-desc.h,m32r-opc.c: Regenerate.
+ * openrisc-asm.c,openrisc-desc.c,openrisc-desc.h: Regenerate.
+ * xstormy16-asm.c,xstormy16-desc.c,xstormy16-desc.h: Regenerate.
+
+2003-06-10 Gary Hade <garyhade@us.ibm.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (DQ, RAQ, RSQ, RTQ): Define.
+ (insert_dq, extract_dq, insert_raq, insert_rtq, insert_rsq): New.
+ (powerpc_opcodes): Add "attn", "lq" and "stq".
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8300-dis.c (bfd_h8_disassemble): Don't print brackets round
+ rts/l and rte/l register lists.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * frv-desc.c: Regenerate.
+ * frv-opc.c: Regenerate.
+ * frv-asm.c: Regenerate.
+ * frv-desc.h: Regenerate.
+ * frv-dis.c: Regenerate.
+ * frv-ibld.c: Regenerate.
+ * frv-opc.h: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+ and Bernd Schmidt <bernds@redhat.com>
+ and Alexandre Oliva <aoliva@redhat.com>
+
+ * disassemble.c (disassembler): Add support for h8300sx.
+ * h8300-dis.c: Ditto.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * frv-desc.c: Regenerate.
+ * frv-opc.c: Regenerate.
+
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * iq2000-asm.c: Regenerate.
+ * iq2000-desc.c: Regenerate.
+ * iq2000-desc.h: Regenerate.
+ * iq2000-dis.c: Regenerate.
+ * iq2000-ibld.c: Regenerate.
+ * iq2000-opc.c: Regenerate.
+ * iq2000-opc.h: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
2003-05-23 Jason Eckhardt <jle@rice.edu>
* i860-dis.c (crnames): Add bear, ccr, p0, p1, p2, p3.
@@ -11,9 +83,9 @@
2003-05-17 Andreas Jaeger <aj@suse.de>
- * Makefile.am (libopcodes_la_LIBADD): Add libbfd.la.
- (libopcodes_la_DEPENDENCIES): Add libbfd.la.
- * Makefile.in: Regenerated.
+ * Makefile.am (libopcodes_la_LIBADD): Add libbfd.la.
+ (libopcodes_la_DEPENDENCIES): Add libbfd.la.
+ * Makefile.in: Regenerated.
2003-05-16 Nick Clifton <nickc@redhat.com>
@@ -77,7 +149,7 @@
2003-03-25 Stan Cox <scox@redhat.com>
Nick Clifton <nickc@redhat.com>
-
+
Contribute support for Intel's iWMMXt chip - an ARM variant:
* arm-dis.c (regnames): Add iWMMXt register names.
@@ -185,24 +257,24 @@
2002-01-02 Ben Elliston <bje@redhat.com>
Jeff Johnston <jjohnstn@redhat.com>
- * iq2000-asm.c: New file.
- * iq2000-desc.c: Likewise.
- * iq2000-desc.h: Likewise.
- * iq2000-dis.c: Likewise.
- * iq2000-ibld.c: Likewise.
- * iq2000-opc.c: Likewise.
- * iq2000-opc.h: Likewise.
- * Makefile.am (HFILES): Add iq2000-desc.h, iq2000-opc.h.
- (CFILES): Add iq2000-asm.c, iq2000-desc.c, iq2000-dis.c,
- iq2000-ibld.c, iq2000-opc.c.
- (ALL_MACHINES): Add iq2000-asm.lo, iq2000-desc.lo, iq2000-dis.lo,
- iq2000-ibld.lo, iq2000-opc.lo.
- (CLEANFILES): Add stamp-iq2000.
- (IQ2000_DEPS): New macro.
- (stamp-iq2000): New target.
- * Makefile.in: Regenerate.
- * configure.in: Handle bfd_iq2000_arch.
- * configure: Regenerate.
+ * iq2000-asm.c: New file.
+ * iq2000-desc.c: Likewise.
+ * iq2000-desc.h: Likewise.
+ * iq2000-dis.c: Likewise.
+ * iq2000-ibld.c: Likewise.
+ * iq2000-opc.c: Likewise.
+ * iq2000-opc.h: Likewise.
+ * Makefile.am (HFILES): Add iq2000-desc.h, iq2000-opc.h.
+ (CFILES): Add iq2000-asm.c, iq2000-desc.c, iq2000-dis.c,
+ iq2000-ibld.c, iq2000-opc.c.
+ (ALL_MACHINES): Add iq2000-asm.lo, iq2000-desc.lo, iq2000-dis.lo,
+ iq2000-ibld.lo, iq2000-opc.lo.
+ (CLEANFILES): Add stamp-iq2000.
+ (IQ2000_DEPS): New macro.
+ (stamp-iq2000): New target.
+ * Makefile.in: Regenerate.
+ * configure.in: Handle bfd_iq2000_arch.
+ * configure: Regenerate.
2003-01-02 Chris Demetriou <cgd@broadcom.com>
@@ -398,7 +470,7 @@
(lookup_regindex): Recognize AR[FCR], AR[EFLAG], AR[CSD],
AR[SSD], AR[CFLG], AR[FSR], AR[FIR], and AR[FDR].
* ia64-asmtab.c: Regenerate.
-
+
2002-11-25 Aldy Hernandez <aldyh@redhat.com>
* ppc-opc.c: Remove evmwlssf, evmwlssfa, evmwlsmf, evmwlsmfa,
@@ -476,7 +548,7 @@
* xstormy16-desc.c: Regenerate.
* xstormy16-opc.c: Regenerate.
* xstormy16-opc.h: Regenerate.
-
+
2002-11-18 Klee Dienes <kdienes@apple.com>
* avr-dis.c: Include libiberty.h (for xmalloc).
@@ -558,18 +630,18 @@
2002-11-07 Klee Dienes <kdienes@apple.com>
- * Makefile.am (ia64-asmtab.c): Update to use the new '--srcdir'
- argument to ia64-gen.
+ * Makefile.am (ia64-asmtab.c): Update to use the new '--srcdir'
+ argument to ia64-gen.
Regenerate dependencies for ia64-len.lo.
* Makefile.in: Regenerate.
- * ia64-gen.c: Convert to use getopt(). Add the standard GNU
- options, as well as '--srcdir', which controls the directory in
- which ia64-gen looks for the sources it uses to generate the
- output table. Add a 'const' to the declaration of the final
- output table. Call xmalloc_set_program_name to set the program
- name.
+ * ia64-gen.c: Convert to use getopt(). Add the standard GNU
+ options, as well as '--srcdir', which controls the directory in
+ which ia64-gen looks for the sources it uses to generate the
+ output table. Add a 'const' to the declaration of the final
+ output table. Call xmalloc_set_program_name to set the program
+ name.
* ia64-asmtab.c: Regenerate.
-
+
2002-11-07 Nick Clifton <nickc@redhat.com>
* ia64-gen.c: Fix comment formatting and compile time warnings.
@@ -583,7 +655,7 @@
2002-11-06 Aldy Hernandez <aldyh@redhat.com>
- * opcodes/ppc-opc.c: Change RD to RS for evmerge*.
+ * opcodes/ppc-opc.c: Change RD to RS for evmerge*.
2002-10-07 Nathan Tallent <eraxxon@alumni.rice.edu>
@@ -598,10 +670,10 @@
at the end.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* mips-dis.c (print_insn_arg): Handle '[', ']', 'e' and '%'.
(mips_isa_type): Handle bfd_mach_mips4120, bfd_mach_mips5400
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 6ec05e42294..7097be0f8dd 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -649,10 +649,12 @@ iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h $(INCDIR)/libiberty.h
+ iq2000-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen.h iq2000-opc.h \
+ opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
$(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 8c03c172b92..2823902f224 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -467,7 +467,7 @@ acinclude.m4 aclocal.m4 config.in configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -1145,10 +1145,12 @@ iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h $(INCDIR)/libiberty.h
+ iq2000-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen.h iq2000-opc.h \
+ opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
$(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4
index 184bf3665ad..92732d34f68 100644
--- a/opcodes/aclocal.m4
+++ b/opcodes/aclocal.m4
@@ -35,6 +35,24 @@ AC_SUBST(bfdlibdir)
AC_SUBST(bfdincludedir)
])
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/opcodes/cgen-asm.in b/opcodes/cgen-asm.in
index 525177c79d0..1ea076809b9 100644
--- a/opcodes/cgen-asm.in
+++ b/opcodes/cgen-asm.in
@@ -361,10 +361,10 @@ const CGEN_INSN *
if (! @arch@_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/config.in b/opcodes/config.in
index 6355be08085..5caef5503ed 100644
--- a/opcodes/config.in
+++ b/opcodes/config.in
@@ -25,9 +25,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -109,12 +106,6 @@
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/opcodes/configure b/opcodes/configure
index bb079388aec..ae248d05111 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -732,249 +732,49 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:739: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:769: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:820: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:738: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 863 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 746 "configure"
#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
-main(){return(0);}
+int main() {
+strerror()
+; return 0; }
EOF
-if { (eval echo configure:868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
+if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:899: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:927: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:959: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+ LIBS="$LIBS -lcposix"
else
echo "$ac_t""no" 1>&6
- ISC=
fi
+
+
# We currently only use the version number for the name of any shared
# library. For user convenience, we always use the same version
@@ -993,7 +793,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:997: checking for a BSD compatible install" >&5
+echo "configure:797: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1046,7 +846,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1050: checking whether build environment is sane" >&5
+echo "configure:850: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1103,7 +903,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1107: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:907: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1149,7 +949,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1153: checking for working aclocal" >&5
+echo "configure:953: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1162,7 +962,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1166: checking for working autoconf" >&5
+echo "configure:966: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1175,7 +975,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1179: checking for working automake" >&5
+echo "configure:979: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1188,7 +988,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1192: checking for working autoheader" >&5
+echo "configure:992: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1201,7 +1001,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1205: checking for working makeinfo" >&5
+echo "configure:1005: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1224,7 +1024,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1228: checking for $ac_word" >&5
+echo "configure:1028: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1256,7 +1056,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1260: checking for $ac_word" >&5
+echo "configure:1060: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1288,7 +1088,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1292: checking for $ac_word" >&5
+echo "configure:1092: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1391,6 +1191,228 @@ else
enable_fast_install=yes
fi
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1198: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1228: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1279: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1311: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1322 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1358: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1386: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1403,7 +1425,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1407: checking for ld used by GCC" >&5
+echo "configure:1429: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1433,10 +1455,10 @@ echo "configure:1407: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1437: checking for GNU ld" >&5
+echo "configure:1459: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1440: checking for non-GNU ld" >&5
+echo "configure:1462: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1471,7 +1493,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1475: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1497: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1488,7 +1510,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1492: checking for $LD option to reload object files" >&5
+echo "configure:1514: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1500,7 +1522,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1504: checking for BSD-compatible nm" >&5
+echo "configure:1526: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1538,7 +1560,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1542: checking whether ln -s works" >&5
+echo "configure:1564: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1559,7 +1581,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1563: checking how to recognise dependant libraries" >&5
+echo "configure:1585: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1732,13 +1754,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1736: checking for object suffix" >&5
+echo "configure:1758: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1758,7 +1780,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1762: checking for executable suffix" >&5
+echo "configure:1784: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1768,7 +1790,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -1795,7 +1817,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1799: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1821: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1857,7 +1879,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1861: checking for file" >&5
+echo "configure:1883: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1928,7 +1950,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1932: checking for $ac_word" >&5
+echo "configure:1954: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1960,7 +1982,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1964: checking for $ac_word" >&5
+echo "configure:1986: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1995,7 +2017,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1999: checking for $ac_word" >&5
+echo "configure:2021: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2027,7 +2049,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2031: checking for $ac_word" >&5
+echo "configure:2053: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2094,8 +2116,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2098 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2120 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2128,7 +2150,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2146,7 +2168,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2150: checking whether the C compiler needs -belf" >&5
+echo "configure:2172: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2159,14 +2181,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2163 "configure"
+#line 2185 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2334,7 +2356,7 @@ if test -z "$target" ; then
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2338: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2360: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -2357,7 +2379,7 @@ fi
echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2361: checking whether to install libbfd" >&5
+echo "configure:2383: checking whether to install libbfd" >&5
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
@@ -2394,7 +2416,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2398: checking for executable suffix" >&5
+echo "configure:2420: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2404,7 +2426,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -2430,7 +2452,7 @@ ac_exeext=$EXEEXT
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2434: checking for $ac_word" >&5
+echo "configure:2456: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2460,7 +2482,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2464: checking for $ac_word" >&5
+echo "configure:2486: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2511,7 +2533,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2515: checking for $ac_word" >&5
+echo "configure:2537: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2543,7 +2565,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2547: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2569: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2554,12 +2576,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2558 "configure"
+#line 2580 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2585,12 +2607,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2589: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2611: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2594: checking whether we are using GNU C" >&5
+echo "configure:2616: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2599,7 +2621,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2618,7 +2640,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2622: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2644: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2652,7 +2674,7 @@ fi
ALL_LINGUAS="fr sv tr es da de id pt_BR ro"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2656: checking how to run the C preprocessor" >&5
+echo "configure:2678: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2667,13 +2689,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2671 "configure"
+#line 2693 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2684,13 +2706,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2688 "configure"
+#line 2710 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2701,13 +2723,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2705 "configure"
+#line 2727 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2734,7 +2756,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2738: checking for $ac_word" >&5
+echo "configure:2760: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2762,12 +2784,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2766: checking for ANSI C header files" >&5
+echo "configure:2788: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2771 "configure"
+#line 2793 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2775,7 +2797,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2792,7 +2814,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2796 "configure"
+#line 2818 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2810,7 +2832,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2814 "configure"
+#line 2836 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2831,7 +2853,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2835 "configure"
+#line 2857 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2842,7 +2864,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2866,12 +2888,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2870: checking for working const" >&5
+echo "configure:2892: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2875 "configure"
+#line 2897 "configure"
#include "confdefs.h"
int main() {
@@ -2920,7 +2942,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2941,21 +2963,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2945: checking for inline" >&5
+echo "configure:2967: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
+#line 2974 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2981,12 +3003,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2985: checking for off_t" >&5
+echo "configure:3007: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2990 "configure"
+#line 3012 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3014,12 +3036,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3018: checking for size_t" >&5
+echo "configure:3040: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3023 "configure"
+#line 3045 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3049,19 +3071,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3053: checking for working alloca.h" >&5
+echo "configure:3075: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3058 "configure"
+#line 3080 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3082,12 +3104,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3086: checking for alloca" >&5
+echo "configure:3108: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3091 "configure"
+#line 3113 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3115,7 +3137,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3147,12 +3169,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3151: checking whether alloca needs Cray hooks" >&5
+echo "configure:3173: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
+#line 3178 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3177,12 +3199,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3181: checking for $ac_func" >&5
+echo "configure:3203: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3186 "configure"
+#line 3208 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3205,7 +3227,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3232,7 +3254,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3236: checking stack direction for C alloca" >&5
+echo "configure:3258: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3240,7 +3262,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3244 "configure"
+#line 3266 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3259,7 +3281,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3284,17 +3306,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3288: checking for $ac_hdr" >&5
+echo "configure:3310: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3293 "configure"
+#line 3315 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3323,12 +3345,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3327: checking for $ac_func" >&5
+echo "configure:3349: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3332 "configure"
+#line 3354 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3351,7 +3373,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3376,7 +3398,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3380: checking for working mmap" >&5
+echo "configure:3402: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3384,7 +3406,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3388 "configure"
+#line 3410 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3524,7 +3546,7 @@ main()
}
EOF
-if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -3552,17 +3574,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3556: checking for $ac_hdr" >&5
+echo "configure:3578: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3561 "configure"
+#line 3583 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3592,12 +3614,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3596: checking for $ac_func" >&5
+echo "configure:3618: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3601 "configure"
+#line 3623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3620,7 +3642,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3649,12 +3671,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3653: checking for $ac_func" >&5
+echo "configure:3675: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+#line 3680 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3677,7 +3699,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3711,19 +3733,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3715: checking for LC_MESSAGES" >&5
+echo "configure:3737: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3720 "configure"
+#line 3742 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3744,7 +3766,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3748: checking whether NLS is requested" >&5
+echo "configure:3770: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3764,7 +3786,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3768: checking whether included gettext is requested" >&5
+echo "configure:3790: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3783,17 +3805,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3787: checking for libintl.h" >&5
+echo "configure:3809: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3792 "configure"
+#line 3814 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3810,19 +3832,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3814: checking for gettext in libc" >&5
+echo "configure:3836: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3819 "configure"
+#line 3841 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3838,7 +3860,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3842: checking for bindtextdomain in -lintl" >&5
+echo "configure:3864: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3846,7 +3868,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3850 "configure"
+#line 3872 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3857,7 +3879,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3873,19 +3895,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3877: checking for gettext in libintl" >&5
+echo "configure:3899: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3882 "configure"
+#line 3904 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3913,7 +3935,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3917: checking for $ac_word" >&5
+echo "configure:3939: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3947,12 +3969,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3951: checking for $ac_func" >&5
+echo "configure:3973: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3956 "configure"
+#line 3978 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3975,7 +3997,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4002,7 +4024,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4006: checking for $ac_word" >&5
+echo "configure:4028: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4038,7 +4060,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4042: checking for $ac_word" >&5
+echo "configure:4064: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4070,7 +4092,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4074 "configure"
+#line 4096 "configure"
#include "confdefs.h"
int main() {
@@ -4078,7 +4100,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4110,7 +4132,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4114: checking for $ac_word" >&5
+echo "configure:4136: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4144,7 +4166,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4148: checking for $ac_word" >&5
+echo "configure:4170: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4180,7 +4202,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4184: checking for $ac_word" >&5
+echo "configure:4206: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4270,7 +4292,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4274: checking for catalogs to be installed" >&5
+echo "configure:4296: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4298,17 +4320,17 @@ echo "configure:4274: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4302: checking for linux/version.h" >&5
+echo "configure:4324: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4307 "configure"
+#line 4329 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4386,7 +4408,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4390: checking for build system executable suffix" >&5
+echo "configure:4412: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4423,7 +4445,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4427: checking for a BSD compatible install" >&5
+echo "configure:4449: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4480,17 +4502,17 @@ for ac_hdr in string.h strings.h stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4484: checking for $ac_hdr" >&5
+echo "configure:4506: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4489 "configure"
+#line 4511 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4869,7 +4891,6 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -4883,6 +4904,7 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
+s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
diff --git a/opcodes/fr30-asm.c b/opcodes/fr30-asm.c
index be9c36c947c..8e7c7b80975 100644
--- a/opcodes/fr30-asm.c
+++ b/opcodes/fr30-asm.c
@@ -657,10 +657,10 @@ fr30_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! fr30_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/fr30-desc.c b/opcodes/fr30-desc.c
index 01d896f28ea..3309d54cf03 100644
--- a/opcodes/fr30-desc.c
+++ b/opcodes/fr30-desc.c
@@ -105,7 +105,7 @@ const CGEN_ATTR_TABLE fr30_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "NOT-IN-DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/fr30-desc.h b/opcodes/fr30-desc.h
index 6be96d933ab..35d0de70820 100644
--- a/opcodes/fr30-desc.h
+++ b/opcodes/fr30-desc.h
@@ -240,7 +240,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_NOT_IN_DELAY_SLOT, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 538ed2dc8f1..0e3d8ddf669 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -64,6 +64,8 @@ static const char * parse_s12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
static const char * parse_u12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_even_register
+ PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
static const char *
parse_ulo16 (cd, strp, opindex, valuep)
@@ -346,6 +348,26 @@ parse_u12 (cd, strp, opindex, valuep)
}
}
+static const char *
+parse_even_register (cd, strP, tableP, valueP)
+ CGEN_CPU_DESC cd;
+ const char ** strP;
+ CGEN_KEYWORD * tableP;
+ long * valueP;
+{
+ const char * errmsg;
+ const char * saved_star_strP = * strP;
+
+ errmsg = cgen_parse_keyword (cd, strP, tableP, valueP);
+
+ if (errmsg == NULL && ((* valueP) & 1))
+ {
+ errmsg = _("register number must be even");
+ * strP = saved_star_strP;
+ }
+
+ return errmsg;
+}
/* -- */
const char * frv_cgen_parse_operand
@@ -455,12 +477,21 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
case FRV_OPERAND_FRINTI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
+ break;
case FRV_OPERAND_FRINTJ :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
+ break;
case FRV_OPERAND_FRINTK :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
+ break;
case FRV_OPERAND_FRJ :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;
@@ -929,10 +960,10 @@ frv_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! frv_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/frv-desc.c b/opcodes/frv-desc.c
index 5fac77a0dd7..97d49b3077b 100644
--- a/opcodes/frv-desc.c
+++ b/opcodes/frv-desc.c
@@ -188,7 +188,7 @@ const CGEN_ATTR_TABLE frv_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "PRIVILEGED", &bool_attr[0], &bool_attr[0] },
@@ -2173,6 +2173,18 @@ const CGEN_OPERAND frv_cgen_operand_table[] =
{ "label24", FRV_OPERAND_LABEL24, HW_H_IADDR, 17, 24,
{ 2, { (const PTR) &FRV_F_LABEL24_MULTI_IFIELD[0] } },
{ 0|A(PCREL_ADDR)|A(VIRTUAL), { (1<<MACH_BASE) } } },
+/* FRintieven: (even) source register 1 */
+ { "FRintieven", FRV_OPERAND_FRINTIEVEN, HW_H_FR_INT, 17, 6,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRI] } },
+ { 0, { (1<<MACH_BASE) } } },
+/* FRintjeven: (even) source register 2 */
+ { "FRintjeven", FRV_OPERAND_FRINTJEVEN, HW_H_FR_INT, 5, 6,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRJ] } },
+ { 0, { (1<<MACH_BASE) } } },
+/* FRintkeven: (even) target register */
+ { "FRintkeven", FRV_OPERAND_FRINTKEVEN, HW_H_FR_INT, 30, 6,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRK] } },
+ { 0, { (1<<MACH_BASE) } } },
/* d12: 12 bit signed immediate */
{ "d12", FRV_OPERAND_D12, HW_H_SINT, 11, 12,
{ 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_D12] } },
@@ -5472,7 +5484,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MCUTSSI, "mcutssi", "mcutssi", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mdcutssi$pack $ACC40Si,$s6,$FRintk */
+/* mdcutssi$pack $ACC40Si,$s6,$FRintkeven */
{
FRV_INSN_MDCUTSSI, "mdcutssi", "mdcutssi", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
@@ -5497,7 +5509,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MSRAHI, "msrahi", "msrahi", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mdrotli$pack $FRinti,$u6,$FRintk */
+/* mdrotli$pack $FRintieven,$s6,$FRintkeven */
{
FRV_INSN_MDROTLI, "mdrotli", "mdrotli", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
@@ -5517,7 +5529,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MSATHS, "msaths", "msaths", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
-/* mqsaths$pack $FRinti,$FRintj,$FRintk */
+/* mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSATHS, "mqsaths", "mqsaths", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
@@ -5582,42 +5594,42 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMSUBHUS, "cmsubhus", "cmsubhus", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
-/* mqaddhss$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHSS, "mqaddhss", "mqaddhss", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* mqaddhus$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHUS, "mqaddhus", "mqaddhus", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* mqsubhss$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHSS, "mqsubhss", "mqsubhss", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* mqsubhus$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHUS, "mqsubhus", "mqsubhus", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqaddhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHSS, "cmqaddhss", "cmqaddhss", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqaddhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHUS, "cmqaddhus", "cmqaddhus", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqsubhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHSS, "cmqsubhss", "cmqsubhss", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqsubhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHUS, "cmqsubhus", "cmqsubhus", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
@@ -5682,32 +5694,32 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMMULHU, "cmmulhu", "cmmulhu", 32,
{ 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
-/* mqmulhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHS, "mqmulhs", "mqmulhs", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmulhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHU, "mqmulhu", "mqmulhu", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmulxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHS, "mqmulxhs", "mqmulxhs", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmulxhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHU, "mqmulxhu", "mqmulxhu", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmulhs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHS, "cmqmulhs", "cmqmulhs", 32,
{ 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmulhu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHU, "cmqmulhu", "cmqmulhu", 32,
{ 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
@@ -5742,37 +5754,37 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMMACHU, "cmmachu", "cmmachu", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
-/* mqmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACHS, "mqmachs", "mqmachs", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmachu$pack $FRinti,$FRintj,$ACC40Uk */
+/* mqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk */
{
FRV_INSN_MQMACHU, "mqmachu", "mqmachu", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmachs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMACHS, "cmqmachs", "cmqmachs", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmachu$pack $FRinti,$FRintj,$ACC40Uk,$CCi,$cond */
+/* cmqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk,$CCi,$cond */
{
FRV_INSN_CMQMACHU, "cmqmachu", "cmqmachu", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqxmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACHS, "mqxmachs", "mqxmachs", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
-/* mqxmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACXHS, "mqxmacxhs", "mqxmacxhs", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
-/* mqmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACXHS, "mqmacxhs", "mqmacxhs", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
@@ -5817,22 +5829,22 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMCPXIU, "cmcpxiu", "cmcpxiu", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
-/* mqcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxrs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRS, "mqcpxrs", "mqcpxrs", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqcpxru$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxru$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRU, "mqcpxru", "mqcpxru", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqcpxis$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxis$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIS, "mqcpxis", "mqcpxis", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqcpxiu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxiu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIU, "mqcpxiu", "mqcpxiu", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
@@ -5847,12 +5859,12 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMEXPDHW, "cmexpdhw", "cmexpdhw", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mexpdhd$pack $FRinti,$u6,$FRintk */
+/* mexpdhd$pack $FRinti,$u6,$FRintkeven */
{
FRV_INSN_MEXPDHD, "mexpdhd", "mexpdhd", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* cmexpdhd$pack $FRinti,$u6,$FRintk,$CCi,$cond */
+/* cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMEXPDHD, "cmexpdhd", "cmexpdhd", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
@@ -5862,37 +5874,37 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MPACKH, "mpackh", "mpackh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mdpackh$pack $FRinti,$FRintj,$FRintk */
+/* mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MDPACKH, "mdpackh", "mdpackh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_5 } }
},
-/* munpackh$pack $FRinti,$FRintk */
+/* munpackh$pack $FRinti,$FRintkeven */
{
FRV_INSN_MUNPACKH, "munpackh", "munpackh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* mdunpackh$pack $FRinti,$FRintk */
+/* mdunpackh$pack $FRintieven,$FRintk */
{
FRV_INSN_MDUNPACKH, "mdunpackh", "mdunpackh", 32,
{ 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7 } }
},
-/* mbtoh$pack $FRintj,$FRintk */
+/* mbtoh$pack $FRintj,$FRintkeven */
{
FRV_INSN_MBTOH, "mbtoh", "mbtoh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* cmbtoh$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMBTOH, "cmbtoh", "cmbtoh", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* mhtob$pack $FRintj,$FRintk */
+/* mhtob$pack $FRintjeven,$FRintk */
{
FRV_INSN_MHTOB, "mhtob", "mhtob", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* cmhtob$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond */
{
FRV_INSN_CMHTOB, "cmhtob", "cmhtob", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
diff --git a/opcodes/frv-desc.h b/opcodes/frv-desc.h
index 53cad79079c..a169e7a6092 100644
--- a/opcodes/frv-desc.h
+++ b/opcodes/frv-desc.h
@@ -677,15 +677,16 @@ typedef enum cgen_operand_type {
, FRV_OPERAND_U6, FRV_OPERAND_S5, FRV_OPERAND_COND, FRV_OPERAND_CCOND
, FRV_OPERAND_HINT, FRV_OPERAND_HINT_TAKEN, FRV_OPERAND_HINT_NOT_TAKEN, FRV_OPERAND_LI
, FRV_OPERAND_LOCK, FRV_OPERAND_DEBUG, FRV_OPERAND_A, FRV_OPERAND_AE
- , FRV_OPERAND_LABEL16, FRV_OPERAND_LABEL24, FRV_OPERAND_D12, FRV_OPERAND_S12
- , FRV_OPERAND_U12, FRV_OPERAND_SPR, FRV_OPERAND_ULO16, FRV_OPERAND_SLO16
- , FRV_OPERAND_UHI16, FRV_OPERAND_PSR_ESR, FRV_OPERAND_PSR_S, FRV_OPERAND_PSR_PS
- , FRV_OPERAND_PSR_ET, FRV_OPERAND_BPSR_BS, FRV_OPERAND_BPSR_BET, FRV_OPERAND_TBR_TBA
- , FRV_OPERAND_TBR_TT, FRV_OPERAND_MAX
+ , FRV_OPERAND_LABEL16, FRV_OPERAND_LABEL24, FRV_OPERAND_FRINTIEVEN, FRV_OPERAND_FRINTJEVEN
+ , FRV_OPERAND_FRINTKEVEN, FRV_OPERAND_D12, FRV_OPERAND_S12, FRV_OPERAND_U12
+ , FRV_OPERAND_SPR, FRV_OPERAND_ULO16, FRV_OPERAND_SLO16, FRV_OPERAND_UHI16
+ , FRV_OPERAND_PSR_ESR, FRV_OPERAND_PSR_S, FRV_OPERAND_PSR_PS, FRV_OPERAND_PSR_ET
+ , FRV_OPERAND_BPSR_BS, FRV_OPERAND_BPSR_BET, FRV_OPERAND_TBR_TBA, FRV_OPERAND_TBR_TT
+ , FRV_OPERAND_MAX
} CGEN_OPERAND_TYPE;
/* Number of operands types. */
-#define MAX_OPERANDS 77
+#define MAX_OPERANDS 80
/* Maximum number of operands referenced by any insn. */
#define MAX_OPERAND_INSTANCES 8
@@ -695,7 +696,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_PRIVILEGED, CGEN_INSN_NON_EXCEPTING
, CGEN_INSN_CONDITIONAL, CGEN_INSN_FR_ACCESS, CGEN_INSN_PRESERVE_OVF, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_UNIT, CGEN_INSN_FR400_MAJOR
diff --git a/opcodes/frv-dis.c b/opcodes/frv-dis.c
index f71e1c5c83f..dfe053d5c15 100644
--- a/opcodes/frv-dis.c
+++ b/opcodes/frv-dis.c
@@ -230,12 +230,21 @@ frv_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
case FRV_OPERAND_FRINTI :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRi, 0);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRi, 0);
+ break;
case FRV_OPERAND_FRINTJ :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRj, 0);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRj, 0);
+ break;
case FRV_OPERAND_FRINTK :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRk, 0);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRk, 0);
+ break;
case FRV_OPERAND_FRJ :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRj, 0);
break;
diff --git a/opcodes/frv-ibld.c b/opcodes/frv-ibld.c
index 316b2cc1bdb..bac1837e1be 100644
--- a/opcodes/frv-ibld.c
+++ b/opcodes/frv-ibld.c
@@ -651,12 +651,21 @@ frv_cgen_insert_operand (cd, opindex, fields, buffer, pc)
case FRV_OPERAND_FRINTI :
errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
+ break;
case FRV_OPERAND_FRINTJ :
errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
+ break;
case FRV_OPERAND_FRINTK :
errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
+ break;
case FRV_OPERAND_FRJ :
errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
break;
@@ -942,12 +951,21 @@ frv_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
case FRV_OPERAND_FRINTI :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
+ break;
case FRV_OPERAND_FRINTJ :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
+ break;
case FRV_OPERAND_FRINTK :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
+ break;
case FRV_OPERAND_FRJ :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
break;
@@ -1216,12 +1234,21 @@ frv_cgen_get_int_operand (cd, opindex, fields)
case FRV_OPERAND_FRINTI :
value = fields->f_FRi;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ value = fields->f_FRi;
+ break;
case FRV_OPERAND_FRINTJ :
value = fields->f_FRj;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ value = fields->f_FRj;
+ break;
case FRV_OPERAND_FRINTK :
value = fields->f_FRk;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ value = fields->f_FRk;
+ break;
case FRV_OPERAND_FRJ :
value = fields->f_FRj;
break;
@@ -1441,12 +1468,21 @@ frv_cgen_get_vma_operand (cd, opindex, fields)
case FRV_OPERAND_FRINTI :
value = fields->f_FRi;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ value = fields->f_FRi;
+ break;
case FRV_OPERAND_FRINTJ :
value = fields->f_FRj;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ value = fields->f_FRj;
+ break;
case FRV_OPERAND_FRINTK :
value = fields->f_FRk;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ value = fields->f_FRk;
+ break;
case FRV_OPERAND_FRJ :
value = fields->f_FRj;
break;
@@ -1675,12 +1711,21 @@ frv_cgen_set_int_operand (cd, opindex, fields, value)
case FRV_OPERAND_FRINTI :
fields->f_FRi = value;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ fields->f_FRi = value;
+ break;
case FRV_OPERAND_FRINTJ :
fields->f_FRj = value;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ fields->f_FRj = value;
+ break;
case FRV_OPERAND_FRINTK :
fields->f_FRk = value;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ fields->f_FRk = value;
+ break;
case FRV_OPERAND_FRJ :
fields->f_FRj = value;
break;
@@ -1897,12 +1942,21 @@ frv_cgen_set_vma_operand (cd, opindex, fields, value)
case FRV_OPERAND_FRINTI :
fields->f_FRi = value;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ fields->f_FRi = value;
+ break;
case FRV_OPERAND_FRINTJ :
fields->f_FRj = value;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ fields->f_FRj = value;
+ break;
case FRV_OPERAND_FRINTK :
fields->f_FRk = value;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ fields->f_FRk = value;
+ break;
case FRV_OPERAND_FRJ :
fields->f_FRj = value;
break;
diff --git a/opcodes/frv-opc.c b/opcodes/frv-opc.c
index 5e56e357645..de27a43f5a0 100644
--- a/opcodes/frv-opc.c
+++ b/opcodes/frv-opc.c
@@ -1033,6 +1033,18 @@ static const CGEN_IFMT ifmt_mcuti = {
32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_ACC40SI) }, { F (F_OPE1) }, { F (F_S6) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mdcutssi = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_ACC40SI) }, { F (F_OPE1) }, { F (F_S6) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mdrotli = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_S6) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mqsaths = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_mcmpsh = {
32, 32, 0x79fc0fc0, { { F (F_PACK) }, { F (F_COND_NULL) }, { F (F_FCCK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
};
@@ -1041,6 +1053,10 @@ static const CGEN_IFMT ifmt_mabshs = {
32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_cmqaddhss = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_maddaccs = {
32, 32, 0x1fc0fff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_ACC40SI) }, { F (F_OPE1) }, { F (F_ACCJ_NULL) }, { 0 } }
};
@@ -1053,6 +1069,14 @@ static const CGEN_IFMT ifmt_cmmulhs = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mqmulhs = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmqmulhs = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_mmachu = {
32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
};
@@ -1061,18 +1085,54 @@ static const CGEN_IFMT ifmt_cmmachu = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mqmachu = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmqmachu = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_cmexpdhw = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_U6) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mexpdhd = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_U6) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmexpdhd = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_U6) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_munpackh = {
32, 32, 0x1fc0fff, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mdunpackh = {
+ 32, 32, 0x1fc0fff, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mbtoh = {
+ 32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_cmbtoh = {
32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mhtob = {
+ 32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmhtob = {
+ 32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmbtohe = {
+ 32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_mclracc = {
32, 32, 0x1fdffff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_A) }, { F (F_MISC_NULL_10) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
};
@@ -4978,11 +5038,11 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (ACC40SI), ',', OP (S6), ',', OP (FRINTK), 0 } },
& ifmt_mcuti, { 0x1ec0bc0 }
},
-/* mdcutssi$pack $ACC40Si,$s6,$FRintk */
+/* mdcutssi$pack $ACC40Si,$s6,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (ACC40SI), ',', OP (S6), ',', OP (FRINTK), 0 } },
- & ifmt_mcuti, { 0x1e00380 }
+ { { MNEM, OP (PACK), ' ', OP (ACC40SI), ',', OP (S6), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mdcutssi, { 0x1e00380 }
},
/* maveh$pack $FRinti,$FRintj,$FRintk */
{
@@ -5008,11 +5068,11 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), 0 } },
& ifmt_mrotli, { 0x1ec02c0 }
},
-/* mdrotli$pack $FRinti,$u6,$FRintk */
+/* mdrotli$pack $FRintieven,$s6,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), 0 } },
- & ifmt_mrotli, { 0x1e002c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (S6), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mdrotli, { 0x1e002c0 }
},
/* mcplhi$pack $FRinti,$u6,$FRintk */
{
@@ -5032,11 +5092,11 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
& ifmt_mand, { 0x1ec0300 }
},
-/* mqsaths$pack $FRinti,$FRintj,$FRintk */
+/* mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1e003c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1e003c0 }
},
/* msathu$pack $FRinti,$FRintj,$FRintk */
{
@@ -5110,53 +5170,53 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmand, { 0x1c400c0 }
},
-/* mqaddhss$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0600 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0600 }
},
-/* mqaddhus$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0640 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0640 }
},
-/* mqsubhss$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0680 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0680 }
},
-/* mqsubhus$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec06c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec06c0 }
},
-/* cmqaddhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc0000 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc0000 }
},
-/* cmqaddhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc0040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc0040 }
},
-/* cmqsubhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc0080 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc0080 }
},
-/* cmqsubhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc00c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc00c0 }
},
/* maddaccs$pack $ACC40Si,$ACC40Sk */
{
@@ -5230,41 +5290,41 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmmulhs, { 0x1c80040 }
},
-/* mqmulhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0700 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0700 }
},
-/* mqmulhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0740 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0740 }
},
-/* mqmulxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0a80 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0a80 }
},
-/* mqmulxhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0ac0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0ac0 }
},
-/* cmqmulhs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmulhs, { 0x1d00000 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmulhs, { 0x1d00000 }
},
-/* cmqmulhu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmulhs, { 0x1d00040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmulhs, { 0x1d00040 }
},
/* mmachs$pack $FRinti,$FRintj,$ACC40Sk */
{
@@ -5302,47 +5362,47 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40UK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmmachu, { 0x1c800c0 }
},
-/* mqmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0780 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0780 }
},
-/* mqmachu$pack $FRinti,$FRintj,$ACC40Uk */
+/* mqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40UK), 0 } },
- & ifmt_mmachu, { 0x1ec07c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40UK), 0 } },
+ & ifmt_mqmachu, { 0x1ec07c0 }
},
-/* cmqmachs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmulhs, { 0x1d00080 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmulhs, { 0x1d00080 }
},
-/* cmqmachu$pack $FRinti,$FRintj,$ACC40Uk,$CCi,$cond */
+/* cmqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40UK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmachu, { 0x1d000c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40UK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmachu, { 0x1d000c0 }
},
-/* mqxmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1e00000 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1e00000 }
},
-/* mqxmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1e00040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1e00040 }
},
-/* mqmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1e00080 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1e00080 }
},
/* mcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
{
@@ -5392,29 +5452,29 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmmulhs, { 0x1d400c0 }
},
-/* mqcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxrs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0900 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0900 }
},
-/* mqcpxru$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxru$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0940 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0940 }
},
-/* mqcpxis$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxis$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0980 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0980 }
},
-/* mqcpxiu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxiu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec09c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec09c0 }
},
/* mexpdhw$pack $FRinti,$u6,$FRintk */
{
@@ -5428,17 +5488,17 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmexpdhw, { 0x1d80080 }
},
-/* mexpdhd$pack $FRinti,$u6,$FRintk */
+/* mexpdhd$pack $FRinti,$u6,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), 0 } },
- & ifmt_mrotli, { 0x1ec0cc0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mexpdhd, { 0x1ec0cc0 }
},
-/* cmexpdhd$pack $FRinti,$u6,$FRintk,$CCi,$cond */
+/* cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmexpdhw, { 0x1d800c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmexpdhd, { 0x1d800c0 }
},
/* mpackh$pack $FRinti,$FRintj,$FRintk */
{
@@ -5446,47 +5506,47 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
& ifmt_mand, { 0x1ec0d00 }
},
-/* mdpackh$pack $FRinti,$FRintj,$FRintk */
+/* mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0d80 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0d80 }
},
-/* munpackh$pack $FRinti,$FRintk */
+/* munpackh$pack $FRinti,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTK), 0 } },
+ { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTKEVEN), 0 } },
& ifmt_munpackh, { 0x1ec0d40 }
},
-/* mdunpackh$pack $FRinti,$FRintk */
+/* mdunpackh$pack $FRintieven,$FRintk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTK), 0 } },
- & ifmt_munpackh, { 0x1ec0dc0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTK), 0 } },
+ & ifmt_mdunpackh, { 0x1ec0dc0 }
},
-/* mbtoh$pack $FRintj,$FRintk */
+/* mbtoh$pack $FRintj,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mabshs, { 0x1ec0e00 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mbtoh, { 0x1ec0e00 }
},
-/* cmbtoh$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
+ { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmbtoh, { 0x1dc0000 }
},
-/* mhtob$pack $FRintj,$FRintk */
+/* mhtob$pack $FRintjeven,$FRintk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mabshs, { 0x1ec0e40 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTJEVEN), ',', OP (FRINTK), 0 } },
+ & ifmt_mhtob, { 0x1ec0e40 }
},
-/* cmhtob$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmbtoh, { 0x1dc0040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTJEVEN), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmhtob, { 0x1dc0040 }
},
/* mbtohe$pack $FRintj,$FRintk */
{
@@ -5498,7 +5558,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmbtoh, { 0x1dc0080 }
+ & ifmt_cmbtohe, { 0x1dc0080 }
},
/* mclracc$pack $ACC40Sk,$A */
{
diff --git a/opcodes/frv-opc.h b/opcodes/frv-opc.h
index 018a64378d7..5d23cf91043 100644
--- a/opcodes/frv-opc.h
+++ b/opcodes/frv-opc.h
@@ -27,11 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* -- opc.h */
-#undef CGEN_DIS_HASH_SIZE
+#undef CGEN_DIS_HASH_SIZE
#define CGEN_DIS_HASH_SIZE 128
-#undef CGEN_DIS_HASH
+#undef CGEN_DIS_HASH
#define CGEN_DIS_HASH(buffer, value) (((value) >> 18) & 127)
+/* Allows reason codes to be output when assembler errors occur. */
+#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+
/* Vliw support. */
#define FRV_VLIW_SIZE 4 /* fr500 has largest vliw size of 4. */
typedef CGEN_ATTR_VALUE_TYPE VLIW_COMBO[FRV_VLIW_SIZE];
diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c
index 2a3cd218f47..ea8d30b457c 100644
--- a/opcodes/h8300-dis.c
+++ b/opcodes/h8300-dis.c
@@ -1,5 +1,5 @@
/* Disassemble h8300 instructions.
- Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002
+ Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -34,11 +34,39 @@ struct h8_instruction
struct h8_instruction *h8_instructions;
static void bfd_h8_disassemble_init PARAMS ((void));
-static unsigned int bfd_h8_disassemble
- PARAMS ((bfd_vma, disassemble_info *, int));
+static void print_one_arg PARAMS ((disassemble_info *, bfd_vma, op_type,
+ int, int, int, int, const char **, int));
+static unsigned int bfd_h8_disassemble PARAMS ((bfd_vma,
+ disassemble_info *,
+ int));
+static void extract_immediate PARAMS ((FILE *,
+ op_type, int,
+ unsigned char *,
+ int *, int *,
+ const struct h8_opcode *));
+
+static void print_colon_thingie PARAMS ((op_type *));
+
+static void
+print_colon_thingie (op_type *nib)
+{
+ switch (*nib & SIZE) {
+ case L_2: fprintf (stdout, "2"); break;
+ case L_3:
+ case L_3NZ: fprintf (stdout, "3"); break;
+ case L_4: fprintf (stdout, "4"); break;
+ case L_5: fprintf (stdout, "5"); break;
+ case L_8: fprintf (stdout, "8"); break;
+ case L_16:
+ case L_16U: fprintf (stdout, "16"); break;
+ case L_24: fprintf (stdout, "24"); break;
+ case L_32: fprintf (stdout, "32"); break;
+ }
+}
/* Run through the opcodes and sort them into order to make them easy
to disassemble. */
+
static void
bfd_h8_disassemble_init ()
{
@@ -69,11 +97,14 @@ bfd_h8_disassemble_init ()
/* Just make sure there are an even number of nibbles in it, and
that the count is the same as the length. */
- for (i = 0; p->data.nib[i] != E; i++)
+ for (i = 0; p->data.nib[i] != (op_type) E; i++)
;
if (i & 1)
- abort ();
+ {
+ fprintf (stderr, "Internal error, h8_disassemble_init.\n");
+ abort ();
+ }
pi->length = i / 2;
pi->opcode = p;
@@ -84,42 +115,287 @@ bfd_h8_disassemble_init ()
pi->opcode = p;
}
-static unsigned int
-bfd_h8_disassemble (addr, info, mode)
- bfd_vma addr;
+static void
+extract_immediate (stream, looking_for, thisnib, data, cst, len, q)
+ FILE *stream;
+ op_type looking_for;
+ int thisnib;
+ unsigned char *data;
+ int *cst, *len;
+ const struct h8_opcode *q;
+{
+ switch (looking_for & SIZE)
+ {
+ case L_2:
+ *len = 2;
+ *cst = thisnib & 3;
+
+ /* DISP2 special treatment. */
+ if ((looking_for & MODE) == DISP)
+ {
+ if (OP_KIND (q->how) == O_MOVAB ||
+ OP_KIND (q->how) == O_MOVAW ||
+ OP_KIND (q->how) == O_MOVAL)
+ {
+ /* Handling for mova insn. */
+ switch (q->args.nib[0] & MODE) {
+ case INDEXB:
+ default:
+ break;
+ case INDEXW:
+ *cst *= 2;
+ break;
+ case INDEXL:
+ *cst *= 4;
+ break;
+ }
+ }
+ else
+ {
+ /* Handling for non-mova insn. */
+ switch (OP_SIZE (q->how)) {
+ default: break;
+ case SW:
+ *cst *= 2;
+ break;
+ case SL:
+ *cst *= 4;
+ break;
+ }
+ }
+ }
+ break;
+ case L_8:
+ *len = 8;
+ *cst = data[0];
+ break;
+ case L_16:
+ case L_16U:
+ *len = 16;
+ *cst = (data[0] << 8) + data [1];
+#if 0
+ if ((looking_for & SIZE) == L_16)
+ *cst = (short) *cst; /* sign extend */
+#endif
+ break;
+ case L_32:
+ *len = 32;
+ *cst = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
+ break;
+ default:
+ *len = 0;
+ *cst = 0;
+ fprintf (stream, "DISP bad size\n");
+ break;
+ }
+}
+
+static const char *regnames[] =
+{
+ "r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
+ "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
+};
+static const char *wregnames[] =
+{
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
+};
+static const char *lregnames[] =
+{
+ "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
+ "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
+};
+static const char *cregnames[] =
+{
+ "ccr", "exr", "mach", "macl", "", "", "vbr", "sbr"
+};
+
+static void
+print_one_arg (info, addr, x, cst, cstlen, rdisp_n, rn, pregnames, len)
disassemble_info *info;
- int mode;
+ bfd_vma addr;
+ op_type x;
+ int cst, cstlen, rdisp_n, rn;
+ const char **pregnames;
+ int len;
{
- /* Find the first entry in the table for this opcode. */
- static const char *regnames[] =
+ void *stream = info->stream;
+ fprintf_ftype outfn = info->fprintf_func;
+
+ if ((x & SIZE) == L_3 ||
+ (x & SIZE) == L_3NZ)
+ {
+ outfn (stream, "#0x%x", (unsigned) cst);
+ }
+ else if ((x & MODE) == IMM)
+ {
+ outfn (stream, "#0x%x", (unsigned) cst);
+ }
+ else if ((x & MODE) == DBIT ||
+ (x & MODE) == KBIT)
+ {
+ outfn (stream, "#%d", (unsigned) cst);
+ }
+ else if ((x & MODE) == CONST_2)
+ outfn (stream, "#2");
+ else if ((x & MODE) == CONST_4)
+ outfn (stream, "#4");
+ else if ((x & MODE) == CONST_8)
+ outfn (stream, "#8");
+ else if ((x & MODE) == CONST_16)
+ outfn (stream, "#16");
+ else if ((x & MODE) == REG)
+ {
+ switch (x & SIZE)
+ {
+ case L_8:
+ outfn (stream, "%s", regnames[rn]);
+ break;
+ case L_16:
+ case L_16U:
+ outfn (stream, "%s", wregnames[rn]);
+ break;
+ case L_P:
+ case L_32:
+ outfn (stream, "%s", lregnames[rn]);
+ break;
+ }
+ }
+ else if ((x & MODE) == LOWREG)
+ {
+ switch (x & SIZE)
+ {
+ case L_8:
+ /* Always take low half of reg. */
+ outfn (stream, "%s.b", regnames[rn < 8 ? rn + 8 : rn]);
+ break;
+ case L_16:
+ case L_16U:
+ /* Always take low half of reg. */
+ outfn (stream, "%s.w", wregnames[rn < 8 ? rn : rn - 8]);
+ break;
+ case L_P:
+ case L_32:
+ outfn (stream, "%s.l", lregnames[rn]);
+ break;
+ }
+ }
+ else if ((x & MODE) == POSTINC)
+ {
+ outfn (stream, "@%s+", pregnames[rn]);
+ }
+ else if ((x & MODE) == POSTDEC)
+ {
+ outfn (stream, "@%s-", pregnames[rn]);
+ }
+ else if ((x & MODE) == PREINC)
+ {
+ outfn (stream, "@+%s", pregnames[rn]);
+ }
+ else if ((x & MODE) == PREDEC)
+ {
+ outfn (stream, "@-%s", pregnames[rn]);
+ }
+ else if ((x & MODE) == IND)
+ {
+ outfn (stream, "@%s", pregnames[rn]);
+ }
+ else if ((x & MODE) == ABS || (x & ABSJMP))
+ {
+ outfn (stream, "@0x%x:%d", (unsigned) cst, cstlen);
+ }
+ else if ((x & MODE) == MEMIND)
+ {
+ outfn (stream, "@@%d (0x%x)", cst, cst);
+ }
+ else if ((x & MODE) == VECIND)
+ {
+ /* FIXME Multiplier should be 2 or 4, depending on processor mode,
+ by which is meant "normal" vs. "middle", "advanced", "maximum". */
+
+ int offset = (cst + 0x80) * 4;
+ outfn (stream, "@@%d (0x%x)", offset, offset);
+ }
+ else if ((x & MODE) == PCREL)
+ {
+ if ((x & SIZE) == L_16 ||
+ (x & SIZE) == L_16U)
+ {
+ outfn (stream, ".%s%d (0x%x)",
+ (short) cst > 0 ? "+" : "",
+ (short) cst,
+ addr + (short) cst + len);
+ }
+ else
+ {
+ outfn (stream, ".%s%d (0x%x)",
+ (char) cst > 0 ? "+" : "",
+ (char) cst,
+ addr + (char) cst + len);
+ }
+ }
+ else if ((x & MODE) == DISP)
+ {
+ outfn (stream, "@(0x%x:%d,%s)", cst, cstlen,
+ pregnames[rdisp_n]);
+ }
+ else if ((x & MODE) == INDEXB)
+ {
+ /* Always take low half of reg. */
+ outfn (stream, "@(0x%x:%d,%s.b)", cst, cstlen,
+ regnames[rdisp_n < 8 ? rdisp_n + 8 : rdisp_n]);
+ }
+ else if ((x & MODE) == INDEXW)
{
- "r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
- "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
- };
- static const char *wregnames[] =
+ /* Always take low half of reg. */
+ outfn (stream, "@(0x%x:%d,%s.w)", cst, cstlen,
+ wregnames[rdisp_n < 8 ? rdisp_n : rdisp_n - 8]);
+ }
+ else if ((x & MODE) == INDEXL)
{
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
- };
- static const char *lregnames[] =
+ outfn (stream, "@(0x%x:%d,%s.l)", cst, cstlen,
+ lregnames[rdisp_n]);
+ }
+ else if (x & CTRL)
{
- "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
- "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
- };
- int rs = 0;
- int rd = 0;
- int rdisp = 0;
- int abs = 0;
- int bit = 0;
- int plen = 0;
+ outfn (stream, cregnames[rn]);
+ }
+ else if ((x & MODE) == CCR)
+ {
+ outfn (stream, "ccr");
+ }
+ else if ((x & MODE) == EXR)
+ {
+ outfn (stream, "exr");
+ }
+ else if ((x & MODE) == MACREG)
+ {
+ outfn (stream, "mac%c", cst ? 'l' : 'h');
+ }
+ else
+ /* xgettext:c-format */
+ outfn (stream, _("Hmmmm 0x%x"), x);
+}
+
+static unsigned int
+bfd_h8_disassemble (addr, info, mach)
+ bfd_vma addr;
+ disassemble_info *info;
+ int mach;
+{
+ /* Find the first entry in the table for this opcode. */
+ int regno[3] = { 0, 0, 0 };
+ int dispregno[3] = { 0, 0, 0 };
+ int cst[3] = { 0, 0, 0 };
+ int cstlen[3] = { 0, 0, 0 };
static bfd_boolean init = 0;
const struct h8_instruction *qi;
- char const **pregnames = mode != 0 ? lregnames : wregnames;
+ char const **pregnames = mach != 0 ? lregnames : wregnames;
int status;
- int l;
- unsigned char data[20];
+ unsigned int l;
+ unsigned char data[MAX_CODE_NIBBLES];
void *stream = info->stream;
- fprintf_ftype fprintf = info->fprintf_func;
+ fprintf_ftype outfn = info->fprintf_func;
if (!init)
{
@@ -134,7 +410,7 @@ bfd_h8_disassemble (addr, info, mode)
return -1;
}
- for (l = 2; status == 0 && l < 10; l += 2)
+ for (l = 2; status == 0 && l < sizeof (data) / 2; l += 2)
status = info->read_memory_func (addr + l, data + l, 2, info);
/* Find the exact opcode/arg combo. */
@@ -147,9 +423,12 @@ bfd_h8_disassemble (addr, info, mode)
while (1)
{
op_type looking_for = *nib;
- int thisnib = data[len >> 1];
+ int thisnib = data[len / 2];
+ int opnr;
- thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib >> 4) & 0xf);
+ thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib / 16) & 0xf);
+ opnr = ((looking_for & OP3) == OP3 ? 2
+ : (looking_for & DST) == DST ? 1 : 0);
if (looking_for < 16 && looking_for >= 0)
{
@@ -160,21 +439,78 @@ bfd_h8_disassemble (addr, info, mode)
{
if ((int) looking_for & (int) B31)
{
- if (!(((int) thisnib & 0x8) != 0))
+ if (!((thisnib & 0x8) != 0))
goto fail;
looking_for = (op_type) ((int) looking_for & ~(int) B31);
+ thisnib &= 0x7;
}
-
- if ((int) looking_for & (int) B30)
+ else if ((int) looking_for & (int) B30)
{
- if (!(((int) thisnib & 0x8) == 0))
+ if (!((thisnib & 0x8) == 0))
goto fail;
looking_for = (op_type) ((int) looking_for & ~(int) B30);
}
- if (looking_for & DBIT)
+ if ((int) looking_for & (int) B21)
+ {
+ if (!((thisnib & 0x4) != 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B21);
+ thisnib &= 0xb;
+ }
+ else if ((int) looking_for & (int) B20)
+ {
+ if (!((thisnib & 0x4) == 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B20);
+ }
+ if ((int) looking_for & (int) B11)
+ {
+ if (!((thisnib & 0x2) != 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B11);
+ thisnib &= 0xd;
+ }
+ else if ((int) looking_for & (int) B10)
+ {
+ if (!((thisnib & 0x2) == 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B10);
+ }
+
+ if ((int) looking_for & (int) B01)
+ {
+ if (!((thisnib & 0x1) != 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B01);
+ thisnib &= 0xe;
+ }
+ else if ((int) looking_for & (int) B00)
+ {
+ if (!((thisnib & 0x1) == 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B00);
+ }
+
+ if (looking_for & IGNORE)
+ {
+ /* Hitachi has declared that IGNORE must be zero. */
+ if (thisnib != 0)
+ goto fail;
+ }
+ else if ((looking_for & MODE) == DATA)
+ {
+ ; /* Skip embedded data. */
+ }
+ else if ((looking_for & MODE) == DBIT)
{
/* Exclude adds/subs by looking at bit 0 and 2, and
make sure the operand size, either w or l,
@@ -182,45 +518,98 @@ bfd_h8_disassemble (addr, info, mode)
if ((looking_for & 7) != (thisnib & 7))
goto fail;
- abs = (thisnib & 0x8) ? 2 : 1;
+ cst[opnr] = (thisnib & 0x8) ? 2 : 1;
}
- else if (looking_for & (REG | IND | INC | DEC))
+ else if ((looking_for & MODE) == DISP ||
+ (looking_for & MODE) == ABS ||
+ (looking_for & MODE) == PCREL ||
+ (looking_for & MODE) == INDEXB ||
+ (looking_for & MODE) == INDEXW ||
+ (looking_for & MODE) == INDEXL)
{
- if (looking_for & SRC)
- rs = thisnib;
- else
- rd = thisnib;
+ extract_immediate (stream, looking_for, thisnib,
+ data + len / 2, cst + opnr,
+ cstlen + opnr, q);
+ /* Even address == bra, odd == bra/s. */
+ if (q->how == O (O_BRAS, SB))
+ cst[opnr] -= 1;
}
- else if (looking_for & L_16)
+ else if ((looking_for & MODE) == REG ||
+ (looking_for & MODE) == LOWREG ||
+ (looking_for & MODE) == IND ||
+ (looking_for & MODE) == PREINC ||
+ (looking_for & MODE) == POSTINC ||
+ (looking_for & MODE) == PREDEC ||
+ (looking_for & MODE) == POSTDEC)
{
- abs = (data[len >> 1]) * 256 + data[(len + 2) >> 1];
- plen = 16;
+ regno[opnr] = thisnib;
}
- else if (looking_for & ABSJMP)
+ else if (looking_for & CTRL) /* Control Register */
{
- abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ thisnib &= 7;
+ if (((looking_for & MODE) == CCR && (thisnib != C_CCR)) ||
+ ((looking_for & MODE) == EXR && (thisnib != C_EXR)) ||
+ ((looking_for & MODE) == MACH && (thisnib != C_MACH)) ||
+ ((looking_for & MODE) == MACL && (thisnib != C_MACL)) ||
+ ((looking_for & MODE) == VBR && (thisnib != C_VBR)) ||
+ ((looking_for & MODE) == SBR && (thisnib != C_SBR)))
+ goto fail;
+ if (((looking_for & MODE) == CCR_EXR &&
+ (thisnib != C_CCR && thisnib != C_EXR)) ||
+ ((looking_for & MODE) == VBR_SBR &&
+ (thisnib != C_VBR && thisnib != C_SBR)) ||
+ ((looking_for & MODE) == MACREG &&
+ (thisnib != C_MACH && thisnib != C_MACL)))
+ goto fail;
+ if (((looking_for & MODE) == CC_EX_VB_SB &&
+ (thisnib != C_CCR && thisnib != C_EXR &&
+ thisnib != C_VBR && thisnib != C_SBR)))
+ goto fail;
+
+ regno[opnr] = thisnib;
+ }
+ else if ((looking_for & SIZE) == L_5)
+ {
+ cst[opnr] = data[len / 2] & 31;
+ cstlen[opnr] = 5;
+ }
+ else if ((looking_for & SIZE) == L_4)
+ {
+ cst[opnr] = thisnib;
+ cstlen[opnr] = 4;
+ }
+ else if ((looking_for & SIZE) == L_16 ||
+ (looking_for & SIZE) == L_16U)
+ {
+ cst[opnr] = (data[len / 2]) * 256 + data[(len + 2) / 2];
+ cstlen[opnr] = 16;
+ }
+ else if ((looking_for & MODE) == MEMIND)
+ {
+ cst[opnr] = data[1];
}
- else if (looking_for & MEMIND)
+ else if ((looking_for & MODE) == VECIND)
{
- abs = data[1];
+ cst[opnr] = data[1] & 0x7f;
}
- else if (looking_for & L_32)
+ else if ((looking_for & SIZE) == L_32)
{
- int i = len >> 1;
+ int i = len / 2;
- abs = (data[i] << 24)
- | (data[i + 1] << 16)
- | (data[i + 2] << 8)
- | (data[i + 3]);
+ cst[opnr] = ((data[i] << 24)
+ | (data[i + 1] << 16)
+ | (data[i + 2] << 8)
+ | (data[i + 3]));
- plen = 32;
+ cstlen[opnr] = 32;
}
- else if (looking_for & L_24)
+ else if ((looking_for & SIZE) == L_24)
{
- int i = len >> 1;
+ int i = len / 2;
- abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
- plen = 24;
+ cst[opnr] =
+ (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
+ cstlen[opnr] = 24;
}
else if (looking_for & IGNORE)
{
@@ -228,64 +617,67 @@ bfd_h8_disassemble (addr, info, mode)
}
else if (looking_for & DISPREG)
{
- rdisp = thisnib;
+ dispregno[opnr] = thisnib & 7;
}
- else if (looking_for & KBIT)
+ else if ((looking_for & MODE) == KBIT)
{
switch (thisnib)
{
case 9:
- abs = 4;
+ cst[opnr] = 4;
break;
case 8:
- abs = 2;
+ cst[opnr] = 2;
break;
case 0:
- abs = 1;
+ cst[opnr] = 1;
break;
default:
goto fail;
}
}
- else if (looking_for & L_8)
+ else if ((looking_for & SIZE) == L_8)
{
- plen = 8;
- abs = data[len >> 1];
+ cstlen[opnr] = 8;
+ cst[opnr] = data[len / 2];
}
- else if (looking_for & L_3)
+ else if ((looking_for & SIZE) == L_3 ||
+ (looking_for & SIZE) == L_3NZ)
{
- bit = thisnib & 0x7;
+ cst[opnr] = thisnib & 0x7;
+ if (cst[opnr] == 0 && (looking_for & SIZE) == L_3NZ)
+ goto fail;
}
- else if (looking_for & L_2)
+ else if ((looking_for & SIZE) == L_2)
{
- plen = 2;
- abs = thisnib & 0x3;
+ cstlen[opnr] = 2;
+ cst[opnr] = thisnib & 0x3;
}
- else if (looking_for & MACREG)
+ else if ((looking_for & MODE) == MACREG)
{
- abs = (thisnib == 3);
+ cst[opnr] = (thisnib == 3);
}
- else if (looking_for == E)
+ else if (looking_for == (op_type) E)
{
int i;
for (i = 0; i < qi->length; i++)
- fprintf (stream, "%02x ", data[i]);
+ outfn (stream, "%02x ", data[i]);
for (; i < 6; i++)
- fprintf (stream, " ");
+ outfn (stream, " ");
- fprintf (stream, "%s\t", q->name);
+ outfn (stream, "%s\t", q->name);
/* Gross. Disgusting. */
if (strcmp (q->name, "ldm.l") == 0)
{
int count, high;
- count = (data[1] >> 4) & 0x3;
- high = data[3] & 0x7;
+ count = (data[1] / 16) & 0x3;
+ high = regno[1];
- fprintf (stream, "@sp+,er%d-er%d", high - count, high);
+ outfn (stream, "@sp+,er%d-er%d", high - count, high);
return qi->length;
}
@@ -293,121 +685,71 @@ bfd_h8_disassemble (addr, info, mode)
{
int count, low;
- count = (data[1] >> 4) & 0x3;
- low = data[3] & 0x7;
+ count = (data[1] / 16) & 0x3;
+ low = regno[0];
- fprintf (stream, "er%d-er%d,@-sp", low, low + count);
+ outfn (stream, "er%d-er%d,@-sp", low, low + count);
+ return qi->length;
+ }
+ if (strcmp (q->name, "rte/l") == 0
+ || strcmp (q->name, "rts/l") == 0)
+ {
+ if (regno[0] == 0)
+ outfn (stream, "er%d", regno[1]);
+ else
+ {
+ outfn (stream, "er%d-er%d", regno[1] - regno[0],
+ regno[1]);
+ }
+ return qi->length;
+ }
+ if (strncmp (q->name, "mova", 4) == 0)
+ {
+ op_type *args = q->args.nib;
+
+ if (args[1] == (op_type) E)
+ {
+ /* Short form. */
+ print_one_arg (info, addr, args[0], cst[0],
+ cstlen[0], dispregno[0], regno[0],
+ pregnames, qi->length);
+ outfn (stream, ",er%d", dispregno[0]);
+ }
+ else
+ {
+ outfn (stream, "@(0x%x:%d,", cst[0], cstlen[0]);
+ print_one_arg (info, addr, args[1], cst[1],
+ cstlen[1], dispregno[1], regno[1],
+ pregnames, qi->length);
+ outfn (stream, ".%c),",
+ (args[0] & MODE) == INDEXB ? 'b' : 'w');
+ print_one_arg (info, addr, args[2], cst[2],
+ cstlen[2], dispregno[2], regno[2],
+ pregnames, qi->length);
+ }
return qi->length;
}
-
/* Fill in the args. */
{
op_type *args = q->args.nib;
int hadone = 0;
+ int nargs;
- while (*args != E)
+ for (nargs = 0;
+ nargs < 3 && args[nargs] != (op_type) E;
+ nargs++)
{
- int x = *args;
+ int x = args[nargs];
if (hadone)
- fprintf (stream, ",");
-
- if (x & L_3)
- {
- fprintf (stream, "#0x%x", (unsigned) bit);
- }
- else if (x & (IMM | KBIT | DBIT))
- {
- /* Bletch. For shal #2,er0 and friends. */
- if (*(args + 1) & SRC_IN_DST)
- abs = 2;
-
- fprintf (stream, "#0x%x", (unsigned) abs);
- }
- else if (x & REG)
- {
- int rn = (x & DST) ? rd : rs;
-
- switch (x & SIZE)
- {
- case L_8:
- fprintf (stream, "%s", regnames[rn]);
- break;
- case L_16:
- fprintf (stream, "%s", wregnames[rn]);
- break;
- case L_P:
- case L_32:
- fprintf (stream, "%s", lregnames[rn]);
- break;
- }
- }
- else if (x & MACREG)
- {
- fprintf (stream, "mac%c", abs ? 'l' : 'h');
- }
- else if (x & INC)
- {
- fprintf (stream, "@%s+", pregnames[rs]);
- }
- else if (x & DEC)
- {
- fprintf (stream, "@-%s", pregnames[rd]);
- }
- else if (x & IND)
- {
- int rn = (x & DST) ? rd : rs;
- fprintf (stream, "@%s", pregnames[rn]);
- }
- else if (x & ABS8MEM)
- {
- fprintf (stream, "@0x%x:8", (unsigned) abs);
- }
- else if (x & (ABS | ABSJMP))
- {
- fprintf (stream, "@0x%x:%d", (unsigned) abs, plen);
- }
- else if (x & MEMIND)
- {
- fprintf (stream, "@@%d (%x)", abs, abs);
- }
- else if (x & PCREL)
- {
- if (x & L_16)
- {
- abs += 2;
- fprintf (stream,
- ".%s%d (%x)",
- (short) abs > 0 ? "+" : "",
- (short) abs, addr + (short) abs + 2);
- }
- else
- {
- fprintf (stream,
- ".%s%d (%x)",
- (char) abs > 0 ? "+" : "",
- (char) abs, addr + (char) abs + 2);
- }
- }
- else if (x & DISP)
- {
- fprintf (stream, "@(0x%x:%d,%s)",
- abs, plen, pregnames[rdisp]);
- }
- else if (x & CCR)
- {
- fprintf (stream, "ccr");
- }
- else if (x & EXR)
- {
- fprintf (stream, "exr");
- }
- else
- /* xgettext:c-format */
- fprintf (stream, _("Hmmmm %x"), x);
+ outfn (stream, ",");
+
+ print_one_arg (info, addr, x,
+ cst[nargs], cstlen[nargs],
+ dispregno[nargs], regno[nargs],
+ pregnames, qi->length);
hadone = 1;
- args++;
}
}
@@ -415,7 +757,7 @@ bfd_h8_disassemble (addr, info, mode)
}
else
/* xgettext:c-format */
- fprintf (stream, _("Don't understand %x \n"), looking_for);
+ outfn (stream, _("Don't understand 0x%x \n"), looking_for);
}
len++;
@@ -427,7 +769,7 @@ bfd_h8_disassemble (addr, info, mode)
}
/* Fell off the end. */
- fprintf (stream, "%02x %02x .word\tH'%x,H'%x",
+ outfn (stream, "%02x %02x .word\tH'%x,H'%x",
data[0], data[1],
data[0], data[1]);
return 2;
diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c
index 6a1653b014b..524f256a537 100644
--- a/opcodes/ip2k-asm.c
+++ b/opcodes/ip2k-asm.c
@@ -908,10 +908,10 @@ ip2k_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! ip2k_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/ip2k-desc.c b/opcodes/ip2k-desc.c
index f8e493289fb..0ab2cc5fa44 100644
--- a/opcodes/ip2k-desc.c
+++ b/opcodes/ip2k-desc.c
@@ -105,7 +105,7 @@ const CGEN_ATTR_TABLE ip2k_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "EXT-SKIP-INSN", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/ip2k-desc.h b/opcodes/ip2k-desc.h
index 84db7fb1cb0..11220263b5c 100644
--- a/opcodes/ip2k-desc.h
+++ b/opcodes/ip2k-desc.h
@@ -225,7 +225,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_EXT_SKIP_INSN, CGEN_INSN_SKIPA
, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
index 17b93eb2f40..7fb795eb155 100644
--- a/opcodes/iq2000-asm.c
+++ b/opcodes/iq2000-asm.c
@@ -385,15 +385,15 @@ iq2000_cgen_parse_operand (cd, opindex, strp, fields)
case IQ2000_OPERAND_EXECODE :
errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_EXECODE, &fields->f_excode);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_F_INDEX, &fields->f_index);
+ break;
case IQ2000_OPERAND_HI16 :
errmsg = parse_hi16 (cd, strp, IQ2000_OPERAND_HI16, &fields->f_imm);
break;
case IQ2000_OPERAND_IMM :
errmsg = parse_imm (cd, strp, IQ2000_OPERAND_IMM, &fields->f_imm);
break;
- case IQ2000_OPERAND_INDEX :
- errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_INDEX, &fields->f_index);
- break;
case IQ2000_OPERAND_JMPTARG :
{
bfd_vma value;
@@ -477,9 +477,6 @@ iq2000_cgen_init_asm (cd)
iq2000_cgen_init_ibld_table (cd);
cd->parse_handlers = & iq2000_cgen_parse_handlers[0];
cd->parse_operand = iq2000_cgen_parse_operand;
-#ifdef CGEN_ASM_INIT_HOOK
-CGEN_ASM_INIT_HOOK
-#endif
}
@@ -797,10 +794,10 @@ iq2000_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! iq2000_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/iq2000-desc.c b/opcodes/iq2000-desc.c
index a30bf56b8bf..6c7f3b06b79 100644
--- a/opcodes/iq2000-desc.c
+++ b/opcodes/iq2000-desc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "ansidecl.h"
@@ -33,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "iq2000-opc.h"
#include "opintl.h"
#include "libiberty.h"
+#include "xregex.h"
/* Attributes. */
@@ -105,7 +105,7 @@ const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "YIELD-INSN", &bool_attr[0], &bool_attr[0] },
@@ -122,7 +122,7 @@ const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] =
/* Instruction set variants. */
static const CGEN_ISA iq2000_cgen_isa_table[] = {
- { "iq2000", 32, 32, 32, 32 },
+ { "iq2000", 32, 32, 23, 32 },
{ 0, 0, 0, 0, 0 }
};
@@ -255,6 +255,9 @@ const CGEN_IFLD iq2000_cgen_ifld_table[] =
{ IQ2000_F_CP_GRP, "f-cp-grp", 0, 32, 7, 2, { 0, { (1<<MACH_BASE) } } },
{ IQ2000_F_FUNC, "f-func", 0, 32, 5, 6, { 0, { (1<<MACH_BASE) } } },
{ IQ2000_F_IMM, "f-imm", 0, 32, 15, 16, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_RD_RS, "f-rd-rs", 0, 0, 0, 0,{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+ { IQ2000_F_RD_RT, "f-rd-rt", 0, 0, 0, 0,{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+ { IQ2000_F_RT_RS, "f-rt-rs", 0, 0, 0, 0,{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
{ IQ2000_F_JTARG, "f-jtarg", 0, 32, 15, 16, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
{ IQ2000_F_JTARGQ10, "f-jtargq10", 0, 32, 20, 21, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
{ IQ2000_F_OFFSET, "f-offset", 0, 32, 15, 16, { 0|A(PCREL_ADDR), { (1<<MACH_BASE) } } },
@@ -295,21 +298,21 @@ const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [];
const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [] =
{
- { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
- {0,{0}}
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
+ { 0, { (const PTR) 0 } }
};
const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [] =
{
- { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
- {0,{0}}
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
+ { 0, { (const PTR) 0 } }
};
const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [] =
{
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
- {0,{0}}
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
+ { 0, { (const PTR) 0 } }
};
/* The operand table. */
@@ -329,133 +332,136 @@ const CGEN_OPERAND iq2000_cgen_operand_table[] =
{
/* pc: program counter */
{ "pc", IQ2000_OPERAND_PC, HW_H_PC, 0, 0,
- { 0, { (void *) &(iq2000_cgen_ifld_table[0])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_NIL] } },
{ 0|A(SEM_ONLY), { (1<<MACH_BASE) } } },
/* rs: register Rs */
{ "rs", IQ2000_OPERAND_RS, HW_H_GR, 25, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
{ 0, { (1<<MACH_BASE) } } },
/* rt: register Rt */
{ "rt", IQ2000_OPERAND_RT, HW_H_GR, 20, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
{ 0, { (1<<MACH_BASE) } } },
/* rd: register Rd */
{ "rd", IQ2000_OPERAND_RD, HW_H_GR, 15, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } },
{ 0, { (1<<MACH_BASE) } } },
/* rd-rs: register Rd from Rs */
{ "rd-rs", IQ2000_OPERAND_RD_RS, HW_H_GR, 15, 10,
- { 2, { (void *) &(IQ2000_F_RD_RS_MULTI_IFIELD[0])} },
+ { 2, { (const PTR) &IQ2000_F_RD_RS_MULTI_IFIELD[0] } },
{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
/* rd-rt: register Rd from Rt */
{ "rd-rt", IQ2000_OPERAND_RD_RT, HW_H_GR, 15, 10,
- { 2, { (void *) &(IQ2000_F_RD_RT_MULTI_IFIELD[0])} },
+ { 2, { (const PTR) &IQ2000_F_RD_RT_MULTI_IFIELD[0] } },
{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
/* rt-rs: register Rt from Rs */
{ "rt-rs", IQ2000_OPERAND_RT_RS, HW_H_GR, 20, 10,
- { 2, { (void *) &(IQ2000_F_RT_RS_MULTI_IFIELD[0])} },
+ { 2, { (const PTR) &IQ2000_F_RT_RS_MULTI_IFIELD[0] } },
{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
/* shamt: shift amount */
{ "shamt", IQ2000_OPERAND_SHAMT, HW_H_UINT, 10, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[6])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_SHAMT] } },
{ 0, { (1<<MACH_BASE) } } },
/* imm: immediate */
{ "imm", IQ2000_OPERAND_IMM, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* offset: pc-relative offset */
{ "offset", IQ2000_OPERAND_OFFSET, HW_H_IADDR, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[14])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_OFFSET] } },
{ 0|A(PCREL_ADDR), { (1<<MACH_BASE) } } },
/* baseoff: base register offset */
{ "baseoff", IQ2000_OPERAND_BASEOFF, HW_H_IADDR, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* jmptarg: jump target */
{ "jmptarg", IQ2000_OPERAND_JMPTARG, HW_H_IADDR, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[12])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_JTARG] } },
{ 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
/* mask: mask */
{ "mask", IQ2000_OPERAND_MASK, HW_H_UINT, 9, 4,
- { 0, { (void *) &(iq2000_cgen_ifld_table[18])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASK] } },
{ 0, { (1<<MACH_BASE) } } },
/* maskq10: iq10 mask */
{ "maskq10", IQ2000_OPERAND_MASKQ10, HW_H_UINT, 10, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[19])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASKQ10] } },
{ 0, { (1<<MACH_BASE) } } },
/* maskl: mask left */
{ "maskl", IQ2000_OPERAND_MASKL, HW_H_UINT, 4, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[20])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASKL] } },
{ 0, { (1<<MACH_BASE) } } },
/* count: count */
{ "count", IQ2000_OPERAND_COUNT, HW_H_UINT, 15, 7,
- { 0, { (void *) &(iq2000_cgen_ifld_table[15])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_COUNT] } },
{ 0, { (1<<MACH_BASE) } } },
-/* index: index */
- { "index", IQ2000_OPERAND_INDEX, HW_H_UINT, 8, 9,
- { 0, { (void *) &(iq2000_cgen_ifld_table[17])} },
+/* f-index: index */
+ { "f-index", IQ2000_OPERAND_F_INDEX, HW_H_UINT, 8, 9,
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_INDEX] } },
{ 0, { (1<<MACH_BASE) } } },
/* execode: execcode */
{ "execode", IQ2000_OPERAND_EXECODE, HW_H_UINT, 25, 20,
- { 0, { (void *) &(iq2000_cgen_ifld_table[21])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_EXCODE] } },
{ 0, { (1<<MACH_BASE) } } },
/* bytecount: byte count */
{ "bytecount", IQ2000_OPERAND_BYTECOUNT, HW_H_UINT, 7, 8,
- { 0, { (void *) &(iq2000_cgen_ifld_table[16])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_BYTECOUNT] } },
{ 0, { (1<<MACH_BASE) } } },
/* cam-y: cam global opn y */
{ "cam-y", IQ2000_OPERAND_CAM_Y, HW_H_UINT, 2, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[29])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CAM_Y] } },
{ 0, { (1<<MACH_BASE) } } },
/* cam-z: cam global mask z */
{ "cam-z", IQ2000_OPERAND_CAM_Z, HW_H_UINT, 5, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[28])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CAM_Z] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-3func: CM 3 bit fn field */
{ "cm-3func", IQ2000_OPERAND_CM_3FUNC, HW_H_UINT, 5, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[30])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_3FUNC] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-4func: CM 4 bit fn field */
{ "cm-4func", IQ2000_OPERAND_CM_4FUNC, HW_H_UINT, 5, 4,
- { 0, { (void *) &(iq2000_cgen_ifld_table[31])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_4FUNC] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-3z: CM 3 bit Z field */
{ "cm-3z", IQ2000_OPERAND_CM_3Z, HW_H_UINT, 1, 2,
- { 0, { (void *) &(iq2000_cgen_ifld_table[32])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_3Z] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-4z: CM 4 bit Z field */
{ "cm-4z", IQ2000_OPERAND_CM_4Z, HW_H_UINT, 2, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[33])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_4Z] } },
{ 0, { (1<<MACH_BASE) } } },
/* base: base register */
{ "base", IQ2000_OPERAND_BASE, HW_H_GR, 25, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
{ 0, { (1<<MACH_BASE) } } },
/* maskr: mask right */
{ "maskr", IQ2000_OPERAND_MASKR, HW_H_UINT, 25, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
{ 0, { (1<<MACH_BASE) } } },
/* bitnum: bit number */
{ "bitnum", IQ2000_OPERAND_BITNUM, HW_H_UINT, 20, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
{ 0, { (1<<MACH_BASE) } } },
/* hi16: high 16 bit immediate */
{ "hi16", IQ2000_OPERAND_HI16, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* lo16: 16 bit signed immediate, for low */
{ "lo16", IQ2000_OPERAND_LO16, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* mlo16: negated 16 bit signed immediate */
{ "mlo16", IQ2000_OPERAND_MLO16, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* jmptargq10: iq10 21-bit jump offset */
{ "jmptargq10", IQ2000_OPERAND_JMPTARGQ10, HW_H_IADDR, 20, 21,
- { 0, { (void *) &(iq2000_cgen_ifld_table[13])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_JTARGQ10] } },
{ 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
- { 0, 0, 0, 0, 0, {0, {0}}, {0, {0}} }
+/* sentinel */
+ { 0, 0, 0, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { 0 } } }
};
#undef A
@@ -1161,14 +1167,14 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_PKRL, "pkrl", "pkrl", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* pkrlr1 $rt,$index,$count */
+/* pkrlr1 $rt,$count */
{
- IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 32,
+ IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* pkrlr30 $rt,$index,$count */
+/* pkrlr30 $rt,$count */
{
- IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 32,
+ IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* rb $rd,$rt */
@@ -1176,14 +1182,14 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_RB, "rb", "rb", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* rbr1 $rt,$index,$count */
+/* rbr1 $rt,$count */
{
- IQ2000_INSN_RBR1, "rbr1", "rbr1", 32,
+ IQ2000_INSN_RBR1, "rbr1", "rbr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* rbr30 $rt,$index,$count */
+/* rbr30 $rt,$count */
{
- IQ2000_INSN_RBR30, "rbr30", "rbr30", 32,
+ IQ2000_INSN_RBR30, "rbr30", "rbr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* rfe */
@@ -1196,14 +1202,14 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_RX, "rx", "rx", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* rxr1 $rt,$index,$count */
+/* rxr1 $rt,$count */
{
- IQ2000_INSN_RXR1, "rxr1", "rxr1", 32,
+ IQ2000_INSN_RXR1, "rxr1", "rxr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* rxr30 $rt,$index,$count */
+/* rxr30 $rt,$count */
{
- IQ2000_INSN_RXR30, "rxr30", "rxr30", 32,
+ IQ2000_INSN_RXR30, "rxr30", "rxr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* sleep */
@@ -1261,24 +1267,24 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_WBU, "wbu", "wbu", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* wbr1 $rt,$index,$count */
+/* wbr1 $rt,$count */
{
- IQ2000_INSN_WBR1, "wbr1", "wbr1", 32,
+ IQ2000_INSN_WBR1, "wbr1", "wbr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wbr1u $rt,$index,$count */
+/* wbr1u $rt,$count */
{
- IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 32,
+ IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wbr30 $rt,$index,$count */
+/* wbr30 $rt,$count */
{
- IQ2000_INSN_WBR30, "wbr30", "wbr30", 32,
+ IQ2000_INSN_WBR30, "wbr30", "wbr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wbr30u $rt,$index,$count */
+/* wbr30u $rt,$count */
{
- IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 32,
+ IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* wx $rd,$rt */
@@ -1291,24 +1297,24 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_WXU, "wxu", "wxu", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* wxr1 $rt,$index,$count */
+/* wxr1 $rt,$count */
{
- IQ2000_INSN_WXR1, "wxr1", "wxr1", 32,
+ IQ2000_INSN_WXR1, "wxr1", "wxr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wxr1u $rt,$index,$count */
+/* wxr1u $rt,$count */
{
- IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 32,
+ IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wxr30 $rt,$index,$count */
+/* wxr30 $rt,$count */
{
- IQ2000_INSN_WXR30, "wxr30", "wxr30", 32,
+ IQ2000_INSN_WXR30, "wxr30", "wxr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wxr30u $rt,$index,$count */
+/* wxr30u $rt,$count */
{
- IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 32,
+ IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* ldw $rt,$lo16($base) */
@@ -2181,7 +2187,7 @@ iq2000_cgen_cpu_close (cd)
CGEN_CPU_DESC cd;
{
unsigned int i;
- CGEN_INSN *insns;
+ const CGEN_INSN *insns;
if (cd->macro_insn_table.init_entries)
{
@@ -2189,7 +2195,7 @@ iq2000_cgen_cpu_close (cd)
for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
{
if (CGEN_INSN_RX ((insns)))
- regfree(CGEN_INSN_RX (insns));
+ regfree (CGEN_INSN_RX (insns));
}
}
@@ -2199,7 +2205,7 @@ iq2000_cgen_cpu_close (cd)
for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
{
if (CGEN_INSN_RX (insns))
- regfree(CGEN_INSN_RX (insns));
+ regfree (CGEN_INSN_RX (insns));
}
}
diff --git a/opcodes/iq2000-desc.h b/opcodes/iq2000-desc.h
index 584c3ded755..13b4f56a80b 100644
--- a/opcodes/iq2000-desc.h
+++ b/opcodes/iq2000-desc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define CGEN_INSN_LSB0_P 1
/* Minimum size of any insn (in bytes). */
-#define CGEN_MIN_INSN_SIZE 4
+#define CGEN_MIN_INSN_SIZE 3
/* Maximum size of any insn (in bytes). */
#define CGEN_MAX_INSN_SIZE 4
@@ -255,7 +255,7 @@ typedef enum cgen_operand_type {
, IQ2000_OPERAND_RD_RS, IQ2000_OPERAND_RD_RT, IQ2000_OPERAND_RT_RS, IQ2000_OPERAND_SHAMT
, IQ2000_OPERAND_IMM, IQ2000_OPERAND_OFFSET, IQ2000_OPERAND_BASEOFF, IQ2000_OPERAND_JMPTARG
, IQ2000_OPERAND_MASK, IQ2000_OPERAND_MASKQ10, IQ2000_OPERAND_MASKL, IQ2000_OPERAND_COUNT
- , IQ2000_OPERAND_INDEX, IQ2000_OPERAND_EXECODE, IQ2000_OPERAND_BYTECOUNT, IQ2000_OPERAND_CAM_Y
+ , IQ2000_OPERAND_F_INDEX, IQ2000_OPERAND_EXECODE, IQ2000_OPERAND_BYTECOUNT, IQ2000_OPERAND_CAM_Y
, IQ2000_OPERAND_CAM_Z, IQ2000_OPERAND_CM_3FUNC, IQ2000_OPERAND_CM_4FUNC, IQ2000_OPERAND_CM_3Z
, IQ2000_OPERAND_CM_4Z, IQ2000_OPERAND_BASE, IQ2000_OPERAND_MASKR, IQ2000_OPERAND_BITNUM
, IQ2000_OPERAND_HI16, IQ2000_OPERAND_LO16, IQ2000_OPERAND_MLO16, IQ2000_OPERAND_JMPTARGQ10
@@ -273,7 +273,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_YIELD_INSN, CGEN_INSN_LOAD_DELAY
, CGEN_INSN_EVEN_REG_NUM, CGEN_INSN_UNSUPPORTED, CGEN_INSN_USES_RD, CGEN_INSN_USES_RS
, CGEN_INSN_USES_RT, CGEN_INSN_USES_R31, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31
diff --git a/opcodes/iq2000-dis.c b/opcodes/iq2000-dis.c
index 49e01201dc6..b1bfa0ef4b4 100644
--- a/opcodes/iq2000-dis.c
+++ b/opcodes/iq2000-dis.c
@@ -4,7 +4,8 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
- the resultant file is machine generated, cgen-dis.in isn't
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -31,6 +32,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "dis-asm.h"
#include "bfd.h"
#include "symcat.h"
+#include "libiberty.h"
#include "iq2000-desc.h"
#include "iq2000-opc.h"
#include "opintl.h"
@@ -127,15 +129,15 @@ iq2000_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
case IQ2000_OPERAND_EXECODE :
print_normal (cd, info, fields->f_excode, 0, pc, length);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ print_normal (cd, info, fields->f_index, 0, pc, length);
+ break;
case IQ2000_OPERAND_HI16 :
print_normal (cd, info, fields->f_imm, 0, pc, length);
break;
case IQ2000_OPERAND_IMM :
print_normal (cd, info, fields->f_imm, 0, pc, length);
break;
- case IQ2000_OPERAND_INDEX :
- print_normal (cd, info, fields->f_index, 0, pc, length);
- break;
case IQ2000_OPERAND_JMPTARG :
print_address (cd, info, fields->f_jtarg, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
break;
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
index 5a29228c08b..4917d9fa3d5 100644
--- a/opcodes/iq2000-ibld.c
+++ b/opcodes/iq2000-ibld.c
@@ -35,9 +35,9 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
/* Used by the ifield rtx function. */
@@ -605,15 +605,15 @@ iq2000_cgen_insert_operand (cd, opindex, fields, buffer, pc)
case IQ2000_OPERAND_EXECODE :
errmsg = insert_normal (cd, fields->f_excode, 0, 0, 25, 20, 32, total_length, buffer);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ errmsg = insert_normal (cd, fields->f_index, 0, 0, 8, 9, 32, total_length, buffer);
+ break;
case IQ2000_OPERAND_HI16 :
errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
break;
case IQ2000_OPERAND_IMM :
errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
break;
- case IQ2000_OPERAND_INDEX :
- errmsg = insert_normal (cd, fields->f_index, 0, 0, 8, 9, 32, total_length, buffer);
- break;
case IQ2000_OPERAND_JMPTARG :
{
long value = fields->f_jtarg;
@@ -788,15 +788,15 @@ iq2000_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
case IQ2000_OPERAND_EXECODE :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 20, 32, total_length, pc, & fields->f_excode);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 9, 32, total_length, pc, & fields->f_index);
+ break;
case IQ2000_OPERAND_HI16 :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
break;
case IQ2000_OPERAND_IMM :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
break;
- case IQ2000_OPERAND_INDEX :
- length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 9, 32, total_length, pc, & fields->f_index);
- break;
case IQ2000_OPERAND_JMPTARG :
{
long value;
@@ -961,15 +961,15 @@ iq2000_cgen_get_int_operand (cd, opindex, fields)
case IQ2000_OPERAND_EXECODE :
value = fields->f_excode;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ value = fields->f_index;
+ break;
case IQ2000_OPERAND_HI16 :
value = fields->f_imm;
break;
case IQ2000_OPERAND_IMM :
value = fields->f_imm;
break;
- case IQ2000_OPERAND_INDEX :
- value = fields->f_index;
- break;
case IQ2000_OPERAND_JMPTARG :
value = fields->f_jtarg;
break;
@@ -1075,15 +1075,15 @@ iq2000_cgen_get_vma_operand (cd, opindex, fields)
case IQ2000_OPERAND_EXECODE :
value = fields->f_excode;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ value = fields->f_index;
+ break;
case IQ2000_OPERAND_HI16 :
value = fields->f_imm;
break;
case IQ2000_OPERAND_IMM :
value = fields->f_imm;
break;
- case IQ2000_OPERAND_INDEX :
- value = fields->f_index;
- break;
case IQ2000_OPERAND_JMPTARG :
value = fields->f_jtarg;
break;
@@ -1198,15 +1198,15 @@ iq2000_cgen_set_int_operand (cd, opindex, fields, value)
case IQ2000_OPERAND_EXECODE :
fields->f_excode = value;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ fields->f_index = value;
+ break;
case IQ2000_OPERAND_HI16 :
fields->f_imm = value;
break;
case IQ2000_OPERAND_IMM :
fields->f_imm = value;
break;
- case IQ2000_OPERAND_INDEX :
- fields->f_index = value;
- break;
case IQ2000_OPERAND_JMPTARG :
fields->f_jtarg = value;
break;
@@ -1309,15 +1309,15 @@ iq2000_cgen_set_vma_operand (cd, opindex, fields, value)
case IQ2000_OPERAND_EXECODE :
fields->f_excode = value;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ fields->f_index = value;
+ break;
case IQ2000_OPERAND_HI16 :
fields->f_imm = value;
break;
case IQ2000_OPERAND_IMM :
fields->f_imm = value;
break;
- case IQ2000_OPERAND_INDEX :
- fields->f_index = value;
- break;
case IQ2000_OPERAND_JMPTARG :
fields->f_jtarg = value;
break;
diff --git a/opcodes/iq2000-opc.c b/opcodes/iq2000-opc.c
index fe8cf641502..35ffdf0a213 100644
--- a/opcodes/iq2000-opc.c
+++ b/opcodes/iq2000-opc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -166,7 +166,7 @@ static const CGEN_IFMT ifmt_lulck = {
};
static const CGEN_IFMT ifmt_pkrlr1 = {
- 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_COUNT) }, { F (F_INDEX) }, { 0 } }
+ 23, 23, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_COUNT) }, { 0 } }
};
static const CGEN_IFMT ifmt_rfe = {
@@ -1070,16 +1070,16 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200007 }
},
-/* pkrlr1 $rt,$index,$count */
+/* pkrlr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4fa00000 }
},
-/* pkrlr30 $rt,$index,$count */
+/* pkrlr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4fe00000 }
},
/* rb $rd,$rt */
@@ -1088,16 +1088,16 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200004 }
},
-/* rbr1 $rt,$index,$count */
+/* rbr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4f000000 }
},
-/* rbr30 $rt,$index,$count */
+/* rbr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4f400000 }
},
/* rfe */
@@ -1112,16 +1112,16 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200006 }
},
-/* rxr1 $rt,$index,$count */
+/* rxr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4f800000 }
},
-/* rxr30 $rt,$index,$count */
+/* rxr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4fc00000 }
},
/* sleep */
@@ -1190,28 +1190,28 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200001 }
},
-/* wbr1 $rt,$index,$count */
+/* wbr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e000000 }
},
-/* wbr1u $rt,$index,$count */
+/* wbr1u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e200000 }
},
-/* wbr30 $rt,$index,$count */
+/* wbr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e400000 }
},
-/* wbr30u $rt,$index,$count */
+/* wbr30u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e600000 }
},
/* wx $rd,$rt */
@@ -1226,28 +1226,28 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200003 }
},
-/* wxr1 $rt,$index,$count */
+/* wxr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e800000 }
},
-/* wxr1u $rt,$index,$count */
+/* wxr1u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4ea00000 }
},
-/* wxr30 $rt,$index,$count */
+/* wxr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4ec00000 }
},
-/* wxr30u $rt,$index,$count */
+/* wxr30u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4ee00000 }
},
/* ldw $rt,$lo16($base) */
diff --git a/opcodes/iq2000-opc.h b/opcodes/iq2000-opc.h
index 4dca525ffe1..1242cea67a0 100644
--- a/opcodes/iq2000-opc.h
+++ b/opcodes/iq2000-opc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
diff --git a/opcodes/m32r-asm.c b/opcodes/m32r-asm.c
index 4abe187b81f..2bd751af6db 100644
--- a/opcodes/m32r-asm.c
+++ b/opcodes/m32r-asm.c
@@ -659,10 +659,10 @@ m32r_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! m32r_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/m32r-desc.c b/opcodes/m32r-desc.c
index 30a071985bd..023ab62bb9e 100644
--- a/opcodes/m32r-desc.c
+++ b/opcodes/m32r-desc.c
@@ -118,7 +118,7 @@ const CGEN_ATTR_TABLE m32r_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "FILL-SLOT", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/m32r-desc.h b/opcodes/m32r-desc.h
index 85e22ee4dcd..8781772f266 100644
--- a/opcodes/m32r-desc.h
+++ b/opcodes/m32r-desc.h
@@ -204,7 +204,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_FILL_SLOT, CGEN_INSN_SPECIAL
, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_PIPE
, CGEN_INSN_END_NBOOLS
diff --git a/opcodes/m32r-opc.c b/opcodes/m32r-opc.c
index b60c1bf36e0..8143b618520 100644
--- a/opcodes/m32r-opc.c
+++ b/opcodes/m32r-opc.c
@@ -1187,7 +1187,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bc $disp24 */
{
-1, "bc24r", "bc", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bl $disp8 */
{
@@ -1197,7 +1197,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bl $disp24 */
{
-1, "bl24r", "bl", 32,
- { 0|A(RELAX)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bcl $disp8 */
{
@@ -1207,7 +1207,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bcl $disp24 */
{
-1, "bcl24r", "bcl", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
},
/* bnc $disp8 */
{
@@ -1217,7 +1217,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bnc $disp24 */
{
-1, "bnc24r", "bnc", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bra $disp8 */
{
@@ -1227,7 +1227,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bra $disp24 */
{
-1, "bra24r", "bra", 32,
- { 0|A(RELAX)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bncl $disp8 */
{
@@ -1237,7 +1237,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bncl $disp24 */
{
-1, "bncl24r", "bncl", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
},
/* ld $dr,@($sr) */
{
diff --git a/opcodes/openrisc-asm.c b/opcodes/openrisc-asm.c
index d47659b8c8f..26b2625957f 100644
--- a/opcodes/openrisc-asm.c
+++ b/opcodes/openrisc-asm.c
@@ -578,10 +578,10 @@ openrisc_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! openrisc_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/openrisc-desc.c b/opcodes/openrisc-desc.c
index 6de9107f77b..989b1958648 100644
--- a/opcodes/openrisc-desc.c
+++ b/opcodes/openrisc-desc.c
@@ -112,7 +112,7 @@ const CGEN_ATTR_TABLE openrisc_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "NOT-IN-DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/openrisc-desc.h b/opcodes/openrisc-desc.h
index d1edee2f51c..0c7df17b886 100644
--- a/opcodes/openrisc-desc.h
+++ b/opcodes/openrisc-desc.h
@@ -223,7 +223,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_NOT_IN_DELAY_SLOT, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/po/Make-in b/opcodes/po/Make-in
index 0552db1feef..6176dbf78c3 100644
--- a/opcodes/po/Make-in
+++ b/opcodes/po/Make-in
@@ -24,6 +24,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+DESTDIR =
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -111,9 +113,9 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -123,7 +125,7 @@ install-data-yes: all
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -153,12 +155,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -171,12 +173,12 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 9a14a1daeb9..df9060ef8a5 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -137,6 +137,7 @@ xstormy16-dis.c
xstormy16-ibld.c
xstormy16-opc.c
xstormy16-opc.h
+xtensa-dis.c
z8k-dis.c
z8k-opc.h
z8kgen.c
diff --git a/opcodes/po/opcodes.pot b/opcodes/po/opcodes.pot
index fbc549dbda2..ee61ca633f8 100644
--- a/opcodes/po/opcodes.pot
+++ b/opcodes/po/opcodes.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-02-08 03:24-0200\n"
+"POT-Creation-Date: 2003-06-05 11:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -26,47 +26,47 @@ msgstr ""
msgid "Illegal limm reference in last instruction!\n"
msgstr ""
-#: arm-dis.c:502
+#: arm-dis.c:554
msgid "<illegal precision>"
msgstr ""
-#: arm-dis.c:1012
+#: arm-dis.c:1162
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr ""
-#: arm-dis.c:1019
+#: arm-dis.c:1169
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr ""
-#: arm-dis.c:1191
+#: arm-dis.c:1343
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
"the -M switch:\n"
msgstr ""
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
msgid "undefined"
msgstr ""
-#: avr-dis.c:180
+#: avr-dis.c:179
msgid "Internal disassembler error"
msgstr ""
-#: avr-dis.c:228
+#: avr-dis.c:227
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
-#: xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr ""
-#: cgen-asm.c:367
+#: cgen-asm.c:369
#, c-format
msgid "operand out of range (%lu not between %lu and %lu)"
msgstr ""
@@ -87,112 +87,134 @@ msgstr ""
msgid "Address 0x%x is out of bounds.\n"
msgstr ""
-#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:244 xstormy16-asm.c:284
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr ""
-#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:294 xstormy16-asm.c:334
msgid "missing mnemonic in syntax string"
msgstr ""
#. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511
-#: m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430
-#: openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623
-#: xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508
-#: xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
msgid "unrecognized instruction"
msgstr ""
-#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:477 xstormy16-asm.c:517
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr ""
-#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:487 xstormy16-asm.c:527
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr ""
-#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:515 xstormy16-asm.c:555
msgid "junk at end of line"
msgstr ""
-#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:662
msgid "unrecognized form of instruction"
msgstr ""
-#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:674
#, c-format
msgid "bad instruction `%.50s...'"
msgstr ""
-#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:677
#, c-format
msgid "bad instruction `%.50s'"
msgstr ""
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
msgid "*unknown*"
msgstr ""
-#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr ""
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr ""
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr ""
-#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr ""
-#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr ""
-#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr ""
-#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr ""
-#: h8300-dis.c:384
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr ""
+
+#: h8300-dis.c:377
#, c-format
-msgid "Hmmmm %x"
+msgid "Hmmmm 0x%x"
msgstr ""
-#: h8300-dis.c:395
+#: h8300-dis.c:760
#, c-format
-msgid "Don't understand %x \n"
+msgid "Don't understand 0x%x \n"
msgstr ""
#: h8500-dis.c:143
@@ -206,10 +228,185 @@ msgstr ""
msgid "%02x\t\t*unknown*"
msgstr ""
-#: i386-dis.c:1649
+#: i386-dis.c:1650
msgid "<internal disassembler error>"
msgstr ""
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr ""
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr ""
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr ""
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr ""
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr ""
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr ""
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr ""
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr ""
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr ""
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr ""
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr ""
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr ""
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr ""
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr ""
+
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr ""
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr ""
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr ""
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr ""
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr ""
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr ""
+
+#. We've been passed a w. Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr ""
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr ""
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr ""
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr ""
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr ""
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr ""
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr ""
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr ""
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr ""
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr ""
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr ""
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr ""
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr ""
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr ""
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+msgid "missing `)'"
+msgstr ""
+
#: m10200-dis.c:199
#, c-format
msgid "unknown\t0x%02x"
@@ -235,21 +432,99 @@ msgstr ""
msgid "<function code %d>"
msgstr ""
-#: m88k-dis.c:255
+#: m88k-dis.c:746
#, c-format
msgid "# <dis error: %08x>"
msgstr ""
-#: mips-dis.c:290
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr ""
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr ""
+
+#: mips-dis.c:1000
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr ""
-#: mips-dis.c:1154
+#: mips-dis.c:1751
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr ""
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+" gpr-names=ABI Print GPR names according to specified ABI.\n"
+" Default: based on binary being disassembled.\n"
+msgstr ""
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+" fpr-names=ABI Print FPR names according to specified ABI.\n"
+" Default: numeric.\n"
+msgstr ""
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+" cp0-names=ARCH Print CP0 register names according to\n"
+" specified architecture.\n"
+" Default: based on binary being disassembled.\n"
+msgstr ""
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+" hwr-names=ARCH Print HWR names according to specified \n"
+"\t\t\t architecture.\n"
+" Default: based on binary being disassembled.\n"
+msgstr ""
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+" reg-names=ABI Print GPR and FPR names according to\n"
+" specified ABI.\n"
+msgstr ""
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+" reg-names=ARCH Print CP0 register and HWR names according to\n"
+" specified architecture.\n"
+msgstr ""
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+" For the options above, the following values are supported for \"ABI\":\n"
+" "
+msgstr ""
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr ""
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+" For the options above, The following values are supported for \"ARCH\":\n"
+" "
+msgstr ""
+
#: mmix-dis.c:34
#, c-format
msgid "Bad case %d (%s) in %s:%d\n"
@@ -264,7 +539,7 @@ msgstr ""
msgid "(unknown)"
msgstr ""
-#: mmix-dis.c:517
+#: mmix-dis.c:519
#, c-format
msgid "*unknown operands type: %d*"
msgstr ""
@@ -275,76 +550,96 @@ msgstr ""
#. * aoffsetp by since whatever generated this is broken
#. * anyway!
#.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
msgid "$<undefined>"
msgstr ""
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:818 ppc-opc.c:851
msgid "invalid conditional option"
msgstr ""
-#: ppc-opc.c:800
+#: ppc-opc.c:853
msgid "attempt to set y bit when using + or - modifier"
msgstr ""
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:881
+msgid "offset not a multiple of 2"
+msgstr ""
+
+#: ppc-opc.c:883
+msgid "offset greater than 62"
+msgstr ""
+
+#: ppc-opc.c:904 ppc-opc.c:954 ppc-opc.c:1006
msgid "offset not a multiple of 4"
msgstr ""
-#: ppc-opc.c:857
+#: ppc-opc.c:906
+msgid "offset greater than 124"
+msgstr ""
+
+#: ppc-opc.c:927
+msgid "offset not a multiple of 8"
+msgstr ""
+
+#: ppc-opc.c:929
+msgid "offset greater than 248"
+msgstr ""
+
+#: ppc-opc.c:979
msgid "offset not between -2048 and 2047"
msgstr ""
-#: ppc-opc.c:882
+#: ppc-opc.c:1004
msgid "offset not between -8192 and 8191"
msgstr ""
-#: ppc-opc.c:910
+#: ppc-opc.c:1032
msgid "ignoring least significant bits in branch offset"
msgstr ""
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:1066 ppc-opc.c:1103
msgid "illegal bitmask"
msgstr ""
-#: ppc-opc.c:1054
+#: ppc-opc.c:1176
msgid "value out of range"
msgstr ""
-#: ppc-opc.c:1130
+#: ppc-opc.c:1252
msgid "index register in load range"
msgstr ""
-#: ppc-opc.c:1146
+#: ppc-opc.c:1268
msgid "invalid register operand when updating"
msgstr ""
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
msgid "unknown"
msgstr ""
-#: sparc-dis.c:825
+#: sparc-dis.c:835
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:836
+#: sparc-dis.c:846
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:885
+#: sparc-dis.c:895
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr ""
-#: v850-dis.c:224
+#: v850-dis.c:221
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: v850-dis.c:236
+#: v850-dis.c:233
#, c-format
msgid "unknown pop reg: %d\n"
msgstr ""
@@ -398,30 +693,42 @@ msgstr ""
msgid "immediate value must be even"
msgstr ""
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
msgid "Bad register in preincrement"
msgstr ""
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
msgid "Bad register in postincrement"
msgstr ""
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
msgid "Bad register name"
msgstr ""
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
msgid "Label conflicts with register name"
msgstr ""
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
msgid "Label conflicts with `Rx'"
msgstr ""
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
msgid "Bad immediate expression"
msgstr ""
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr ""
+
+#: xstormy16-asm.c:125
msgid "Small operand was not an immediate number"
msgstr ""
+
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr ""
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr ""
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 27eb23e22d8..a6e93131ebf 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -68,6 +68,10 @@ static unsigned long insert_boe
PARAMS ((unsigned long, long, int, const char **));
static long extract_boe
PARAMS ((unsigned long, int, int *));
+static unsigned long insert_dq
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_dq
+ PARAMS ((unsigned long, int, int *));
static unsigned long insert_ds
PARAMS ((unsigned long, long, int, const char **));
static long extract_ds
@@ -104,12 +108,18 @@ static unsigned long insert_ral
PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_ram
PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_raq
+ PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_ras
PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_rbs
PARAMS ((unsigned long, long, int, const char **));
static long extract_rbs
PARAMS ((unsigned long, int, int *));
+static unsigned long insert_rsq
+ PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_rtq
+ PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_sh6
PARAMS ((unsigned long, long, int, const char **));
static long extract_sh6
@@ -279,9 +289,15 @@ const struct powerpc_operand powerpc_operands[] =
#define DES DE + 1
{ 14, 0, insert_des, extract_des, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+ /* The DQ field in a DQ form instruction. This is like D, but the
+ lower four bits are forced to zero. */
+#define DQ DES + 1
+ { 16, 0, insert_dq, extract_dq,
+ PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DQ },
+
/* The DS field in a DS form instruction. This is like D, but the
lower two bits are forced to zero. */
-#define DS DES + 1
+#define DS DQ + 1
{ 16, 0, insert_ds, extract_ds,
PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DS },
@@ -389,15 +405,20 @@ const struct powerpc_operand powerpc_operands[] =
{ 16, 0, insert_nsi, extract_nsi,
PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
- /* The RA field in an D, DS, X, XO, M, or MDS form instruction. */
+ /* The RA field in an D, DS, DQ, X, XO, M, or MDS form instruction. */
#define RA NSI + 1
#define RA_MASK (0x1f << 16)
{ 5, 16, 0, 0, PPC_OPERAND_GPR },
+ /* The RA field in the DQ form lq instruction, which has special
+ value restrictions. */
+#define RAQ RA + 1
+ { 5, 16, insert_raq, 0, PPC_OPERAND_GPR },
+
/* The RA field in a D or X form instruction which is an updating
load, which means that the RA field may not be zero and may not
equal the RT field. */
-#define RAL RA + 1
+#define RAL RAQ + 1
{ 5, 16, insert_ral, 0, PPC_OPERAND_GPR },
/* The RA field in an lmw instruction, which has special value
@@ -430,8 +451,18 @@ const struct powerpc_operand powerpc_operands[] =
#define RT_MASK (0x1f << 21)
{ 5, 21, 0, 0, PPC_OPERAND_GPR },
+ /* The RS field of the DS form stq instruction, which has special
+ value restrictions. */
+#define RSQ RS + 1
+ { 5, 21, insert_rsq, 0, PPC_OPERAND_GPR },
+
+ /* The RT field of the DQ form lq instruction, which has special
+ value restrictions. */
+#define RTQ RSQ + 1
+ { 5, 21, insert_rtq, 0, PPC_OPERAND_GPR },
+
/* The SH field in an X or M form instruction. */
-#define SH RS + 1
+#define SH RTQ + 1
#define SH_MASK (0x1f << 11)
{ 5, 11, 0, 0, 0 },
@@ -870,6 +901,32 @@ extract_boe (insn, dialect, invalid)
return value & 0x1e;
}
+ /* The DQ field in a DQ form instruction. This is like D, but the
+ lower four bits are forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_dq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char ** errmsg ATTRIBUTE_UNUSED;
+{
+ if ((value & 0xf) != 0 && errmsg != NULL)
+ *errmsg = _("offset not a multiple of 16");
+ return insn | (value & 0xfff0);
+}
+
+/*ARGSUSED*/
+static long
+extract_dq (insn, dialect, invalid)
+ unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return ((insn & 0xfff0) ^ 0x8000) - 0x8000;
+}
+
static unsigned long
insert_ev2 (insn, value, dialect, errmsg)
unsigned long insn;
@@ -1253,6 +1310,24 @@ insert_ram (insn, value, dialect, errmsg)
return insn | ((value & 0x1f) << 16);
}
+ /* The RA field in the DQ form lq instruction, which has special
+ value restrictions. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_raq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ long rtvalue = (insn & RT_MASK) >> 21;
+
+ if (value == rtvalue && errmsg != NULL)
+ *errmsg = _("source and target register operands must be different");
+ return insn | ((value & 0x1f) << 16);
+}
+
/* The RA field in a D or X form instruction which is an updating
store or an updating floating point load, which means that the RA
field may not be zero. */
@@ -1298,6 +1373,38 @@ extract_rbs (insn, dialect, invalid)
return 0;
}
+ /* The RT field of the DQ form lq instruction, which has special
+ value restrictions. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_rtq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ if ((value & 1) != 0 && errmsg != NULL)
+ *errmsg = _("target register operand must be even");
+ return insn | ((value & 0x1f) << 21);
+}
+
+ /* The RS field of the DS form stq instruction, which has special
+ value restrictions. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_rsq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value ATTRIBUTE_UNUSED;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ if ((value & 1) != 0 && errmsg != NULL)
+ *errmsg = _("source register operand must be even");
+ return insn | ((value & 0x1f) << 21);
+}
+
/* The SH field in an MD form instruction. This is split. */
/*ARGSUSED*/
@@ -1768,6 +1875,7 @@ extract_tbr (insn, dialect, invalid)
sorted by major opcode. */
const struct powerpc_opcode powerpc_opcodes[] = {
+{ "attn", X(0,256), X_MASK, POWER4, { 0 } },
{ "tdlgti", OPTO(2,TOLGT), OPTO_MASK, PPC64, { RA, SI } },
{ "tdllti", OPTO(2,TOLLT), OPTO_MASK, PPC64, { RA, SI } },
{ "tdeqi", OPTO(2,TOEQ), OPTO_MASK, PPC64, { RA, SI } },
@@ -4335,6 +4443,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stfdu", OP(55), OP_MASK, COM, { FRS, D, RAS } },
+{ "lq", OP(56), OP_MASK, POWER4, { RTQ, DQ, RAQ } },
+
{ "lfq", OP(56), OP_MASK, POWER2, { FRT, D, RA } },
{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA } },
@@ -4411,6 +4521,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stdu", DSO(62,1), DS_MASK, PPC64, { RS, DS, RAS } },
+{ "stq", DSO(62,2), DS_MASK, POWER4, { RSQ, DS, RA } },
+
{ "fcmpu", X(63,0), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
{ "frsp", XRC(63,12,0), XRA_MASK, COM, { FRT, FRB } },
diff --git a/opcodes/xstormy16-asm.c b/opcodes/xstormy16-asm.c
index 324c091893e..810938c4a93 100644
--- a/opcodes/xstormy16-asm.c
+++ b/opcodes/xstormy16-asm.c
@@ -618,10 +618,10 @@ xstormy16_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! xstormy16_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/xstormy16-desc.c b/opcodes/xstormy16-desc.c
index 9c9f30bc582..1c94fd7d853 100644
--- a/opcodes/xstormy16-desc.c
+++ b/opcodes/xstormy16-desc.c
@@ -104,7 +104,7 @@ const CGEN_ATTR_TABLE xstormy16_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ 0, 0, 0 }
diff --git a/opcodes/xstormy16-desc.h b/opcodes/xstormy16-desc.h
index a880321f759..e6135058083 100644
--- a/opcodes/xstormy16-desc.h
+++ b/opcodes/xstormy16-desc.h
@@ -261,7 +261,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31
, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index fb3e1b786ea..71c3c38545f 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * common/run.c (main): Remove SIM_H8300 ifdef.
+ (usage): Ditto.
+ * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX.
+ (standard_options): Add '-x' for h8/300sx.
+ (standard_option_handler): Add case for SIM_H8300SX.
+
2003-04-13 Michael Snyder <msnyder@redhat.com>
* Make-common.in (sim-events.o, sim-config.o): Depend on sim-main.h.
diff --git a/sim/common/run.c b/sim/common/run.c
index 4131dd79bbb..79642007618 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -119,11 +119,7 @@ main (ac, av)
/* FIXME: This is currently being rewritten to have each simulator
do all argv processing. */
-#ifdef SIM_H8300 /* FIXME: quick hack */
- while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF)
-#else
while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF)
-#endif
switch (i)
{
case 'a':
@@ -176,14 +172,6 @@ main (ac, av)
/* sim_set_verbose (1); */
break;
/* FIXME: Quick hack, to be replaced by more general facility. */
-#ifdef SIM_H8300
- case 'h':
- set_h8300h (1, 0);
- break;
- case 'S':
- set_h8300h (1, 1);
- break;
-#endif
default:
usage ();
}
@@ -288,11 +276,6 @@ main (ac, av)
the signal that the simulator received; we want to return that to
indicate failure. */
-#ifdef SIM_H8300 /* FIXME: Ugh. grep for SLEEP in compile.c */
- if (sigrc == SIGILL)
- abort ();
- sigrc = 0;
-#else
/* Why did we stop? */
switch (reason)
{
@@ -311,7 +294,6 @@ main (ac, av)
break;
}
-#endif
return sigrc;
}
@@ -325,10 +307,6 @@ usage ()
#ifdef SIM_HAVE_SIMCACHE
fprintf (stderr, "-c size Set simulator cache size to `size'.\n");
#endif
-#ifdef SIM_H8300
- fprintf (stderr, "-h Executable is for H8/300H.\n");
- fprintf (stderr, "-S Executable is for H8S.\n");
-#endif
fprintf (stderr, "-m size Set memory size of simulator, in bytes.\n");
#ifdef SIM_HAVE_ENVIRONMENT
fprintf (stderr, "-o Select operating (kernel) environment.\n");
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index aae0245613e..8c16d56cc75 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -109,8 +109,9 @@ typedef enum {
#endif
OPTION_HELP,
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
- OPTION_H8300,
+ OPTION_H8300H,
OPTION_H8300S,
+ OPTION_H8300SX,
#endif
OPTION_LOAD_LMA,
OPTION_LOAD_VMA,
@@ -152,12 +153,15 @@ static const OPTION standard_options[] =
standard_option_handler },
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
- { {"h8300h", no_argument, NULL, OPTION_H8300},
+ { {"h8300h", no_argument, NULL, OPTION_H8300H},
'h', NULL, "Indicate the CPU is h8/300h",
standard_option_handler },
{ {"h8300s", no_argument, NULL, OPTION_H8300S},
'S', NULL, "Indicate the CPU is h8/300s",
standard_option_handler },
+ { {"h8300sx", no_argument, NULL, OPTION_H8300SX},
+ 'x', NULL, "Indicate the CPU is h8/300sx",
+ standard_option_handler },
#endif
#ifdef SIM_HAVE_FLATMEM
@@ -357,11 +361,14 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
break;
#ifdef SIM_H8300 /* FIXME: Can be moved to h8300 dir. */
- case OPTION_H8300:
- set_h8300h (1,0);
+ case OPTION_H8300H:
+ set_h8300h (bfd_mach_h8300h);
break;
case OPTION_H8300S:
- set_h8300h (1,1);
+ set_h8300h (bfd_mach_h8300s);
+ break;
+ case OPTION_H8300SX:
+ set_h8300h (bfd_mach_h8300sx);
break;
#endif
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 600e9cc08a9..e35d2b7eb7c 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,17 @@
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c (sim_info): Fix typo in output.
+
+ * h8300/compile.c (set_h8300h): Replace 'flag' arguments
+ with a bfd_machine argument, and decode it inline.
+ Check for bfd_mach_h8300hn and bfd_mach_h8300sn.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c: Add h8300sx insns and addressing modes.
+ * sim-main.h: Replaces h8300/inst.h.
+ * Makefile.in: Tweak to bring in some sim/common stuff.
+
2003-04-13 Michael Snyder <msnyder@redhat.com>
* compile.c (sim_resume): Implement 'daa' and 'das' instructions.
diff --git a/sim/h8300/Makefile.in b/sim/h8300/Makefile.in
index 55dc3db7310..1d1f9d3db76 100644
--- a/sim/h8300/Makefile.in
+++ b/sim/h8300/Makefile.in
@@ -18,10 +18,20 @@
## COMMON_PRE_CONFIG_FRAG
-SIM_OBJS = compile.o sim-load.o
+# List of main object files for `run'.
+SIM_RUN_OBJS = nrun.o
+
+SIM_OBJS = compile.o \
+ $(SIM_NEW_COMMON_OBJS) \
+ sim-cpu.o \
+ sim-engine.o \
+ sim-load.o \
+ $(SIM_EXTRA_OBJS)
+
## COMMON_POST_CONFIG_FRAG
compile.o: compile.c inst.h config.h \
- $(srcdir)/../../include/gdb/sim-h8300.h \
- $(srcdir)/../../include/gdb/remote-sim.h \
- $(srcdir)/../../include/gdb/callback.h
+ $(srcdir)/../../include/gdb/sim-h8300.h \
+ $(srcdir)/../../include/opcode/h8300.h \
+ $(srcdir)/../../include/gdb/remote-sim.h \
+ $(srcdir)/../../include/gdb/callback.h
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 0e4b6d2b291..c71658e5c8b 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -17,9 +17,6 @@
* AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include "config.h"
-
-#include <stdio.h>
#include <signal.h>
#ifdef HAVE_TIME_H
#include <time.h>
@@ -30,10 +27,9 @@
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#include "ansidecl.h"
+
#include "bfd.h"
-#include "gdb/callback.h"
-#include "gdb/remote-sim.h"
+#include "sim-main.h"
#include "gdb/sim-h8300.h"
#include "sys/stat.h"
#include "sys/types.h"
@@ -53,61 +49,440 @@ static char *myname;
This header should also include the things in remote-sim.h.
One could move this to remote-sim.h but this function isn't needed
by gdb. */
-void sim_set_simcache_size PARAMS ((int));
+static void set_simcache_size (SIM_DESC, int);
-#define X(op, size) op * 4 + size
+#define X(op, size) (op * 4 + size)
#define SP (h8300hmode ? SL : SW)
-#define SB 0
-#define SW 1
-#define SL 2
-#define OP_REG 1
-#define OP_DEC 2
-#define OP_DISP 3
-#define OP_INC 4
-#define OP_PCREL 5
-#define OP_MEM 6
-#define OP_CCR 7
-#define OP_IMM 8
-#define OP_ABS 10
-#define OP_EXR 11
+
#define h8_opcodes ops
#define DEFINE_TABLE
#include "opcode/h8300.h"
-#include "inst.h"
+/* CPU data object: */
+
+static int
+sim_state_initialize (SIM_DESC sd, sim_cpu *cpu)
+{
+ /* FIXME: not really necessary, since sim_cpu_alloc calls zalloc. */
+
+ memset (&cpu->regs, 0, sizeof(cpu->regs));
+ cpu->regs[SBR_REGNUM] = 0xFFFFFF00;
+ cpu->pc = 0;
+ cpu->delayed_branch = 0;
+ cpu->memory = NULL;
+ cpu->eightbit = NULL;
+ cpu->mask = 0;
+
+ /* Initialize local simulator state. */
+ sd->sim_cache = NULL;
+ sd->sim_cache_size = 0;
+ sd->cache_idx = NULL;
+ sd->cache_top = 0;
+ sd->memory_size = 0;
+ sd->compiles = 0;
+#ifdef ADEBUG
+ memset (&cpu->stats, 0, sizeof (cpu->stats));
+#endif
+ return 0;
+}
+
+static unsigned int
+h8_get_pc (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> pc;
+}
+
+static void
+h8_set_pc (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> pc = val;
+}
+
+static unsigned int
+h8_get_ccr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[CCR_REGNUM];
+}
+
+static void
+h8_set_ccr (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[CCR_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_exr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[EXR_REGNUM];
+}
+
+static void
+h8_set_exr (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[EXR_REGNUM] = val;
+}
+
+static int
+h8_get_sbr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[SBR_REGNUM];
+}
+
+static void
+h8_set_sbr (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[SBR_REGNUM] = val;
+}
+
+static int
+h8_get_vbr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[VBR_REGNUM];
+}
+
+static void
+h8_set_vbr (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[VBR_REGNUM] = val;
+}
+
+static int
+h8_get_cache_top (SIM_DESC sd)
+{
+ return sd -> cache_top;
+}
+
+static void
+h8_set_cache_top (SIM_DESC sd, int val)
+{
+ sd -> cache_top = val;
+}
+
+static int
+h8_get_mask (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> mask;
+}
+
+static void
+h8_set_mask (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> mask = val;
+}
+#if 0
+static int
+h8_get_exception (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> exception;
+}
+
+static void
+h8_set_exception (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> exception = val;
+}
+
+static enum h8300_sim_state
+h8_get_state (SIM_DESC sd)
+{
+ return sd -> state;
+}
+
+static void
+h8_set_state (SIM_DESC sd, enum h8300_sim_state val)
+{
+ sd -> state = val;
+}
+#endif
+static unsigned int
+h8_get_cycles (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[CYCLE_REGNUM];
+}
+
+static void
+h8_set_cycles (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[CYCLE_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_insts (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[INST_REGNUM];
+}
+
+static void
+h8_set_insts (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[INST_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_ticks (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[TICK_REGNUM];
+}
+
+static void
+h8_set_ticks (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[TICK_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_mach (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[MACH_REGNUM];
+}
+
+static void
+h8_set_mach (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[MACH_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_macl (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[MACL_REGNUM];
+}
+
+static void
+h8_set_macl (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[MACL_REGNUM] = val;
+}
+
+static int
+h8_get_compiles (SIM_DESC sd)
+{
+ return sd -> compiles;
+}
+
+static void
+h8_increment_compiles (SIM_DESC sd)
+{
+ sd -> compiles ++;
+}
+
+static unsigned int *
+h8_get_reg_buf (SIM_DESC sd)
+{
+ return &(((STATE_CPU (sd, 0)) -> regs)[0]);
+}
+
+static unsigned int
+h8_get_reg (SIM_DESC sd, int regnum)
+{
+ return (STATE_CPU (sd, 0)) -> regs[regnum];
+}
+
+static void
+h8_set_reg (SIM_DESC sd, int regnum, int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[regnum] = val;
+}
+
+#ifdef ADEBUG
+static int
+h8_get_stats (SIM_DESC sd, int idx)
+{
+ return sd -> stats[idx];
+}
+
+static void
+h8_increment_stats (SIM_DESC sd, int idx)
+{
+ sd -> stats[idx] ++;
+}
+#endif /* ADEBUG */
+
+static unsigned short *
+h8_get_cache_idx_buf (SIM_DESC sd)
+{
+ return sd -> cache_idx;
+}
+
+static void
+h8_set_cache_idx_buf (SIM_DESC sd, unsigned short *ptr)
+{
+ sd -> cache_idx = ptr;
+}
+
+static unsigned short
+h8_get_cache_idx (SIM_DESC sd, unsigned int idx)
+{
+ if (idx > sd->memory_size)
+ return (unsigned short) -1;
+ return sd -> cache_idx[idx];
+}
+
+static void
+h8_set_cache_idx (SIM_DESC sd, int idx, unsigned int val)
+{
+ sd -> cache_idx[idx] = (unsigned short) val;
+}
+
+static unsigned char *
+h8_get_memory_buf (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> memory;
+}
+
+static void
+h8_set_memory_buf (SIM_DESC sd, unsigned char *ptr)
+{
+ (STATE_CPU (sd, 0)) -> memory = ptr;
+}
+
+static unsigned char
+h8_get_memory (SIM_DESC sd, int idx)
+{
+ return (STATE_CPU (sd, 0)) -> memory[idx];
+}
+
+static void
+h8_set_memory (SIM_DESC sd, int idx, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> memory[idx] = (unsigned char) val;
+}
+
+static unsigned char *
+h8_get_eightbit_buf (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> eightbit;
+}
+
+static void
+h8_set_eightbit_buf (SIM_DESC sd, unsigned char *ptr)
+{
+ (STATE_CPU (sd, 0)) -> eightbit = ptr;
+}
+
+static unsigned char
+h8_get_eightbit (SIM_DESC sd, int idx)
+{
+ return (STATE_CPU (sd, 0)) -> eightbit[idx];
+}
+
+static void
+h8_set_eightbit (SIM_DESC sd, int idx, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> eightbit[idx] = (unsigned char) val;
+}
+
+static unsigned int
+h8_get_delayed_branch (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> delayed_branch;
+}
+
+static void
+h8_set_delayed_branch (SIM_DESC sd, unsigned int dest)
+{
+ (STATE_CPU (sd, 0)) -> delayed_branch = dest;
+}
+
+static char **
+h8_get_command_line (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> command_line;
+}
+
+static void
+h8_set_command_line (SIM_DESC sd, char ** val)
+{
+ (STATE_CPU (sd, 0)) -> command_line = val;
+}
+
+static char *
+h8_get_cmdline_arg (SIM_DESC sd, int index)
+{
+ return (STATE_CPU (sd, 0)) -> command_line[index];
+}
+
+static void
+h8_set_cmdline_arg (SIM_DESC sd, int index, char * val)
+{
+ (STATE_CPU (sd, 0)) -> command_line[index] = val;
+}
+
+/* MAC Saturation Mode */
+static int
+h8_get_macS (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macS;
+}
+
+static void
+h8_set_macS (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macS = (val != 0);
+}
+
+/* MAC Zero Flag */
+static int
+h8_get_macZ (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macZ;
+}
+
+static void
+h8_set_macZ (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macZ = (val != 0);
+}
+
+/* MAC Negative Flag */
+static int
+h8_get_macN (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macN;
+}
+
+static void
+h8_set_macN (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macN = (val != 0);
+}
+
+/* MAC Overflow Flag */
+static int
+h8_get_macV (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macV;
+}
+
+static void
+h8_set_macV (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macV = (val != 0);
+}
+
+/* End CPU data object. */
/* The rate at which to call the host's poll_quit callback. */
-#define POLL_QUIT_INTERVAL 0x80000
+enum { POLL_QUIT_INTERVAL = 0x80000 };
#define LOW_BYTE(x) ((x) & 0xff)
#define HIGH_BYTE(x) (((x) >> 8) & 0xff)
-#define P(X,Y) ((X << 8) | Y)
-
-#define BUILDSR() \
- cpu.ccr = ((I << 7) | (UI << 6) | (H << 5) | (U << 4) \
- | (N << 3) | (Z << 2) | (V << 1) | C);
-
-#define BUILDEXR() \
- if (h8300smode) cpu.exr = (trace<<7) | intMask;
-
-#define GETSR() \
- c = (cpu.ccr >> 0) & 1;\
- v = (cpu.ccr >> 1) & 1;\
- nz = !((cpu.ccr >> 2) & 1);\
- n = (cpu.ccr >> 3) & 1;\
- u = (cpu.ccr >> 4) & 1;\
- h = (cpu.ccr >> 5) & 1;\
- ui = ((cpu.ccr >> 6) & 1);\
- intMaskBit = (cpu.ccr >> 7) & 1;
-
-#define GETEXR() \
- if (h8300smode) \
- { \
- trace = (cpu.exr >> 7) & 1; \
- intMask = cpu.exr & 7; \
- }
+#define P(X, Y) ((X << 8) | Y)
+
+#define C (c != 0)
+#define Z (nz == 0)
+#define V (v != 0)
+#define N (n != 0)
+#define U (u != 0)
+#define H (h != 0)
+#define UI (ui != 0)
+#define I (intMaskBit != 0)
+
+#define BUILDSR(SD) \
+ h8_set_ccr (SD, (I << 7) | (UI << 6) | (H << 5) | (U << 4) \
+ | (N << 3) | (Z << 2) | (V << 1) | C)
#ifdef __CHAR_IS_SIGNED__
#define SEXTCHAR(x) ((char) (x))
@@ -121,17 +496,16 @@ void sim_set_simcache_size PARAMS ((int));
#define UEXTSHORT(x) ((x) & 0xffff)
#define SEXTSHORT(x) ((short) (x))
-static cpu_state_type cpu;
-
-int h8300hmode = 0;
-int h8300smode = 0;
+int h8300hmode = 0;
+int h8300smode = 0;
+int h8300sxmode = 0;
static int memory_size;
static int
get_now (void)
{
- return time (0); /* WinXX HAS UNIX like 'time', so why not using it? */
+ return time (0); /* WinXX HAS UNIX like 'time', so why not use it? */
}
static int
@@ -148,32 +522,42 @@ bitfrom (int x)
case L_8:
return SB;
case L_16:
+ case L_16U:
return SW;
case L_32:
return SL;
case L_P:
return h8300hmode ? SL : SW;
}
+ return 0;
}
+/* Simulate an indirection / dereference.
+ return 0 for success, -1 for failure.
+*/
+
static unsigned int
-lvalue (int x, int rn)
+lvalue (SIM_DESC sd, int x, int rn, unsigned int *val)
{
+ if (val == NULL) /* Paranoia. */
+ return -1;
+
switch (x / 4)
{
case OP_DISP:
- if (rn == 8)
- {
- return X (OP_IMM, SP);
- }
- return X (OP_REG, SP);
-
+ if (rn == ZERO_REGNUM)
+ *val = X (OP_IMM, SP);
+ else
+ *val = X (OP_REG, SP);
+ break;
case OP_MEM:
- return X (OP_MEM, SP);
-
+ *val = X (OP_MEM, SP);
+ break;
default:
- abort (); /* ?? May be something more usefull? */
+ sim_engine_set_run_state (sd, sim_stopped, SIGSEGV);
+ return -1;
}
+ return 0;
}
static int
@@ -187,17 +571,14 @@ cmdline_location()
return 0xff00L;
}
-static unsigned int
-decode (int addr, unsigned char *data, decoded_inst *dst)
+static void
+decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
{
- int rs = 0;
- int rd = 0;
- int rdisp = 0;
- int abs = 0;
- int bit = 0;
- int plen = 0;
- struct h8_opcode *q;
- int size = 0;
+ int cst[3] = {0, 0, 0};
+ int reg[3] = {0, 0, 0};
+ int rdisp[3] = {0, 0, 0};
+ int opnum;
+ const struct h8_opcode *q;
dst->dst.type = -1;
dst->src.type = -1;
@@ -208,12 +589,18 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
op_type *nib = q->data.nib;
unsigned int len = 0;
+ if ((q->available == AV_H8SX && !h8300sxmode) ||
+ (q->available == AV_H8H && !h8300hmode))
+ continue;
+
while (1)
{
op_type looking_for = *nib;
- int thisnib = data[len >> 1];
+ int thisnib = data[len / 2];
thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib >> 4) & 0xf);
+ opnum = ((looking_for & OP3) ? 2 :
+ (looking_for & DST) ? 1 : 0);
if (looking_for < 16 && looking_for >= 0)
{
@@ -222,24 +609,81 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
}
else
{
- if ((int) looking_for & (int) B31)
+ if (looking_for & B31)
{
- if (!(((int) thisnib & 0x8) != 0))
+ if (!((thisnib & 0x8) != 0))
goto fail;
- looking_for = (op_type) ((int) looking_for & ~(int) B31);
+ looking_for = (op_type) (looking_for & ~B31);
thisnib &= 0x7;
}
+ else if (looking_for & B30)
+ {
+ if (!((thisnib & 0x8) == 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B30);
+ }
+
+ if (looking_for & B21)
+ {
+ if (!((thisnib & 0x4) != 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B21);
+ thisnib &= 0xb;
+ }
+ else if (looking_for & B20)
+ {
+ if (!((thisnib & 0x4) == 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B20);
+ }
+
+ if (looking_for & B11)
+ {
+ if (!((thisnib & 0x2) != 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B11);
+ thisnib &= 0xd;
+ }
+ else if (looking_for & B10)
+ {
+ if (!((thisnib & 0x2) == 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B10);
+ }
- if ((int) looking_for & (int) B30)
+ if (looking_for & B01)
{
- if (!(((int) thisnib & 0x8) == 0))
+ if (!((thisnib & 0x1) != 0))
goto fail;
- looking_for = (op_type) ((int) looking_for & ~(int) B30);
+ looking_for = (op_type) (looking_for & ~B01);
+ thisnib &= 0xe;
}
+ else if (looking_for & B00)
+ {
+ if (!((thisnib & 0x1) == 0))
+ goto fail;
- if (looking_for & DBIT)
+ looking_for = (op_type) (looking_for & ~B00);
+ }
+
+ if (looking_for & IGNORE)
+ {
+ /* Hitachi has declared that IGNORE must be zero. */
+ if (thisnib != 0)
+ goto fail;
+ }
+ else if ((looking_for & MODE) == DATA)
+ {
+ ; /* Skip embedded data. */
+ }
+ else if ((looking_for & MODE) == DBIT)
{
/* Exclude adds/subs by looking at bit 0 and 2, and
make sure the operand size, either w or l,
@@ -247,223 +691,438 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
if ((looking_for & 7) != (thisnib & 7))
goto fail;
- abs = (thisnib & 0x8) ? 2 : 1;
+ cst[opnum] = (thisnib & 0x8) ? 2 : 1;
}
- else if (looking_for & (REG | IND | INC | DEC))
+ else if ((looking_for & MODE) == REG ||
+ (looking_for & MODE) == LOWREG ||
+ (looking_for & MODE) == IND ||
+ (looking_for & MODE) == PREINC ||
+ (looking_for & MODE) == POSTINC ||
+ (looking_for & MODE) == PREDEC ||
+ (looking_for & MODE) == POSTDEC)
{
- if (looking_for & REG)
+ reg[opnum] = thisnib;
+ }
+ else if (looking_for & CTRL)
+ {
+ thisnib &= 7;
+ if (((looking_for & MODE) == CCR && (thisnib != C_CCR)) ||
+ ((looking_for & MODE) == EXR && (thisnib != C_EXR)) ||
+ ((looking_for & MODE) == MACH && (thisnib != C_MACH)) ||
+ ((looking_for & MODE) == MACL && (thisnib != C_MACL)) ||
+ ((looking_for & MODE) == VBR && (thisnib != C_VBR)) ||
+ ((looking_for & MODE) == SBR && (thisnib != C_SBR)))
+ goto fail;
+ if (((looking_for & MODE) == CCR_EXR &&
+ (thisnib != C_CCR && thisnib != C_EXR)) ||
+ ((looking_for & MODE) == VBR_SBR &&
+ (thisnib != C_VBR && thisnib != C_SBR)) ||
+ ((looking_for & MODE) == MACREG &&
+ (thisnib != C_MACH && thisnib != C_MACL)))
+ goto fail;
+ if (((looking_for & MODE) == CC_EX_VB_SB &&
+ (thisnib != C_CCR && thisnib != C_EXR &&
+ thisnib != C_VBR && thisnib != C_SBR)))
+ goto fail;
+
+ reg[opnum] = thisnib;
+ }
+ else if ((looking_for & MODE) == ABS)
+ {
+ /* Absolute addresses are unsigned. */
+ switch (looking_for & SIZE)
{
- /* Can work out size from the register. */
- size = bitfrom (looking_for);
+ case L_8:
+ cst[opnum] = UEXTCHAR (data[len / 2]);
+ break;
+ case L_16:
+ case L_16U:
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ break;
+ case L_32:
+ cst[opnum] =
+ (data[len / 2 + 0] << 24) +
+ (data[len / 2 + 1] << 16) +
+ (data[len / 2 + 2] << 8) +
+ (data[len / 2 + 3]);
+ break;
+ default:
+ printf ("decode: bad size ABS: %d\n",
+ (looking_for & SIZE));
+ goto end;
}
- if (looking_for & SRC)
- rs = thisnib;
- else
- rd = thisnib;
}
- else if (looking_for & L_16)
+ else if ((looking_for & MODE) == DISP ||
+ (looking_for & MODE) == PCREL ||
+ (looking_for & MODE) == INDEXB ||
+ (looking_for & MODE) == INDEXW ||
+ (looking_for & MODE) == INDEXL)
+
{
- abs = (data[len >> 1]) * 256 + data[(len + 2) >> 1];
- plen = 16;
- if (looking_for & (PCREL | DISP))
+ switch (looking_for & SIZE)
{
- abs = (short) (abs);
+ case L_2:
+ cst[opnum] = thisnib & 3;
+
+ /* DISP2 special treatment. */
+ if ((looking_for & MODE) == DISP)
+ {
+ switch (OP_SIZE (q->how)) {
+ default: break;
+ case SW:
+ cst[opnum] *= 2;
+ break;
+ case SL:
+ cst[opnum] *= 4;
+ break;
+ }
+ }
+ break;
+ case L_8:
+ cst[opnum] = SEXTCHAR (data[len / 2]);
+ break;
+ case L_16:
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ cst[opnum] = (short) cst[opnum]; /* Sign extend. */
+ break;
+ case L_16U:
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ break;
+ case L_32:
+ cst[opnum] =
+ (data[len / 2 + 0] << 24) +
+ (data[len / 2 + 1] << 16) +
+ (data[len / 2 + 2] << 8) +
+ (data[len / 2 + 3]);
+ break;
+ default:
+ printf ("decode: bad size DISP/PCREL/INDEX: %d\n",
+ (looking_for & SIZE));
+ goto end;
}
}
- else if (looking_for & ABSJMP)
+ else if ((looking_for & SIZE) == L_16 ||
+ (looking_for & SIZE) == L_16U)
{
- abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ if ((looking_for & SIZE) != L_16U)
+ cst[opnum] = (short) cst[opnum]; /* Sign extend. */
}
- else if (looking_for & MEMIND)
+ else if (looking_for & ABSJMP)
{
- abs = data[1];
+ switch (looking_for & SIZE) {
+ case L_24:
+ cst[opnum] = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ break;
+ case L_32:
+ cst[opnum] =
+ (data[len / 2 + 0] << 24) +
+ (data[len / 2 + 1] << 16) +
+ (data[len / 2 + 2] << 8) +
+ (data[len / 2 + 3]);
+ break;
+ default:
+ printf ("decode: bad size ABSJMP: %d\n",
+ (looking_for & SIZE));
+ goto end;
+ }
}
- else if (looking_for & L_32)
+ else if ((looking_for & MODE) == MEMIND)
{
- int i = len >> 1;
-
- abs = (data[i] << 24)
- | (data[i + 1] << 16)
- | (data[i + 2] << 8)
- | (data[i + 3]);
-
- plen = 32;
+ cst[opnum] = data[1];
}
- else if (looking_for & L_24)
+ else if ((looking_for & SIZE) == L_32)
{
- int i = len >> 1;
+ int i = len / 2;
- abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
- plen = 24;
+ cst[opnum] =
+ (data[i + 0] << 24) |
+ (data[i + 1] << 16) |
+ (data[i + 2] << 8) |
+ (data[i + 3]);
}
- else if (looking_for & IGNORE)
+ else if ((looking_for & SIZE) == L_24)
{
- ;
+ int i = len / 2;
+
+ cst[opnum] =
+ (data[i + 0] << 16) |
+ (data[i + 1] << 8) |
+ (data[i + 2]);
}
else if (looking_for & DISPREG)
{
- rdisp = thisnib & 0x7;
+ rdisp[opnum] = thisnib & 0x7;
}
- else if (looking_for & KBIT)
+ else if ((looking_for & MODE) == KBIT)
{
switch (thisnib)
{
case 9:
- abs = 4;
+ cst[opnum] = 4;
break;
case 8:
- abs = 2;
+ cst[opnum] = 2;
break;
case 0:
- abs = 1;
+ cst[opnum] = 1;
break;
default:
goto fail;
}
}
- else if (looking_for & L_8)
+ else if ((looking_for & SIZE) == L_8)
{
- plen = 8;
-
- if (looking_for & PCREL)
+ if ((looking_for & MODE) == ABS)
{
- abs = SEXTCHAR (data[len >> 1]);
- }
- else if (looking_for & ABS8MEM)
- {
- plen = 8;
- abs = h8300hmode ? ~0xff0000ff : ~0xffff00ff;
- abs |= data[len >> 1] & 0xff;
+ /* Will be combined with contents of SBR_REGNUM
+ by fetch (). For all modes except h8sx, this
+ will always contain the value 0xFFFFFF00. */
+ cst[opnum] = data[len / 2] & 0xff;
}
else
{
- abs = data[len >> 1] & 0xff;
+ cst[opnum] = data[len / 2] & 0xff;
}
}
- else if (looking_for & L_3)
+ else if ((looking_for & SIZE) == L_3 ||
+ (looking_for & SIZE) == L_3NZ)
{
- plen = 3;
-
- bit = thisnib;
+ cst[opnum] = thisnib & 7;
+ if (cst[opnum] == 0 && (looking_for & SIZE) == L_3NZ)
+ goto fail;
+ }
+ else if ((looking_for & SIZE) == L_4)
+ {
+ cst[opnum] = thisnib & 15;
+ }
+ else if ((looking_for & SIZE) == L_5)
+ {
+ cst[opnum] = data[len / 2] & 0x1f;
}
else if (looking_for == E)
{
+#ifdef ADEBUG
dst->op = q;
-
+#endif
/* Fill in the args. */
{
op_type *args = q->args.nib;
int hadone = 0;
+ int nargs;
- while (*args != E)
+ for (nargs = 0;
+ nargs < 3 && *args != E;
+ nargs++)
{
int x = *args;
- int rn = (x & DST) ? rd : rs;
ea_type *p;
+ opnum = ((x & OP3) ? 2 :
+ (x & DST) ? 1 : 0);
if (x & DST)
- p = &(dst->dst);
+ p = &dst->dst;
+ else if (x & OP3)
+ p = &dst->op3;
else
- p = &(dst->src);
+ p = &dst->src;
- if (x & L_3)
+ if ((x & MODE) == IMM ||
+ (x & MODE) == KBIT ||
+ (x & MODE) == DBIT)
{
- p->type = X (OP_IMM, size);
- p->literal = bit;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_IMM, OP_SIZE (q->how));
+ p->literal = cst[opnum];
}
- else if (x & (IMM | KBIT | DBIT))
+ else if ((x & MODE) == CONST_2 ||
+ (x & MODE) == CONST_4 ||
+ (x & MODE) == CONST_8 ||
+ (x & MODE) == CONST_16)
{
- p->type = X (OP_IMM, size);
- p->literal = abs;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_IMM, OP_SIZE (q->how));
+ switch (x & MODE) {
+ case CONST_2: p->literal = 2; break;
+ case CONST_4: p->literal = 4; break;
+ case CONST_8: p->literal = 8; break;
+ case CONST_16: p->literal = 16; break;
+ }
}
- else if (x & REG)
+ else if ((x & MODE) == REG)
{
- /* Reset the size.
- Some ops (like mul) have two sizes. */
-
- size = bitfrom (x);
- p->type = X (OP_REG, size);
- p->reg = rn;
+ p->type = X (OP_REG, bitfrom (x));
+ p->reg = reg[opnum];
}
- else if (x & INC)
+ else if ((x & MODE) == LOWREG)
{
- p->type = X (OP_INC, size);
- p->reg = rn & 0x7;
+ p->type = X (OP_LOWREG, bitfrom (x));
+ p->reg = reg[opnum];
}
- else if (x & DEC)
+ else if ((x & MODE) == PREINC)
{
- p->type = X (OP_DEC, size);
- p->reg = rn & 0x7;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_PREINC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
}
- else if (x & IND)
+ else if ((x & MODE) == POSTINC)
{
- p->type = X (OP_DISP, size);
- p->reg = rn & 0x7;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_POSTINC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
+ }
+ else if ((x & MODE) == PREDEC)
+ {
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_PREDEC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
+ }
+ else if ((x & MODE) == POSTDEC)
+ {
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_POSTDEC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
+ }
+ else if ((x & MODE) == IND)
+ {
+ /* Note: an indirect is transformed into
+ a displacement of zero.
+ */
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_DISP, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
p->literal = 0;
+ if (OP_KIND (q->how) == O_JSR ||
+ OP_KIND (q->how) == O_JMP)
+ if (lvalue (sd, p->type, p->reg, &p->type))
+ goto end;
}
- else if (x & (ABS | ABSJMP | ABS8MEM))
+ else if ((x & MODE) == ABS)
{
- p->type = X (OP_DISP, size);
- p->literal = abs;
- p->reg = 8;
+ /* Note: a 16 or 32 bit ABS is transformed into a
+ displacement from pseudo-register ZERO_REGNUM,
+ which is always zero. An 8 bit ABS becomes
+ a displacement from SBR_REGNUM.
+ */
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_DISP, OP_SIZE (q->how));
+ p->literal = cst[opnum];
+
+ /* 8-bit ABS is displacement from SBR.
+ 16 and 32-bit ABS are displacement from ZERO.
+ (SBR will always be zero except for h8/sx)
+ */
+ if ((x & SIZE) == L_8)
+ p->reg = SBR_REGNUM;
+ else
+ p->reg = ZERO_REGNUM;;
}
- else if (x & MEMIND)
+ else if ((x & MODE) == MEMIND)
{
- p->type = X (OP_MEM, size);
- p->literal = abs;
+ /* Size doesn't matter. */
+ p->type = X (OP_MEM, SB);
+ p->literal = cst[opnum];
+ if (OP_KIND (q->how) == O_JSR ||
+ OP_KIND (q->how) == O_JMP)
+ if (lvalue (sd, p->type, p->reg, &p->type))
+ goto end;
}
- else if (x & PCREL)
+ else if ((x & MODE) == PCREL)
{
- p->type = X (OP_PCREL, size);
- p->literal = abs + addr + 2;
- if (x & L_16)
- p->literal += 2;
+ /* Size doesn't matter. */
+ p->type = X (OP_PCREL, SB);
+ p->literal = cst[opnum];
}
else if (x & ABSJMP)
{
p->type = X (OP_IMM, SP);
- p->literal = abs;
+ p->literal = cst[opnum];
+ }
+ else if ((x & MODE) == INDEXB ||
+ (x & MODE) == INDEXW ||
+ (x & MODE) == INDEXL ||
+ (x & MODE) == DISP)
+ {
+ /* Use the instruction to determine
+ the operand size. */
+ switch (x & MODE) {
+ case INDEXB:
+ p->type = X (OP_INDEXB, OP_SIZE (q->how));
+ break;
+ case INDEXW:
+ p->type = X (OP_INDEXW, OP_SIZE (q->how));
+ break;
+ case INDEXL:
+ p->type = X (OP_INDEXL, OP_SIZE (q->how));
+ break;
+ case DISP:
+ p->type = X (OP_DISP, OP_SIZE (q->how));
+ break;
+ }
+
+ p->literal = cst[opnum];
+ p->reg = rdisp[opnum];
}
- else if (x & DISP)
+ else if (x & CTRL)
{
- p->type = X (OP_DISP, size);
- p->literal = abs;
- p->reg = rdisp & 0x7;
+ switch (reg[opnum])
+ {
+ case C_CCR:
+ p->type = X (OP_CCR, SB);
+ break;
+ case C_EXR:
+ p->type = X (OP_EXR, SB);
+ break;
+ case C_MACH:
+ p->type = X (OP_MACH, SL);
+ break;
+ case C_MACL:
+ p->type = X (OP_MACL, SL);
+ break;
+ case C_VBR:
+ p->type = X (OP_VBR, SL);
+ break;
+ case C_SBR:
+ p->type = X (OP_SBR, SL);
+ break;
+ }
}
- else if (x & CCR)
+ else if ((x & MODE) == CCR)
{
p->type = OP_CCR;
}
- else if (x & EXR)
+ else if ((x & MODE) == EXR)
{
p->type = OP_EXR;
}
else
- printf ("Hmmmm %x", x);
+ printf ("Hmmmm %x...\n", x);
args++;
}
}
- /* But a jmp or a jsr gets automagically lvalued,
- since we branch to their address not their
- contents. */
- if (q->how == O (O_JSR, SB)
- || q->how == O (O_JMP, SB))
- {
- dst->src.type = lvalue (dst->src.type, dst->src.reg);
- }
-
+ /* Unary operators: treat src and dst as equivalent. */
if (dst->dst.type == -1)
dst->dst = dst->src;
+ if (dst->src.type == -1)
+ dst->src = dst->dst;
dst->opcode = q->how;
dst->cycles = q->time;
- /* And a jsr to these locations are turned into magic
- traps. */
+ /* And jsr's to these locations are turned into
+ magic traps. */
- if (dst->opcode == O (O_JSR, SB))
+ if (OP_KIND (dst->opcode) == O_JSR)
{
switch (dst->src.literal)
{
@@ -509,165 +1168,344 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
fail:
;
}
-
+ end:
/* Fell off the end. */
dst->opcode = O (O_ILL, SB);
}
static void
-compile (int pc)
+compile (SIM_DESC sd, int pc)
{
int idx;
/* Find the next cache entry to use. */
- idx = cpu.cache_top + 1;
- cpu.compiles++;
- if (idx >= cpu.csize)
+ idx = h8_get_cache_top (sd) + 1;
+ h8_increment_compiles (sd);
+ if (idx >= sd->sim_cache_size)
{
idx = 1;
}
- cpu.cache_top = idx;
+ h8_set_cache_top (sd, idx);
/* Throw away its old meaning. */
- cpu.cache_idx[cpu.cache[idx].oldpc] = 0;
+ h8_set_cache_idx (sd, sd->sim_cache[idx].oldpc, 0);
/* Set to new address. */
- cpu.cache[idx].oldpc = pc;
+ sd->sim_cache[idx].oldpc = pc;
/* Fill in instruction info. */
- decode (pc, cpu.memory + pc, cpu.cache + idx);
+ decode (sd, pc, h8_get_memory_buf (sd) + pc, sd->sim_cache + idx);
/* Point to new cache entry. */
- cpu.cache_idx[pc] = idx;
+ h8_set_cache_idx (sd, pc, idx);
}
-static unsigned char *breg[18];
-static unsigned short *wreg[18];
-static unsigned int *lreg[18];
-
-#define GET_B_REG(x) *(breg[x])
-#define SET_B_REG(x,y) (*(breg[x])) = (y)
-#define GET_W_REG(x) *(wreg[x])
-#define SET_W_REG(x,y) (*(wreg[x])) = (y)
-
-#define GET_L_REG(x) *(lreg[x])
-#define SET_L_REG(x,y) (*(lreg[x])) = (y)
-
-#define GET_MEMORY_L(x) \
- (x < memory_size \
- ? ((cpu.memory[x+0] << 24) | (cpu.memory[x+1] << 16) \
- | (cpu.memory[x+2] << 8) | cpu.memory[x+3]) \
- : ((cpu.eightbit[(x+0) & 0xff] << 24) | (cpu.eightbit[(x+1) & 0xff] << 16) \
- | (cpu.eightbit[(x+2) & 0xff] << 8) | cpu.eightbit[(x+3) & 0xff]))
-
-#define GET_MEMORY_W(x) \
- (x < memory_size \
- ? ((cpu.memory[x+0] << 8) | (cpu.memory[x+1] << 0)) \
- : ((cpu.eightbit[(x+0) & 0xff] << 8) | (cpu.eightbit[(x+1) & 0xff] << 0)))
-
-
-#define GET_MEMORY_B(x) \
- (x < memory_size ? (cpu.memory[x]) : (cpu.eightbit[x & 0xff]))
+static unsigned char *breg[32];
+static unsigned short *wreg[16];
+static unsigned int *lreg[18];
+
+#define GET_B_REG(X) *(breg[X])
+#define SET_B_REG(X, Y) (*(breg[X])) = (Y)
+#define GET_W_REG(X) *(wreg[X])
+#define SET_W_REG(X, Y) (*(wreg[X])) = (Y)
+#define GET_L_REG(X) h8_get_reg (sd, X)
+#define SET_L_REG(X, Y) h8_set_reg (sd, X, Y)
+
+#define GET_MEMORY_L(X) \
+ ((X) < memory_size \
+ ? ((h8_get_memory (sd, (X)+0) << 24) | (h8_get_memory (sd, (X)+1) << 16) \
+ | (h8_get_memory (sd, (X)+2) << 8) | (h8_get_memory (sd, (X)+3) << 0)) \
+ : ((h8_get_eightbit (sd, ((X)+0) & 0xff) << 24) \
+ | (h8_get_eightbit (sd, ((X)+1) & 0xff) << 16) \
+ | (h8_get_eightbit (sd, ((X)+2) & 0xff) << 8) \
+ | (h8_get_eightbit (sd, ((X)+3) & 0xff) << 0)))
+
+#define GET_MEMORY_W(X) \
+ ((X) < memory_size \
+ ? ((h8_get_memory (sd, (X)+0) << 8) \
+ | (h8_get_memory (sd, (X)+1) << 0)) \
+ : ((h8_get_eightbit (sd, ((X)+0) & 0xff) << 8) \
+ | (h8_get_eightbit (sd, ((X)+1) & 0xff) << 0)))
+
+
+#define GET_MEMORY_B(X) \
+ ((X) < memory_size ? (h8_get_memory (sd, (X))) \
+ : (h8_get_eightbit (sd, (X) & 0xff)))
+
+#define SET_MEMORY_L(X, Y) \
+{ register unsigned char *_p; register int __y = (Y); \
+ _p = ((X) < memory_size ? h8_get_memory_buf (sd) + (X) : \
+ h8_get_eightbit_buf (sd) + ((X) & 0xff)); \
+ _p[0] = __y >> 24; _p[1] = __y >> 16; \
+ _p[2] = __y >> 8; _p[3] = __y >> 0; \
+}
-#define SET_MEMORY_L(x,y) \
-{ register unsigned char *_p; register int __y = y; \
- _p = (x < memory_size ? cpu.memory+x : cpu.eightbit + (x & 0xff)); \
- _p[0] = (__y)>>24; _p[1] = (__y)>>16; \
- _p[2] = (__y)>>8; _p[3] = (__y)>>0;}
+#define SET_MEMORY_W(X, Y) \
+{ register unsigned char *_p; register int __y = (Y); \
+ _p = ((X) < memory_size ? h8_get_memory_buf (sd) + (X) : \
+ h8_get_eightbit_buf (sd) + ((X) & 0xff)); \
+ _p[0] = __y >> 8; _p[1] = __y; \
+}
-#define SET_MEMORY_W(x,y) \
-{ register unsigned char *_p; register int __y = y; \
- _p = (x < memory_size ? cpu.memory+x : cpu.eightbit + (x & 0xff)); \
- _p[0] = (__y)>>8; _p[1] =(__y);}
+#define SET_MEMORY_B(X, Y) \
+ ((X) < memory_size ? (h8_set_memory (sd, (X), (Y))) \
+ : (h8_set_eightbit (sd, (X) & 0xff, (Y))))
-#define SET_MEMORY_B(x,y) \
- (x < memory_size ? (cpu.memory[(x)] = y) : (cpu.eightbit[x & 0xff] = y))
+/* Simulate a memory fetch.
+ Return 0 for success, -1 for failure.
+*/
static int
-fetch (ea_type *arg)
+fetch_1 (SIM_DESC sd, ea_type *arg, int *val, int twice)
{
int rn = arg->reg;
int abs = arg->literal;
int r;
int t;
+ if (val == NULL)
+ return -1; /* Paranoia. */
+
switch (arg->type)
{
- case X (OP_REG, SB):
- return GET_B_REG (rn);
- case X (OP_REG, SW):
- return GET_W_REG (rn);
- case X (OP_REG, SL):
- return GET_L_REG (rn);
- case X (OP_IMM, SB):
- case X (OP_IMM, SW):
- case X (OP_IMM, SL):
- return abs;
- case X (OP_DEC, SB):
- abort ();
-
- case X (OP_INC, SB):
+ /* Indexed register plus displacement mode:
+
+ This new family of addressing modes are similar to OP_DISP
+ (register plus displacement), with two differences:
+ 1) INDEXB uses only the least significant byte of the register,
+ INDEXW uses only the least significant word, and
+ INDEXL uses the entire register (just like OP_DISP).
+ and
+ 2) The displacement value in abs is multiplied by two
+ for SW-sized operations, and by four for SL-size.
+
+ This gives nine possible variations.
+ */
+
+ case X (OP_INDEXB, SB):
+ case X (OP_INDEXB, SW):
+ case X (OP_INDEXB, SL):
+ case X (OP_INDEXW, SB):
+ case X (OP_INDEXW, SW):
+ case X (OP_INDEXW, SL):
+ case X (OP_INDEXL, SB):
+ case X (OP_INDEXL, SW):
+ case X (OP_INDEXL, SL):
+ t = GET_L_REG (rn);
+ switch (OP_KIND (arg->type)) {
+ case OP_INDEXB: t &= 0xff; break;
+ case OP_INDEXW: t &= 0xffff; break;
+ case OP_INDEXL:
+ default: break;
+ }
+ switch (OP_SIZE (arg->type)) {
+ case SB:
+ *val = GET_MEMORY_B ((t * 1 + abs) & h8_get_mask (sd));
+ break;
+ case SW:
+ *val = GET_MEMORY_W ((t * 2 + abs) & h8_get_mask (sd));
+ break;
+ case SL:
+ *val = GET_MEMORY_L ((t * 4 + abs) & h8_get_mask (sd));
+ break;
+ }
+ break;
+
+ case X (OP_LOWREG, SB):
+ *val = GET_L_REG (rn) & 0xff;
+ break;
+ case X (OP_LOWREG, SW):
+ *val = GET_L_REG (rn) & 0xffff;
+ break;
+
+ case X (OP_REG, SB): /* Register direct, byte. */
+ *val = GET_B_REG (rn);
+ break;
+ case X (OP_REG, SW): /* Register direct, word. */
+ *val = GET_W_REG (rn);
+ break;
+ case X (OP_REG, SL): /* Register direct, long. */
+ *val = GET_L_REG (rn);
+ break;
+ case X (OP_IMM, SB): /* Immediate, byte. */
+ case X (OP_IMM, SW): /* Immediate, word. */
+ case X (OP_IMM, SL): /* Immediate, long. */
+ *val = abs;
+ break;
+ case X (OP_POSTINC, SB): /* Register indirect w/post-incr: byte. */
+ t = GET_L_REG (rn);
+ t &= h8_get_mask (sd);
+ r = GET_MEMORY_B (t);
+ if (!twice)
+ t += 1;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+ case X (OP_POSTINC, SW): /* Register indirect w/post-incr: word. */
+ t = GET_L_REG (rn);
+ t &= h8_get_mask (sd);
+ r = GET_MEMORY_W (t);
+ if (!twice)
+ t += 2;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+ case X (OP_POSTINC, SL): /* Register indirect w/post-incr: long. */
+ t = GET_L_REG (rn);
+ t &= h8_get_mask (sd);
+ r = GET_MEMORY_L (t);
+ if (!twice)
+ t += 4;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+
+ case X (OP_POSTDEC, SB): /* Register indirect w/post-decr: byte. */
t = GET_L_REG (rn);
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
r = GET_MEMORY_B (t);
- t++;
- t = t & cpu.mask;
+ if (!twice)
+ t -= 1;
+ t = t & h8_get_mask (sd);
SET_L_REG (rn, t);
- return r;
+ *val = r;
break;
- case X (OP_INC, SW):
+ case X (OP_POSTDEC, SW): /* Register indirect w/post-decr: word. */
t = GET_L_REG (rn);
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
r = GET_MEMORY_W (t);
- t += 2;
- t = t & cpu.mask;
+ if (!twice)
+ t -= 2;
+ t = t & h8_get_mask (sd);
SET_L_REG (rn, t);
- return r;
- case X (OP_INC, SL):
+ *val = r;
+ break;
+ case X (OP_POSTDEC, SL): /* Register indirect w/post-decr: long. */
t = GET_L_REG (rn);
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
r = GET_MEMORY_L (t);
+ if (!twice)
+ t -= 4;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+
+ case X (OP_PREDEC, SB): /* Register indirect w/pre-decr: byte. */
+ t = GET_L_REG (rn) - 1;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_B (t);
+ break;
+
+ case X (OP_PREDEC, SW): /* Register indirect w/pre-decr: word. */
+ t = GET_L_REG (rn) - 2;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_W (t);
+ break;
+
+ case X (OP_PREDEC, SL): /* Register indirect w/pre-decr: long. */
+ t = GET_L_REG (rn) - 4;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_L (t);
+ break;
+
+ case X (OP_PREINC, SB): /* Register indirect w/pre-incr: byte. */
+ t = GET_L_REG (rn) + 1;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_B (t);
+ break;
- t += 4;
- t = t & cpu.mask;
+ case X (OP_PREINC, SW): /* Register indirect w/pre-incr: long. */
+ t = GET_L_REG (rn) + 2;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
- return r;
+ *val = GET_MEMORY_W (t);
+ break;
- case X (OP_DISP, SB):
+ case X (OP_PREINC, SL): /* Register indirect w/pre-incr: long. */
+ t = GET_L_REG (rn) + 4;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_L (t);
+ break;
+
+ case X (OP_DISP, SB): /* Register indirect w/displacement: byte. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
- return GET_MEMORY_B (t);
+ t &= h8_get_mask (sd);
+ *val = GET_MEMORY_B (t);
+ break;
- case X (OP_DISP, SW):
+ case X (OP_DISP, SW): /* Register indirect w/displacement: word. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
- return GET_MEMORY_W (t);
+ t &= h8_get_mask (sd);
+ *val = GET_MEMORY_W (t);
+ break;
- case X (OP_DISP, SL):
+ case X (OP_DISP, SL): /* Register indirect w/displacement: long. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
- return GET_MEMORY_L (t);
+ t &= h8_get_mask (sd);
+ *val =GET_MEMORY_L (t);
+ break;
- case X (OP_MEM, SL):
+ case X (OP_MEM, SL): /* Absolute memory address, long. */
t = GET_MEMORY_L (abs);
- t &= cpu.mask;
- return t;
+ t &= h8_get_mask (sd);
+ *val = t;
+ break;
- case X (OP_MEM, SW):
+ case X (OP_MEM, SW): /* Absolute memory address, word. */
t = GET_MEMORY_W (abs);
- t &= cpu.mask;
- return t;
+ t &= h8_get_mask (sd);
+ *val = t;
+ break;
- default:
- abort (); /* ?? May be something more usefull? */
+ case X (OP_PCREL, SB): /* PC relative (for jump, branch etc). */
+ case X (OP_PCREL, SW):
+ case X (OP_PCREL, SL):
+ case X (OP_PCREL, SN):
+ *val = abs;
+ break;
+ case X (OP_MEM, SB): /* Why isn't this implemented? */
+ default:
+ sim_engine_set_run_state (sd, sim_stopped, SIGSEGV);
+ return -1;
}
+ return 0; /* Success. */
}
+/* Normal fetch. */
-static void
-store (ea_type *arg, int n)
+static int
+fetch (SIM_DESC sd, ea_type *arg, int *val)
+{
+ return fetch_1 (sd, arg, val, 0);
+}
+
+/* Fetch which will be followed by a store to the same location.
+ The difference being that we don't want to do a post-increment
+ or post-decrement at this time: we'll do it when we store. */
+
+static int
+fetch2 (SIM_DESC sd, ea_type *arg, int *val)
+{
+ return fetch_1 (sd, arg, val, 1);
+}
+
+/* Simulate a memory store.
+ Return 0 for success, -1 for failure.
+*/
+
+static int
+store_1 (SIM_DESC sd, ea_type *arg, int n, int twice)
{
int rn = arg->reg;
int abs = arg->literal;
@@ -675,57 +1513,195 @@ store (ea_type *arg, int n)
switch (arg->type)
{
- case X (OP_REG, SB):
+ /* Indexed register plus displacement mode:
+
+ This new family of addressing modes are similar to OP_DISP
+ (register plus displacement), with two differences:
+ 1) INDEXB uses only the least significant byte of the register,
+ INDEXW uses only the least significant word, and
+ INDEXL uses the entire register (just like OP_DISP).
+ and
+ 2) The displacement value in abs is multiplied by two
+ for SW-sized operations, and by four for SL-size.
+
+ This gives nine possible variations.
+ */
+
+ case X (OP_INDEXB, SB):
+ case X (OP_INDEXB, SW):
+ case X (OP_INDEXB, SL):
+ case X (OP_INDEXW, SB):
+ case X (OP_INDEXW, SW):
+ case X (OP_INDEXW, SL):
+ case X (OP_INDEXL, SB):
+ case X (OP_INDEXL, SW):
+ case X (OP_INDEXL, SL):
+ t = GET_L_REG (rn);
+ switch (OP_KIND (arg->type)) {
+ case OP_INDEXB: t &= 0xff; break;
+ case OP_INDEXW: t &= 0xffff; break;
+ case OP_INDEXL:
+ default: break;
+ }
+ switch (OP_SIZE (arg->type)) {
+ case SB:
+ SET_MEMORY_B ((t * 1 + abs) & h8_get_mask (sd), n);
+ break;
+ case SW:
+ SET_MEMORY_W ((t * 2 + abs) & h8_get_mask (sd), n);
+ break;
+ case SL:
+ SET_MEMORY_L ((t * 4 + abs) & h8_get_mask (sd), n);
+ break;
+ }
+ break;
+
+ case X (OP_REG, SB): /* Register direct, byte. */
SET_B_REG (rn, n);
break;
- case X (OP_REG, SW):
+ case X (OP_REG, SW): /* Register direct, word. */
SET_W_REG (rn, n);
break;
- case X (OP_REG, SL):
+ case X (OP_REG, SL): /* Register direct, long. */
SET_L_REG (rn, n);
break;
- case X (OP_DEC, SB):
- t = GET_L_REG (rn) - 1;
- t &= cpu.mask;
+ case X (OP_PREDEC, SB): /* Register indirect w/pre-decr, byte. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t -= 1;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ SET_MEMORY_B (t, n);
+
+ break;
+ case X (OP_PREDEC, SW): /* Register indirect w/pre-decr, word. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t -= 2;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ SET_MEMORY_W (t, n);
+ break;
+
+ case X (OP_PREDEC, SL): /* Register indirect w/pre-decr, long. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t -= 4;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ SET_MEMORY_L (t, n);
+ break;
+
+ case X (OP_PREINC, SB): /* Register indirect w/pre-incr, byte. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t += 1;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
SET_MEMORY_B (t, n);
break;
- case X (OP_DEC, SW):
- t = (GET_L_REG (rn) - 2) & cpu.mask;
+ case X (OP_PREINC, SW): /* Register indirect w/pre-incr, word. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t += 2;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
SET_MEMORY_W (t, n);
break;
- case X (OP_DEC, SL):
- t = (GET_L_REG (rn) - 4) & cpu.mask;
+ case X (OP_PREINC, SL): /* Register indirect w/pre-incr, long. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t += 4;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
SET_MEMORY_L (t, n);
break;
- case X (OP_DISP, SB):
+ case X (OP_POSTDEC, SB): /* Register indirect w/post-decr, byte. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_B (t, n);
+ SET_L_REG (rn, t - 1);
+ break;
+
+ case X (OP_POSTDEC, SW): /* Register indirect w/post-decr, word. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_W (t, n);
+ SET_L_REG (rn, t - 2);
+ break;
+
+ case X (OP_POSTDEC, SL): /* Register indirect w/post-decr, long. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_L (t, n);
+ SET_L_REG (rn, t - 4);
+ break;
+
+ case X (OP_POSTINC, SB): /* Register indirect w/post-incr, byte. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_B (t, n);
+ SET_L_REG (rn, t + 1);
+ break;
+
+ case X (OP_POSTINC, SW): /* Register indirect w/post-incr, word. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_W (t, n);
+ SET_L_REG (rn, t + 2);
+ break;
+
+ case X (OP_POSTINC, SL): /* Register indirect w/post-incr, long. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_L (t, n);
+ SET_L_REG (rn, t + 4);
+ break;
+
+ case X (OP_DISP, SB): /* Register indirect w/displacement, byte. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
SET_MEMORY_B (t, n);
break;
- case X (OP_DISP, SW):
+ case X (OP_DISP, SW): /* Register indirect w/displacement, word. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
SET_MEMORY_W (t, n);
break;
- case X (OP_DISP, SL):
+ case X (OP_DISP, SL): /* Register indirect w/displacement, long. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
SET_MEMORY_L (t, n);
break;
+
+
+ case X (OP_MEM, SB): /* Why isn't this implemented? */
+ case X (OP_MEM, SW): /* Why isn't this implemented? */
+ case X (OP_MEM, SL): /* Why isn't this implemented? */
default:
- abort ();
+ sim_engine_set_run_state (sd, sim_stopped, SIGSEGV);
+ return -1;
}
+ return 0;
}
+/* Normal store. */
+
+static int
+store (SIM_DESC sd, ea_type *arg, int n)
+{
+ return store_1 (sd, arg, n, 0);
+}
+
+/* Store which follows a fetch from the same location.
+ The difference being that we don't want to do a pre-increment
+ or pre-decrement at this time: it was already done when we fetched. */
+
+static int
+store2 (SIM_DESC sd, ea_type *arg, int n)
+{
+ return store_1 (sd, arg, n, 1);
+}
static union
{
@@ -736,20 +1712,18 @@ static union
char high;
}
u;
-}
+} littleendian;
-littleendian;
+/* Flag to be set whenever a new SIM_DESC object is created. */
+static int init_pointers_needed = 1;
static void
-init_pointers (void)
+init_pointers (SIM_DESC sd)
{
- static int init;
-
- if (!init)
+ if (init_pointers_needed)
{
int i;
- init = 1;
littleendian.i = 1;
if (h8300smode)
@@ -758,39 +1732,55 @@ init_pointers (void)
memory_size = H8300H_MSIZE;
else
memory_size = H8300_MSIZE;
- cpu.memory = (unsigned char *) calloc (sizeof (char), memory_size);
- cpu.cache_idx = (unsigned short *) calloc (sizeof (short), memory_size);
- cpu.eightbit = (unsigned char *) calloc (sizeof (char), 256);
-
/* `msize' must be a power of two. */
if ((memory_size & (memory_size - 1)) != 0)
- abort ();
- cpu.mask = memory_size - 1;
-
- for (i = 0; i < 9; i++)
{
- cpu.regs[i] = 0;
+ (*sim_callback->printf_filtered)
+ (sim_callback,
+ "init_pointers: bad memory size %d, defaulting to %d.\n",
+ memory_size, memory_size = H8300S_MSIZE);
}
+ if (h8_get_memory_buf (sd))
+ free (h8_get_memory_buf (sd));
+ if (h8_get_cache_idx_buf (sd))
+ free (h8_get_cache_idx_buf (sd));
+ if (h8_get_eightbit_buf (sd))
+ free (h8_get_eightbit_buf (sd));
+
+ h8_set_memory_buf (sd, (unsigned char *)
+ calloc (sizeof (char), memory_size));
+ h8_set_cache_idx_buf (sd, (unsigned short *)
+ calloc (sizeof (short), memory_size));
+ sd->memory_size = memory_size;
+ h8_set_eightbit_buf (sd, (unsigned char *) calloc (sizeof (char), 256));
+
+ h8_set_mask (sd, memory_size - 1);
+
+ memset (h8_get_reg_buf (sd), 0, sizeof (((STATE_CPU (sd, 0))->regs)));
+
for (i = 0; i < 8; i++)
{
- unsigned char *p = (unsigned char *) (cpu.regs + i);
- unsigned char *e = (unsigned char *) (cpu.regs + i + 1);
- unsigned short *q = (unsigned short *) (cpu.regs + i);
- unsigned short *u = (unsigned short *) (cpu.regs + i + 1);
- cpu.regs[i] = 0x00112233;
+ /* FIXME: rewrite using local buffer. */
+ unsigned char *p = (unsigned char *) (h8_get_reg_buf (sd) + i);
+ unsigned char *e = (unsigned char *) (h8_get_reg_buf (sd) + i + 1);
+ unsigned short *q = (unsigned short *) (h8_get_reg_buf (sd) + i);
+ unsigned short *u = (unsigned short *) (h8_get_reg_buf (sd) + i + 1);
+ h8_set_reg (sd, i, 0x00112233);
+
while (p < e)
{
if (*p == 0x22)
- {
breg[i] = p;
- }
if (*p == 0x33)
- {
breg[i + 8] = p;
- }
+ if (*p == 0x11)
+ breg[i + 16] = p;
+ if (*p == 0x00)
+ breg[i + 24] = p;
p++;
}
+
wreg[i] = wreg[i + 8] = 0;
while (q < u)
{
@@ -804,196 +1794,60 @@ init_pointers (void)
}
q++;
}
+
if (wreg[i] == 0 || wreg[i + 8] == 0)
- abort ();
- cpu.regs[i] = 0;
- lreg[i] = &cpu.regs[i];
+ (*sim_callback->printf_filtered) (sim_callback,
+ "init_pointers: internal error.\n");
+
+ h8_set_reg (sd, i, 0);
+ lreg[i] = h8_get_reg_buf (sd) + i;
}
- lreg[8] = &cpu.regs[8];
+ /* Note: sim uses pseudo-register ZERO as a zero register. */
+ lreg[ZERO_REGNUM] = h8_get_reg_buf (sd) + ZERO_REGNUM;
+ init_pointers_needed = 0;
/* Initialize the seg registers. */
- if (!cpu.cache)
- sim_set_simcache_size (CSIZE);
+ if (!sd->sim_cache)
+ set_simcache_size (sd, CSIZE);
}
}
+/* Grotty global variable for use by control_c signal handler. */
+static SIM_DESC control_c_sim_desc;
+
static void
control_c (int sig)
{
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGINT;
+ sim_engine_set_run_state (control_c_sim_desc, sim_stopped, SIGINT);
}
-#define C (c != 0)
-#define Z (nz == 0)
-#define V (v != 0)
-#define N (n != 0)
-#define U (u != 0)
-#define H (h != 0)
-#define UI (ui != 0)
-#define I (intMaskBit != 0)
-
-static int
-mop (decoded_inst *code, int bsize, int sign)
+int
+sim_stop (SIM_DESC sd)
{
- int multiplier;
- int multiplicand;
- int result;
- int n, nz;
-
- if (sign)
- {
- multiplicand =
- bsize ? SEXTCHAR (GET_W_REG (code->dst.reg)) :
- SEXTSHORT (GET_W_REG (code->dst.reg));
- multiplier =
- bsize ? SEXTCHAR (GET_B_REG (code->src.reg)) :
- SEXTSHORT (GET_W_REG (code->src.reg));
- }
- else
- {
- multiplicand = bsize ? UEXTCHAR (GET_W_REG (code->dst.reg)) :
- UEXTSHORT (GET_W_REG (code->dst.reg));
- multiplier =
- bsize ? UEXTCHAR (GET_B_REG (code->src.reg)) :
- UEXTSHORT (GET_W_REG (code->src.reg));
-
- }
- result = multiplier * multiplicand;
-
- if (sign)
- {
- n = result & (bsize ? 0x8000 : 0x80000000);
- nz = result & (bsize ? 0xffff : 0xffffffff);
- }
- if (bsize)
- {
- SET_W_REG (code->dst.reg, result);
- }
- else
- {
- SET_L_REG (code->dst.reg, result);
- }
-#if 0
- return ((n == 1) << 1) | (nz == 1);
-#endif
-}
-
-#define ONOT(name, how) \
-case O (name, SB): \
-{ \
- int t; \
- int hm = 0x80; \
- rd = GET_B_REG (code->src.reg); \
- how; \
- goto shift8; \
-} \
-case O (name, SW): \
-{ \
- int t; \
- int hm = 0x8000; \
- rd = GET_W_REG (code->src.reg); \
- how; \
- goto shift16; \
-} \
-case O (name, SL): \
-{ \
- int t; \
- int hm = 0x80000000; \
- rd = GET_L_REG (code->src.reg); \
- how; \
- goto shift32; \
+ /* FIXME: use a real signal value. */
+ sim_engine_set_run_state (sd, sim_stopped, SIGINT);
+ return 1;
}
-#define OSHIFTS(name, how1, how2) \
+#define OBITOP(name, f, s, op) \
case O (name, SB): \
{ \
- int t; \
- int hm = 0x80; \
- rd = GET_B_REG (code->src.reg); \
- if ((GET_MEMORY_B (pc + 1) & 0x40) == 0) \
- { \
- how1; \
- } \
- else \
- { \
- how2; \
- } \
- goto shift8; \
-} \
-case O (name, SW): \
-{ \
- int t; \
- int hm = 0x8000; \
- rd = GET_W_REG (code->src.reg); \
- if ((GET_MEMORY_B (pc + 1) & 0x40) == 0) \
- { \
- how1; \
- } \
- else \
- { \
- how2; \
- } \
- goto shift16; \
-} \
-case O (name, SL): \
-{ \
- int t; \
- int hm = 0x80000000; \
- rd = GET_L_REG (code->src.reg); \
- if ((GET_MEMORY_B (pc + 1) & 0x40) == 0) \
- { \
- how1; \
- } \
- else \
- { \
- how2; \
- } \
- goto shift32; \
-}
-
-#define OBITOP(name,f, s, op) \
-case O (name, SB): \
-{ \
- int m; \
- int b; \
- if (f) ea = fetch (&code->dst); \
- m=1<< fetch (&code->src); \
+ int m, tmp; \
+ \
+ if (f) \
+ if (fetch (sd, &code->dst, &ea)) \
+ goto end; \
+ if (fetch (sd, &code->src, &tmp)) \
+ goto end; \
+ m = 1 << tmp; \
op; \
- if (s) store (&code->dst,ea); goto next; \
-}
-
-int
-sim_stop (SIM_DESC sd)
-{
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGINT;
- return 1;
+ if (s) \
+ if (store (sd, &code->dst,ea)) \
+ goto end; \
+ goto next; \
}
-#define R0_REGNUM 0
-#define R1_REGNUM 1
-#define R2_REGNUM 2
-#define R3_REGNUM 3
-#define R4_REGNUM 4
-#define R5_REGNUM 5
-#define R6_REGNUM 6
-#define R7_REGNUM 7
-
-#define SP_REGNUM R7_REGNUM /* Contains address of top of stack */
-#define FP_REGNUM R6_REGNUM /* Contains address of executing
- * stack frame */
-
-#define CCR_REGNUM 8 /* Contains processor status */
-#define PC_REGNUM 9 /* Contains program counter */
-
-#define CYCLE_REGNUM 10
-
-#define EXR_REGNUM 11
-#define INST_REGNUM 12
-#define TICK_REGNUM 13
-
void
sim_resume (SIM_DESC sd, int step, int siggnal)
{
@@ -1012,55 +1866,63 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int c, nz, v, n, u, h, ui, intMaskBit;
int trace, intMask;
int oldmask;
- init_pointers ();
+ enum sim_stop reason;
+ int sigrc;
+ init_pointers (sd);
+
+ control_c_sim_desc = sd;
prev = signal (SIGINT, control_c);
if (step)
{
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGTRAP;
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
}
else
{
- cpu.state = SIM_STATE_RUNNING;
- cpu.exception = 0;
+ sim_engine_set_run_state (sd, sim_running, 0);
}
- pc = cpu.pc;
+ pc = h8_get_pc (sd);
/* The PC should never be odd. */
if (pc & 0x1)
- abort ();
+ {
+ sim_engine_set_run_state (sd, sim_stopped, SIGBUS);
+ return;
+ }
- GETSR ();
- GETEXR ();
+ /* Get Status Register (flags). */
+ c = (h8_get_ccr (sd) >> 0) & 1;
+ v = (h8_get_ccr (sd) >> 1) & 1;
+ nz = !((h8_get_ccr (sd) >> 2) & 1);
+ n = (h8_get_ccr (sd) >> 3) & 1;
+ u = (h8_get_ccr (sd) >> 4) & 1;
+ h = (h8_get_ccr (sd) >> 5) & 1;
+ ui = ((h8_get_ccr (sd) >> 6) & 1);
+ intMaskBit = (h8_get_ccr (sd) >> 7) & 1;
+
+ if (h8300smode) /* Get exr. */
+ {
+ trace = (h8_get_exr (sd) >> 7) & 1;
+ intMask = h8_get_exr (sd) & 7;
+ }
- oldmask = cpu.mask;
+ oldmask = h8_get_mask (sd);
if (!h8300hmode)
- cpu.mask = 0xffff;
+ h8_set_mask (sd, 0xffff);
do
{
- int cidx;
+ unsigned short cidx;
decoded_inst *code;
top:
- cidx = cpu.cache_idx[pc];
- code = cpu.cache + cidx;
-
-
-#define ALUOP(STORE, NAME, HOW) \
- case O (NAME, SB): HOW; if (STORE) goto alu8; else goto just_flags_alu8; \
- case O (NAME, SW): HOW; if (STORE) goto alu16; else goto just_flags_alu16; \
- case O (NAME, SL): HOW; if (STORE) goto alu32; else goto just_flags_alu32;
-
-
-#define LOGOP(NAME, HOW) \
- case O (NAME, SB): HOW; goto log8; \
- case O (NAME, SW): HOW; goto log16; \
- case O (NAME, SL): HOW; goto log32;
-
-
+ cidx = h8_get_cache_idx (sd, pc);
+ if (cidx == (unsigned short) -1 ||
+ cidx >= sd->sim_cache_size)
+ goto illegal;
+
+ code = sd->sim_cache + cidx;
#if ADEBUG
if (debug)
@@ -1068,8 +1930,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
printf ("%x %d %s\n", pc, code->opcode,
code->op ? code->op->name : "**");
}
- cpu.stats[code->opcode]++;
-
+ h8_increment_stats (sd, code->opcode);
#endif
if (code->opcode)
@@ -1085,231 +1946,547 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
* This opcode is a fake for when we get to an
* instruction which hasnt been compiled
*/
- compile (pc);
+ compile (sd, pc);
goto top;
break;
+ case O (O_MOVAB, SL):
+ case O (O_MOVAW, SL):
+ case O (O_MOVAL, SL):
+ /* 1) Evaluate 2nd argument (dst).
+ 2) Mask / zero extend according to whether 1st argument (src)
+ is INDEXB, INDEXW, or INDEXL.
+ 3) Left-shift the result by 0, 1 or 2, according to size of mova
+ (mova/b, mova/w, mova/l).
+ 4) Add literal value of 1st argument (src).
+ 5) Store result in 3rd argument (op3).
+
+ */
+ if (fetch (sd, &code->dst, &ea))
+ goto end;
+
+ switch (OP_KIND (code->src.type)) {
+ case OP_INDEXB: ea = ea & 0xff; break;
+ case OP_INDEXW: ea = ea & 0xffff; break;
+ case OP_INDEXL: break;
+ default: goto illegal;
+ }
+
+ switch (code->opcode) {
+ case O (O_MOVAB, SL): break;
+ case O (O_MOVAW, SL): ea = ea << 1; break;
+ case O (O_MOVAL, SL): ea = ea << 2; break;
+ default: goto illegal;
+ }
+
+ ea = ea + code->src.literal;
+
+ if (store (sd, &code->op3, ea))
+ goto end;
+
+ goto next;
+
+ case O (O_SUBX, SB): /* subx, extended sub */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = -(ea + C);
+ res = rd + ea;
+ goto alu8;
+
+ case O (O_SUBX, SW): /* subx, extended sub */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = -(ea + C);
+ res = rd + ea;
+ goto alu16;
- case O (O_SUBX, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_SUBX, SL): /* subx, extended sub */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -(ea + C);
res = rd + ea;
+ goto alu32;
+
+ case O (O_ADDX, SB): /* addx, extended add */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = ea + C;
+ res = rd + ea;
goto alu8;
- case O (O_ADDX, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
- ea = C + ea;
+ case O (O_ADDX, SW): /* addx, extended add */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = ea + C;
+ res = rd + ea;
+ goto alu16;
+
+ case O (O_ADDX, SL): /* addx, extended add */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = ea + C;
+ res = rd + ea;
+ goto alu32;
+
+ case O (O_SUB, SB): /* sub.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ ea = -ea;
res = rd + ea;
goto alu8;
-#define EA ea = fetch (&code->src);
-#define RD_EA ea = fetch (&code->src); rd = fetch (&code->dst);
+ case O (O_SUB, SW): /* sub.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ ea = -ea;
+ res = rd + ea;
+ goto alu16;
- ALUOP (1, O_SUB, RD_EA;
- ea = -ea;
- res = rd + ea);
- ALUOP (1, O_NEG, EA;
- ea = -ea;
- rd = 0;
- res = rd + ea);
+ case O (O_SUB, SL): /* sub.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ ea = -ea;
+ res = rd + ea;
+ goto alu32;
- case O (O_ADD, SB):
- rd = GET_B_REG (code->dst.reg);
- ea = fetch (&code->src);
+ case O (O_NEG, SB): /* neg.b */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
res = rd + ea;
goto alu8;
- case O (O_ADD, SW):
- rd = GET_W_REG (code->dst.reg);
- ea = fetch (&code->src);
+
+ case O (O_NEG, SW): /* neg.w */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
res = rd + ea;
goto alu16;
- case O (O_ADD, SL):
- rd = GET_L_REG (code->dst.reg);
- ea = fetch (&code->src);
+
+ case O (O_NEG, SL): /* neg.l */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
res = rd + ea;
goto alu32;
+ case O (O_ADD, SB): /* add.b */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ res = rd + ea;
+ goto alu8;
- LOGOP (O_AND, RD_EA;
- res = rd & ea);
+ case O (O_ADD, SW): /* add.w */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ res = rd + ea;
+ goto alu16;
- LOGOP (O_OR, RD_EA;
- res = rd | ea);
+ case O (O_ADD, SL): /* add.l */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ res = rd + ea;
+ goto alu32;
- LOGOP (O_XOR, RD_EA;
- res = rd ^ ea);
+ case O (O_AND, SB): /* and.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd & ea;
+ goto log8;
+ case O (O_AND, SW): /* and.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd & ea;
+ goto log16;
- case O (O_MOV_TO_MEM, SB):
- res = GET_B_REG (code->src.reg);
+ case O (O_AND, SL): /* and.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd & ea;
+ goto log32;
+
+ case O (O_OR, SB): /* or.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd | ea;
goto log8;
- case O (O_MOV_TO_MEM, SW):
- res = GET_W_REG (code->src.reg);
+
+ case O (O_OR, SW): /* or.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd | ea;
goto log16;
- case O (O_MOV_TO_MEM, SL):
- res = GET_L_REG (code->src.reg);
+
+ case O (O_OR, SL): /* or.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd | ea;
goto log32;
+ case O (O_XOR, SB): /* xor.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd ^ ea;
+ goto log8;
- case O (O_MOV_TO_REG, SB):
- res = fetch (&code->src);
- SET_B_REG (code->dst.reg, res);
+ case O (O_XOR, SW): /* xor.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd ^ ea;
+ goto log16;
+
+ case O (O_XOR, SL): /* xor.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd ^ ea;
+ goto log32;
+
+ case O (O_MOV, SB):
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->dst, res))
+ goto end;
goto just_flags_log8;
- case O (O_MOV_TO_REG, SW):
- res = fetch (&code->src);
- SET_W_REG (code->dst.reg, res);
+ case O (O_MOV, SW):
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->dst, res))
+ goto end;
goto just_flags_log16;
- case O (O_MOV_TO_REG, SL):
- res = fetch (&code->src);
- SET_L_REG (code->dst.reg, res);
+ case O (O_MOV, SL):
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->dst, res))
+ goto end;
goto just_flags_log32;
- case O (O_EEPMOV, SB):
- case O (O_EEPMOV, SW):
+ case O (O_MOVMD, SB): /* movsd.b */
+ ea = GET_W_REG (4);
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_B (GET_L_REG (5));
+ SET_MEMORY_B (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 1);
+ SET_L_REG (6, GET_L_REG (6) + 1);
+ SET_W_REG (4, ea);
+ }
+ goto next;
+
+ case O (O_MOVMD, SW): /* movsd.b */
+ ea = GET_W_REG (4);
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_W (GET_L_REG (5));
+ SET_MEMORY_W (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 2);
+ SET_L_REG (6, GET_L_REG (6) + 2);
+ SET_W_REG (4, ea);
+ }
+ goto next;
+
+ case O (O_MOVMD, SL): /* movsd.b */
+ ea = GET_W_REG (4);
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_L (GET_L_REG (5));
+ SET_MEMORY_L (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 4);
+ SET_L_REG (6, GET_L_REG (6) + 4);
+ SET_W_REG (4, ea);
+ }
+ goto next;
+
+ case O (O_MOVSD, SB): /* movsd.b */
+ /* This instruction implements strncpy, with a conditional branch.
+ r4 contains n, r5 contains src, and r6 contains dst.
+ The 16-bit displacement operand is added to the pc
+ if and only if the end of string is reached before
+ n bytes are transferred. */
+
+ ea = GET_L_REG (4) & 0xffff;
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_B (GET_L_REG (5));
+ SET_MEMORY_B (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 1);
+ SET_L_REG (6, GET_L_REG (6) + 1);
+ SET_W_REG (4, ea);
+ if (rd == 0)
+ goto condtrue;
+ }
+ goto next;
+
+ case O (O_EEPMOV, SB): /* eepmov.b */
+ case O (O_EEPMOV, SW): /* eepmov.w */
if (h8300hmode || h8300smode)
{
register unsigned char *_src, *_dst;
unsigned int count = ((code->opcode == O (O_EEPMOV, SW))
- ? cpu.regs[R4_REGNUM] & 0xffff
- : cpu.regs[R4_REGNUM] & 0xff);
-
- _src = (cpu.regs[R5_REGNUM] < memory_size
- ? cpu.memory + cpu.regs[R5_REGNUM]
- : cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff));
- if ((_src + count) >= (cpu.memory + memory_size))
+ ? h8_get_reg (sd, R4_REGNUM) & 0xffff
+ : h8_get_reg (sd, R4_REGNUM) & 0xff);
+
+ _src = (h8_get_reg (sd, R5_REGNUM) < memory_size
+ ? h8_get_memory_buf (sd) + h8_get_reg (sd, R5_REGNUM)
+ : h8_get_eightbit_buf (sd) +
+ (h8_get_reg (sd, R5_REGNUM) & 0xff));
+ if ((_src + count) >= (h8_get_memory_buf (sd) + memory_size))
{
- if ((_src + count) >= (cpu.eightbit + 0x100))
+ if ((_src + count) >= (h8_get_eightbit_buf (sd) + 0x100))
goto illegal;
}
- _dst = (cpu.regs[R6_REGNUM] < memory_size
- ? cpu.memory + cpu.regs[R6_REGNUM]
- : cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff));
- if ((_dst + count) >= (cpu.memory + memory_size))
+ _dst = (h8_get_reg (sd, R6_REGNUM) < memory_size
+ ? h8_get_memory_buf (sd) + h8_get_reg (sd, R6_REGNUM)
+ : h8_get_eightbit_buf (sd) +
+ (h8_get_reg (sd, R6_REGNUM) & 0xff));
+
+ if ((_dst + count) >= (h8_get_memory_buf (sd) + memory_size))
{
- if ((_dst + count) >= (cpu.eightbit + 0x100))
+ if ((_dst + count) >= (h8_get_eightbit_buf (sd) + 0x100))
goto illegal;
}
memcpy (_dst, _src, count);
- cpu.regs[R5_REGNUM] += count;
- cpu.regs[R6_REGNUM] += count;
- cpu.regs[R4_REGNUM] &= ((code->opcode == O (O_EEPMOV, SW))
- ? (~0xffff) : (~0xff));
+ h8_set_reg (sd, R5_REGNUM, h8_get_reg (sd, R5_REGNUM) + count);
+ h8_set_reg (sd, R6_REGNUM, h8_get_reg (sd, R6_REGNUM) + count);
+ h8_set_reg (sd, R4_REGNUM, h8_get_reg (sd, R4_REGNUM) &
+ ((code->opcode == O (O_EEPMOV, SW))
+ ? (~0xffff) : (~0xff)));
cycles += 2 * count;
goto next;
}
goto illegal;
- case O (O_ADDS, SL):
+ case O (O_ADDS, SL): /* adds (.l) */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
SET_L_REG (code->dst.reg,
GET_L_REG (code->dst.reg)
+ code->src.literal);
goto next;
- case O (O_SUBS, SL):
+ case O (O_SUBS, SL): /* subs (.l) */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
SET_L_REG (code->dst.reg,
GET_L_REG (code->dst.reg)
- code->src.literal);
goto next;
- case O (O_CMP, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_CMP, SB): /* cmp.b */
+ if (fetch (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -ea;
res = rd + ea;
goto just_flags_alu8;
- case O (O_CMP, SW):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_CMP, SW): /* cmp.w */
+ if (fetch (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -ea;
res = rd + ea;
goto just_flags_alu16;
- case O (O_CMP, SL):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_CMP, SL): /* cmp.l */
+ if (fetch (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -ea;
res = rd + ea;
goto just_flags_alu32;
-
- case O (O_DEC, SB):
+ case O (O_DEC, SB): /* dec.b */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_B_REG (code->src.reg);
ea = -1;
res = rd + ea;
SET_B_REG (code->src.reg, res);
goto just_flags_inc8;
- case O (O_DEC, SW):
+ case O (O_DEC, SW): /* dec.w */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_W_REG (code->dst.reg);
ea = -code->src.literal;
res = rd + ea;
SET_W_REG (code->dst.reg, res);
goto just_flags_inc16;
- case O (O_DEC, SL):
+ case O (O_DEC, SL): /* dec.l */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_L_REG (code->dst.reg);
ea = -code->src.literal;
res = rd + ea;
SET_L_REG (code->dst.reg, res);
goto just_flags_inc32;
-
- case O (O_INC, SB):
+ case O (O_INC, SB): /* inc.b */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_B_REG (code->src.reg);
ea = 1;
res = rd + ea;
SET_B_REG (code->src.reg, res);
goto just_flags_inc8;
- case O (O_INC, SW):
+ case O (O_INC, SW): /* inc.w */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_W_REG (code->dst.reg);
ea = code->src.literal;
res = rd + ea;
SET_W_REG (code->dst.reg, res);
goto just_flags_inc16;
- case O (O_INC, SL):
+ case O (O_INC, SL): /* inc.l */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_L_REG (code->dst.reg);
ea = code->src.literal;
res = rd + ea;
SET_L_REG (code->dst.reg, res);
goto just_flags_inc32;
-#define GET_CCR(x) BUILDSR();x = cpu.ccr
-#define GET_EXR(x) BUILDEXR ();x = cpu.exr
+ case O (O_LDC, SB): /* ldc.b */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ goto setc;
+
+ case O (O_LDC, SW): /* ldc.w */
+ if (fetch (sd, &code->src, &res))
+ goto end;
- case O (O_LDC, SB):
- case O (O_LDC, SW):
- res = fetch (&code->src);
+ /* Word operand, value from MSB, must be shifted. */
+ res >>= 8;
goto setc;
- case O (O_STC, SB):
- case O (O_STC, SW):
- if (code->src.type == OP_CCR)
+
+ case O (O_LDC, SL): /* ldc.l */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ switch (code->dst.type) {
+ case X (OP_SBR, SL):
+ h8_set_sbr (sd, res);
+ break;
+ case X (OP_VBR, SL):
+ h8_set_vbr (sd, res);
+ break;
+ default:
+ goto illegal;
+ }
+ goto next;
+
+ case O (O_STC, SW): /* stc.w */
+ case O (O_STC, SB): /* stc.b */
+ if (code->src.type == X (OP_CCR, SB))
{
- GET_CCR (res);
+ BUILDSR (sd);
+ res = h8_get_ccr (sd);
}
- else if (code->src.type == OP_EXR && h8300smode)
+ else if (code->src.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (res);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ res = h8_get_exr (sd);
}
else
goto illegal;
- store (&code->dst, res);
+
+ /* Word operand, value to MSB, must be shifted. */
+ if (code->opcode == X (O_STC, SW))
+ res <<= 8;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+ case O (O_STC, SL): /* stc.l */
+ switch (code->src.type) {
+ case X (OP_SBR, SL):
+ res = h8_get_sbr (sd);
+ break;
+ case X (OP_VBR, SL):
+ res = h8_get_vbr (sd);
+ break;
+ default:
+ goto illegal;
+ }
+ if (store (sd, &code->dst, res))
+ goto end;
goto next;
- case O (O_ANDC, SB):
- if (code->dst.type == OP_CCR)
+ case O (O_ANDC, SB): /* andc.b */
+ if (code->dst.type == X (OP_CCR, SB))
{
- GET_CCR (rd);
+ BUILDSR (sd);
+ rd = h8_get_ccr (sd);
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (code->dst.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (rd);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ res = h8_get_exr (sd);
}
else
goto illegal;
@@ -1317,14 +2494,17 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
res = rd & ea;
goto setc;
- case O (O_ORC, SB):
- if (code->dst.type == OP_CCR)
+ case O (O_ORC, SB): /* orc.b */
+ if (code->dst.type == X (OP_CCR, SB))
{
- GET_CCR (rd);
+ BUILDSR (sd);
+ rd = h8_get_ccr (sd);
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (code->dst.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (rd);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ rd = h8_get_exr (sd);
}
else
goto illegal;
@@ -1332,14 +2512,17 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
res = rd | ea;
goto setc;
- case O (O_XORC, SB):
- if (code->dst.type == OP_CCR)
+ case O (O_XORC, SB): /* xorc.b */
+ if (code->dst.type == X (OP_CCR, SB))
{
- GET_CCR (rd);
+ BUILDSR (sd);
+ rd = h8_get_ccr (sd);
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (code->dst.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (rd);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ rd = h8_get_exr (sd);
}
else
goto illegal;
@@ -1347,79 +2530,139 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
res = rd ^ ea;
goto setc;
+ case O (O_BRAS, SB): /* bra/s */
+ /* This is basically an ordinary branch, with a delay slot. */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+
+ if ((res & 1) == 0)
+ goto illegal;
+
+ res -= 1;
+
+ /* Execution continues at next instruction, but
+ delayed_branch is set up for next cycle. */
+ h8_set_delayed_branch (sd, code->next_pc + res);
+ pc = code->next_pc;
+ goto end;
+
+ case O (O_BRAB, SB): /* bra rd.b */
+ case O (O_BRAW, SW): /* bra rd.w */
+ case O (O_BRAL, SL): /* bra erd.l */
+ if (fetch (sd, &code->src, &rd))
+ goto end;
+ switch (OP_SIZE (code->opcode)) {
+ case SB: rd &= 0xff; break;
+ case SW: rd &= 0xffff; break;
+ case SL: rd &= 0xffffffff; break;
+ }
+ pc = code->next_pc + rd;
+ goto end;
+
+ case O (O_BRABC, SB): /* bra/bc, branch if bit clear */
+ case O (O_BRABS, SB): /* bra/bs, branch if bit set */
+ case O (O_BSRBC, SB): /* bsr/bc, call if bit clear */
+ case O (O_BSRBS, SB): /* bsr/bs, call if bit set */
+ if (fetch (sd, &code->dst, &rd) ||
+ fetch (sd, &code->src, &bit))
+ goto end;
+
+ if (code->opcode == O (O_BRABC, SB) || /* branch if clear */
+ code->opcode == O (O_BSRBC, SB)) /* call if clear */
+ {
+ if ((rd & (1 << bit))) /* no branch */
+ goto next;
+ }
+ else /* branch/call if set */
+ {
+ if (!(rd & (1 << bit))) /* no branch */
+ goto next;
+ }
+
+ if (fetch (sd, &code->op3, &res)) /* branch */
+ goto end;
+ pc = code->next_pc + res;
+
+ if (code->opcode == O (O_BRABC, SB) ||
+ code->opcode == O (O_BRABS, SB)) /* branch */
+ goto end;
+ else /* call */
+ goto call;
- case O (O_BRA, SB):
+ case O (O_BRA, SN):
+ case O (O_BRA, SL):
+ case O (O_BRA, SW):
+ case O (O_BRA, SB): /* bra, branch always */
if (1)
goto condtrue;
goto next;
- case O (O_BRN, SB):
+ case O (O_BRN, SB): /* brn, ;-/ branch never? */
if (0)
goto condtrue;
goto next;
- case O (O_BHI, SB):
+ case O (O_BHI, SB): /* bhi */
if ((C || Z) == 0)
goto condtrue;
goto next;
- case O (O_BLS, SB):
+ case O (O_BLS, SB): /* bls */
if ((C || Z))
goto condtrue;
goto next;
- case O (O_BCS, SB):
+ case O (O_BCS, SB): /* bcs, branch if carry set */
if ((C == 1))
goto condtrue;
goto next;
- case O (O_BCC, SB):
+ case O (O_BCC, SB): /* bcc, branch if carry clear */
if ((C == 0))
goto condtrue;
goto next;
- case O (O_BEQ, SB):
+ case O (O_BEQ, SB): /* beq, branch if zero set */
if (Z)
goto condtrue;
goto next;
- case O (O_BGT, SB):
+ case O (O_BGT, SB): /* bgt */
if (((Z || (N ^ V)) == 0))
goto condtrue;
goto next;
-
- case O (O_BLE, SB):
+ case O (O_BLE, SB): /* ble */
if (((Z || (N ^ V)) == 1))
goto condtrue;
goto next;
- case O (O_BGE, SB):
+ case O (O_BGE, SB): /* bge */
if ((N ^ V) == 0)
goto condtrue;
goto next;
- case O (O_BLT, SB):
+ case O (O_BLT, SB): /* blt */
if ((N ^ V))
goto condtrue;
goto next;
- case O (O_BMI, SB):
+ case O (O_BMI, SB): /* bmi */
if ((N))
goto condtrue;
goto next;
- case O (O_BNE, SB):
+ case O (O_BNE, SB): /* bne, branch if zero clear */
if ((Z == 0))
goto condtrue;
goto next;
- case O (O_BPL, SB):
+ case O (O_BPL, SB): /* bpl */
if (N == 0)
goto condtrue;
goto next;
- case O (O_BVC, SB):
+ case O (O_BVC, SB): /* bvc */
if ((V == 0))
goto condtrue;
goto next;
- case O (O_BVS, SB):
+ case O (O_BVS, SB): /* bvs */
if ((V == 1))
goto condtrue;
goto next;
@@ -1451,10 +2694,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Set the address of 256 free locations where command line is
stored. */
addr_cmdline = cmdline_location();
- cpu.regs[0] = addr_cmdline;
+ h8_set_reg (sd, 0, addr_cmdline);
/* Counting the no. of commandline arguments. */
- for (i = 0; ptr_command_line[i] != NULL; i++)
+ for (i = 0; h8_get_cmdline_arg (sd, i) != NULL; i++)
continue;
/* No. of arguments in the command line. */
@@ -1484,7 +2727,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
ind_arg_len = 0;
/* The size of the commandline argument. */
- ind_arg_len = (strlen (ptr_command_line[i]) + 1);
+ ind_arg_len = strlen (h8_get_cmdline_arg (sd, i) + 1);
/* The total size of the command line string. */
size_cmdline += ind_arg_len;
@@ -1495,7 +2738,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
given may behave unpredictably. */
if (size_cmdline >= 256)
{
- cpu.regs[0] = 0;
+ h8_set_reg (sd, 0, 0);
goto next;
}
else
@@ -1507,7 +2750,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
{
SET_MEMORY_B ((current_location +
(sizeof (char) * j)),
- *(ptr_command_line[i] +
+ *(h8_get_cmdline_arg (sd, i) +
sizeof (char) * j));
}
@@ -1518,7 +2761,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
/* This is the original position of the stack pointer. */
- old_sp = cpu.regs[7];
+ old_sp = h8_get_reg (sd, SP_REGNUM);
/* We need space from the stack to store the pointers to argvs. */
/* As we will infringe on the stack, we need to shift the stack
@@ -1568,16 +2811,16 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
free (argv_ptrs);
for (i = 0; i <= no_of_args; i++)
{
- free (ptr_command_line[i]);
+ free (h8_get_cmdline_arg (sd, i));
}
- free (ptr_command_line);
+ free (h8_get_command_line (sd));
/* The no. of argv arguments are returned in Reg 0. */
- cpu.regs[0] = no_of_args;
+ h8_set_reg (sd, 0, no_of_args);
/* The Pointer to argv in Register 1. */
- cpu.regs[1] = new_sp;
+ h8_set_reg (sd, 1, new_sp);
/* Setting the stack pointer to the new value. */
- cpu.regs[7] = new_sp;
+ h8_set_reg (sd, SP_REGNUM, new_sp);
}
goto next;
@@ -1592,21 +2835,21 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int i; /* Loop counter */
int filename_ptr; /* Pointer to filename in cpu memory. */
- /* Setting filename_ptr to first argument of open. */
- filename_ptr = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
-
- /* Trying to get mode. */
- if (h8300hmode || h8300smode)
+ /* Setting filename_ptr to first argument of open, */
+ /* and trying to get mode. */
+ if (h8300sxmode || h8300hmode || h8300smode)
{
- mode = GET_MEMORY_L (cpu.regs[7] + 4);
+ filename_ptr = GET_L_REG (0);
+ mode = GET_MEMORY_L (h8_get_reg (sd, SP_REGNUM) + 4);
}
else
{
- mode = GET_MEMORY_W (cpu.regs[7] + 2);
+ filename_ptr = GET_W_REG (0);
+ mode = GET_MEMORY_W (h8_get_reg (sd, SP_REGNUM) + 2);
}
/* Trying to find the length of the filename. */
- temp_char = GET_MEMORY_B (cpu.regs[0]);
+ temp_char = GET_MEMORY_B (h8_get_reg (sd, 0));
len = 1;
while (temp_char != '\0')
@@ -1629,7 +2872,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
open_return = sim_callback->open (sim_callback, filename, mode);
/* Return value in register 0. */
- cpu.regs[0] = open_return;
+ h8_set_reg (sd, 0, open_return);
/* Freeing memory used for filename. */
free (filename);
@@ -1657,12 +2900,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* The characters read are stored in cpu memory. */
for (i = 0; i < buf_size; i++)
{
- SET_MEMORY_B ((cpu.regs[1] + (sizeof (char) * i)),
+ SET_MEMORY_B ((h8_get_reg (sd, 1) + (sizeof (char) * i)),
*(char_ptr + (sizeof (char) * i)));
}
/* Return value in Register 0. */
- cpu.regs[0] = read_return;
+ h8_set_reg (sd, 0, read_return);
/* Freeing memory used as buffer. */
free (char_ptr);
@@ -1698,7 +2941,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
write_return = sim_callback->write (sim_callback, fd, ptr, len);
/* Return value in Register 0. */
- cpu.regs[0] = write_return;
+ h8_set_reg (sd, 0, write_return);
/* Freeing memory used as buffer. */
free (ptr);
@@ -1721,7 +2964,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
sim_callback->lseek (sim_callback, fd, offset, origin);
/* Return value in register 0. */
- cpu.regs[0] = lseek_return;
+ h8_set_reg (sd, 0, lseek_return);
}
goto next;
@@ -1736,7 +2979,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
close_return = sim_callback->close (sim_callback, fd);
/* Return value in register 0. */
- cpu.regs[0] = close_return;
+ h8_set_reg (sd, 0, close_return);
}
goto next;
@@ -1783,7 +3026,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
SET_MEMORY_L (stat_ptr, stat_rec.st_ctime);
/* Return value in register 0. */
- cpu.regs[0] = fstat_return;
+ h8_set_reg (sd, 0, fstat_return);
}
goto next;
@@ -1803,7 +3046,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
filename_ptr = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
/* Trying to find the length of the filename. */
- temp_char = GET_MEMORY_B (cpu.regs[0]);
+ temp_char = GET_MEMORY_B (h8_get_reg (sd, 0));
len = 1;
while (temp_char != '\0')
@@ -1823,7 +3066,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
/* Setting stat_ptr to second argument of stat. */
- /* stat_ptr = cpu.regs[1]; */
+ /* stat_ptr = h8_get_reg (sd, 1); */
stat_ptr = h8300hmode ? GET_L_REG (1) : GET_W_REG (1);
/* Callback stat and return. */
@@ -1832,10 +3075,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Have stat_ptr point to starting of stat_rec. */
temp_stat_ptr = (char *) (&stat_rec);
-
+
/* Freeing memory used for filename. */
free (filename);
-
+
/* Setting up the stat structure returned. */
SET_MEMORY_W (stat_ptr, stat_rec.st_dev);
stat_ptr += 2;
@@ -1858,52 +3101,383 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
SET_MEMORY_L (stat_ptr, stat_rec.st_mtime);
stat_ptr += 8;
SET_MEMORY_L (stat_ptr, stat_rec.st_ctime);
-
+
/* Return value in register 0. */
- cpu.regs[0] = stat_return;
+ h8_set_reg (sd, 0, stat_return);
}
goto next;
/* End of system call processing. */
- ONOT (O_NOT, rd = ~rd; v = 0;);
- OSHIFTS (O_SHLL,
- c = rd & hm; v = 0; rd <<= 1,
- c = rd & (hm >> 1); v = 0; rd <<= 2);
- OSHIFTS (O_SHLR,
- c = rd & 1; v = 0; rd = (unsigned int) rd >> 1,
- c = rd & 2; v = 0; rd = (unsigned int) rd >> 2);
- OSHIFTS (O_SHAL,
- c = rd & hm; v = (rd & hm) != ((rd & (hm >> 1)) << 1); rd <<= 1,
- c = rd & (hm >> 1); v = (rd & (hm >> 1)) != ((rd & (hm >> 2)) << 2); rd <<= 2);
- OSHIFTS (O_SHAR,
- t = rd & hm; c = rd & 1; v = 0; rd >>= 1; rd |= t,
- t = rd & hm; c = rd & 2; v = 0; rd >>= 2; rd |= t | t >> 1);
- OSHIFTS (O_ROTL,
- c = rd & hm; v = 0; rd <<= 1; rd |= C,
- c = rd & hm; v = 0; rd <<= 1; rd |= C; c = rd & hm; rd <<= 1; rd |= C);
- OSHIFTS (O_ROTR,
- c = rd & 1; v = 0; rd = (unsigned int) rd >> 1; if (c) rd |= hm,
- c = rd & 1; v = 0; rd = (unsigned int) rd >> 1; if (c) rd |= hm; c = rd & 1; rd = (unsigned int) rd >> 1; if (c) rd |= hm);
- OSHIFTS (O_ROTXL,
- t = rd & hm; rd <<= 1; rd |= C; c = t; v = 0,
- t = rd & hm; rd <<= 1; rd |= C; c = t; v = 0; t = rd & hm; rd <<= 1; rd |= C; c = t);
- OSHIFTS (O_ROTXR,
- t = rd & 1; rd = (unsigned int) rd >> 1; if (C) rd |= hm; c = t; v = 0,
- t = rd & 1; rd = (unsigned int) rd >> 1; if (C) rd |= hm; c = t; v = 0; t = rd & 1; rd = (unsigned int) rd >> 1; if (C) rd |= hm; c = t);
-
- case O (O_JMP, SB):
- {
- pc = fetch (&code->src);
+ case O (O_NOT, SB): /* not.b */
+ if (fetch2 (sd, &code->src, &rd))
+ goto end;
+ rd = ~rd;
+ v = 0;
+ goto shift8;
+
+ case O (O_NOT, SW): /* not.w */
+ if (fetch2 (sd, &code->src, &rd))
+ goto end;
+ rd = ~rd;
+ v = 0;
+ goto shift16;
+
+ case O (O_NOT, SL): /* not.l */
+ if (fetch2 (sd, &code->src, &rd))
+ goto end;
+ rd = ~rd;
+ v = 0;
+ goto shift32;
+
+ case O (O_SHLL, SB): /* shll.b */
+ case O (O_SHLR, SB): /* shlr.b */
+ if (fetch2 (sd, &code->dst, &rd))
goto end;
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHLL, SB))
+ {
+ v = (ea > 8);
+ c = rd & (0x80 >> (ea - 1));
+ rd <<= ea;
+ }
+ else
+ {
+ v = 0;
+ c = rd & (1 << (ea - 1));
+ rd = (unsigned char) rd >> ea;
+ }
+ goto shift8;
+
+ case O (O_SHLL, SW): /* shll.w */
+ case O (O_SHLR, SW): /* shlr.w */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHLL, SW))
+ {
+ v = (ea > 16);
+ c = rd & (0x8000 >> (ea - 1));
+ rd <<= ea;
+ }
+ else
+ {
+ v = 0;
+ c = rd & (1 << (ea - 1));
+ rd = (unsigned short) rd >> ea;
+ }
+ goto shift16;
+
+ case O (O_SHLL, SL): /* shll.l */
+ case O (O_SHLR, SL): /* shlr.l */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHLL, SL))
+ {
+ v = (ea > 32);
+ c = rd & (0x80000000 >> (ea - 1));
+ rd <<= ea;
+ }
+ else
+ {
+ v = 0;
+ c = rd & (1 << (ea - 1));
+ rd = (unsigned int) rd >> ea;
+ }
+ goto shift32;
+
+ case O (O_SHAL, SB):
+ case O (O_SHAR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHAL, SB))
+ {
+ c = rd & (0x80 >> (ea - 1));
+ res = rd >> (7 - ea);
+ v = ((res & 1) && !(res & 2))
+ || (!(res & 1) && (res & 2));
+ rd <<= ea;
+ }
+ else
+ {
+ c = rd & (1 << (ea - 1));
+ v = 0;
+ rd = ((signed char) rd) >> ea;
+ }
+ goto shift8;
+
+ case O (O_SHAL, SW):
+ case O (O_SHAR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHAL, SW))
+ {
+ c = rd & (0x8000 >> (ea - 1));
+ res = rd >> (15 - ea);
+ v = ((res & 1) && !(res & 2))
+ || (!(res & 1) && (res & 2));
+ rd <<= ea;
+ }
+ else
+ {
+ c = rd & (1 << (ea - 1));
+ v = 0;
+ rd = ((signed short) rd) >> ea;
+ }
+ goto shift16;
+
+ case O (O_SHAL, SL):
+ case O (O_SHAR, SL):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHAL, SL))
+ {
+ c = rd & (0x80000000 >> (ea - 1));
+ res = rd >> (31 - ea);
+ v = ((res & 1) && !(res & 2))
+ || (!(res & 1) && (res & 2));
+ rd <<= ea;
+ }
+ else
+ {
+ c = rd & (1 << (ea - 1));
+ v = 0;
+ rd = ((signed int) rd) >> ea;
+ }
+ goto shift32;
+
+ case O (O_ROTL, SB):
+ case O (O_ROTR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTL, SB))
+ {
+ c = rd & 0x80;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
+ }
+ else
+ {
+ c = rd & 1;
+ rd = ((unsigned char) rd) >> 1;
+ if (c)
+ rd |= 0x80;
+ }
+
+ v = 0;
+ goto shift8;
+
+ case O (O_ROTL, SW):
+ case O (O_ROTR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTL, SW))
+ {
+ c = rd & 0x8000;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
+ }
+ else
+ {
+ c = rd & 1;
+ rd = ((unsigned short) rd) >> 1;
+ if (c)
+ rd |= 0x8000;
+ }
+
+ v = 0;
+ goto shift16;
+
+ case O (O_ROTL, SL):
+ case O (O_ROTR, SL):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTL, SL))
+ {
+ c = rd & 0x80000000;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
+ }
+ else
+ {
+ c = rd & 1;
+ rd = ((unsigned int) rd) >> 1;
+ if (c)
+ rd |= 0x80000000;
+ }
+
+ v = 0;
+ goto shift32;
+
+ case O (O_ROTXL, SB):
+ case O (O_ROTXR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTXL, SB))
+ {
+ res = rd & 0x80;
+ rd <<= 1;
+ if (C)
+ rd |= 1;
+ c = res;
+ }
+ else
+ {
+ res = rd & 1;
+ rd = ((unsigned char) rd) >> 1;
+ if (C)
+ rd |= 0x80;
+ c = res;
+ }
+
+ v = 0;
+ goto shift8;
+
+ case O (O_ROTXL, SW):
+ case O (O_ROTXR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTXL, SW))
+ {
+ res = rd & 0x8000;
+ rd <<= 1;
+ if (C)
+ rd |= 1;
+ c = res;
+ }
+ else
+ {
+ res = rd & 1;
+ rd = ((unsigned short) rd) >> 1;
+ if (C)
+ rd |= 0x8000;
+ c = res;
+ }
+
+ v = 0;
+ goto shift16;
+
+ case O (O_ROTXL, SL):
+ case O (O_ROTXR, SL):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTXL, SL))
+ {
+ res = rd & 0x80000000;
+ rd <<= 1;
+ if (C)
+ rd |= 1;
+ c = res;
+ }
+ else
+ {
+ res = rd & 1;
+ rd = ((unsigned int) rd) >> 1;
+ if (C)
+ rd |= 0x80000000;
+ c = res;
+ }
+
+ v = 0;
+ goto shift32;
+
+ case O (O_JMP, SN):
+ case O (O_JMP, SL):
+ case O (O_JMP, SB): /* jmp */
+ case O (O_JMP, SW):
+ {
+ fetch (sd, &code->src, &pc);
+ goto end;
}
- case O (O_JSR, SB):
+ case O (O_JSR, SN):
+ case O (O_JSR, SL):
+ case O (O_JSR, SB): /* jsr, jump to subroutine */
+ case O (O_JSR, SW):
{
int tmp;
- pc = fetch (&code->src);
+ if (fetch (sd, &code->src, &pc))
+ goto end;
call:
- tmp = cpu.regs[7];
+ tmp = h8_get_reg (sd, SP_REGNUM);
if (h8300hmode)
{
@@ -1915,19 +3489,24 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
tmp -= 2;
SET_MEMORY_W (tmp, code->next_pc);
}
- cpu.regs[7] = tmp;
+ h8_set_reg (sd, SP_REGNUM, tmp);
goto end;
}
- case O (O_BSR, SB):
- pc = code->src.literal;
+
+ case O (O_BSR, SW):
+ case O (O_BSR, SL):
+ case O (O_BSR, SB): /* bsr, branch to subroutine */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ pc = code->next_pc + res;
goto call;
- case O (O_RTS, SN):
+ case O (O_RTS, SN): /* rts, return from subroutine */
{
int tmp;
- tmp = cpu.regs[7];
+ tmp = h8_get_reg (sd, SP_REGNUM);
if (h8300hmode)
{
@@ -1940,67 +3519,386 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
tmp += 2;
}
- cpu.regs[7] = tmp;
+ h8_set_reg (sd, SP_REGNUM, tmp);
goto end;
}
- case O (O_ILL, SB):
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGILL;
+ case O (O_ILL, SB): /* illegal */
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
goto end;
- case O (O_SLEEP, SN):
- /* FIXME: Doesn't this break for breakpoints when r0
- contains just the right (er, wrong) value? */
- cpu.state = SIM_STATE_STOPPED;
- /* The format of r0 is defined by target newlib. Expand
- the macros here instead of looking for .../sys/wait.h. */
-#define SIM_WIFEXITED(v) (((v) & 0xff) == 0)
-#define SIM_WIFSIGNALED(v) (((v) & 0x7f) > 0 && (((v) & 0x7f) < 0x7f))
- if (! SIM_WIFEXITED (cpu.regs[0]) && SIM_WIFSIGNALED (cpu.regs[0]))
- cpu.exception = SIGILL;
+
+ case O (O_SLEEP, SN): /* sleep */
+ /* Check for magic numbers in r1 and r2. */
+ if ((h8_get_reg (sd, R1_REGNUM) & 0xffff) == LIBC_EXIT_MAGIC1 &&
+ (h8_get_reg (sd, R2_REGNUM) & 0xffff) == LIBC_EXIT_MAGIC2 &&
+ SIM_WIFEXITED (h8_get_reg (sd, 0)))
+ {
+ /* This trap comes from _exit, not from gdb. */
+ sim_engine_set_run_state (sd, sim_exited,
+ SIM_WEXITSTATUS (h8_get_reg (sd, 0)));
+ }
else
- cpu.exception = SIGTRAP;
+ {
+ /* Treat it as a sigtrap. */
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
+ }
goto end;
+
case O (O_BPT, SN):
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGTRAP;
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
goto end;
- OBITOP (O_BNOT, 1, 1, ea ^= m);
- OBITOP (O_BTST, 1, 0, nz = ea & m);
- OBITOP (O_BCLR, 1, 1, ea &= ~m);
- OBITOP (O_BSET, 1, 1, ea |= m);
- OBITOP (O_BLD, 1, 0, c = ea & m);
- OBITOP (O_BILD, 1, 0, c = !(ea & m));
+ case O (O_BSETEQ, SB):
+ if (Z)
+ goto bset;
+ goto next;
+
+ case O (O_BSETNE, SB):
+ if (!Z)
+ goto bset;
+ goto next;
+
+ case O (O_BCLREQ, SB):
+ if (Z)
+ goto bclr;
+ goto next;
+
+ case O (O_BCLRNE, SB):
+ if (!Z)
+ goto bclr;
+ goto next;
+
+ OBITOP (O_BNOT, 1, 1, ea ^= m); /* bnot */
+ OBITOP (O_BTST, 1, 0, nz = ea & m); /* btst */
+ bset:
+ OBITOP (O_BSET, 1, 1, ea |= m); /* bset */
+ bclr:
+ OBITOP (O_BCLR, 1, 1, ea &= ~m); /* bclr */
+ OBITOP (O_BLD, 1, 0, c = ea & m); /* bld */
+ OBITOP (O_BILD, 1, 0, c = !(ea & m)); /* bild */
OBITOP (O_BST, 1, 1, ea &= ~m;
- if (C) ea |= m);
+ if (C) ea |= m); /* bst */
OBITOP (O_BIST, 1, 1, ea &= ~m;
- if (!C) ea |= m);
- OBITOP (O_BAND, 1, 0, c = (ea & m) && C);
- OBITOP (O_BIAND, 1, 0, c = !(ea & m) && C);
- OBITOP (O_BOR, 1, 0, c = (ea & m) || C);
- OBITOP (O_BIOR, 1, 0, c = !(ea & m) || C);
- OBITOP (O_BXOR, 1, 0, c = ((ea & m) != 0) != C);
- OBITOP (O_BIXOR, 1, 0, c = !(ea & m) != C);
-
-#define MOP(bsize, signed) \
- mop (code, bsize, signed); \
- goto next;
-
- case O (O_MULS, SB):
- MOP (1, 1);
- break;
- case O (O_MULS, SW):
- MOP (0, 1);
- break;
- case O (O_MULU, SB):
- MOP (1, 0);
- break;
- case O (O_MULU, SW):
- MOP (0, 0);
- break;
+ if (!C) ea |= m); /* bist */
+ OBITOP (O_BSTZ, 1, 1, ea &= ~m;
+ if (Z) ea |= m); /* bstz */
+ OBITOP (O_BISTZ, 1, 1, ea &= ~m;
+ if (!Z) ea |= m); /* bistz */
+ OBITOP (O_BAND, 1, 0, c = (ea & m) && C); /* band */
+ OBITOP (O_BIAND, 1, 0, c = !(ea & m) && C); /* biand */
+ OBITOP (O_BOR, 1, 0, c = (ea & m) || C); /* bor */
+ OBITOP (O_BIOR, 1, 0, c = !(ea & m) || C); /* bior */
+ OBITOP (O_BXOR, 1, 0, c = ((ea & m) != 0)!= C); /* bxor */
+ OBITOP (O_BIXOR, 1, 0, c = !(ea & m) != C); /* bixor */
+
+ case O (O_BFLD, SB): /* bfld */
+ /* bitfield load */
+ ea = 0;
+ if (fetch (sd, &code->src, &bit))
+ goto end;
+
+ if (bit != 0)
+ {
+ if (fetch (sd, &code->dst, &ea))
+ goto end;
+
+ ea &= bit;
+ while (!(bit & 1))
+ {
+ ea >>= 1;
+ bit >>= 1;
+ }
+ }
+ if (store (sd, &code->op3, ea))
+ goto end;
+
+ goto next;
- case O (O_TAS, SB):
+ case O(O_BFST, SB): /* bfst */
+ /* bitfield store */
+ /* NOTE: the imm8 value is in dst, and the ea value
+ (which is actually the destination) is in op3.
+ It has to be that way, to avoid breaking the assembler. */
+
+ if (fetch (sd, &code->dst, &bit)) /* imm8 */
+ goto end;
+ if (bit == 0) /* noop -- nothing to do. */
+ goto next;
+
+ if (fetch (sd, &code->src, &rd)) /* reg8 src */
+ goto end;
+
+ if (fetch2 (sd, &code->op3, &ea)) /* ea dst */
+ goto end;
+
+ /* Left-shift the register data into position. */
+ for (tmp = bit; !(tmp & 1); tmp >>= 1)
+ rd <<= 1;
+
+ /* Combine it with the neighboring bits. */
+ ea = (ea & ~bit) | (rd & bit);
+
+ /* Put it back. */
+ if (store2 (sd, &code->op3, ea))
+ goto end;
+ goto next;
+
+ case O (O_CLRMAC, SN): /* clrmac */
+ h8_set_mach (sd, 0);
+ h8_set_macl (sd, 0);
+ h8_set_macZ (sd, 1);
+ h8_set_macV (sd, 0);
+ h8_set_macN (sd, 0);
+ goto next;
+
+ case O (O_STMAC, SL): /* stmac, 260 */
+ switch (code->src.type) {
+ case X (OP_MACH, SL):
+ res = h8_get_mach (sd);
+ if (res & 0x200) /* sign extend */
+ res |= 0xfffffc00;
+ break;
+ case X (OP_MACL, SL):
+ res = h8_get_macl (sd);
+ break;
+ default: goto illegal;
+ }
+ nz = !h8_get_macZ (sd);
+ n = h8_get_macN (sd);
+ v = h8_get_macV (sd);
+
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_LDMAC, SL): /* ldmac, 179 */
+ if (fetch (sd, &code->src, &rd))
+ goto end;
+
+ switch (code->dst.type) {
+ case X (OP_MACH, SL):
+ rd &= 0x3ff; /* Truncate to 10 bits */
+ h8_set_mach (sd, rd);
+ break;
+ case X (OP_MACL, SL):
+ h8_set_macl (sd, rd);
+ break;
+ default: goto illegal;
+ }
+ h8_set_macV (sd, 0);
+ goto next;
+
+ case O (O_MAC, SW):
+ if (fetch (sd, &code->src, &rd) ||
+ fetch (sd, &code->dst, &res))
+ goto end;
+
+ /* Ye gods, this is non-portable!
+ However, the existing mul/div code is similar. */
+ res = SEXTSHORT (res) * SEXTSHORT (rd);
+
+ if (h8_get_macS (sd)) /* Saturating mode */
+ {
+ long long mac = h8_get_macl (sd);
+
+ if (mac & 0x80000000) /* sign extend */
+ mac |= 0xffffffff00000000LL;
+
+ mac += res;
+ if (mac > 0x7fffffff || mac < 0xffffffff80000000LL)
+ h8_set_macV (sd, 1);
+ h8_set_macZ (sd, (mac == 0));
+ h8_set_macN (sd, (mac < 0));
+ h8_set_macl (sd, (int) mac);
+ }
+ else /* "Less Saturating" mode */
+ {
+ long long mac = h8_get_mach (sd);
+ mac <<= 32;
+ mac += h8_get_macl (sd);
+
+ if (mac & 0x20000000000LL) /* sign extend */
+ mac |= 0xfffffc0000000000LL;
+
+ mac += res;
+ if (mac > 0x1ffffffffffLL ||
+ mac < (long long) 0xfffffe0000000000LL)
+ h8_set_macV (sd, 1);
+ h8_set_macZ (sd, (mac == 0));
+ h8_set_macN (sd, (mac < 0));
+ h8_set_macl (sd, (int) mac);
+ mac >>= 32;
+ h8_set_mach (sd, (int) (mac & 0x3ff));
+ }
+ goto next;
+
+ case O (O_MULS, SW): /* muls.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfff0;
+ else
+ ea = SEXTSHORT (ea);
+
+ res = SEXTSHORT (ea * SEXTSHORT (rd));
+
+ n = res & 0x8000;
+ nz = res & 0xffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULS, SL): /* muls.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ res = ea * rd;
+
+ n = res & 0x80000000;
+ nz = res & 0xffffffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_MULSU, SL): /* muls/u.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ /* Compute upper 32 bits of the 64-bit result. */
+ res = (((long long) ea) * ((long long) rd)) >> 32;
+
+ n = res & 0x80000000;
+ nz = res & 0xffffffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_MULU, SW): /* mulu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = UEXTSHORT ((UEXTSHORT (ea) * UEXTSHORT (rd)));
+
+ /* Don't set Z or N. */
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULU, SL): /* mulu.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = ea * rd;
+
+ /* Don't set Z or N. */
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULUU, SL): /* mulu/u.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* Compute upper 32 bits of the 64-bit result. */
+ res = (((unsigned long long) (unsigned) ea) *
+ ((unsigned long long) (unsigned) rd)) >> 32;
+
+ /* Don't set Z or N. */
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXS, SB): /* mulxs.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+ else
+ ea = SEXTCHAR (ea);
+
+ res = ea * SEXTCHAR (rd);
+
+ n = res & 0x8000;
+ nz = res & 0xffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXS, SW): /* mulxs.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfff0;
+ else
+ ea = SEXTSHORT (ea);
+
+ res = ea * SEXTSHORT (rd & 0xffff);
+
+ n = res & 0x80000000;
+ nz = res & 0xffffffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXU, SB): /* mulxu.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = UEXTCHAR (ea) * UEXTCHAR (rd);
+
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXU, SW): /* mulxu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = UEXTSHORT (ea) * UEXTSHORT (rd);
+
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_TAS, SB): /* tas, (test and set?) */
if (!h8300smode || code->src.type != X (OP_REG, SL))
goto illegal;
switch (code->src.reg)
@@ -2013,127 +3911,297 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
default:
goto illegal;
}
- res = fetch (&code->src);
- store (&code->src, res | 0x80);
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->src, res | 0x80))
+ goto end;
+
goto just_flags_log8;
- case O (O_DIVU, SB):
- {
- rd = GET_W_REG (code->dst.reg);
- ea = GET_B_REG (code->src.reg);
- if (ea)
- {
- tmp = (unsigned) rd % ea;
- rd = (unsigned) rd / ea;
- }
- SET_W_REG (code->dst.reg, (rd & 0xff) | (tmp << 8));
- n = ea & 0x80;
- nz = ea & 0xff;
+ case O (O_DIVU, SW): /* divu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
- goto next;
- }
- case O (O_DIVU, SW):
- {
- rd = GET_L_REG (code->dst.reg);
- ea = GET_W_REG (code->src.reg);
- n = ea & 0x8000;
- nz = ea & 0xffff;
- if (ea)
- {
- tmp = (unsigned) rd % ea;
- rd = (unsigned) rd / ea;
- }
- SET_L_REG (code->dst.reg, (rd & 0xffff) | (tmp << 16));
- goto next;
- }
+ n = ea & 0x8000;
+ nz = ea & 0xffff;
+ if (ea)
+ res = (unsigned) (UEXTSHORT (rd) / UEXTSHORT (ea));
+ else
+ res = 0;
- case O (O_DIVS, SB):
- {
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
- rd = SEXTSHORT (GET_W_REG (code->dst.reg));
- ea = SEXTCHAR (GET_B_REG (code->src.reg));
- if (ea)
- {
- tmp = (int) rd % (int) ea;
- rd = (int) rd / (int) ea;
- n = rd & 0x8000;
- nz = 1;
- }
- else
- nz = 0;
- SET_W_REG (code->dst.reg, (rd & 0xff) | (tmp << 8));
- goto next;
- }
- case O (O_DIVS, SW):
- {
- rd = GET_L_REG (code->dst.reg);
- ea = SEXTSHORT (GET_W_REG (code->src.reg));
- if (ea)
- {
- tmp = (int) rd % (int) ea;
- rd = (int) rd / (int) ea;
- n = rd & 0x80000000;
- nz = 1;
- }
- else
- nz = 0;
- SET_L_REG (code->dst.reg, (rd & 0xffff) | (tmp << 16));
- goto next;
- }
- case O (O_EXTS, SW):
- rd = GET_W_REG (code->src.reg) & 0xff; /* Yes, src, not dst. */
+ case O (O_DIVU, SL): /* divu.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ n = ea & 0x80000000;
+ nz = ea & 0xffffffff;
+ if (ea)
+ res = (unsigned) rd / ea;
+ else
+ res = 0;
+
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_DIVS, SW): /* divs.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ if (ea)
+ {
+ res = SEXTSHORT (rd) / SEXTSHORT (ea);
+ nz = 1;
+ }
+ else
+ {
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x8000;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_DIVS, SL): /* divs.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ if (ea)
+ {
+ res = rd / ea;
+ nz = 1;
+ }
+ else
+ {
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x80000000;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_DIVXU, SB): /* divxu.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ rd = UEXTSHORT (rd);
+ ea = UEXTCHAR (ea);
+
+ n = ea & 0x80;
+ nz = ea & 0xff;
+ if (ea)
+ {
+ tmp = (unsigned) rd % ea;
+ res = (unsigned) rd / ea;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ }
+
+ if (store (sd, &code->dst, (res & 0xffff) | (tmp << 8)))
+ goto end;
+ goto next;
+
+ case O (O_DIVXU, SW): /* divxu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ ea = UEXTSHORT (ea);
+
+ n = ea & 0x8000;
+ nz = ea & 0xffff;
+ if (ea)
+ {
+ tmp = (unsigned) rd % ea;
+ res = (unsigned) rd / ea;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ }
+
+ if (store (sd, &code->dst, (res & 0xffff) | (tmp << 16)))
+ goto end;
+ goto next;
+
+ case O (O_DIVXS, SB): /* divxs.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ rd = SEXTSHORT (rd);
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+ else
+ ea = SEXTCHAR (ea);
+
+ if (ea)
+ {
+ tmp = (int) rd % (int) ea;
+ res = (int) rd / (int) ea;
+ nz = 1;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x8000;
+ if (store (sd, &code->dst, (res & 0xff) | (tmp << 8)))
+ goto end;
+ goto next;
+
+ case O (O_DIVXS, SW): /* divxs.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+ else
+ ea = SEXTSHORT (ea);
+
+ if (ea)
+ {
+ tmp = (int) rd % (int) ea;
+ res = (int) rd / (int) ea;
+ nz = 1;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x80000000;
+ if (store (sd, &code->dst, (res & 0xffff) | (tmp << 16)))
+ goto end;
+ goto next;
+
+ case O (O_EXTS, SW): /* exts.w, signed extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
ea = rd & 0x80 ? -256 : 0;
- res = rd + ea;
+ res = (rd & 0xff) + ea;
goto log16;
- case O (O_EXTS, SL):
- rd = GET_W_REG (code->src.reg) & 0xffff;
+
+ case O (O_EXTS, SL): /* exts.l, signed extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (code->src.type == X (OP_IMM, SL))
+ {
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+
+ if (ea == 2) /* exts.l #2, nn */
+ {
+ /* Sign-extend from 8-bit to 32-bit. */
+ ea = rd & 0x80 ? -256 : 0;
+ res = (rd & 0xff) + ea;
+ goto log32;
+ }
+ }
+ /* Sign-extend from 16-bit to 32-bit. */
ea = rd & 0x8000 ? -65536 : 0;
- res = rd + ea;
+ res = (rd & 0xffff) + ea;
goto log32;
- case O (O_EXTU, SW):
- rd = GET_W_REG (code->src.reg) & 0xff;
+
+ case O (O_EXTU, SW): /* extu.w, unsigned extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
ea = 0;
- res = rd + ea;
+ res = (rd & 0xff) + ea;
goto log16;
- case O (O_EXTU, SL):
- rd = GET_W_REG (code->src.reg) & 0xffff;
+
+ case O (O_EXTU, SL): /* extu.l, unsigned extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (code->src.type == X (OP_IMM, SL))
+ {
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+
+ if (ea == 2) /* extu.l #2, nn */
+ {
+ /* Zero-extend from 8-bit to 32-bit. */
+ ea = 0;
+ res = (rd & 0xff) + ea;
+ goto log32;
+ }
+ }
+ /* Zero-extend from 16-bit to 32-bit. */
ea = 0;
- res = rd + ea;
+ res = (rd & 0xffff) + ea;
goto log32;
- case O (O_NOP, SN):
+ case O (O_NOP, SN): /* nop */
goto next;
- case O (O_STM, SL):
+ case O (O_STM, SL): /* stm, store to memory */
{
int nregs, firstreg, i;
nregs = GET_MEMORY_B (pc + 1);
nregs >>= 4;
nregs &= 0xf;
- firstreg = GET_MEMORY_B (pc + 3);
+ firstreg = code->src.reg;
firstreg &= 0xf;
for (i = firstreg; i <= firstreg + nregs; i++)
{
- cpu.regs[7] -= 4;
- SET_MEMORY_L (cpu.regs[7], cpu.regs[i]);
+ h8_set_reg (sd, SP_REGNUM, h8_get_reg (sd, SP_REGNUM) - 4);
+ SET_MEMORY_L (h8_get_reg (sd, SP_REGNUM), h8_get_reg (sd, i));
}
}
goto next;
- case O (O_LDM, SL):
+ case O (O_LDM, SL): /* ldm, load from memory */
{
int nregs, firstreg, i;
nregs = GET_MEMORY_B (pc + 1);
nregs >>= 4;
nregs &= 0xf;
- firstreg = GET_MEMORY_B (pc + 3);
+ firstreg = code->dst.reg;
firstreg &= 0xf;
for (i = firstreg; i >= firstreg - nregs; i--)
{
- cpu.regs[i] = GET_MEMORY_L (cpu.regs[7]);
- cpu.regs[7] += 4;
+ h8_set_reg (sd, i, GET_MEMORY_L (h8_get_reg (sd, SP_REGNUM)));
+ h8_set_reg (sd, SP_REGNUM, h8_get_reg (sd, SP_REGNUM) + 4);
}
}
goto next;
@@ -2141,73 +4209,91 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
case O (O_DAA, SB):
/* Decimal Adjust Addition. This is for BCD arithmetic. */
res = GET_B_REG (code->src.reg);
- if (!c && (0 <= (res >> 4) && (res >> 4) <= 9)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ if (!c && (0 <= (res >> 4) && (res >> 4) <= 9) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res; /* Value added == 0. */
- else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8)
- && !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8) &&
+ !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
res = res + 0x6; /* Value added == 6. */
- else if (!c && (0 <= (res >> 4) && (res >> 4) <= 9)
- && h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
+ else if (!c && (0 <= (res >> 4) && (res >> 4) <= 9) &&
+ h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
res = res + 0x6; /* Value added == 6. */
- else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res + 0x60; /* Value added == 60. */
- else if (!c && (9 <= (res >> 4) && (res >> 4) <= 15)
- && !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (!c && (9 <= (res >> 4) && (res >> 4) <= 15) &&
+ !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ res = res + 0x66; /* Value added == 66. */
+ else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15) &&
+ h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
res = res + 0x66; /* Value added == 66. */
- else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15)
- && h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
+ else if ( c && (1 <= (res >> 4) && (res >> 4) <= 2) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ res = res + 0x60; /* Value added == 60. */
+ else if ( c && (1 <= (res >> 4) && (res >> 4) <= 2) &&
+ !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ res = res + 0x66; /* Value added == 66. */
+ else if (c && (1 <= (res >> 4) && (res >> 4) <= 3) &&
+ h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
res = res + 0x66; /* Value added == 66. */
- else if (c && (1 <= (res >> 4) && (res >> 4) <= 2)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
- res = res + 0x160; /* Value added == 60, plus 'carry'. */
- else if (c && (1 <= (res >> 4) && (res >> 4) <= 2)
- && !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
- res = res + 0x166; /* Value added == 66, plus 'carry'. */
- else if (c && (1 <= (res >> 4) && (res >> 4) <= 3)
- && h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
- res = res + 0x166; /* Value added == 66, plus 'carry'. */
goto alu8;
case O (O_DAS, SB):
/* Decimal Adjust Subtraction. This is for BCD arithmetic. */
res = GET_B_REG (code->src.reg); /* FIXME fetch, fetch2... */
- if (!c && (0 <= (res >> 4) && (res >> 4) <= 9)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ if (!c && (0 <= (res >> 4) && (res >> 4) <= 9) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res; /* Value added == 0. */
- else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8)
- && h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8) &&
+ h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
res = res + 0xfa; /* Value added == 0xfa. */
- else if (c && (7 <= (res >> 4) && (res >> 4) <= 15)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ else if ( c && (7 <= (res >> 4) && (res >> 4) <= 15) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res + 0xa0; /* Value added == 0xa0. */
- else if (c && (6 <= (res >> 4) && (res >> 4) <= 15)
- && h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (c && (6 <= (res >> 4) && (res >> 4) <= 15) &&
+ h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
res = res + 0x9a; /* Value added == 0x9a. */
goto alu8;
default:
illegal:
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGILL;
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
goto end;
}
- abort ();
+
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_resume: internal error.\n");
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
+ goto end;
setc:
- if (code->dst.type == OP_CCR)
+ if (code->dst.type == X (OP_CCR, SB) ||
+ code->dst.type == X (OP_CCR, SW))
{
- cpu.ccr = res;
- GETSR ();
+ h8_set_ccr (sd, res);
+ /* Get Status Register (flags). */
+ c = (h8_get_ccr (sd) >> 0) & 1;
+ v = (h8_get_ccr (sd) >> 1) & 1;
+ nz = !((h8_get_ccr (sd) >> 2) & 1);
+ n = (h8_get_ccr (sd) >> 3) & 1;
+ u = (h8_get_ccr (sd) >> 4) & 1;
+ h = (h8_get_ccr (sd) >> 5) & 1;
+ ui = ((h8_get_ccr (sd) >> 6) & 1);
+ intMaskBit = (h8_get_ccr (sd) >> 7) & 1;
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (h8300smode &&
+ (code->dst.type == X (OP_EXR, SB) ||
+ code->dst.type == X (OP_EXR, SW)))
{
- cpu.exr = res;
- GETEXR ();
+ h8_set_exr (sd, res);
+ if (h8300smode) /* Get exr. */
+ {
+ trace = (h8_get_exr (sd) >> 7) & 1;
+ intMask = h8_get_exr (sd) & 7;
+ }
}
else
goto illegal;
@@ -2216,7 +4302,11 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
condtrue:
/* When a branch works */
- pc = code->src.literal;
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (res & 1) /* bad address */
+ goto illegal;
+ pc = code->next_pc + res;
goto end;
/* Set the cond codes from res */
@@ -2229,7 +4319,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = (rd & 0x7f) == 0x7f;
goto next;
-
/* Set the flags after an 16 bit inc/dec operation */
just_flags_inc16:
n = res & 0x8000;
@@ -2237,7 +4326,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = (rd & 0x7fff) == 0x7fff;
goto next;
-
/* Set the flags after an 32 bit inc/dec operation */
just_flags_inc32:
n = res & 0x80000000;
@@ -2245,30 +4333,34 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = (rd & 0x7fffffff) == 0x7fffffff;
goto next;
-
shift8:
/* Set flags after an 8 bit shift op, carry,overflow set in insn */
n = (rd & 0x80);
nz = rd & 0xff;
- SET_B_REG (code->src.reg, rd);
+ if (store2 (sd, &code->dst, rd))
+ goto end;
goto next;
shift16:
/* Set flags after an 16 bit shift op, carry,overflow set in insn */
n = (rd & 0x8000);
nz = rd & 0xffff;
- SET_W_REG (code->src.reg, rd);
+ if (store2 (sd, &code->dst, rd))
+ goto end;
goto next;
shift32:
/* Set flags after an 32 bit shift op, carry,overflow set in insn */
n = (rd & 0x80000000);
nz = rd & 0xffffffff;
- SET_L_REG (code->src.reg, rd);
+ if (store2 (sd, &code->dst, rd))
+ goto end;
goto next;
log32:
- store (&code->dst, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_log32:
/* flags after a 32bit logical operation */
n = res & 0x80000000;
@@ -2277,7 +4369,9 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
goto next;
log16:
- store (&code->dst, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_log16:
/* flags after a 16bit logical operation */
n = res & 0x8000;
@@ -2285,9 +4379,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = 0;
goto next;
-
log8:
- store (&code->dst, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_log8:
n = res & 0x80;
nz = res & 0xff;
@@ -2295,7 +4390,9 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
goto next;
alu8:
- SET_B_REG (code->dst.reg, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_alu8:
n = res & 0x80;
nz = res & 0xff;
@@ -2303,10 +4400,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
switch (code->opcode / 4)
{
case O_ADD:
+ case O_ADDX:
v = ((rd & 0x80) == (ea & 0x80)
&& (rd & 0x80) != (res & 0x80));
break;
case O_SUB:
+ case O_SUBX:
case O_CMP:
v = ((rd & 0x80) != (-ea & 0x80)
&& (rd & 0x80) != (res & 0x80));
@@ -2314,11 +4413,16 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
case O_NEG:
v = (rd == 0x80);
break;
+ case O_DAA:
+ case O_DAS:
+ break; /* No effect on v flag. */
}
goto next;
alu16:
- SET_W_REG (code->dst.reg, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_alu16:
n = res & 0x8000;
nz = res & 0xffff;
@@ -2326,10 +4430,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
switch (code->opcode / 4)
{
case O_ADD:
+ case O_ADDX:
v = ((rd & 0x8000) == (ea & 0x8000)
&& (rd & 0x8000) != (res & 0x8000));
break;
case O_SUB:
+ case O_SUBX:
case O_CMP:
v = ((rd & 0x8000) != (-ea & 0x8000)
&& (rd & 0x8000) != (res & 0x8000));
@@ -2341,18 +4447,23 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
goto next;
alu32:
- SET_L_REG (code->dst.reg, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_alu32:
n = res & 0x80000000;
nz = res & 0xffffffff;
switch (code->opcode / 4)
{
case O_ADD:
+ case O_ADDX:
v = ((rd & 0x80000000) == (ea & 0x80000000)
&& (rd & 0x80000000) != (res & 0x80000000));
- c = ((unsigned) res < (unsigned) rd) || ((unsigned) res < (unsigned) ea);
+ c = ((unsigned) res < (unsigned) rd) ||
+ ((unsigned) res < (unsigned) ea);
break;
case O_SUB:
+ case O_SUBX:
case O_CMP:
v = ((rd & 0x80000000) != (-ea & 0x80000000)
&& (rd & 0x80000000) != (res & 0x80000000));
@@ -2365,34 +4476,37 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
goto next;
- next:;
- pc = code->next_pc;
+ next:
+ if ((res = h8_get_delayed_branch (sd)) != 0)
+ {
+ pc = res;
+ h8_set_delayed_branch (sd, 0);
+ }
+ else
+ pc = code->next_pc;
end:
- ;
-#if 0
- if (cpu.regs[8])
- abort ();
-#endif
-
+
if (--poll_count < 0)
{
poll_count = POLL_QUIT_INTERVAL;
if ((*sim_callback->poll_quit) != NULL
&& (*sim_callback->poll_quit) (sim_callback))
- sim_stop (sd);
+ sim_engine_set_run_state (sd, sim_stopped, SIGINT);
}
+ sim_engine_get_run_state (sd, &reason, &sigrc);
+ } while (reason == sim_running);
- }
- while (cpu.state == SIM_STATE_RUNNING);
- cpu.ticks += get_now () - tick_start;
- cpu.cycles += cycles;
- cpu.insts += insts;
-
- cpu.pc = pc;
- BUILDSR ();
- BUILDEXR ();
- cpu.mask = oldmask;
+ h8_set_ticks (sd, h8_get_ticks (sd) + get_now () - tick_start);
+ h8_set_cycles (sd, h8_get_cycles (sd) + cycles);
+ h8_set_insts (sd, h8_get_insts (sd) + insts);
+ h8_set_pc (sd, pc);
+ BUILDSR (sd);
+
+ if (h8300smode)
+ h8_set_exr (sd, (trace<<7) | intMask);
+
+ h8_set_mask (sd, oldmask);
signal (SIGINT, prev);
}
@@ -2400,7 +4514,9 @@ int
sim_trace (SIM_DESC sd)
{
/* FIXME: Unfinished. */
- abort ();
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_trace: trace not supported.\n");
+ return 1; /* Done. */
}
int
@@ -2408,18 +4524,20 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
int i;
- init_pointers ();
+ init_pointers (sd);
if (addr < 0)
return 0;
for (i = 0; i < size; i++)
{
if (addr < memory_size)
{
- cpu.memory[addr + i] = buffer[i];
- cpu.cache_idx[addr + i] = 0;
+ h8_set_memory (sd, addr + i, buffer[i]);
+ h8_set_cache_idx (sd, addr + i, 0);
}
else
- cpu.eightbit[(addr + i) & 0xff] = buffer[i];
+ {
+ h8_set_eightbit (sd, (addr + i) & 0xff, buffer[i]);
+ }
}
return size;
}
@@ -2427,13 +4545,13 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
int
sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
- init_pointers ();
+ init_pointers (sd);
if (addr < 0)
return 0;
if (addr < memory_size)
- memcpy (buffer, cpu.memory + addr, size);
+ memcpy (buffer, h8_get_memory_buf (sd) + addr, size);
else
- memcpy (buffer, cpu.eightbit + (addr & 0xff), size);
+ memcpy (buffer, h8_get_eightbit_buf (sd) + (addr & 0xff), size);
return size;
}
@@ -2448,14 +4566,16 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
shortval = (value[0] << 8) | (value[1]);
intval = h8300hmode ? longval : shortval;
- init_pointers ();
+ init_pointers (sd);
switch (rn)
{
case PC_REGNUM:
- cpu.pc = intval;
+ h8_set_pc (sd, intval);
break;
default:
- abort ();
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_store_register: bad regnum %d.\n",
+ rn);
case R0_REGNUM:
case R1_REGNUM:
case R2_REGNUM:
@@ -2464,24 +4584,24 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
case R5_REGNUM:
case R6_REGNUM:
case R7_REGNUM:
- cpu.regs[rn] = intval;
+ h8_set_reg (sd, rn, intval);
break;
case CCR_REGNUM:
- cpu.ccr = intval;
+ h8_set_ccr (sd, intval);
break;
case EXR_REGNUM:
- cpu.exr = intval;
+ h8_set_exr (sd, intval);
break;
case CYCLE_REGNUM:
- cpu.cycles = longval;
+ h8_set_cycles (sd, longval);
break;
case INST_REGNUM:
- cpu.insts = longval;
+ h8_set_insts (sd, longval);
break;
case TICK_REGNUM:
- cpu.ticks = longval;
+ h8_set_ticks (sd, longval);
break;
}
return -1;
@@ -2493,22 +4613,26 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
int v;
int longreg = 0;
- init_pointers ();
+ init_pointers (sd);
if (!h8300smode && rn >= EXR_REGNUM)
rn++;
switch (rn)
{
default:
- abort ();
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_fetch_register: bad regnum %d.\n",
+ rn);
+ v = 0;
+ break;
case CCR_REGNUM:
- v = cpu.ccr;
+ v = h8_get_ccr (sd);
break;
case EXR_REGNUM:
- v = cpu.exr;
+ v = h8_get_exr (sd);
break;
case PC_REGNUM:
- v = cpu.pc;
+ v = h8_get_pc (sd);
break;
case R0_REGNUM:
case R1_REGNUM:
@@ -2518,18 +4642,18 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
case R5_REGNUM:
case R6_REGNUM:
case R7_REGNUM:
- v = cpu.regs[rn];
+ v = h8_get_reg (sd, rn);
break;
case CYCLE_REGNUM:
- v = cpu.cycles;
+ v = h8_get_cycles (sd);
longreg = 1;
break;
case TICK_REGNUM:
- v = cpu.ticks;
+ v = h8_get_ticks (sd);
longreg = 1;
break;
case INST_REGNUM:
- v = cpu.insts;
+ v = h8_get_insts (sd);
longreg = 1;
break;
}
@@ -2551,19 +4675,7 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
void
sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
{
-#if 0 /* FIXME: This should work but we can't use it.
- grep for SLEEP above. */
- switch (cpu.state)
- {
- case SIM_STATE_EXITED : *reason = sim_exited; break;
- case SIM_STATE_SIGNALLED : *reason = sim_signalled; break;
- case SIM_STATE_STOPPED : *reason = sim_stopped; break;
- default : abort ();
- }
-#else
- *reason = sim_stopped;
-#endif
- *sigrc = cpu.exception;
+ sim_engine_get_run_state (sd, reason, sigrc);
}
/* FIXME: Rename to sim_set_mem_size. */
@@ -2574,36 +4686,36 @@ sim_size (int n)
/* Memory size is fixed. */
}
-void
-sim_set_simcache_size (int n)
+static void
+set_simcache_size (SIM_DESC sd, int n)
{
- if (cpu.cache)
- free (cpu.cache);
+ if (sd->sim_cache)
+ free (sd->sim_cache);
if (n < 2)
n = 2;
- cpu.cache = (decoded_inst *) malloc (sizeof (decoded_inst) * n);
- memset (cpu.cache, 0, sizeof (decoded_inst) * n);
- cpu.csize = n;
+ sd->sim_cache = (decoded_inst *) malloc (sizeof (decoded_inst) * n);
+ memset (sd->sim_cache, 0, sizeof (decoded_inst) * n);
+ sd->sim_cache_size = n;
}
void
sim_info (SIM_DESC sd, int verbose)
{
- double timetaken = (double) cpu.ticks / (double) now_persec ();
- double virttime = cpu.cycles / 10.0e6;
+ double timetaken = (double) h8_get_ticks (sd) / (double) now_persec ();
+ double virttime = h8_get_cycles (sd) / 10.0e6;
(*sim_callback->printf_filtered) (sim_callback,
"\n\n#instructions executed %10d\n",
- cpu.insts);
+ h8_get_insts (sd));
(*sim_callback->printf_filtered) (sim_callback,
"#cycles (v approximate) %10d\n",
- cpu.cycles);
+ h8_get_cycles (sd));
(*sim_callback->printf_filtered) (sim_callback,
"#real time taken %10.4f\n",
timetaken);
(*sim_callback->printf_filtered) (sim_callback,
- "#virtual time taked %10.4f\n",
+ "#virtual time taken %10.4f\n",
virttime);
if (timetaken != 0.0)
(*sim_callback->printf_filtered) (sim_callback,
@@ -2611,10 +4723,10 @@ sim_info (SIM_DESC sd, int verbose)
virttime / timetaken);
(*sim_callback->printf_filtered) (sim_callback,
"#compiles %10d\n",
- cpu.compiles);
+ h8_get_compiles (sd));
(*sim_callback->printf_filtered) (sim_callback,
"#cache size %10d\n",
- cpu.csize);
+ sd->sim_cache_size);
#ifdef ADEBUG
/* This to be conditional on `what' (aka `verbose'),
@@ -2624,9 +4736,9 @@ sim_info (SIM_DESC sd, int verbose)
int i;
for (i = 0; i < O_LAST; i++)
{
- if (cpu.stats[i])
- (*sim_callback->printf_filtered) (sim_callback,
- "%d: %d\n", i, cpu.stats[i]);
+ if (h8_get_stats (sd, i))
+ (*sim_callback->printf_filtered) (sim_callback, "%d: %d\n",
+ i, h8_get_stats (sd, i));
}
}
#endif
@@ -2636,28 +4748,105 @@ sim_info (SIM_DESC sd, int verbose)
FLAG is non-zero for the H8/300H. */
void
-set_h8300h (int h_flag, int s_flag)
+set_h8300h (unsigned long machine)
{
/* FIXME: Much of the code in sim_load can be moved to sim_open.
This function being replaced by a sim_open:ARGV configuration
option. */
- h8300hmode = h_flag;
- h8300smode = s_flag;
+
+ if (machine == bfd_mach_h8300sx)
+ h8300sxmode = 1;
+
+ if (machine == bfd_mach_h8300s || machine == bfd_mach_h8300sn || h8300sxmode)
+ h8300smode = 1;
+
+ if (machine == bfd_mach_h8300h || machine == bfd_mach_h8300hn || h8300smode)
+ h8300hmode = 1;
+}
+
+/* Cover function of sim_state_free to free the cpu buffers as well. */
+
+static void
+free_state (SIM_DESC sd)
+{
+ if (STATE_MODULES (sd) != NULL)
+ sim_module_uninstall (sd);
+
+ /* Fixme: free buffers in _sim_cpu. */
+ sim_state_free (sd);
}
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
- struct host_callback_struct *ptr,
+ struct host_callback_struct *callback,
struct bfd *abfd,
char **argv)
{
+ SIM_DESC sd;
+ sim_cpu *cpu;
+
+ sd = sim_state_alloc (kind, callback);
+ sd->cpu = sim_cpu_alloc (sd, 0);
+ cpu = STATE_CPU (sd, 0);
+ SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
+ sim_state_initialize (sd, cpu);
+ /* sim_cpu object is new, so some initialization is needed. */
+ init_pointers_needed = 1;
+
+ /* For compatibility (FIXME: is this right?). */
+ current_alignment = NONSTRICT_ALIGNMENT;
+ current_target_byte_order = BIG_ENDIAN;
+
+ if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
+ {
+ free_state (sd);
+ return 0;
+ }
+
+ /* getopt will print the error message so we just have to exit if
+ this fails. FIXME: Hmmm... in the case of gdb we need getopt
+ to call print_filtered. */
+ if (sim_parse_args (sd, argv) != SIM_RC_OK)
+ {
+ /* Uninstall the modules to avoid memory leaks,
+ file descriptor leaks, etc. */
+ free_state (sd);
+ return 0;
+ }
+
+ /* Check for/establish the a reference program image. */
+ if (sim_analyze_program (sd,
+ (STATE_PROG_ARGV (sd) != NULL
+ ? *STATE_PROG_ARGV (sd)
+ : NULL), abfd) != SIM_RC_OK)
+ {
+ free_state (sd);
+ return 0;
+ }
+
+ /* Establish any remaining configuration options. */
+ if (sim_config (sd) != SIM_RC_OK)
+ {
+ free_state (sd);
+ return 0;
+ }
+
+ if (sim_post_argv_init (sd) != SIM_RC_OK)
+ {
+ /* Uninstall the modules to avoid memory leaks,
+ file descriptor leaks, etc. */
+ free_state (sd);
+ return 0;
+ }
+
+ /* sim_hw_configure (sd); */
+
/* FIXME: Much of the code in sim_load can be moved here. */
sim_kind = kind;
myname = argv[0];
- sim_callback = ptr;
- /* Fudge our descriptor. */
- return (SIM_DESC) 1;
+ sim_callback = callback;
+ return sd;
}
void
@@ -2689,9 +4878,7 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
and bfd_openr as sim_load_file checks too. */
if (bfd_check_format (prog_bfd, bfd_object))
{
- unsigned long mach = bfd_get_mach (prog_bfd);
- set_h8300h (mach == bfd_mach_h8300h || mach == bfd_mach_h8300s,
- mach == bfd_mach_h8300s);
+ set_h8300h (bfd_get_mach (prog_bfd));
}
}
@@ -2717,21 +4904,27 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
else
memory_size = H8300_MSIZE;
- if (cpu.memory)
- free (cpu.memory);
- if (cpu.cache_idx)
- free (cpu.cache_idx);
- if (cpu.eightbit)
- free (cpu.eightbit);
+ if (h8_get_memory_buf (sd))
+ free (h8_get_memory_buf (sd));
+ if (h8_get_cache_idx_buf (sd))
+ free (h8_get_cache_idx_buf (sd));
+ if (h8_get_eightbit_buf (sd))
+ free (h8_get_eightbit_buf (sd));
- cpu.memory = (unsigned char *) calloc (sizeof (char), memory_size);
- cpu.cache_idx = (unsigned short *) calloc (sizeof (short), memory_size);
- cpu.eightbit = (unsigned char *) calloc (sizeof (char), 256);
+ h8_set_memory_buf (sd, (unsigned char *)
+ calloc (sizeof (char), memory_size));
+ h8_set_cache_idx_buf (sd, (unsigned short *)
+ calloc (sizeof (short), memory_size));
+ h8_set_eightbit_buf (sd, (unsigned char *) calloc (sizeof (char), 256));
/* `msize' must be a power of two. */
if ((memory_size & (memory_size - 1)) != 0)
- abort ();
- cpu.mask = memory_size - 1;
+ {
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_load: bad memory size.\n");
+ return SIM_RC_FAIL;
+ }
+ h8_set_mask (sd, memory_size - 1);
if (sim_load_file (sd, myname, sim_callback, prog, prog_bfd,
sim_kind == SIM_OPEN_DEBUG,
@@ -2756,11 +4949,11 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
int i = 0;
int len_arg = 0;
int no_of_args = 0;
-
+
if (abfd != NULL)
- cpu.pc = bfd_get_start_address (abfd);
+ h8_set_pc (sd, bfd_get_start_address (abfd));
else
- cpu.pc = 0;
+ h8_set_pc (sd, 0);
/* Command Line support. */
if (argv != NULL)
@@ -2770,18 +4963,15 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
continue;
/* Allocating memory for the argv pointers. */
- ptr_command_line = (char **) malloc ((sizeof (char *))
- * (no_of_args + 1));
+ h8_set_command_line (sd, (char **) malloc ((sizeof (char *))
+ * (no_of_args + 1)));
for (i = 0; i < no_of_args; i++)
{
- /* Calculating the length of argument for allocating memory. */
- len_arg = strlen (argv[i] + 1);
- ptr_command_line[i] = (char *) malloc (sizeof (char) * len_arg);
/* Copying the argument string. */
- ptr_command_line[i] = (char *) strdup (argv[i]);
+ h8_set_cmdline_arg (sd, i, (char *) strdup (argv[i]));
}
- ptr_command_line[i] = NULL;
+ h8_set_cmdline_arg (sd, i, NULL);
}
return SIM_RC_OK;
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
new file mode 100644
index 00000000000..11fc3204759
--- /dev/null
+++ b/sim/h8300/sim-main.h
@@ -0,0 +1,170 @@
+/* Main header for the Hitachi h8/300 architecture. */
+
+#include "bfd.h"
+
+#ifndef SIM_MAIN_H
+#define SIM_MAIN_H
+
+#define DEBUG
+
+/* These define the size of main memory for the simulator.
+
+ Note the size of main memory for the H8/300H is only 256k. Keeping it
+ small makes the simulator run much faster and consume less memory.
+
+ The linker knows about the limited size of the simulator's main memory
+ on the H8/300H (via the h8300h.sc linker script). So if you change
+ H8300H_MSIZE, be sure to fix the linker script too.
+
+ Also note that there's a separate "eightbit" area aside from main
+ memory. For simplicity, the simulator assumes any data memory reference
+ outside of main memory refers to the eightbit area (in theory, this
+ can only happen when simulating H8/300H programs). We make no attempt
+ to catch overlapping addresses, wrapped addresses, etc etc. */
+
+#define H8300_MSIZE (1 << 16)
+
+/* avolkov:
+ Next 2 macros are ugly for any workstation, but while they're work.
+ Memory size MUST be configurable. */
+#define H8300H_MSIZE (1 << 18)
+#define H8300S_MSIZE (1 << 24)
+
+#define CSIZE 1024
+
+enum h8_regnum {
+ R0_REGNUM = 0,
+ R1_REGNUM = 1,
+ R2_REGNUM = 2,
+ R3_REGNUM = 3,
+ R4_REGNUM = 4,
+ R5_REGNUM = 5,
+ R6_REGNUM = 6,
+ R7_REGNUM = 7,
+
+ SP_REGNUM = R7_REGNUM, /* Contains address of top of stack */
+ FP_REGNUM = R6_REGNUM, /* Contains address of executing
+ stack frame */
+ CCR_REGNUM = 8, /* Contains processor status */
+ PC_REGNUM = 9, /* Contains program counter */
+ CYCLE_REGNUM = 10,
+ EXR_REGNUM = 11,
+ INST_REGNUM = 12,
+ TICK_REGNUM = 13,
+ SBR_REGNUM = 14,
+ VBR_REGNUM = 15,
+ MACH_REGNUM = 16,
+ MACL_REGNUM = 17,
+
+ ZERO_REGNUM = 18
+};
+
+enum h8_typecodes {
+ OP_NULL,
+ OP_REG, /* Register direct. */
+ OP_LOWREG, /* Special reg syntax for "bra". */
+ OP_DISP, /* Register indirect w/displacement. */
+ /* Note: h8300, h8300h, and h8300s permit only pre-decr and post-incr. */
+ OP_PREDEC, /* Register indirect w/pre-decrement. */
+ OP_POSTDEC, /* Register indirect w/post-decrement. */
+ OP_PREINC, /* Register indirect w/pre-increment. */
+ OP_POSTINC, /* Register indirect w/post-increment. */
+ OP_PCREL, /* PC Relative. */
+ OP_MEM, /* Absolute memory address. */
+ OP_CCR, /* Condition Code Register. */
+ OP_IMM, /* Immediate value. */
+ /*OP_ABS*/ /* Un-used (duplicates op_mem?). */
+ OP_EXR, /* EXtended control Register. */
+ OP_SBR, /* Vector Base Register. */
+ OP_VBR, /* Short-address Base Register. */
+ OP_MACH, /* Multiply Accumulator - high. */
+ OP_MACL, /* Multiply Accumulator - low. */
+ /* FIXME: memory indirect? */
+ OP_INDEXB, /* Byte index mode */
+ OP_INDEXW, /* Word index mode */
+ OP_INDEXL /* Long index mode */
+};
+
+#include "sim-basics.h"
+
+/* Define sim_cia. */
+typedef unsigned32 sim_cia;
+
+#include "sim-base.h"
+
+/* Structure used to describe addressing */
+
+typedef struct
+{
+ int type;
+ int reg;
+ int literal;
+} ea_type;
+
+/* Struct for instruction decoder. */
+typedef struct
+{
+ ea_type src;
+ ea_type dst;
+ ea_type op3;
+ int opcode;
+ int next_pc;
+ int oldpc;
+ int cycles;
+#ifdef DEBUG
+ struct h8_opcode *op;
+#endif
+} decoded_inst;
+
+struct _sim_cpu {
+ unsigned int regs[20]; /* 8 GR's plus ZERO, SBR, and VBR. */
+ unsigned int pc;
+
+ int macS; /* MAC Saturating mode */
+ int macV; /* MAC Overflow */
+ int macN; /* MAC Negative */
+ int macZ; /* MAC Zero */
+
+ int delayed_branch;
+ char **command_line; /* Pointer to command line arguments. */
+
+ unsigned char *memory;
+ unsigned char *eightbit;
+ int mask;
+
+ sim_cpu_base base;
+};
+
+/* The sim_state struct. */
+struct sim_state {
+ struct _sim_cpu *cpu;
+ unsigned int sim_cache_size;
+ decoded_inst *sim_cache;
+ unsigned short *cache_idx;
+ unsigned long memory_size;
+ int cache_top;
+ int compiles;
+#ifdef ADEBUG
+ int stats[O_LAST];
+#endif
+ sim_state_base base;
+};
+
+/* The current state of the processor; registers, memory, etc. */
+
+#define CIA_GET(CPU) (cpu_get_pc (CPU))
+#define CIA_SET(CPU, VAL) (cpu_set_pc ((CPU), (VAL)))
+#define STATE_CPU(SD, N) ((SD)->cpu) /* Single Processor. */
+#define cpu_set_pc(CPU, VAL) (((CPU)->pc) = (VAL))
+#define cpu_get_pc(CPU) (((CPU)->pc))
+
+/* Magic numbers used to distinguish an exit from a breakpoint. */
+#define LIBC_EXIT_MAGIC1 0xdead
+#define LIBC_EXIT_MAGIC2 0xbeef
+/* Local version of macros for decoding exit status.
+ (included here rather than try to find target version of wait.h)
+*/
+#define SIM_WIFEXITED(V) (((V) & 0xff) == 0)
+#define SIM_WEXITSTATUS(V) ((V) >> 8)
+
+#endif /* SIM_MAIN_H */